34 Commits

Author SHA1 Message Date
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
82787786db Door recipe simplification.
- No graphite lubrication needed.
- Just insert pin instead of pounding it in.
- Pins must be inserted into end face.
- Node will not spin from using pin on wrong face.
2019-10-27 08:34:33 -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
70388c4ceb Item duplication bug. 2019-10-13 13:30:47 -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
522a4c0de5 Laser ablation door operation.
This now allows optics to interact with doors, tying the two
systems together.
2019-10-11 08:34:50 -04:00
Aaron Suen
252d167544 Back out falling-node operation.
Falling nodes themselves are too unstable, so players should not
be encouraged to build machines that perpetually put nodes into
that state and destabilize the game.  Testing has led to some node
duplication exploits.

Leave the door operatoin rate nerf in place, though, since it will
help keep a lid on traffic.
2019-10-11 01:29:47 -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
54e6ef9019 Fix door digging issue. 2019-10-06 10:37:15 -04:00
Aaron Suen
c147da4dde Convert from depends.txt to mod.conf 2019-10-05 11:24:16 -04:00
Aaron Suen
ce9e68fa9b Fix item duplication bug. 2019-10-05 10:07:12 -04:00
Aaron Suen
7e75fd149a Quote consistency. 2019-09-14 09:49:06 -04:00
Aaron Suen
310ce1bc6c Treat NodeCore as a unified thing.
- Collapse all nodecore "core" mods in the /mods listing, so it's
  easier to find the actual add-on mods.
- Parameterize in-game branding to make renaming derivatives just
  a little easier.
2019-09-07 09:08:57 -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
14b45a3b1b Cheaper, but more complex, doors.
Wooden doors now use a cheap wooden axle (though
you still need lode to chisel them).  All doors must now
be lubricated with graphite (coal) before driving in the
hinge pin.
2019-08-24 06:44:36 -04:00
Aaron Suen
fd52006a7a Image optimizations. 2019-08-19 22:31:00 -04:00
Aaron Suen
7a47f9d61c Add stone doors, tweak descriptions.
The alternate_loose/dig_in_place logic for cobble is interfering
with how stone doors work when dug, but it's still playable and
lossless, even though it's a bit tedious.  I'd like to understand
why it's happening this way and I can't seem to bypass it easily,
but it may be justifiable to leave it this way.
2019-08-14 18:36:22 -04:00
Aaron Suen
15941ba35c Add door operating sounds. 2019-08-14 00:47:18 -04:00
Aaron Suen
32ea24ec50 Image optimization. 2019-08-13 23:01:32 -04:00
Aaron Suen
e5343addd2 Double doors and gears. Update docs. 2019-08-13 22:53:20 -04:00
Aaron Suen
05ac51dafc Fixed description. 2019-08-13 22:09:12 -04:00
Aaron Suen
7431453ad7 Door rotation logic.
Shockingly it WORKS.

Does not yet interact reasonably with a lot of terrain (should
arguably push liquids, falling nodes, items, etc.) or entities
a(i.e. should arguably push players).
2019-08-13 22:02:02 -04:00
Aaron Suen
86cc55c12b Basic door node setup and recipes.
- Craft door panels by chiseling with a rod.
- Rotate door panels.
- Hammer in rod to act as hinge pin.
- Dig out hinge pin, dig up panel.
2019-08-13 21:06:13 -04:00