Skip to content

Commit

Permalink
make pipeworks Game agnostic (#16)
Browse files Browse the repository at this point in the history
* make it boot in non mtg

* make water flow

* fix water texture warnings

* fix missing steel texture issues

* remove depreciated/unnessary default function calls

* make sounds work

* fix default formspec crashes

* fix wierd tab spacing

* additionally game dig group support

* move crafts to crafts.lua

* make crafts support various games
  • Loading branch information
wsor4035 authored Mar 15, 2022
1 parent 5618003 commit 5aa0501
Show file tree
Hide file tree
Showing 21 changed files with 466 additions and 328 deletions.
15 changes: 1 addition & 14 deletions autocrafter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,6 @@ local function update_meta(meta, enabled)
"image_button[3,2;1,0.6;pipeworks_button_" .. state .. ".png;" .. state .. ";;;false;pipeworks_button_interm.png]" ..
"list[context;src;0,4.5;8,3;]"..
"list[context;dst;4,0;4,3;]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
default.get_hotbar_bg(0,8) ..
"list[current_player;main;0,8;8,4;]" ..
"listring[current_player;main]"..
"listring[context;src]" ..
Expand Down Expand Up @@ -252,7 +248,7 @@ minetest.register_node("pipeworks:autocrafter", {
description = S("Autocrafter"),
drawtype = "normal",
tiles = {"pipeworks_autocrafter.png"},
groups = {snappy = 3, tubedevice = 1, tubedevice_receiver = 1},
groups = {snappy = 3, tubedevice = 1, tubedevice_receiver = 1, dig_generic = 1},
tube = {insert_object = function(pos, node, stack, direction)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
Expand Down Expand Up @@ -428,12 +424,3 @@ minetest.register_node("pipeworks:autocrafter", {
},
})
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = "pipeworks:autocrafter"

minetest.register_craft( {
output = "pipeworks:autocrafter 2",
recipe = {
{ "default:steel_ingot", "default:mese_crystal", "default:steel_ingot" },
{ "basic_materials:plastic_sheet", "default:steel_ingot", "basic_materials:plastic_sheet" },
{ "default:steel_ingot", "default:mese_crystal", "default:steel_ingot" }
},
})
2 changes: 1 addition & 1 deletion common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ function pipeworks.create_fake_player(def, is_dynamic)
is_player = delay(true),
is_fake_player = true,

_formspec = def.formspec or default.gui_survival_form,
_formspec = def.formspec or "",
_hp = def.hp or 20,
_breath = 11,
_pos = def.position and table.copy(def.position) or vector.new(),
Expand Down
Loading

0 comments on commit 5aa0501

Please sign in to comment.