1
0
mirror of https://github.com/mt-mods/pipeworks.git synced 2024-12-28 20:00:27 +01:00
Commit Graph

67 Commits

Author SHA1 Message Date
wsor4035
e3d94cb3a8
fix digiline formspec spacing (#27) 2022-05-07 17:04:06 -04:00
wsor4035
37eef73695
add I3 support + update to formspecs v2 (#22)
* add fs helper inv function

* add fs helper prepends function

* add trash can, vacuum tube, teleport tube. wielders, autocrafter, mesetube, injectors

* fixed missed texture to make game agnostic

* fix luacheck
2022-04-16 14:51:59 -04:00
wsor4035
5aa0501872
make pipeworks Game agnostic (#16)
* 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
2022-03-14 21:39:58 -04:00
zichen
7d3a61e595
Fix toggling of autocrafter when digilines is not installed (#5)
Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com>
2021-12-26 17:12:15 +11:00
OgelGames
7ba685344c fix autocrafter 2021-05-29 17:37:10 +10:00
hlqkj
29bac67d3a Skip protection check on formspec close
Prevents protector flip/player being hurt/protection violation if the
player closes the formspec without attempting any changes (sorting tube
and autocrafter).
2021-05-06 18:02:19 +02:00
Vanessa Dannenberg
fc6efb450c add support for Unified Inventory categories 2021-04-02 15:48:28 -04:00
HybridDog
17a602a5a1 Remove unused loop variables, trailing whitespace and fix mixed-whitespace indentations 2021-02-05 17:17:50 +01:00
HybridDog
b2d2ccbcba Remove or comment unused code and declare some variables local 2021-02-03 18:08:50 +01:00
Fedja Beader
505fc7cc49 Add "get_recipe" digiline command for querying the current autocrafter recipe.
Useful for having the player teach the luacontroller how to craft various items.
2020-07-23 01:49:37 +02:00
Louis Royer
62bc13078f Add translation support
- Created `locale/template.txt`
- Fixed some typos
- Replace some `print("[pipeworks]"..` with `pipeworks.logger()`
- Removed "You hacker, you" from descriptions
2020-02-18 17:34:52 +00:00
h-v-smacker
f37b21e632 fix autocrafter recipe 2018-11-15 03:51:56 +03:00
Vanessa Dannenberg
d7dfd11364 use basic_materials mod where possible 2018-10-30 20:45:48 -04:00
Vanessa Ezekowitz
acc2b6802e fix scale on autocrafter's on/off switch 2017-04-12 07:09:35 -04:00
Carter Kolwey
c15023a5d1 Tweak listring behavior of autocrafter
Now goes player->source->player and destination->player
2017-03-28 18:02:10 -05:00
Carter Kolwey
1a15a8b453 Add digilines support to autocrafter
"on" and "off" messages turn it on or off, "single" crafts one item, and sending nested tables in the shape of the crafting grid sets the craft. Example message:
{
{"default:wood","default:wood","default:wood"},
{"default:wood","","default:wood"},
{"default:wood","default:wood","default:wood"}
}
2017-02-26 15:35:51 -06:00
Tim
4fdf73fbcd add list rings to pipework inventories 2016-08-29 18:28:43 +02:00
Auke Kok
b1b9a7e994 Don't use item_drop(, nil,) 2016-04-01 22:20:07 -07:00
HybridDog
6de437b83d fix 2 other minetest.item_drops 2015-11-18 10:07:00 +01:00
Tim
d167aacf4d add ownership/protection handling for device configuration
take any available ownership into account before deciding on area protection
2015-03-11 19:36:41 +01:00
Tim
13e878398c revert accidental revert (810ae99 -- autocrafter.lua) of f79956c 2015-02-02 03:16:15 +01:00
Tim
810ae99008 reduce texturename repetition via __index 2015-01-31 14:47:06 +01:00
Tim
f79956c0b6 improve handling of shapeless recipes in the autocrafter recipe filling function 2015-01-30 21:09:43 +01:00
Tim
fcba05fd78 move autocrafter, tp-tube and filter-injector crafts to their respective code files 2015-01-29 20:31:08 +01:00
Tim
373c7951d2 add sanity check for upgrade cases of autocrafters with broken metadata (especially for can_dig) 2015-01-29 17:06:09 +01:00
Tim
73b3466a7b improve autocrafter infotext handling
use the item description and provide more information in paused states
2015-01-29 17:06:09 +01:00
Tim
3bcf3b5f2f use on_destruct instead of after_dig_node to clean up the cache entry to avoid any leaking during worldediting 2015-01-28 21:47:50 +01:00
Tim
b009e46590 call after_recipe_change also when moving the output item to src or dst to stop the crafter as expected 2015-01-28 21:45:43 +01:00
Tim
197e433f49 don't add unknown or groupnamed items to the crafting grid when setting it via the output slot 2015-01-28 20:56:26 +01:00
Tim
0cb1eb49dc make sure the autocrafter runs after an upgrade 2015-01-28 19:41:38 +01:00
Tim
7dca3393be improve upgrade of autocrafter from both former versions 2015-01-28 18:55:59 +01:00
Tim
d75e1a214a allow virtual item moving from output to the recipe grid 2015-01-28 16:51:07 +01:00
Tim
a74c2212ab simplify autocrafter code a bit 2015-01-28 16:30:22 +01:00
Tim
320a483f4f add an output field, that is being filled with the crafting result and can be used for quickly emptying or filling the crafting grid with the last registered recipe
some of the recipes are still treated wrongly due to minetest/minetest#2222 but are failling gracefully
2015-01-28 06:51:59 +01:00
Tim
5fa3e1f626 use the default background colors and hotbar image for the autocrafter formspec 2015-01-28 01:36:13 +01:00
Tim
3a46c1266a allow moving virtual items within the crafting grid 2015-01-28 00:42:22 +01:00
Tim
e92ac0f7b3 abstract adding of virtual items 2015-01-28 00:33:07 +01:00
Tim
78e081cf25 on_ -> after_ to be consistent with minetest api usage of these prefixes 2015-01-28 00:27:17 +01:00
Tim
6d1bc7b3fc add an enable/disable button to the autocrafter
the reaction time of the button might be a bit confusing though until minetest/minetest#2220 is being resolved
2015-01-28 00:22:35 +01:00
Tim
5ac0053f8c let the infotext show what we are crafting, or if we craft at all 2015-01-27 23:41:46 +01:00
Tim
f3b636d63e let the autocrafter catch up on missed crafts 2015-01-27 23:41:46 +01:00
Tim
44bafb844a use nodetimers instead of abm's to run the autocrafters; only run autocrafters when needed
autocrafters will stop() when theres no valid recipe, no dst space or enough src material
it will resume again on inventory or recipe changes
2015-01-27 23:41:46 +01:00
Tim
2ccce52976 split autocraft into a run function and a function autocrafting a singe step
this gives us flexibility for future changes
2015-01-27 23:41:46 +01:00
Tim
f427bae557 also cache the recipe consumption to get rid of an additional loop per craft 2015-01-27 23:41:46 +01:00
Tim
cee16932be remove unnecessary looping and testing, since we only check and update the cache if there was actually a reason to assume a recipe change 2015-01-27 23:41:46 +01:00
Tim
827d049789 reduce stacksizes and wear of virtual items on update instead of leaving the previous configuration in 2015-01-27 23:41:46 +01:00
Tim
d3110a9e20 rename variables to reflect the official api and making the code more clear 2015-01-27 23:41:46 +01:00
Tim
7b9571912d reduce table lookups and hash_node_position calculations 2015-01-27 23:41:46 +01:00
Vanessa Ezekowitz
e0039f22f8 sanity checking, stop crash in case of garbage inventory data
(i.e. that looks like nil)
2015-01-10 01:31:22 -05:00
Novatux
3f85f83e35 Make items in autocrafters virtual as well 2014-11-02 09:35:43 +01:00