Update boat textures to Faithful

This commit is contained in:
Wuzzy 2017-06-12 23:50:42 +02:00
parent 3c0eade540
commit 5dc2037de1
14 changed files with 15 additions and 13 deletions

View file

@ -39,7 +39,7 @@ local boat = {
collisionbox = {-0.5, -0.35, -0.5, 0.5, 0.3, 0.5}, collisionbox = {-0.5, -0.35, -0.5, 0.5, 0.3, 0.5},
visual = "mesh", visual = "mesh",
mesh = "boat.b3d", mesh = "boat.b3d",
textures = {"boat.png"}, textures = {"mcl_boats_texture_oak_boat.png"},
visual_size = {x=3, y=3}, visual_size = {x=3, y=3},
rotate = -180, rotate = -180,
animation = { animation = {
@ -48,6 +48,7 @@ local boat = {
walk_start = 0, walk_end = 40, walk_start = 0, walk_end = 40,
run_start = 0, run_end = 40, run_start = 0, run_end = 40,
}, },
driver = nil, driver = nil,
v = 0, v = 0,
last_v = 0, last_v = 0,
@ -94,15 +95,19 @@ end
function boat.on_activate(self, staticdata, dtime_s) function boat.on_activate(self, staticdata, dtime_s)
self.object:set_armor_groups({immortal = 1}) self.object:set_armor_groups({immortal = 1})
if staticdata then if type(staticdata) == "table" then
self.v = tonumber(staticdata) self.v = staticdata.v
self._itemstring = staticdata._itemstring
end end
self.last_v = self.v self.last_v = self.v
end end
function boat.get_staticdata(self) function boat.get_staticdata(self)
return tostring(self.v) return {
v = self.v,
_itemstring = self._itemstring,
}
end end
@ -118,15 +123,10 @@ function boat.on_punch(self, puncher)
if not self.driver then if not self.driver then
self.removed = true self.removed = true
local inv = puncher:get_inventory() local inv = puncher:get_inventory()
if not (creative and creative.is_enabled_for -- Drop boat as item on the ground after punching
and creative.is_enabled_for(puncher:get_player_name())) if not minetest.setting_getbool("creative_mode") then
or not inv:contains_item("main", "mcl_boats:boat") then
local leftover = inv:add_item("main", "mcl_boats:boat")
-- if no room in inventory add a replacement boat to the world
if not leftover:is_empty() then
minetest.add_item(self.object:getpos(), leftover) minetest.add_item(self.object:getpos(), leftover)
end end
end
-- delay remove to ensure player is detached -- delay remove to ensure player is detached
minetest.after(0.1, function() minetest.after(0.1, function()
self.object:remove() self.object:remove()
@ -253,7 +253,9 @@ for b=1, #boat_ids do
return return
end end
pointed_thing.under.y = pointed_thing.under.y+0.5 pointed_thing.under.y = pointed_thing.under.y+0.5
minetest.add_entity(pointed_thing.under, itemstring) local boat = minetest.add_entity(pointed_thing.under, itemstring)
boat:get_luaentity()._itemstring = itemstring
boat:set_properties({textures = { "mcl_boats_texture_"..images[b].."_boat.png" }})
if not minetest.setting_getbool("creative_mode") then if not minetest.setting_getbool("creative_mode") then
itemstack:take_item() itemstack:take_item()
end end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB