Instead of using 20% of CPU time to run
ABMs, defer 75% of them, so we are using
20% time to run 20% ABMs plus defer
a further 60%, giving us a total of roughly
80% CPU time for ABMs (not factoring in
overhead).
This should let us work around the engine's
hardcoded 20% ABM limit.
This should cause maps that have the same
seeds to have much more similar results
than before, e.g. sponge deposits will be in
the same places determined by seed and not
random each regeneration of the map.
- Mapgen shared now provides an RNG which
will be deterministic when feasible, for
repeatable mapgen results.
- Make existing rng-using mapgen hooks use
the new deterministic RNG.
- Mapgen shared hooks are also run in
deterministic order too.
- Tidy up mapgen_shared API a little more.
We generally either require all cooking recipes to operate on a
single item, or on any number in parallel, and will probably
never want to do an exact match on any other quantity.
This speeds up a 4000ms startup cost to 40ms.
- Categorize types of issues, since I find I pick through the list
not based on absolute priority but based on what kind of things
I feel like working on, e.g. gameplay improvements vs. code
quality.
- Clean out the icebox. Reinstate a few things at bottom of other
lists, clean out the rest.
Optics keep track of path dependency info
used in calculating state. When a node is
added/removed in the path via the mod API
(i.e. not schematics, vmanip, etc.) then the
nodes whose state decisions depended on
paths going through there are automatically
triggered for a recheck.
This should make things like furnace sand
auto-loaders respond snappily.
Granted, memory use with this approach is
a concern, but we will just have to monitor it
under normal usage patterns.
- New Delayed Node Trigger API that allows
the use of multiple externally-defined node
timer events, as long as on_timer of a node
is not explicitly overridden.
- Use the new DNT system to make door
ablation reliable.
We actually have good enough coverage to
push in events when the ents need to update
appearance, so the only thing the patrol
on step was doing was clearing old ents that
the ABM wouldn't catch, which would just be
cleared eventually anyway due to unloading
or something.
This cuts out a major performance cost item
entirely.
If the item type does not at least pratially match any cooking/cooling recipe the first run, assume it never will and cache this fact
so we can quickly skip all stacks of the same
item next run.
Suggested by oilboi to make the swimming eye
height match the model anim. There is a bit of
jank switching between swimming and standing
height, but it doesn't seem to be too bad, and it
makes players have to actually break the
surface to breathe, and makes swimming a little
less bizarre in 3rd person view.
- There was never any real proof that the
limiting mechanism was necessary, and if it is,
it may be better to use it sparingly.
- We suspect this may be complicit in some
serious issues, such as door ablation failures.
- Despite 2 different revisions of the code,
limited abms have never worked reliably.
- Instead of fixed count limits, either dynamic
or time-based limits would be better.