Update readme documentation, fix crash when driving, fix airship crafting recipes, and add support for subtitles mod.

This commit is contained in:
MysticTempest 2023-06-05 14:17:06 -05:00
parent d48df74c47
commit 22c4063ead
4 changed files with 47 additions and 13 deletions

View file

@ -1,4 +1,19 @@
# sum_airship # sum_airship
Mod for minetest Mod for minetest
[ContentDB](https://content.minetest.net/packages/Sumianvoice/sum_airship/) [ContentDB](https://content.minetest.net/packages/Sumianvoice/sum_airship/)
This adds an airship to minetest_game or mcl2. Not tested on any other games. If it uses default:steel_ingot or mcl_core:iron_ingot for example, then it should work. It should not crash no matter what game you use though, this is only for the crafting recipes. The dependency on MTG or MCL2 is only for crafting, otherwise the ship it self can still be used just not crafted (because I don't know what your game calls each item / node etc)
Flies like a boat, WSAD, jump and aux1 (sprint) for up and down. Shift to dismount. Does not require fuel but will go faster when given any type of coal.
### Crafting (mcl)
Craftable with wool > canvas and boats > hull. All items: wool: 27, string: 4, wood: 15, iron_ingot: 4
#### Crafting Guide GIF:
![airship%20crafting.gif](airship%20crafting.gif)
### Air Currents
This optionally uses [sum_air_currents](https://content.minetest.net/packages/Sumianvoice/sum_air_currents/) to apply force based on the weather. Both this mod and the air currents mod are in development so expect changes made regularly.

View file

@ -311,12 +311,12 @@ function ship.on_step(self, dtime, moveresult)
end end
if pi then if pi then
if pi.ctrl.up then forward = 1 if pi.up then forward = 1
elseif pi.ctrl.down then forward = -1 end elseif pi.down then forward = -1 end
if pi.ctrl.jump then climb = 1 if pi.jump then climb = 1
elseif pi.ctrl.aux1 then climb = -1 end elseif pi.aux1 then climb = -1 end
if pi.ctrl.right then right = 1 if pi.right then right = 1
elseif pi.ctrl.left then right = -1 end elseif pi.left then right = -1 end
local yaw = self.object:get_yaw() local yaw = self.object:get_yaw()
local dir = minetest.yaw_to_dir(yaw) local dir = minetest.yaw_to_dir(yaw)
@ -429,4 +429,9 @@ minetest.register_craftitem("sum_airship:boat", {
}) })
-- Support SilverSandstone's subtitles mod:
if minetest.get_modpath("subtitles") then
subtitles.register_description('sum_airship_lip_trill', 'Engine purring');
subtitles.register_description('sum_airship_lip_trill_end', 'Engine sputtering');
subtitles.register_description('sum_airship_fire', 'Engine stoked');
end

View file

@ -15,17 +15,21 @@ minetest.register_craftitem("sum_airship:hull", {
stack_max = 1, stack_max = 1,
groups = { craftitem = 1 }, groups = { craftitem = 1 },
}) })
if true then
local w = "group:wool" local w = "group:wool"
if not minetest.get_modpath("farming") then w = "default:paper" end if not minetest.get_modpath("farming") then w = "default:paper" end
local b = "default:boat" local b = "boats:boat"
local m = "default:steel_ingot" local m = "default:steel_ingot"
local s = "farming:string"
if minetest.get_modpath("mcl_boats") if minetest.get_modpath("mcl_boats")
and minetest.get_modpath("mcl_wool") and minetest.get_modpath("mcl_wool")
and minetest.get_modpath("mcl_core") then and minetest.get_modpath("mcl_core")
and minetest.get_modpath("mcl_mobitems") then
w = "group:wool" w = "group:wool"
b = "mcl_boats:boat" b = "group:boat"
m = "mcl_core:iron_ingot" m = "mcl_core:iron_ingot"
s = "mcl_mobitems:string"
end end
minetest.register_craft({ minetest.register_craft({
output = "sum_airship:canvas_roll", output = "sum_airship:canvas_roll",
@ -42,4 +46,13 @@ if true then
{m, m, m}, {m, m, m},
}, },
}) })
end
minetest.register_craft({
output = "sum_airship:boat",
recipe = {
{"sum_airship:canvas_roll","sum_airship:canvas_roll","sum_airship:canvas_roll",},
{s, m, s,},
{s, "sum_airship:hull", s,},
},
})

View file

@ -2,3 +2,4 @@ local mod_name = minetest.get_current_modname()
local mod_path = minetest.get_modpath(mod_name) local mod_path = minetest.get_modpath(mod_name)
dofile(mod_path .. DIR_DELIM .. "balloon.lua") dofile(mod_path .. DIR_DELIM .. "balloon.lua")
dofile(mod_path .. DIR_DELIM .. "crafts.lua")