22 Commits

Author SHA1 Message Date
Aaron Suen
b66c636aa7 Doors can't push nodes into players directly. 2019-12-18 19:52:07 -05:00
Aaron Suen
6e1f3fee94 Standardize intra-line spacing in code. 2019-12-01 11:08:12 -05:00
Aaron Suen
a12d44c4f8 Tighten up interact checks. 2019-11-28 08:55:09 -05:00
Aaron Suen
829e8aed81 Fix some things affected by spectators. 2019-11-25 21:46:29 -05:00
Aaron Suen
decbc96c67 Fix door behavior regressions.
- Packing recipes blocked by stack node visinv ents.
- Item duplication between sliding/falling nodes.

A little sloppy still, but at least it seems to fix the issues.
2019-11-06 19:10:03 -05:00
Aaron Suen
921dc9c1da Doors are now blocked by entities.
This should help mitigate issues that can cause falling_nodes to
clobber doors.  It may make some builds that were working
unreliably before now not work at all, but after a redesign, they
may work more safely now.
2019-11-03 12:40:19 -05:00
Aaron Suen
4996081351 Fix nodes not falling when doors open below. 2019-11-02 21:11:05 -04:00
Aaron Suen
8b9ef4e7ba Door press can be used to count/eject items. 2019-11-01 22:08:51 -04:00
Aaron Suen
98c04d8508 Press only does 1 node per door body.
Not enough pressure to do 2 at a time, and this
prevents it from being trivial to keep a press from
interfering with the item path.
2019-11-01 21:02:29 -04:00
Aaron Suen
42a68a7773 Press backstop cannot be a "loose" node. 2019-11-01 20:44:48 -04:00
Aaron Suen
20e4432598 Apply "press" recipes to nodes jamming doors.
Nodes need to have a "backstop" node of some kind
holding them in place.  Automatically convert all
thumpy pummel recipes to press recipes too.
2019-11-01 20:42:44 -04:00
Aaron Suen
f6102b9512 Revert "Allow placing nodes against ends of doors."
There are other situations where we right-click on things and
expect a non-placement action, and that action fails.  We should
probably be more consistent about not placing in these cases, as
players may be surprised by it, and be left in trouble due to
not having a tool to dig it back up.  Requiring sneak is safer.

Now technically shelves violate this principle, but their
violation is much narrower in scope, i.e. only placement of
containers.

This reverts commit 4795a63116782fe47e72847dd308468a345b9369.
2019-10-13 13:35:49 -04:00
Aaron Suen
4795a63116 Allow placing nodes against ends of doors. 2019-10-13 13:28:53 -04:00
Aaron Suen
fc0ef548e5 Doors prefer centrifugal movement. 2019-10-13 13:10:42 -04:00
Aaron Suen
feb9c5016d Nerf door op rate, falling node operation.
Also:
- Persist door squelch data.
- Work around crush damage logic issue...?
- Try to reduce unnecessary network packets?
2019-10-11 01:14:00 -04:00
Aaron Suen
f44f9941bb Fixed last known conveyor issue. 2019-10-11 00:22:32 -04:00
Aaron Suen
13a3c37d55 Better conveyor support.
Items riding a gear can "turn outward" if they hit a wall.
Unfortunately this creates a divergence in the tracing path,
causing "bubbles" to appear in solid conveyor trains.
2019-10-11 00:20:14 -04:00
Aaron Suen
1152a6885a Allow moving doors to push loose items.
There are a couple of large glaring limitations:
- Items are only pushed after doors operate, so can block doors.
- No "secondary direction" allowing items to migrate out, making
  practical conveyor belts unncessarily difficult.
2019-10-11 00:04:21 -04:00
Aaron Suen
39dea8a2ae MAJOR: Code quality audit using luacheck.
- Removed lots of unused variables, a few shadowed identifiers.
- Removed a few sections of dead code.
2019-08-31 09:26:53 -04:00
Aaron Suen
fe2c153f9e Clean up all lua code style.
Formatting rules based on Paul Kulchenko's perl-based formatter...
http://notebook.kulchenko.com/programming/lua-beautifier-in-55-lines-of-perl
...using a single tab for indent.

Mostly pure whitespace changes.
2019-08-27 19:14:51 -04:00
Aaron Suen
15941ba35c Add door operating sounds. 2019-08-14 00:47:18 -04:00
Aaron Suen
e5343addd2 Double doors and gears. Update docs. 2019-08-13 22:53:20 -04:00