Material datum functionality changed to mimic that of reagents etc. by
using a global datum list and an assoc value list.
Material datums added at the atom level.
starting_materials var added - on New(), the materials in the list are
added to a datum. An empty list generates an empty datum, a null means no
datum.
m_amt, g_amt, and where applicable gold_amt, etc. completely removed,
replaced with starting_materials where applicable.
Fabricators
Fixed a bug with fabricators taking design cost, not shown cost.
Fixed a bug with fabricators taking costs before a design was shown
completable.
Fabricators now transfer the materials they use in the design to the atom
produced's material datum.
Designs are now world-consistent : scanning the same atom will ref the
same design, and scanning an atom with a design will fetch it.
Mechanic fabs now add plastic cost on top of the design, not to it.
Mechanic designs no longer require random extra materials.
Mechanic designs are now material-specific, not type-specific.
Mechanic blueprint uses have been removed, in favour of a consumable
system.
RnD wires moved to the datum system.
Autolathe moved under fabricators. It preserves as much functionality as
possible.
Framework added for plastic costs on mechanic fabs to be toggled, and for
removal of designs to be toggled also.
Removed update_values(). RIP, shine on you CPU diamond.
Removed get_moles_by_id and get_archived_moles_by_id, all moles are now accessed directly to reduce call cost.
Added set_temperature and set_volume procs which recalc pressure when temperature or pressure change.
Heat_capacity is now a var updated when gases update.
Modified adjust_gas to use set_gas, modified set_gas to alter heat_capacity, total_moles, and pressure as needed.
Moved gas_mixture gas numbers to a list which is connected to a global gas_datum list, like with reagents.
Modified some maths procs to be more sane, added adjust_gas and set_gas to help with processing.
Added a modular system for gas flags - gases can now be marked as fuel and oxidiser with a flag, logged with a flag, scanned with a flag, etc.
Changed scrubbers to use a list of scrubbing gases rather than a set of vars.
Made miners and xenoarch effects more sensible - they now produce gas by ID, not manually.
Made turfs' starting gases into a list, removed turf gas number vars.
The drop_item arg is now the loc placed, not the child of the loc or whatever.
Removed a few lines of items being placed into themselves, on themselves, into other things manually, into their users, etc.
Cleans up the fix for MoMMI recharger silliness.
This took about 2 hours of non-stop manual searches.
Stuff goes under types.
Types have procs.
Never have 500 lines of repeated code again.
I came very close to crying while editing this. You should appreciate that.
Added the state var to all machines. 0 is unanchored, 1 is anchored, 2 is welded.
Added the WELD_FIXED flag for machines that can be welded down.
Added the weldToFloor proc, which is used to toggle welding down for machines.
Fixed machines not using general procs.
Fixed some relative pathing.
What was happening was returntopool was nulling the variable that prevented the projectile from bumping something twice, and for whatever reason despite having no loc the proj would bump the same mob twice then be in the void again. The spawn() allows the bump proc to finish and then the projectile is returned to the pool.