Skip to content

Commit

Permalink
Merge pull request #186 from dacmot/update_hidroplane
Browse files Browse the repository at this point in the history
Update hidroplane, airutils and add supercub
  • Loading branch information
dacmot committed Mar 15, 2024
2 parents c98f165 + e3a0055 commit eb70234
Show file tree
Hide file tree
Showing 156 changed files with 7,697 additions and 2,322 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Expand Up @@ -253,3 +253,6 @@
[submodule "builder/mods_src/decor/flower_pot"]
path = builder/mods_src/decor/flower_pot
url = https://codeberg.org/Dacmot/flower_pot.git
[submodule "builder/mods_src/tools/supercub"]
path = builder/mods_src/tools/supercub
url = https://github.com/APercy/supercub.git
2 changes: 0 additions & 2 deletions builder/lib-config-whynot.sh
Expand Up @@ -6,8 +6,6 @@
declare -Ag BRANCHES=(
[minetest_game/minetest_game]=origin/stable-5 # Stay on stable version
[flora_ores/farming]=0b06c7cd450c5ec9a76b3c22a9c57f06e4f8a7c2 # freeze due to incompatibility with milk buckets
[libs/airutils]=e93f33037cfc14bc14d3226fcb9d780244caab74 # breaking change to be reviewed
[tools/hidroplane]=39bd23407f95669d587a611150de8aeeb5610628 # breaking change to be reviewed
)

#
Expand Down
2 changes: 1 addition & 1 deletion builder/mods_src/libs/airutils
Submodule airutils updated 92 files
+16 −1 LICENSE
+276 −0 airutils_biofuel.lua
+7 −5 airutils_papi.lua
+2 −2 airutils_repair.lua
+5 −4 airutils_tug.lua
+7 −5 airutils_wind.lua
+199 −0 attach_extern_ent.lua
+24 −0 common_entities.lua
+0 −1 depends.txt
+343 −77 init.lua
+43 −26 inventory_management.lua
+194 −0 lib_copter/control.lua
+384 −0 lib_copter/entities.lua
+8 −0 lib_copter/init.lua
+317 −0 lib_planes/control.lua
+115 −0 lib_planes/custom_physics.lua
+959 −0 lib_planes/entities.lua
+455 −0 lib_planes/forms.lua
+70 −0 lib_planes/fuel_management.lua
+132 −0 lib_planes/gauges.lua
+8 −0 lib_planes/global_definitions.lua
+328 −0 lib_planes/hud.lua
+27 −0 lib_planes/init.lua
+1,320 −0 lib_planes/utilities.lua
+85 −0 locale/airutils.de.tr
+85 −0 locale/airutils.fr.tr
+84 −0 locale/airutils.pt_BR.tr
+85 −0 locale/airutils.ru.tr
+85 −0 locale/template.txt
+1 −1 mod.conf
+495 −0 mod_translation_updater.py
+ models/airutils_biofuel_distiller.b3d
+ models/airutils_seat_base.b3d
+3 −0 physics_lib.lua
+59 −45 pilot_skin_manager.lua
+ screenshot.png
+20 −0 settingtypes.txt
+ sounds/airutils_collision.ogg
+ sounds/airutils_engine.ogg
+ sounds/airutils_explode.ogg
+ sounds/airutils_heli_snd.ogg
+5 −0 sounds/airutils_heli_snd.txt
+ sounds/airutils_touch.ogg
+ sounds/airutils_touch_water.ogg
+271 −0 text.lua
+137 −0 texture_management.lua
+ textures/airutils_alpha.png
+ textures/airutils_altimeter_gauge.png
+ textures/airutils_aluminum.png
+ textures/airutils_biofuel_inv.png
+ textures/airutils_black.png
+ textures/airutils_black2.png
+ textures/airutils_blue.png
+ textures/airutils_boom.png
+ textures/airutils_brown.png
+ textures/airutils_burned_metal.png
+ textures/airutils_climber_gauge.png
+ textures/airutils_copper.png
+ textures/airutils_form_bg.png
+ textures/airutils_fuel_gauge.png
+ textures/airutils_gauge_bg.png
+ textures/airutils_green.png
+ textures/airutils_grey.png
+ textures/airutils_hud_panel.png
+ textures/airutils_ind_box.png
+ textures/airutils_ind_box_2.png
+ textures/airutils_light.png
+ textures/airutils_metal.png
+ textures/airutils_name_canvas.png
+ textures/airutils_painting.png
+ textures/airutils_painting_2.png
+ textures/airutils_red.png
+ textures/airutils_repair_tool.png
+ textures/airutils_rpm_gauge.png
+ textures/airutils_smoke.png
+ textures/airutils_speed_gauge.png
+ textures/airutils_transparent.png
+ textures/airutils_tug.png
+ textures/airutils_u_black.png
+ textures/airutils_white.png
+ textures/gauge_bg.xcf
+ textures/papi.png
+ textures/pilot_clothes1.png
+ textures/pilot_clothes2.png
+ textures/pilot_clothes3.png
+ textures/pilot_clothes4.png
+ textures/pilot_novaskin_girl.png
+ textures/pilot_novaskin_girl_2.png
+ textures/pilot_novaskin_girl_steampunk.png
+ textures/pilot_novaskin_girl_steampunk_2.png
+ textures/pilot_phones.png
+5 −3 wind.lua
2 changes: 1 addition & 1 deletion builder/mods_src/tools/hidroplane
1 change: 1 addition & 0 deletions builder/mods_src/tools/supercub
Submodule supercub added at d5884c
2 changes: 1 addition & 1 deletion builder/update_mods.sh
Expand Up @@ -37,7 +37,7 @@ NEWSTASHSIZE=$(git stash list | wc -l)

echo -n "Updating local repository..."
git submodule sync $VERBOSITY
git fetch --all --prune --prune-tags --tags --recurse-submodules=yes $VERBOSITY --job 4
git fetch --all --prune --prune-tags --tags --recurse-submodules=yes $VERBOSITY
echo " done."
echo -n "Updating submodules..."
git submodule update --init --recursive $VERBOSITY --jobs 4
Expand Down
8 changes: 6 additions & 2 deletions mod_sources.txt
Expand Up @@ -124,7 +124,7 @@ origin https://github.com/GreenXenith/waffles (fetch)
Mod: food/waffles

origin https://github.com/APercy/airutils.git (fetch)
* e93f33037cfc14bc14d3226fcb9d780244caab74 fix non declared variable
* 836c6d10f6d7c6ee7c517076e0ab5a1e21e251c4 added parameter to simply remove the plane
Mod: libs/airutils

origin https://repo.or.cz/minetest_doc.git (fetch)
Expand Down Expand Up @@ -300,7 +300,7 @@ origin https://github.com/Ezhh/handholds (fetch)
Mod: tools/handholds

origin https://github.com/APercy/hidroplane.git (fetch)
* 39bd23407f95669d587a611150de8aeeb5610628 added check for the new function
* f24640da25b9119740f591b264883ca3bb7cbff5 adjusted to work with mineclone
Mod: tools/hidroplane

origin https://github.com/minetest-mods/hopper (fetch)
Expand All @@ -327,6 +327,10 @@ origin https://github.com/minetest-mods/subspacewalker (fetch)
* 245cca91d172f3ab00ad7f056bea9462fd938620 Update README.md
Mod: tools/subspacewalker

origin https://github.com/APercy/supercub.git (fetch)
* d5884cb50f72b8f3a713b95d8e741c8579d3a865 improved model
Mod: tools/supercub

origin https://github.com/lisacvuk/minetest-toolranks (fetch)
* 05eea5177e4c804eea6fdf77eccd141405b38613 Update README.md
Mod: tools/toolranks
Expand Down
17 changes: 16 additions & 1 deletion mods/libs/airutils/LICENSE
@@ -1,6 +1,12 @@
Except for the file "text.lua", adapted from signs_lib from VanessaE,
that is licenced under LGPL 3.0 (see at: https://www.gnu.org/licenses/lgpl-3.0.txt)
all the code is licenced under MIT Licence, as below:

==================================================================================================

MIT License

Copyright (c) 2022 APercy - Alexsandro Percy
Copyright (c) 2024 APercy - Alexsandro Percy
Copyright (c) 2019 TheTermos (for code from mobkit at physics_lib.lua)

Permission is hereby granted, free of charge, to any person obtaining a copy
Expand All @@ -20,3 +26,12 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

==================================================================================================

Media Licence:

CC0-1.0 for all media
the "airutils_explode.ogg" comes from minetest game tnt mod


276 changes: 276 additions & 0 deletions mods/libs/airutils/airutils_biofuel.lua
@@ -0,0 +1,276 @@
----------
--biofuel
----------
local S = airutils.S
local module_name = "airutils"

if minetest.get_modpath("technic") then
if technic then
technic.register_extractor_recipe({input = {"farming:wheat 33"}, output = "biofuel:biofuel 1"})
technic.register_extractor_recipe({input = {"farming:corn 33"}, output = "biofuel:biofuel 1"})
technic.register_extractor_recipe({input = {"farming:potato 33"}, output = "biofuel:biofuel 1"})
technic.register_extractor_recipe({input = {"default:papyrus 99"}, output = "biofuel:biofuel 1"})
end
end


if minetest.get_modpath("basic_machines") then
if basic_machines then
basic_machines.grinder_recipes["farming:wheat"] = {50,"biofuel:biofuel",1}
basic_machines.grinder_recipes["farming:corn"] = {50,"biofuel:biofuel",1}
basic_machines.grinder_recipes["farming:potato"] = {50,"biofuel:biofuel",1}
basic_machines.grinder_recipes["default:papyrus"] = {70,"biofuel:biofuel",1}
end
end

if minetest.get_modpath("default") then
minetest.register_craft({
output = module_name .. ":biofuel_distiller",
recipe = {
{"default:copper_ingot", "default:copper_ingot", "default:copper_ingot"},
{"default:steel_ingot" , "", "default:steel_ingot"},
{"default:steel_ingot" , "default:steel_ingot", "default:steel_ingot"},
},
})
end
if minetest.get_modpath("mcl_core") then
minetest.register_craft({
output = module_name .. ":biofuel_distiller",
recipe = {
{"mcl_copper:copper_ingot", "mcl_copper:copper_ingot", "mcl_copper:copper_ingot"},
{"mcl_core:iron_ingot" , "", "mcl_core:iron_ingot"},
{"mcl_core:iron_ingot" , "mcl_core:iron_ingot", "mcl_core:iron_ingot"},
},
})
end


-- biofuel
local new_gallon_id = "airutils:biofuel"
minetest.register_craftitem(new_gallon_id,{
description = S("Bio Fuel"),
inventory_image = "airutils_biofuel_inv.png",
})

minetest.register_craft({
type = "fuel",
recipe = new_gallon_id,
burntime = 50,
})

minetest.register_alias("biofuel:biofuel", new_gallon_id) --for the old biofuel

local ferment = {
{"default:papyrus", new_gallon_id},
{"farming:wheat", new_gallon_id},
{"farming:corn", new_gallon_id},
{"farming:baked_potato", new_gallon_id},
{"farming:potato", new_gallon_id}
}

local ferment_groups = {'flora', 'leaves', 'flower', 'sapling', 'tree', 'wood', 'stick', 'plant', 'seed',
'leafdecay', 'leafdecay_drop', 'mushroom', 'vines' }

-- distiller
local biofueldistiller_formspec = "size[8,9]"
.. "list[current_name;src;2,1;1,1;]" .. airutils.get_itemslot_bg(2, 1, 1, 1)
.. "list[current_name;dst;5,1;1,1;]" .. airutils.get_itemslot_bg(5, 1, 1, 1)
.. "list[current_player;main;0,5;8,4;]" .. airutils.get_itemslot_bg(0, 5, 8, 4)
.. "listring[current_name;dst]"
.. "listring[current_player;main]"
.. "listring[current_name;src]"
.. "listring[current_player;main]"
.. "image[3.5,1;1,1;gui_furnace_arrow_bg.png^[transformR270]"

minetest.register_node( module_name .. ":biofuel_distiller", {
description = S("Biofuel Distiller"),
tiles = {"airutils_black.png", "airutils_aluminum.png", "airutils_copper.png" },
drawtype = "mesh",
mesh = "airutils_biofuel_distiller.b3d",
paramtype = "light",
paramtype2 = "facedir",
groups = {
choppy = 2, oddly_breakable_by_hand = 1, flammable = 2
},
legacy_facedir_simple = true,

on_place = minetest.rotate_node,

on_construct = function(pos)

local meta = minetest.get_meta(pos)

meta:set_string("formspec", biofueldistiller_formspec)
meta:set_string("infotext", S("Biofuel Distiller"))
meta:set_float("status", 0.0)

local inv = meta:get_inventory()

inv:set_size("src", 1)
inv:set_size("dst", 1)
end,

can_dig = function(pos,player)

local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()

if not inv:is_empty("dst")
or not inv:is_empty("src") then
return false
end

return true
end,

allow_metadata_inventory_take = function(pos, listname, index, stack, player)

if minetest.is_protected(pos, player:get_player_name()) then
return 0
end

return stack:get_count()
end,

allow_metadata_inventory_put = function(pos, listname, index, stack, player)

if minetest.is_protected(pos, player:get_player_name()) then
return 0
end

local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()

if listname == "src" then
return stack:get_count()
elseif listname == "dst" then
return 0
end
end,

allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)

if minetest.is_protected(pos, player:get_player_name()) then
return 0
end

local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
local stack = inv:get_stack(from_list, from_index)

if to_list == "src" then
return count
elseif to_list == "dst" then
return 0
end
end,

on_metadata_inventory_put = function(pos)

local timer = minetest.get_node_timer(pos)

timer:start(5)
end,

on_timer = function(pos)

local meta = minetest.get_meta(pos) ; if not meta then return end
local inv = meta:get_inventory()

-- is barrel empty?
if not inv or inv:is_empty("src") then

meta:set_float("status", 0.0)
meta:set_string("infotext", S("Fuel Distiller"))

return false
end

-- does it contain any of the source items on the list?
local has_item

--normal items
for n = 1, #ferment do
if inv:contains_item("src", ItemStack(ferment[n][1])) then
has_item = n
break
end
end

--groups
local has_group
if not has_item then
local inv_content = inv:get_list("src")
if inv_content then
for k, v in pairs(inv_content) do
local item_name = v:get_name()
for n = 1, #ferment_groups do
if minetest.get_item_group(item_name, ferment_groups[n]) == 1 then
has_group = n
break
end
end
end
end
end

if not has_item and not has_group then
return false
end

-- is there room for additional fermentation?
if has_item and not inv:room_for_item("dst", ferment[has_item][2]) then
meta:set_string("infotext", S("Fuel Distiller (FULL)"))
return true
end

if has_group and not inv:room_for_item("dst", new_gallon_id) then
meta:set_string("infotext", S("Fuel Distiller (FULL)"))
return true
end

local status = meta:get_float("status")

-- fermenting (change status)
if status < 100 then
meta:set_string("infotext", S("Fuel Distiller @1% done", status))
meta:set_float("status", status + 5)
else
if not has_group then
inv:remove_item("src", ferment[has_item][1])
inv:add_item("dst", ferment[has_item][2])
else
for i,itemstack in pairs(inv:get_list("src")) do
inv:remove_item("src", ItemStack(itemstack:get_name().." 1"))
end
inv:add_item("dst", new_gallon_id)
end

meta:set_float("status", 0,0)
end

if inv:is_empty("src") then
meta:set_float("status", 0.0)
meta:set_string("infotext", S("Fuel Distiller"))
end

return true
end,
})

--lets remove the old one
minetest.register_node(":".."biofuel:biofuel_distiller", {
groups = {old_biofuel=1},
})

minetest.register_abm({
nodenames = {"group:old_biofuel"},
interval = 1,
chance = 1,
action = function(pos, node)
--minetest.remove_node(pos)
minetest.swap_node(pos,{name = module_name..":biofuel_distiller"})
end,
})


0 comments on commit eb70234

Please sign in to comment.