mirror of
https://codeberg.org/SumianVoice/sum_airship.git
synced 2025-03-22 15:42:21 +00:00
Update init.lua, airship_boat.blend, and 6 more files...
This commit is contained in:
parent
1237b8a18f
commit
0ada6ac962
8 changed files with 13 additions and 6 deletions
17
init.lua
17
init.lua
|
@ -1,8 +1,6 @@
|
||||||
local S = minetest.get_translator(minetest.get_current_modname())
|
local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
|
|
||||||
|
|
||||||
local S = minetest.get_translator(minetest.get_current_modname())
|
|
||||||
|
|
||||||
local boat_visual_size = {x = 1, y = 1, z = 1}
|
local boat_visual_size = {x = 1, y = 1, z = 1}
|
||||||
local paddling_speed = 22
|
local paddling_speed = 22
|
||||||
local boat_y_offset = 0.35
|
local boat_y_offset = 0.35
|
||||||
|
@ -107,6 +105,10 @@ local function detach_object(obj, change_pos)
|
||||||
if change_pos then
|
if change_pos then
|
||||||
obj:set_pos(vector.add(obj:get_pos(), vector.new(0, 0.2, 0)))
|
obj:set_pos(vector.add(obj:get_pos(), vector.new(0, 0.2, 0)))
|
||||||
end
|
end
|
||||||
|
obj:set_pos(vector.add(obj:get_pos(), vector.new(0, 0.5, 0)))
|
||||||
|
minetest.after(0.01, function(obj, change_pos)
|
||||||
|
obj:set_pos(vector.add(obj:get_pos(), vector.new(0, 0.5, 0)))
|
||||||
|
end, obj, change_pos)
|
||||||
end
|
end
|
||||||
|
|
||||||
--
|
--
|
||||||
|
@ -118,11 +120,15 @@ local boat = {
|
||||||
pointable = true,
|
pointable = true,
|
||||||
-- Warning: Do not change the position of the collisionbox top surface,
|
-- Warning: Do not change the position of the collisionbox top surface,
|
||||||
-- lowering it causes the boat to fall through the world if underwater
|
-- lowering it causes the boat to fall through the world if underwater
|
||||||
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},
|
||||||
|
collisionbox = {-0.6, -0.2, -1.6, 0.6, 0.3, 0.6},
|
||||||
selectionbox = {-0.7, -0.35, -0.7, 0.7, 0.3, 0.7},
|
selectionbox = {-0.7, -0.35, -0.7, 0.7, 0.3, 0.7},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "sum_airship_boat.b3d",
|
mesh = "sum_airship_boat.b3d",
|
||||||
textures = {"sum_airship_texture_oak_boat.png", "sum_airship_texture_oak_boat.png", "sum_airship_texture_oak_boat.png", "sum_airship_texture_oak_boat.png", "sum_airship_texture_oak_boat.png"},
|
textures = {"sum_airship_texture_oak_boat.png"},
|
||||||
|
animations = {
|
||||||
|
idle = {x= 0, y= 7},
|
||||||
|
},
|
||||||
visual_size = boat_visual_size,
|
visual_size = boat_visual_size,
|
||||||
hp_max = boat_max_hp,
|
hp_max = boat_max_hp,
|
||||||
damage_texture_modifier = "^[colorize:white:0",
|
damage_texture_modifier = "^[colorize:white:0",
|
||||||
|
@ -150,6 +156,7 @@ end
|
||||||
|
|
||||||
function boat.on_activate(self, staticdata, dtime_s)
|
function boat.on_activate(self, staticdata, dtime_s)
|
||||||
self.object:set_armor_groups({fleshy = 100})
|
self.object:set_armor_groups({fleshy = 100})
|
||||||
|
self.object:set_animation({x = 0, y = 7}, 25)
|
||||||
local data = minetest.deserialize(staticdata)
|
local data = minetest.deserialize(staticdata)
|
||||||
if type(data) == "table" then
|
if type(data) == "table" then
|
||||||
self._v = data.v
|
self._v = data.v
|
||||||
|
@ -341,7 +348,7 @@ function boat.on_step(self, dtime, moveresult)
|
||||||
end
|
end
|
||||||
|
|
||||||
local v = self.object:get_velocity()
|
local v = self.object:get_velocity()
|
||||||
v = vector.multiply(v, 0.97)
|
v = vector.multiply(v, 0.98)
|
||||||
self.object:set_velocity(v)
|
self.object:set_velocity(v)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
textures/canvas.png
Normal file
BIN
textures/canvas.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 684 B |
Binary file not shown.
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 17 KiB |
Loading…
Add table
Reference in a new issue