20 Commits

Author SHA1 Message Date
Aaron Suen
2a6deed2bd Fix sponge case survival inconsistency
Instead of hard-coding for the special glass case, check only open
faces of a storebox if the storebox_sealed group is set, otherwise
keep using the old logic of all directions.

A sponge will survive in a shelf or lode crate as long as no side
is exposed to air.  It will survive in glass cases as long as the
open top is not exposed to air; the sides are not checked.
2023-06-04 21:17:10 -04:00
Aaron Suen
741955e097 Fix item deletion on crafting storage boxes
Since items inside box would be deleted, just don't
allow crafting of storeboxes/totes if there's already
an item trapped in the form.
2022-01-02 21:31:15 -05:00
Aaron Suen
4304c47c6f MAJOR: Shelf recipe rework
Finally use the new Forms to craft shelves
using a 2-component recipe, and replace the
old 3x3 recipes.  This affects:
- Wood shelves
- Clear glass cases
- Float glass cases
- Lode crates
- Tote handles

For now, we're just going with the simplest
recipe of just putting an item into the form.
If players want to store things in the form
without assembling a shelf, they'll have to
remember to drop items in through the top
only.

Forms may have served a purpose as makeshift
storage when actual shelves are too expensive
but this is NOT their purpose.  They are
primarily intended as crafting ingredients for
proper storage, and secondarily as hoppers for
stack-fed machines.  Any ability to use them as
actual player-controlled storage devices is
purely coincidental and not guaranteed.
2021-12-30 12:05:29 -05:00
Aaron Suen
1a1a4255db Rename Glass Tank to Glass Case
This caused copious confusion for new players, who assume the
glass "tank" is like an aquarium tank and can be used to carry
water.  Originally it was intended to seal in "moisture" for
sponge transport, but that has become a far less important use
case (and in fact sponge transport is probably best done just by
building submerged pathways, like the way amalgam transport is
done) and glass "tanks" are more like "display cases" now, or an
intermediate storage container that adds top access (useful for
totes).
2021-10-15 06:46:27 -04:00
Aaron Suen
011e171e2d Float glass tanks too now 2021-08-04 06:42:14 -04:00
Aaron Suen
1632b6352a Revert "Appease 5.4-dev texture_alpha warnings"
This reverts commit 253c2282917ecade5b8356d592edab40b1d517f5.

Apparently this warning is full of crap.  Explicitly
setting use_texture_alpha in the node def does
something DIFFERENT than what the engine says
it's doing enabling it internally.  use_texture_alpha
enables alpha BLENDING, which is what we
don't want with interpolation filters, whereas
leaving it off enables alpha THRESHOLDING which
is exactly what we want.
2020-09-05 23:46:44 -04:00
Aaron Suen
253c228291 Appease 5.4-dev texture_alpha warnings
Apparently we will be required to enable
use_texture_alpha explicitly for anything using
any level of transparency, not just alpha
blending, in some future version.
2020-08-31 23:36:35 -04:00
Aaron Suen
b2f78c0daa Indexing for craft checks
By restricting the recipes we check based
on the name of the central object being
checked, we can do many fewer craft
checks per item and avoid expensive
checks.
2020-06-27 12:20:35 -04:00
Aaron Suen
42f125c716 Make most recipes indexable
Register a "rootmatch" property for all
recipes that represents a broader, quicker
test for recipe eligibility.  False positives are
allowed but false negatives are not.

Since most recipes are eligible, we can
use this to build an index for fast lookups
of subsets of recipes to run and skip most
of the other ones.
2020-06-27 11:06:43 -04:00
Aaron Suen
0012c2673b More scaling time definitions
Also, scaling_time completely overrides
group-based scaling time logic.
2020-03-29 08:13:41 -04:00
Aaron Suen
2d73df30e7 New API to check if air passes thru node.
Can be used for things like sponge air exposure
or environmental exposure checks.
2020-01-18 09:57:39 -05:00
Aaron Suen
053f3b718f Fix glass tank hammering properly.
First class recipe, explcitly test for contents.
2020-01-17 23:45:00 -05:00
Aaron Suen
750bb87b31 Disallow hammering glass tanks.
Hammering them to sand destroys their contents.
Instead, require burning away the binding.
2020-01-17 22:14:10 -05:00
Aaron Suen
60e79c4c35 Glass tanks burn down to crude glass, not clear. 2019-12-09 21:10:39 -05:00
Aaron Suen
fc4c4bc9c4 Fix glass shelf burning bug. 2019-12-08 22:31:12 -05:00
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