58 Commits

Author SHA1 Message Date
Aaron Suen
7921a78404 Fix door tote placement
When bypassing custom on_place logic and
skipping directly to "place as node" logic, also
allow nodes to customize their "place as node"
logic with another hook, which the tote can use
to ensure it's rebuilt when door-placed.
2021-12-30 12:49:24 -05:00
Aaron Suen
0aefabbeca Switch tote handle to knurled lode
There's no longer a wooden component in the
recipe, so eliminate the wood texture.
2021-12-30 12:18:10 -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
f0a3c7151b Tote fixes and improvements
- Fix item loss when totes ignite
- Slots used / total in description
2021-12-06 23:40:54 -05:00
Aaron Suen
f1c43f0594 Handle open-bottom storeboxes on tote place
When using forms with totes, if the items in forms
are not supported, they should fall.
2021-12-05 15:25:08 -05:00
Aaron Suen
b73d1d1290 Pre-clean-transparent filter on all textures
Some users may use filtering but not have the "clean transparent"
filter enabled in the Minetest engine config.  Bake this filter
into all images to (1) avoid the consequences of this (i.e. black
halos), and (2) possibly speed up startup time (the filter will
converge immediately).
2021-09-23 07:36:21 -04:00
Aaron Suen
9a700b597c Fix for tote placement crash
When placing a tote, if the space it's being placed into is not
buildable (e.g. placing against the ground where a stick is
lying above it) then it would crash; make it just abort tote
placement instead.
2021-08-23 06:26:42 -04:00
Aaron Suen
1b0a506633 Fix tote AISM over-modification
Carrying a tote with an infused tool inside would
cause the tote to repeatedly animate item
switching because the infused tool's soaking AISM
would keep returning a new item stack, causing
the tote to detect a "dirty" state, reserialize its
data, and thus keep changing metadata.

Detect if we're setting an item string to the same
string it already was, and don't mark it as dirty
if so, fixing this.
2021-08-09 07:26:26 -04:00
Aaron Suen
10a29b067b Preserve all node meta in displacement
Don't just preserve the stack, but assume that
any node with any meta could be displaced.
2021-06-26 09:10:35 -04:00
Aaron Suen
c0d72dccc8 Fix totes not running AISMs 2021-06-11 09:11:45 -04:00
Aaron Suen
c3519ca37c Fix backface culling on most mesh nodes 2021-03-15 19:17:25 -04:00
Aaron Suen
c706163bc1 Model object file optimization
https://github.com/ExeVirus/Compress-Obj
2021-03-09 08:25:01 -05:00
Aaron Suen
410ebd5d8d Recompression using ECT
https://github.com/fhanau/Efficient-Compression-Tool
2021-03-09 08:16:23 -05:00
Aaron Suen
6c649b3747 Relax empty tote handle restrictions
- They can now be stacked, somewhat
- They can be placed inside lode crates
2021-03-01 23:30:38 -05:00
Aaron Suen
c10e80ef87 Set name in mod.conf as demanded by 5.5+ 2021-03-01 20:10:27 -05:00
Aaron Suen
dabf8ac697 Fix node registration alpha for 5.4+ 2021-02-07 12:40:10 -05:00
Aaron Suen
6752808a81 Expand tote hint prereqs 2020-09-26 16:10:39 -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
fd0d7161ce Break tote mod into multiple files 2020-09-05 23:03:56 -04:00
Aaron Suen
18b01c1ae7 Redistribute hints into each mod
Hints themselves have not been tided up
much, but this makes the project of fixing the
hints for each mod a little more manageable
and breaks up the hard-to-navigate single
monolithic hints file in the old guide mod.

The old guide mod has now been completely
retired.  Hints are now a full-fledged API-layer
standard feature.
2020-09-04 19:07:45 -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
94401942ee Protect doors, standardize protection 2020-07-01 00:30:40 -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
7c5c8f68cf Tote placement fixes
Fix noisy prediction and quiet unpack
2020-06-25 23:35:55 -04:00
Aaron Suen
caf112fe75 Register protection violations for totes too 2020-06-09 22:48:45 -04:00
Aaron Suen
e2ed97205b Protection handling for totes 2020-06-09 20:57:19 -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
f5a3911ddf Fix tote handle UV mapping. 2020-01-25 08:25:29 -05:00
Aaron Suen
55a68c844b Fix broken tote AISM hook. 2020-01-17 21:43:48 -05:00
Aaron Suen
4d47ab2e75 NC API dependency simplification.
Treat all API mods as a "layer", and use the new
nc_api_all registration to indicate that a mod depends
on the NC API (which ALL NC mods assume they do).
This means that each non-API mod does not need to
worry about which API mods it really needs and which
it does not, nor will they need to be updated for any
internal API restructures.

This is a game, not a modpack, so all mods will be
loaded anyway, and we only care about order.  That
means that we don't really need to worry about
having excess dependencies because any mod we
don't actually need will be needed by something that's
loaded anyway.  If somebody wants to reuse a
component elsewhere, they're likely to need to do
some work to untangle it anyway, because of the
amount that NodeCore mechanics interact and
interdepend.
2020-01-05 12:59:12 -05:00
Aaron Suen
dcfc80b367 Remove explicit names in mod.confs. 2020-01-05 12:38:45 -05:00
Aaron Suen
89020e8340 Major rebuild of item_entity.
This created a ton of dependency inversions, which
necessitated moving a number of API functions up into
higher layers, and restructuring dependency lists for
a number of mods.

BOLO: non-deterministic load errors due to missed
dependencies.
2020-01-05 11:42:22 -05:00
Aaron Suen
e48722e731 Add a little color to living sponges.
Make them visually distinguishable, and allow
players to tell when their living sponges have died.
2019-12-18 20:21:54 -05:00
Aaron Suen
a0300c6c29 Totes also cannot deploy over players. 2019-12-18 19:53:59 -05:00
Aaron Suen
7050568938 Dammit dammit z-fighting hacks.
- Unbake the scaling tweak from models, apply it
  using mesh scaling in MT instead.
- Standardize ratio definition in one place.
- Default all nodeboxes to winning z-fights.
2019-12-08 23:14:56 -05:00
Aaron Suen
5d0ff923d3 Fix tote mesh missing material groups. 2019-12-08 22:56:12 -05:00
Aaron Suen
c31a01ec13 Fix z-fighting scale hack. 2019-12-08 22:52:25 -05:00
Aaron Suen
5265fdcb92 Image optimize. 2019-12-08 22:31:24 -05:00
Aaron Suen
44a431df61 Overhaul tote visual.
- Convert to mesh node.
- Make handle/frame look more like recipe.
- Visual difference for totes with slots.
2019-12-08 22:28:20 -05:00
Aaron Suen
80340d9058 Sneak-dig tote handle to leave shelves behind. 2019-12-08 08:26:58 -05:00
Aaron Suen
e99c72154d Shelf standarization and tweaks.
- Refactor common code.
- Allow placement of wood shelves inside lode crates.
2019-12-07 18:25:05 -05:00
Aaron Suen
17cb5d0d41 Make note of remaining tote issues. 2019-12-04 08:36:43 -05:00
Aaron Suen
b180912f0e Run AISMs inside totes. 2019-12-04 08:30:37 -05:00
Aaron Suen
0281b2b890 Totes provide only limited fire protection.
When a tote is "burned" it will eject any flammable
container nodes, and their contents, to be exposed to
the fire
2019-12-01 17:00:09 -05:00
Aaron Suen
1e2edf3f95 Make totes recyclable.
Fix minor tote recipe bug, too (make it work with
metal crates too).
2019-10-16 20:02:03 -04:00
Aaron Suen
c147da4dde Convert from depends.txt to mod.conf 2019-10-05 11:24:16 -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
28108e1e40 Add translation support, esp. for TouchTips.
Translations are currently by holistic strings, i.e.
no parameterization.  This may create some busy
work for translators, but gives them more freedom
to account for differences between languages.

A translation template file is written out to the world
path on game start, so translators have a seed to
work from.
2019-08-23 20:40:33 -04:00