mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-05-17 20:30:46 +01:00
b60cd47309
* Techwebs * Add basic stock parts * Techweb production machines * Circuit Imprinter * More work * More designs * More designs, nodes' * More more * Better sorting for designs * Add the exosuit fab' * More conversions * More and more and more * mechfab parts * Modsuit Designs * Pinnace baron * Equipment * more mechfab * vehicles * more mecha * Micro mechs * Update mechfab_designs.dm * no time * zero * Update mechfab_designs.dm * Prosthetics Fabricator and fixes * Update maps to use new parts * Whoops, fix a few maps * Fix lint error * Port scene tools * Fireworks~~ * Don't label the sex toys as sex toys * Fixup maps in TGM format26517b7122: maps/virgo_minitest/virgo_minitest-1.dmm Automatically commited by: tools\mapmerge2\fixup.py * Significant portion of designs converted * Fix paths * Fix tgui lints * Just a whole bunch of designs * Almost doneeee * ALL DESIGNS CONVERTED * Merk all of the old stuff * Fix a few errors * Fix more errors * MORE FIX * Make server control work * Undo changes to archive * Fix a TODO * Make disks work * Start the long process of finishing the node tree * One more oops * All mechfab designs * Add departmental protolathes * Down to 200 designs unsorted * FINISH TECHWEBS * Fuck whoops * Remove the debug verbs * Little map tweaks * Fix mousedrop * More map fixes * Upstream bug lmao * guess CI hates this * Fixup maps in TGM formatfe062e7bc4: maps/tether/tether-03-surface3.dmm Automatically commited by: tools\mapmerge2\fixup.py * I gotta stop committing this * Change scree requested * Make science able to print implants too * Fix ghost spawns * Move NSFW gun * Merk partbundles, make janus module work * Pretty animation when you complete the tree :) * Don't display designs you can't print * Move security protolathes to warden's office * Make servers recover from power failure gracefully * Make fabricators drop their mats on the ground when destroyed * Ore Silo * Make CI happy * Fixup maps in TGM formatfe062e7bc4: maps/tether/tether-05-station1.dmm Automatically commited by: tools\mapmerge2\fixup.py * Fix MC crash * Make experiscanner work for borgs * I REALLY gotta stop committing this * Make scientists and the RD spawn with an experiscanner * Lock NIFs behind scanning mice * Make Biome happy * Allow scanning Cocoa and Kendrick in case they can't find mice * Change from Kendrick to Ratthew, ;help maint, or Brick * Change the name of the /rat/pet class so the experiscanner is more helpful * Add departmental_flags to a bunch of things * Remove a few things from security's techfab * Add a second engineering lathe to atmos * Fix runtime recycling rig modules, add name to cost sequence * Add a discount experiment for scanning slime cores * Change some fluff and shuffle chameleon clothes to bluespace yadayada * Make closets alt click immune * Do a bunch of sorting * Silly * Hopefully fix all infinite material bugs in techwebs * bad merge * quick ai fix * fix some robot stuff * axe downlaod fully * list * no ref * easier readable --------- Co-authored-by: C.L. <killer65311@gmail.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
93 lines
4.6 KiB
Plaintext
93 lines
4.6 KiB
Plaintext
/***************************************************************
|
|
** Design Datums **
|
|
** All the data for building stuff. **
|
|
***************************************************************/
|
|
/*
|
|
For the materials datum, it assumes you need reagents unless specified otherwise. To designate a material that isn't a reagent,
|
|
you use one of the material IDs below. These are NOT ids in the usual sense (they aren't defined in the object or part of a datum),
|
|
they are simply references used as part of a "has materials?" type proc. They all start with a $ to denote that they aren't reagents.
|
|
The currently supporting non-reagent materials. All material amounts are set as the define SHEET_MATERIAL_AMOUNT, which defaults to 100
|
|
|
|
Don't add new keyword/IDs if they are made from an existing one (such as rods which are made from iron). Only add raw materials.
|
|
|
|
Design Guidelines
|
|
- When adding new designs, check rdreadme.dm to see what kind of things have already been made and where new stuff is needed.
|
|
- A single sheet of anything is 100 units of material. Materials besides iron/glass require help from other jobs (mining for
|
|
other types of metals and chemistry for reagents).
|
|
- Add the AUTOLATHE tag to
|
|
*/
|
|
|
|
//DESIGNS ARE GLOBAL. DO NOT CREATE OR DESTROY THEM AT RUNTIME OUTSIDE OF INIT, JUST REFERENCE THEM TO WHATEVER YOU'RE DOING! //why are you yelling?
|
|
//DO NOT REFERENCE OUTSIDE OF SSRESEARCH. USE THE PROCS IN SSRESEARCH TO OBTAIN A REFERENCE.
|
|
|
|
/datum/design_techweb //Datum for object designs, used in construction
|
|
/// Name of the created object
|
|
var/name = "Name"
|
|
/// Description of the created object
|
|
var/desc = null
|
|
/// The ID of the design. Used for quick reference. Alphanumeric, lower-case, no symbols
|
|
var/id = DESIGN_ID_IGNORE
|
|
/// Bitflags indicating what machines this design is compatable with. ([IMPRINTER]|[AWAY_IMPRINTER]|[PROTOLATHE]|[AWAY_LATHE]|[AUTOLATHE]|[MECHFAB]|[BIOGENERATOR]|[LIMBGROWER]|[SMELTER])
|
|
var/build_type = null
|
|
/// List of materials required to create one unit of the product. Format is (typepath or caregory) -> amount
|
|
var/list/materials = list()
|
|
/// The amount of time required to create one unit of the product.
|
|
var/construction_time = 3.2 SECONDS
|
|
/// The typepath of the object produced by this design
|
|
var/build_path = null
|
|
/// Reagent produced by this design. Currently only supported by the biogenerator.
|
|
var/make_reagent
|
|
/// What categories this design falls under. Used for sorting in production machines.
|
|
var/list/category = list()
|
|
/// List of reagents required to create one unit of the product. Currently only supported by the limb grower.
|
|
var/list/reagents_list = list()
|
|
/// How many times faster than normal is this to build on the protolathe
|
|
var/lathe_time_factor = 1
|
|
/// Bitflags indicating what departmental lathes should be allowed to process this design.
|
|
var/departmental_flags = ALL
|
|
/// What techwebs nodes unlock this design. Constructed by SSresearch
|
|
var/list/datum/techweb_node/unlocked_by = list()
|
|
/// Override for the automatic icon generation used for the research console.
|
|
var/research_icon
|
|
/// Override for the automatic icon state generation used for the research console.
|
|
var/research_icon_state
|
|
/// Appears to be unused.
|
|
var/icon_cache
|
|
/// Optional string that interfaces can use as part of search filters. See- item/borg/upgrade/ai and the Exosuit Fabs.
|
|
var/search_metadata
|
|
/// For protolathe designs that don't require reagents: If they can be exported to autolathes with a design disk or not.
|
|
var/autolathe_exportable = TRUE
|
|
|
|
/datum/design_techweb/error_design
|
|
name = "ERROR"
|
|
desc = "This usually means something in the database has corrupted. If this doesn't go away automatically, inform Central Command so their techs can fix this ASAP(tm)"
|
|
|
|
/datum/design_techweb/Destroy()
|
|
SSresearch.techweb_designs -= id
|
|
return ..()
|
|
|
|
/datum/design_techweb/proc/InitializeMaterials()
|
|
var/list/temp_list = list()
|
|
for(var/i in materials) //Go through all of our materials, get the subsystem instance, and then replace the list.
|
|
var/amount = materials[i]
|
|
if(!istext(i)) //Not a category, so get the ref the normal way
|
|
var/datum/material/M = GET_MATERIAL_REF(i)
|
|
temp_list[M] = amount
|
|
else
|
|
temp_list[i] = amount
|
|
materials = temp_list
|
|
|
|
/datum/design_techweb/proc/icon_html(client/user)
|
|
var/datum/asset/spritesheet_batched/sheet = get_asset_datum(/datum/asset/spritesheet_batched/research_designs)
|
|
sheet.send(user)
|
|
return sheet.icon_tag(id)
|
|
|
|
/// Returns the description of the design
|
|
/datum/design_techweb/proc/get_description()
|
|
var/obj/object_build_item_path = build_path
|
|
|
|
return isnull(desc) ? initial(object_build_item_path.desc) : desc
|
|
|
|
/datum/design_techweb/proc/create_item(target)
|
|
return new build_path(target)
|