Skip to content

Material datum implementation

Rob Nelson requested to merge pull/4584/MaterialDatumImpl into Bleeding-Edge

Created by: ComicIronic

m_amt and g_amt (and in cases, gold_amt, diamond_amt, etc) have been stripped out, to make way for....

MATERIAL DATUMS

Like reagents, but for materials! Not generated on every object, but atoms can be set to start with an empty datum or with a datum with preset values via the starting_materials var Think of all the possibilities from materials, but datums. Incredible. Datums have been pooled where possible, to help save on memory load with fabricators making and eating items.

Fabricators

Fixed a bug with fabricators not taking their shown cost, but just the design's plain cost. Fixed a bug where fabricators would begin taking material costs even if an item wasn't completable. Fabricators now transfer the materials used to their products: a more efficient fabricator will therefore use less metal to make a mech, but also make a mech that contains less metal. All designs are now world-consistent - scanning the same object will ref the same design, all fabricators build off the same designs, etc. Mechanic fabs now add the plastic cost to designs themselves, instead of it being a part of the design. This is toggled by var, and autolathes do not do this. Mechanic design making changed to not randomly generate design costs based on tech level now. It may be resurrected later for the fabs themselves. Mechanic blueprints no longer come with uses. Instead, the blueprint will be consumed if paper, or not consumed if nano, when put into a machine. Mechanic designs are now material-specific: it is possible to now scan a specific copy of an item if its materials are unique, and then recreate the item with those materials by using the general fabricator.

Autolathe

Moved to be a research type fabricator under mechanic_fabs. Autolathe building has a maximum time to bring it in line with older behaviour, especially since the lathe's design list never changes. Autolathe does not require plastic.

Wiring

Moved RnD wiring under a rnd wiring datum, which is also used for the Autolathe hacking.

UP FOR CODE REVIEW

TODO

  • Bring back autolathe recycling
  • Bring back autolathe hacking
  • Finalise autholathe code
  • SQUASH

TO DISCUSS

  • Should you be able to add designs to autolathes? These designs would be the same as those in the general fabricator - currently not possible.

Merge request reports