Update init.lua, mod.conf, and 6 more files...

This commit is contained in:
Sumyjkl 2022-08-06 14:30:40 +10:00
parent 0ada6ac962
commit 28735108ce
8 changed files with 50 additions and 10 deletions

View file

@ -8,6 +8,41 @@ local boat_y_offset_ground = boat_y_offset + 0.6
local boat_side_offset = 1.001 local boat_side_offset = 1.001
local boat_max_hp = 4 local boat_max_hp = 4
minetest.register_craftitem("sum_airship:canvas_roll", {
description = S("Canvas Roll"),
_doc_items_longdesc = S("Used in crafting airships."),
inventory_image = "sum_airship_canvas.png",
stack_max = 64,
groups = { craftitem=1 },
})
minetest.register_craftitem("sum_airship:hull", {
description = S("Airship Hull"),
_doc_items_longdesc = S("Used in crafting airships."),
inventory_image = "sum_airship_hull.png",
stack_max = 1,
groups = { craftitem=1 },
})
if true then
local b = "mcl_boats:boat"
local w = "mcl_wool:white"
minetest.register_craft({
output = "sum_airship:canvas_roll",
recipe = {
{w, w, w},
{w, w, w},
{w, w, w},
},
})
minetest.register_craft({
output = "sum_airship:hull",
recipe = {
{b, b, b},
},
})
end
local function is_group(pos, group) local function is_group(pos, group)
local nn = minetest.get_node(pos).name local nn = minetest.get_node(pos).name
return minetest.get_item_group(nn, group) ~= 0 return minetest.get_item_group(nn, group) ~= 0
@ -156,7 +191,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) self.object:set_animation({x = 0, y = 80}, 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
@ -355,8 +390,8 @@ end
-- Register one entity for all boat types -- Register one entity for all boat types
minetest.register_entity("sum_airship:boat", boat) minetest.register_entity("sum_airship:boat", boat)
local boat_ids = { "boat" } local boat_ids = { "main" }
local names = { S("Oak Boat") } local names = { S("Oak Airship") }
local craftstuffs = {} local craftstuffs = {}
if minetest.get_modpath("mcl_core") then if minetest.get_modpath("mcl_core") then
craftstuffs = { "mcl_core:wood" } craftstuffs = { "mcl_core:wood" }
@ -371,11 +406,11 @@ for b=1, #boat_ids do
-- Only create one help entry for all boats -- Only create one help entry for all boats
if b == 1 then if b == 1 then
help = true help = true
longdesc = S("Boats are used to travel on the surface of water.") longdesc = S("Airship are used to travel in the air and stuff.")
usagehelp = S("Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Use [Sneak] to leave the boat, punch the boat to make it drop as an item.") usagehelp = S("thing")
helpname = S("Boat") helpname = S("Airship")
end end
tt_help = S("Water vehicle") tt_help = S("Air vehicle")
minetest.register_craftitem(itemstring, { minetest.register_craftitem(itemstring, {
description = names[b], description = names[b],
@ -434,11 +469,16 @@ for b=1, #boat_ids do
}) })
local c = craftstuffs[b] local c = craftstuffs[b]
local cvs = "sum_airship:canvas_roll"
local sng = "mcl_mobitems:string"
local iro = "mcl_core:iron_ingot"
local hul = "sum_airship:hull"
minetest.register_craft({ minetest.register_craft({
output = itemstring, output = itemstring,
recipe = { recipe = {
{c, "", c}, {cvs, cvs, cvs},
{c, c, c}, {sng, iro, sng},
{sng, hul, sng},
}, },
}) })
end end

View file

@ -1,4 +1,4 @@
name = sum_airship name = sum_airship
author = Sumi author = Sumi
description = airship description = airship
depends = mcl_core depends = mcl_core, mcl_wool, mcl_mobitems

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 744 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 267 B

After

Width:  |  Height:  |  Size: 2.3 KiB