Commit Graph

10 Commits

Author SHA1 Message Date
electrodude 649c7d79f6 Add Digiline Filter-Injector
This adds a new type of Filter-Injector that waits for a digiline
message on its channel and then pulls the items described by the
message out of the inventory. It is basically a Stackwise Injector
that, on receiving a digiline message, sets its filter to the contents
of the digiline message and then activates itself.

Sending the message {name="default:brick", count=2} should do the
same thing as setting the filter of a Stackwise Filter-Injector to
two Brick Blocks and then punching it.

If no count is specified, it defaults to 1. Since this is based off
of the Stackwise Injector, it might make more sense if the default
were an entire stack. I can change this trivially.

You can also send requests like {{name="default:brick", count=1},
{name="default:dirt", count=1}}, which acts the same as setting the
filter to one Brick Block and one Dirt Block and then punching it.

If you send a string "default:dirt" instead of a table
{name="default:dirt"}, the string is passed to ItemStack and the
name and count are extracted from the resulting ItemStack. You can
also send a list of strings instead of tables: {"default:dirt",
"default:brick"}, and the first item found will be pulled.

Punching this or activating it with Mesecons currently does
nothing. I'm not really sure what would be the right thing to do in
either of those two cases, so I made it do nothing. I guess I could
make it use the previously-used filter, but I can't really see any
usefulness in that.

The recipe is probably too cheap. The darker of the two blue texture
colors could probably be better.
2016-05-10 16:13:41 -07:00
Prot EuPhobos 82c03466d7 add exact mode to the filter 2016-04-14 22:18:05 -07:00
Sokomine fca10f613d added is_fake_player entry to the fake player table passed on to allow_metadata_* functions 2015-10-10 05:44:42 +02: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
Vanessa Ezekowitz ce12c83306 fix filters also 2015-02-07 02:51:06 -05:00
est31 50bc351804 Fix injector crash when dug or punched when its empty 2015-02-04 03:08:16 +01:00
est31 3041ebb81b Enable to specify size for stacks a stackwise filter takes 2015-02-03 09:04:56 +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 c9d18f74e4 update all formspecs "current_name" to "context" to reflect current api 2015-01-29 20:08:58 +01:00
Tim 009b9e9276 split the filter-injector specific code out of the generic item_transport 2015-01-29 19:57:23 +01:00