From 22c4063ead01324ceae42f468b46329f6f345d9d Mon Sep 17 00:00:00 2001 From: MysticTempest Date: Mon, 5 Jun 2023 14:17:06 -0500 Subject: [PATCH] Update readme documentation, fix crash when driving, fix airship crafting recipes, and add support for subtitles mod. --- README.md | 17 ++++++++++++++++- balloon.lua | 19 ++++++++++++------- crafts.lua | 23 ++++++++++++++++++----- init.lua | 1 + 4 files changed, 47 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 1fa5154..835d193 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,19 @@ # sum_airship Mod for minetest -[ContentDB](https://content.minetest.net/packages/Sumianvoice/sum_airship/) \ No newline at end of file +[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. diff --git a/balloon.lua b/balloon.lua index b4e28cc..12ef190 100644 --- a/balloon.lua +++ b/balloon.lua @@ -311,12 +311,12 @@ function ship.on_step(self, dtime, moveresult) end if pi then - if pi.ctrl.up then forward = 1 - elseif pi.ctrl.down then forward = -1 end - if pi.ctrl.jump then climb = 1 - elseif pi.ctrl.aux1 then climb = -1 end - if pi.ctrl.right then right = 1 - elseif pi.ctrl.left then right = -1 end + if pi.up then forward = 1 + elseif pi.down then forward = -1 end + if pi.jump then climb = 1 + elseif pi.aux1 then climb = -1 end + if pi.right then right = 1 + elseif pi.left then right = -1 end local yaw = self.object:get_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 diff --git a/crafts.lua b/crafts.lua index 2c57a49..8e24852 100644 --- a/crafts.lua +++ b/crafts.lua @@ -15,17 +15,21 @@ minetest.register_craftitem("sum_airship:hull", { stack_max = 1, groups = { craftitem = 1 }, }) -if true then + + local w = "group:wool" 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 s = "farming:string" if minetest.get_modpath("mcl_boats") 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" - b = "mcl_boats:boat" + b = "group:boat" m = "mcl_core:iron_ingot" + s = "mcl_mobitems:string" end minetest.register_craft({ output = "sum_airship:canvas_roll", @@ -42,4 +46,13 @@ if true then {m, m, m}, }, }) -end \ No newline at end of file + + +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,}, + }, +}) diff --git a/init.lua b/init.lua index ee145c5..746c1ac 100644 --- a/init.lua +++ b/init.lua @@ -2,3 +2,4 @@ local mod_name = minetest.get_current_modname() local mod_path = minetest.get_modpath(mod_name) dofile(mod_path .. DIR_DELIM .. "balloon.lua") +dofile(mod_path .. DIR_DELIM .. "crafts.lua")