19 Commits

Author SHA1 Message Date
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
fb63ad0a82 Fix some optics unloaded-area crashes. 2019-03-24 23:15:25 -04:00
Aaron Suen
c44d9879bd Cut down on log noise from optics. 2019-03-24 19:52:14 -04:00
Aaron Suen
e08e017e04 Stop excess optic rechecks on ignores. 2019-03-24 18:24:37 -04:00
Aaron Suen
7cae0bd430 Clean up optic processing code. 2019-03-12 20:30:59 -04:00
Aaron Suen
8053bbc21c Transactional stability for optics.
- Make lens not flicker with light level dithering by using
  histerisis in threshold.
- Optical nodes always read the past world snapshot for creating
  the next snapshot, so there are no accidental fast paths
  through optical logic leading to glitches (hopefully).
2019-03-12 20:22:42 -04:00
Aaron Suen
0f0377da52 Make lens/prism light pass thru sunlight_propagates nodes.
This also prevents the lens from igniting them.

Made stick and staff at least as transarent as frames/ladders.
2019-03-09 19:46:52 -05:00
Aaron Suen
58109d30e7 Create basic crafting recipes, completing tech tree bridge.
It should now be possible to obtain the new optical stuff given
only resources in-game.  The molten glass casting process, in
particular, should be at least a little interesing.

These recipes aren't very interesting and may be subject to
refinements in the future.
2019-03-07 22:27:38 -05:00
Aaron Suen
fa4ae544ad Crank abm back up again, log unloaded area issues. 2019-03-07 01:56:27 -05:00
Aaron Suen
cb78b5a334 Got immediate triggering working. 2019-03-07 01:40:26 -05:00
Aaron Suen
94082bc86a Prism and full logic basically working.
There seems to be an issue triggering events, so a lot of work
is being done by the abm to cover over this problem...

Much like my earlier work with sz_rotary, I suspect a lot of
fine-tuning will be needed.
2019-03-07 00:58:37 -05:00
Aaron Suen
e68693c062 Optic API works, lens basically works. 2019-03-07 00:35:27 -05:00
Aaron Suen
2b9ff67ee1 Plan. 2019-03-06 00:11:11 -05:00
Aaron Suen
3bb18e195e A little refactoring... 2019-03-05 23:05:56 -05:00
Aaron Suen
b10cdfaa7d Fixed. 2019-03-04 23:52:15 -05:00
Aaron Suen
15805fee3a Typo. 2019-03-04 23:51:04 -05:00
Aaron Suen
42466f557c Oops, of course, I left debug code in. 2019-03-04 23:50:33 -05:00
Aaron Suen
0d23186747 Start getting into nitty-gritty optical transmission protocol.
This is going to be a lot like sz_rotary from sztest, and one of
the more complex things to implement.
2019-03-04 23:49:16 -05:00