Commit Graph

626 Commits

Author SHA1 Message Date
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
0639bb9706 allow pipeworks to skip server steps when moving entities around. 2017-03-31 18:27:44 -04: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
Vanessa Ezekowitz
b46231f543 Merge pull request #165 from cheapie/master
Tweak listring behavior of autocrafter
2017-03-28 19:06:21 -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
Vanessa Ezekowitz
64b2611d8a prevent being able to place "loaded" and "on" items
(forces them to "empty" and "off")
2017-03-17 11:04:59 -04:00
Vanessa Ezekowitz
1bfc2d4e5b increase length of signal tube pulse 2017-03-17 10:15:09 -04:00
Vanessa Ezekowitz
e5ee0dee90 add turn-to-vertical handling to valve, flow sensor
reuse the code from entry panel
2017-03-17 10:07:34 -04:00
Vanessa Ezekowitz
88ad79163d add screwdriver rotation handling on most pipes-related nodes
caveats:  in order to cleanly handle the entry panel, valve, and sensor
I had to rotate the valve and sensor models 90 degrees
so that their in-/outlet pipes point the same direction as the
entry panel.

This also enables proper handling of a valve or sensor turned vertically.

Some objects have rotation disabled entirely (as flipping them over/around makes
no sense)

When a valve is rotated, it is turned off automatically, to work around a glitch in
the rotation code.
2017-03-17 10:07:34 -04:00
Vanessa Ezekowitz
bd4a27d172 make valve and pump turn on/off via on_rightclick
(instead of on_punch)
2017-03-17 10:07:34 -04:00
Thomas--S
3d845a3f28 Make filter-injector work with latest chest versions 2017-03-17 10:07:34 -04:00
Carter Kolwey
a858145098 Add missing table entries 2017-03-17 10:07:34 -04:00
Vanessa Ezekowitz
7d872c05ee Merge pull request #160 from cheapie/master
Special-case technic machines
2017-03-01 01:01:02 -05:00
Carter Kolwey
acf7ee4a80 Special-case technic machines
This makes them work correctly with filters.
2017-02-28 23:52:10 -06:00
Carter Kolwey
cdbe93cdd8 Allow reversing direction if there's nowhere to go 2017-03-01 01:40:06 -03:00
Vanessa Ezekowitz
f7fe95231d Merge pull request #158 from cheapie/master
Add digilines support to autocrafter
2017-02-26 16:44:22 -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
Vanessa Ezekowitz
9ade40ac65 update description a bit (typo, outdated a little) 2017-02-07 16:04:02 -05:00
Vanessa Ezekowitz
62768d243d Use node texture colorization
for priority tube, instead of [colorize
(except for inv image).  Saves a tiny bit of RAM.
2017-01-25 04:33:27 -05:00
electrodude
a3d2e69a42 Allow Digiline Filter-Injector to match wear, metadata, and group
You can now make reqyests like `{group="stick"}`, `"default:pick_wood 1
30000"`, and `"mod:block <count> <exact wear> <meta>"` to match
items precisely.

If you don't specify a field, that field won't be checked.  If you
specify a field in an invalid way, that rule will match nothing.

You can also specify wear as a table `wear={min, max}` to specify
a range `[min, max)` of acceptable wear values.  For example,
`{name="default:pick_wood", wear={0, 32768}}` matches only wooden
pickaxes that have at least half of their life left.

You can even do things like `{count=2, metadata="whatever")}`, which
will match any item at all, as long as its metadata matches, and will
retrieve at most two of those items.
2016-10-10 14:15:44 -07:00
electrodude
36d9e1fc08 Digiline Filter-Injector tweaks
* Made digiline filter-injectors not pull a whole stack if the count is exactly 1
* Made digiline filter-injectors pull a whole stack if no count specified
  * `default:dirt` still has a count of 1, but `{name="name"}` has no count
2016-10-10 14:15:44 -07:00
Vanessa Ezekowitz
6e0e7c47d0 Merge pull request #150 from t4im/master
Add list rings and enable sorting tube reordering
2016-08-30 14:13:01 -04:00
Tim
4fdf73fbcd add list rings to pipework inventories 2016-08-29 18:28:43 +02:00
Tim
aba1ce5b36 allow reordering of itemstacks in sorting tube 2016-08-29 18:28:24 +02:00
Tim
a65eaa7cf2 update .gitignore 2016-08-29 18:25:40 +02:00
electrodude
a1ed3acd7a Add digiline detector tube (#139)
* Add digiline detector tube

The digiline detector tube outputs an itemstring of every stack
that passes through it on the channel specified in its formspec.

* Don't store digiline detector tube's formspec in a temporary local
2016-06-11 17:14:38 -07:00
Auke Kok
f76668969e Do not trust node.param2.
The table lookup will fail if node.param2 is outside [0-3] which
is easily possible since there are several ways to modify param2
values of nodes. Force truncating param2 to always be 0-3 before
using it in a table lookup.
2016-06-11 17:09:07 -07:00
Auke Kok
32f331e7c4 Don't make passing arguments this complex.
This shouldn't be this complex. For me, both syntaxes work,
but I bet it breaks others.
2016-05-27 17:37:56 -07:00
electrodude
10bfa30b93 Fixed settings file leak and invalid io.close (#136)
Before, init.lua called io.open on
pipeworks.worldpath..'/pipeworks_settings.txt'
to see if it existed, but did not close the resulting file handle if
it was found to exist.  It instead erroneously called io.close() with
no argument, which does nothing if the default output file is set to
stdout, which it is.

Now, the result of io.open is saved to a local variable.  If that value
is not nil (i.e. if the world settings file exists), the file handle is
passed to io.close before calling dofile.

Also, this saves pipeworks.worldpath..'/pipeworks_settings.txt' to a
local variable to reduce redundancy.
2016-05-23 10:52:26 -07:00
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
Auke Kok
193a5f8db9 Merge pull request #135 from electrodude/bugs
Fixed mixup between enables for conductor and detector tubes
2016-04-17 20:21:12 -07:00
electrodude
b2f9047e60 Fixed mixup between enables for conductor and detector tubes
pipeworks.enable_detector_tube would define detector tubes but the
recipe for conductor tubes, and vice versa
2016-04-17 23:05:38 -04:00
Auke Kok
66cfc745e1 Squelch a warning if no mesecons. 2016-04-14 22:24:43 -07:00
Prot EuPhobos
82c03466d7 add exact mode to the filter 2016-04-14 22:18:05 -07:00
Auke Kok
b1b9a7e994 Don't use item_drop(, nil,) 2016-04-01 22:20:07 -07: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
Auke Kok
a107ca40f0 Add screenshot.png 2016-03-27 22:31:33 -07:00
Auke Kok
c26d6932ba Adding standard mod files 2016-03-27 21:28:04 -07:00
Vanessa Ezekowitz
b3177a4827 Merge pull request #134 from sofar/furnacefix
Work with NodeTimer based furnaces.
2016-03-27 20:20:03 -04:00
Auke Kok
c61c090ac4 Work with NodeTimer based furnaces.
If we insert items through tubes, we must start the furnace timer
otherwise it will never start operating. This shouldn't break
older versions, as not having a timer function should just cancel
out.
2016-03-27 16:30:23 -07:00
HybridDog
6de437b83d fix 2 other minetest.item_drops 2015-11-18 10:07:00 +01:00
HybridDog
352e23cfb1 fix crash caused by deprecated usage of minetest.item_drop, fixes #122 2015-11-17 07:52:20 -05:00