Commit Graph

75 Commits

Author SHA1 Message Date
DS a5e1bfa0e8 give more possibilities to mods (#194)
* add owner to tubed items

* allow custom inventories
2017-08-20 18:05:08 -04:00
Jordan Irwin 69d994a2a2 Replace deprecated methods: (#179)
- 'setting_get' with 'settings:get'
- 'setting_getbool' with 'settings:get_bool'
2017-05-18 05:33:56 -04:00
DS c9c4b4cd15 make item drop by tubes nicer (#168)
* make item drop by tubes nicer
2017-04-09 01:19:40 -04:00
Vanessa Ezekowitz bea570555a remove "reversed" warning message
(not needed now that tube breaking is reliable)
2017-04-07 03:35:24 -04:00
Vanessa Ezekowitz f3a74bb618 default breaking code to "enabled" and lower the default limit to 30. 2017-04-06 00:15:16 -04:00
Vanessa Ezekowitz 2aa9556748 tonumber() the config'd items limit 2017-04-06 00:02:31 -04:00
Ekdohibs ef68e058ec Don't lose extra movement when entering new tube or turning around. 2017-04-06 05:13:40 +02:00
Ekdohibs 7680820d3e Make item counting more reliable and more efficient. 2017-04-06 03:46:23 +02:00
Novatux 33c4c9d552 let tubes break if they're "over-pressure"
that is, if there are more than X number of items in a tube.  Default is
40 in a tube, but breaking is also disabled by default.

(original framework by Novatux, with changes by VanessaE)
2017-04-05 11:43:41 -04:00
Vanessa Ezekowitz eab59bfe19 always set item start pos on reverse. 2017-04-05 11:43:41 -04:00
ForbiddenJ 0056116148 Namespace pollution cleanup (Used list at #154) 2017-04-04 05:27:37 -03:00
Vanessa Ezekowitz 3a77d1dd8e if an item should reverse dir (e.g. full destination),
and it's not going back into a tube, reject it and pop out as an item
2017-03-29 16:54:38 -04:00
Vanessa Ezekowitz 0e8a82fdba add a warning if a tubed item turns around
(too many means that something is wrong with that tube circuit)
2017-03-29 15:25:05 -04:00
Carter Kolwey cdbe93cdd8 Allow reversing direction if there's nowhere to go 2017-03-01 01:40:06 -03:00
greencopper e30364b2dd Changed item_drop to add_item for items dropped during transport.
item_drop makes Minetest 0.4.13 crash, but add_item works in all
versions and the behavior is identical when looking at the blocks.
2016-04-01 22:20:07 -07:00
HybridDog 352e23cfb1 fix crash caused by deprecated usage of minetest.item_drop, fixes #122 2015-11-17 07:52:20 -05:00
Novatux bedcf4d646 Try to fix items dropping in unloaded areas 2015-07-25 14:29:57 +02:00
Novatux dada8474fe Revert "fix multiple crash points if luaentity.entities or values returned from"
This reverts commit d0952a97fc.
2015-06-23 19:00:17 +02:00
Vanessa Ezekowitz d0952a97fc fix multiple crash points if luaentity.entities or values returned from
luaentity.add_entity() are nil
2015-06-23 12:48:20 -04:00
Tim b54a868c33 chmod -x *.lua 2015-01-29 21:59:35 +01:00
Tim 009b9e9276 split the filter-injector specific code out of the generic item_transport 2015-01-29 19:57:23 +01:00
Vanessa Ezekowitz 28cef5e82f update to use current mesecons API
requires mesecons commit 5be179bf110b44bdc06df6dbfde4e61487cf0635 or newer.
2014-11-22 13:55:54 -05:00
Novatux b49428721a Make filters behave correctly with protected areas (fixes #74) 2014-11-16 13:14:17 +01:00
Vanessa Ezekowitz bbc530a067 fix undefined node crash 2014-08-24 11:51:43 -04:00
Zefram 7915e7f51e Rename tube_item() to tube_inject_item()
The new function has no API compatibility with the old one, so give it
a different name to avoid confusion among caller mods, which need to
change their usage.  Have a function under the old name that outputs a
helpful error message.
2014-08-15 13:24:52 +02:00
Novatux bf6fe237de Fix typo 2014-08-14 22:02:36 +02:00
Novatux d4e14bc891 Add legacy code for items in tubes 2014-08-14 21:18:48 +02:00
Novatux d5480f5ff0 Major rewrite of items in tubes 2014-08-14 16:22:03 +02:00
Zefram b832c0ad06 Slot sequencing modes for filter-injectors
The filter-injectors used to always prefer to take items from the
beginning of the source inventory.  Because items also tend to get placed
at the beginning of an inventory, this could lead to a chest+injector
buffer only passing through a trickle of one type of item, where other
item types are flowing in and getting later inventory slots.  So now,
the sequencing of source inventory slots is configurable, per-injector,
by form.  In addition to the old priority mode, there's now a random
mode and a rotation mode.

Incidentally refactor the filter-injector code, to avoid duplication
between the itemwise and stackwise variants.
2014-07-21 19:03:56 -04:00
Zefram 1c3fb6b1c5 rename "filter" to "filter-injector"
"Injector" better describes the nodes' main purpose.
2014-07-21 14:47:50 -04:00
Zefram 87d87c91fa Name tube items for function rather than material
Previously, some tube types were named based on their function, and others
based on some arbitrarily-chosen material used in their construction,
with no meaningful system governing which was in each category.  With this
change they are consistently named according to function.  Naming style
is also made consistent in the wording that identifies tubes as such,
and in capitalisation.
2014-07-05 12:55:33 -04:00
Zefram 65baf218be Make non-node items in tubes look more solid
Use the "wielditem" visual type for non-node items, with a fixed 45
degree yaw.  This matches the recent change of dropped-item entities from
"sprite" visual to "wielditem".
2014-07-02 21:39:28 -04:00
Novatux df1c9d0874 Fix bug with multiple input inventories with the filters 2014-07-02 12:42:33 +02:00
Novatux 99a902a8b8 Try to fix some bugs that happen on server restart 2014-07-01 18:42:52 +02:00
Novatux 9a63a16140 Filter inventory fix 2014-06-14 15:35:39 +02:00
Novatux fd3c88eb86 Accept multiple input inventories, fix bug with mesecons_mvps 2014-05-23 19:49:35 +02:00
Novatux 8efcd39e39 Bugfix 2014-05-18 16:41:37 +02:00
Novatux 274d7fb048 Deployer fixes 2014-04-13 09:25:31 +02:00
Ciaran Gultnieks 7bac96c588 Add optional before/after filter callbacks
These allow nodes that manage inventory in a non-standard manner (e.g. a
barrel) to still be able to work with pipeworks filters.
2014-02-10 19:19:57 +00:00
Novatux 9f66fd40ad allow_metadata_inventory_take returns a number, not a bool 2014-01-11 08:04:11 +01:00
Novatux 466d8af41d Prevent items from leaving below filters 2014-01-10 21:26:14 +01:00
Novatux d33eb89dcb Support for the mesecons mvps callback 2014-01-03 21:36:10 +01:00
Novatux b040fc585b fix filters and mese filters not working correctly 2013-12-24 08:36:19 -05:00
Novatux 75db2c5307 Fix item transport code 2013-12-21 10:17:12 +01:00
Novatux 61d7bde79a A few fixes 2013-12-21 08:54:33 +01:00
Vanessa Ezekowitz 41ce9be8f3 notvel function can't be local - made global and confined to pipeworks.{} 2013-12-15 16:05:35 -05:00
Vanessa Ezekowitz a4a74413c0 tube_item has to be global. confined it to pipeworks.{} table. 2013-12-15 14:41:03 -05:00
Vanessa Ezekowitz 030ae3283d local-ize a few more variables 2013-12-15 06:10:03 -05:00
Vanessa Ezekowitz c0ce62dacf local-ize a few more variables and functions 2013-12-15 05:53:11 -05:00
Vanessa Ezekowitz 53f6e67399 local-ize a few more functions 2013-12-15 05:40:26 -05:00