mirror of
https://codeberg.org/SumianVoice/sum_airship.git
synced 2025-03-15 04:11:23 +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
19
init.lua
19
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 boat_visual_size = {x = 1, y = 1, z = 1}
|
||||
local paddling_speed = 22
|
||||
local boat_y_offset = 0.35
|
||||
|
@ -105,8 +103,12 @@ local function detach_object(obj, change_pos)
|
|||
obj:get_luaentity()._old_visual_size = nil
|
||||
end
|
||||
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
|
||||
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
|
||||
|
||||
--
|
||||
|
@ -118,11 +120,15 @@ local boat = {
|
|||
pointable = true,
|
||||
-- Warning: Do not change the position of the collisionbox top surface,
|
||||
-- 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},
|
||||
visual = "mesh",
|
||||
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,
|
||||
hp_max = boat_max_hp,
|
||||
damage_texture_modifier = "^[colorize:white:0",
|
||||
|
@ -150,6 +156,7 @@ end
|
|||
|
||||
function boat.on_activate(self, staticdata, dtime_s)
|
||||
self.object:set_armor_groups({fleshy = 100})
|
||||
self.object:set_animation({x = 0, y = 7}, 25)
|
||||
local data = minetest.deserialize(staticdata)
|
||||
if type(data) == "table" then
|
||||
self._v = data.v
|
||||
|
@ -341,7 +348,7 @@ function boat.on_step(self, dtime, moveresult)
|
|||
end
|
||||
|
||||
local v = self.object:get_velocity()
|
||||
v = vector.multiply(v, 0.97)
|
||||
v = vector.multiply(v, 0.98)
|
||||
self.object:set_velocity(v)
|
||||
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