91 Commits

Author SHA1 Message Date
Aaron Suen
2a6fdab972 Glass tank bindings are slightly flammable. 2019-12-08 16:55:38 -05:00
Aaron Suen
ce58f8294c Refactor shelf API/assets into its own module. 2019-12-08 16:41:59 -05:00
Aaron Suen
a53030cdcf Use a mesh instead of nodebox for shelves.
In principle this should be equivalent to 2 cuboids
instead of 6.  In practice, FPS improvements are
hard to measure.
2019-12-08 16:13:44 -05:00
Aaron Suen
00f8a47dda Added glass tank recipe. 2019-12-08 14:59:57 -05:00
Aaron Suen
a54d868cc3 Start work on glass tank. 2019-12-07 22:45:34 -05:00
Aaron Suen
3fd83b8bf7 Gated prisms are just a tiny bit brighter. 2019-12-04 19:51:39 -05:00
Aaron Suen
05aeb6dfaa Stop lenses z-fighting with water. 2019-12-04 19:35:35 -05:00
Aaron Suen
74b8a5cee0 Reverse lens active/shining bias.
Prefer shining state when fed from below even if given
sunlight above.  This should make open-air circuits
easier to build and less likely to act up under sunlight.
2019-12-04 00:17:07 -05:00
Aaron Suen
0a2dd7842f Give the gated prism its own special state. 2019-12-04 00:16:07 -05:00
Aaron Suen
a03d13f9fc Larger, more consistent lens selection box. 2019-12-03 23:56:59 -05:00
Aaron Suen
161b580dea Cubify prisms, consistent selection box. 2019-12-03 23:49:08 -05:00
Aaron Suen
f54117718b Spread passive optic checks across multiple ticks. 2019-12-03 08:01:33 -05:00
Aaron Suen
4ee34d4b2d Fix major optics performance bug.
Optic checks were being propagated unconditionally in loops,
causing nearly every node in an optic network to be checked every
time.

This restores behavior to the original intended behavior of
propagating forward changes on next tick, but stopping at points
where state quiesces.

Unfortunately beam obstruction sensing has been working
instantaneously because of this bug, and that will revert to the
original intended behavior of having those picked up only on
random checks, which may cause regressions in some builds.
2019-12-03 07:57:22 -05:00
Aaron Suen
58d2be5410 Make some hot-potato items place on landing. 2019-12-01 12:57:35 -05:00
Aaron Suen
6e1f3fee94 Standardize intra-line spacing in code. 2019-12-01 11:08:12 -05:00
Aaron Suen
09dd5de920 Tone down "active" glow a bit. 2019-11-30 19:50:19 -05:00
Aaron Suen
62f26784e4 More lens state distinctive textures.
Make all optics distinguishable at nearly any angle.
2019-11-30 19:37:43 -05:00
Aaron Suen
525a6f7c0f Make optics look distinct by state.
New brighter/bolder port textures make it easier to
distinguish active vs. inactive optics from a distance.
2019-11-30 18:44:51 -05:00
Aaron Suen
d8976d3423 New low-poly model for prisms too. 2019-11-30 18:04:28 -05:00
Aaron Suen
a5d5f381e5 Fix UV mapping for lens model. 2019-11-30 17:44:28 -05:00
Aaron Suen
7af74ee5d6 Redo lens as a mesh node.
This should cut triangle count by almost 75% and
improve framerates in complex optic scenes.
2019-11-30 16:40:07 -05:00
Aaron Suen
b9e2f822f8 New flexible find_nodes_around api. 2019-11-30 10:28:35 -05:00
Aaron Suen
9beebc3498 Conservation of mass for burning stacks. 2019-11-28 11:18:03 -05:00
Aaron Suen
45c31cd203 Lenses can still burn transparent things.
The sunlight_propagates flag indicates that a node
can MOSTLY transmit light, like wooden frames, items,
or torches, but there are no purely transparent things
that are flammable, and all existing flammable things
are at least opaque at their centers, where lens light
would focus.
2019-11-28 11:03:45 -05:00
Aaron Suen
fd31c8dad7 Opaque nodes can block lens beams in item form. 2019-11-23 08:57:03 -05:00
Aaron Suen
a208893e07 Fix biactive lens instability.
When lenses face one another and are each fed light to
become active, they now prefer the active state over the
shining state.

Interestingly, inline vs. angled configurations have different
numbers of stable configurations...
2019-11-23 08:52:12 -05:00
Aaron Suen
08437adb04 Tweak lens collisionbox to prevent tunneling. 2019-11-02 23:32:26 -04:00
Aaron Suen
984947830a Fixed water texture error. 2019-10-11 19:49:35 -04:00
Aaron Suen
ed2a9e9573 New experimental animated liquid textures.
These are based on the nodecore "honeycomb", so they should at
least thematically match the other textures somewhat, even if
they're not super-attractive.
2019-10-11 19:40:34 -04:00
Aaron Suen
c147da4dde Convert from depends.txt to mod.conf 2019-10-05 11:24:16 -04:00
Aaron Suen
5c37e4351d Merge branch 'dev' into writing 2019-10-01 20:05:31 -04:00
Aaron Suen
b414d7f5c0 Unify gravel in aggregate recipe. 2019-09-09 06:58:57 -04:00
Aaron Suen
952912b5f6 Allow either kind of sand for glassmaking. 2019-09-07 12:05:23 -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
db1c67e169 Float and clear glass both grind down to crude similarly. 2019-08-19 22:33:25 -04:00
Aaron Suen
fd52006a7a Image optimizations. 2019-08-19 22:31:00 -04:00
Aaron Suen
1201630dbb Significantly simplified recipe registration. 2019-08-19 22:27:05 -04:00
Aaron Suen
20737f383b Merge branch 'dev' into floatglass 2019-08-16 08:41:28 -04:00
Aaron Suen
638f7f69da Merge branch 'dev' into writing 2019-08-16 08:22:57 -04:00
Aaron Suen
087b8c8f1b More precise logic for player names.
Try to detect player traces going through a change in fluid medium
such as water/air or water/glass, and block facial recognition
through it.

Specifically allow air-into-glass transitions, or into any other
medium otherwise clear enough to allow sunlight to propagate.
2019-04-08 08:52:59 -04:00
Aaron Suen
92e27632db Connected crude glass rendering.
Make it consistent with ordinary clear glass.
2019-04-08 08:08:22 -04:00
Aaron Suen
32cd936dc2 Create float glass.
- Super-clear, ultimate form of clear glass.
- Needs to be molded floating atop lava.
- Not sure about merging this yet; there are kinda a lot of forms
  of glass already now...
2019-04-07 18:39:10 -04:00
Aaron Suen
5b9c6324b6 Make crude glass just a bit cruder. 2019-04-07 09:18:07 -04:00
Aaron Suen
d1a937e973 Add crude glass.
This makes glassmaking more challenging, as glass that is quenched
when not molded, or left wandering too long, will tend to quench to
crude glass, which is inferior.

This also prevents molten glass from wandering the countryside
forever from failed glassmaking attempts, and precludes keeping
molten glass in "captivity" as a crude infinite light source.
2019-04-07 09:12:44 -04:00
Aaron Suen
4b1488ed3f Hints system overhaul.
- Included new content.
- Partially converted to base on recipes instead of just items.
- Added support for group and toolcap checks.

Fixed a number of small bugs elsewhere in the process.
2019-04-03 07:41:27 -04:00
Aaron Suen
1b9b20c80b Initial proof-of-concept writing system.
It's barely usable/playable.

I'm not happy with how disjoint it is from the existing crafting
system, for little gain; there's a lot of on_nodepunch logic that
was added for this.

It also doesn't play very well.  Major issues:
- Awkward collision with existing logic, e.g. taking things from
  shelves, then drawing on side of shelf.  Probably need a group
  specifically for writable sufaces.
- Single action to rotate through all glyphs is bad.  Probably
  want one to change through the 8 shapes, and another to change
  rotation/reflection.
- Erasure is awkward, inconsistent, and not necessarily reliable.
  Should make it possible to recover charcoal in most cases, and
  use a unified set of hooks for it...

Should glyphs be pointable and run logic directly on node, or
should we keep it point-through...?
2019-04-01 19:15:01 -04:00
Aaron Suen
fbff15e2fe MAJOR fire api/logic rework.
- Expanded fire api, added "check" varieties of things that also
  perform relevant checks for eligibility.  Standardized testing
  for ventilation.
- Snuff embers to coals as fuel.
- Fuel is consumed randomly by flames.  This means that fuel that
  are surrounded by flame burn out quicker, while flames
  surrounded by fuel consume fuel from each node slower.  This
  adds subtlety to furnace design for efficiency.
2019-03-31 20:54:38 -04:00
Aaron Suen
85f87d1c17 Simplify some selectionboxes significantly. 2019-03-30 21:23:02 -04:00