Revert "Merge branch 'punishesarchie' of https://github.com/MalricB/Hyper-Station-13 into punishesarchie"

This reverts commit 1945c166b4, reversing
changes made to c8d20ea83c.
This commit is contained in:
CygnusB
2021-01-19 06:40:28 -03:00
parent 1945c166b4
commit 8cda8bbd16
1465 changed files with 202589 additions and 377073 deletions
+83 -88
View File
@@ -1,88 +1,83 @@
/***************************************************************
** 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 MINERAL_MATERIAL_AMOUNT, which defaults to 2000
- MAT_METAL (/obj/item/stack/metal).
- MAT_GLASS (/obj/item/stack/glass).
- MAT_PLASMA (/obj/item/stack/plasma).
- MAT_SILVER (/obj/item/stack/silver).
- MAT_GOLD (/obj/item/stack/gold).
- MAT_URANIUM (/obj/item/stack/uranium).
- MAT_DIAMOND (/obj/item/stack/diamond).
- MAT_BANANIUM (/obj/item/stack/bananium).
(Insert new ones here)
Don't add new keyword/IDs if they are made from an existing one (such as rods which are made from metal). 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 2000 units of material. Materials besides metal/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 //Datum for object designs, used in construction
var/name = "Name" //Name of the created object.
var/desc = "Desc" //Description of the created object.
var/id = DESIGN_ID_IGNORE //ID of the created object for easy refernece. Alphanumeric, lower-case, no symbols
var/build_type = null //Flag as to what kind machine the design is built in. See defines.
var/list/materials = list() //List of materials. Format: "id" = amount.
var/construction_time //Amount of time required for building the object
var/build_path = null //The file path of the object that gets created
var/list/make_reagents = list() //Reagents produced. Format: type = amount. Currently only supported by the biogenerator.
var/list/category = null //Primarily used for Mech Fabricators, but can be used for anything
var/list/reagents_list = list() //List of reagents. Format: type = amount.
var/maxstack = 1
var/lathe_time_factor = 1 //How many times faster than normal is this to build on the protolathe
var/dangerous_construction = FALSE //notify and log for admin investigations if this is printed.
var/departmental_flags = ALL //bitflags for deplathes.
var/list/datum/techweb_node/unlocked_by = list()
var/research_icon //Replaces the item icon in the research console
var/research_icon_state
var/icon_cache
/datum/design/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/Destroy()
SSresearch.techweb_designs -= id
return ..()
/datum/design/proc/icon_html(client/user)
var/datum/asset/spritesheet/sheet = get_asset_datum(/datum/asset/spritesheet/research_designs)
sheet.send(user)
return sheet.icon_tag(id)
////////////////////////////////////////
//Disks for transporting design datums//
////////////////////////////////////////
/obj/item/disk/design_disk
name = "Component Design Disk"
desc = "A disk for storing device design data for construction in lathes."
icon_state = "datadisk1"
materials = list(MAT_METAL=300, MAT_GLASS=100)
var/list/blueprints = list()
var/max_blueprints = 1
/obj/item/disk/design_disk/Initialize()
. = ..()
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
for(var/i in 1 to max_blueprints)
blueprints += null
/obj/item/disk/design_disk/adv
name = "Advanced Component Design Disk"
desc = "A disk for storing device design data for construction in lathes. This one has extra storage space."
materials = list(MAT_METAL=300, MAT_GLASS=100, MAT_SILVER = 50)
max_blueprints = 5
/***************************************************************
** 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 MINERAL_MATERIAL_AMOUNT, which defaults to 2000
- MAT_METAL (/obj/item/stack/metal).
- MAT_GLASS (/obj/item/stack/glass).
- MAT_PLASMA (/obj/item/stack/plasma).
- MAT_SILVER (/obj/item/stack/silver).
- MAT_GOLD (/obj/item/stack/gold).
- MAT_URANIUM (/obj/item/stack/uranium).
- MAT_DIAMOND (/obj/item/stack/diamond).
- MAT_BANANIUM (/obj/item/stack/bananium).
(Insert new ones here)
Don't add new keyword/IDs if they are made from an existing one (such as rods which are made from metal). 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 2000 units of material. Materials besides metal/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?
/datum/design //Datum for object designs, used in construction
var/name = "Name" //Name of the created object.
var/desc = "Desc" //Description of the created object.
var/id = DESIGN_ID_IGNORE //ID of the created object for easy refernece. Alphanumeric, lower-case, no symbols
var/build_type = null //Flag as to what kind machine the design is built in. See defines.
var/list/materials = list() //List of materials. Format: "id" = amount.
var/construction_time //Amount of time required for building the object
var/build_path = null //The file path of the object that gets created
var/list/make_reagents = list() //Reagents produced. Format: "id" = amount. Currently only supported by the biogenerator.
var/list/category = null //Primarily used for Mech Fabricators, but can be used for anything
var/list/reagents_list = list() //List of reagents. Format: "id" = amount.
var/maxstack = 1
var/lathe_time_factor = 1 //How many times faster than normal is this to build on the protolathe
var/dangerous_construction = FALSE //notify and log for admin investigations if this is printed.
var/departmental_flags = ALL //bitflags for deplathes.
var/list/datum/techweb_node/unlocked_by = list()
var/research_icon //Replaces the item icon in the research console
var/research_icon_state
var/icon_cache
/datum/design/Destroy()
CRASH("DESIGN DATUMS SHOULD NOT EVER BE DESTROYED AS THEY ARE ONLY MEANT TO BE IN A GLOBAL LIST AND REFERENCED FOR US.")
return ..()
/datum/design/proc/icon_html(client/user)
var/datum/asset/spritesheet/sheet = get_asset_datum(/datum/asset/spritesheet/research_designs)
sheet.send(user)
return sheet.icon_tag(id)
////////////////////////////////////////
//Disks for transporting design datums//
////////////////////////////////////////
/obj/item/disk/design_disk
name = "Component Design Disk"
desc = "A disk for storing device design data for construction in lathes."
icon_state = "datadisk1"
materials = list(MAT_METAL=300, MAT_GLASS=100)
var/list/blueprints = list()
var/max_blueprints = 1
/obj/item/disk/design_disk/Initialize()
. = ..()
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
for(var/i in 1 to max_blueprints)
blueprints += null
/obj/item/disk/design_disk/adv
name = "Advanced Component Design Disk"
desc = "A disk for storing device design data for construction in lathes. This one has extra storage space."
materials = list(MAT_METAL=300, MAT_GLASS=100, MAT_SILVER = 50)
max_blueprints = 5
@@ -151,97 +151,97 @@
name = "Export Design (Wine)"
desc = "Allows for the blowing, and bottling of Wine bottles."
id = "wine_export"
reagents_list = list(/datum/reagent/consumable/ethanol/wine = 100)
reagents_list = list("wine" = 100)
build_path = /obj/item/export/bottle/wine
/datum/design/bottle/export/rum
name = "Export Design (Rum)"
desc = "Allows for the blowing, and bottling of Rum bottles."
id = "rum_export"
reagents_list = list(/datum/reagent/consumable/ethanol/rum = 100)
reagents_list = list("rum" = 100)
build_path = /obj/item/export/bottle/rum
/datum/design/bottle/export/gin
name = "Export Design (Gin)"
desc = "Allows for the blowing, and bottling of Gin bottles."
id = "gin_export"
reagents_list = list(/datum/reagent/consumable/ethanol/gin = 100)
reagents_list = list("gin" = 100)
build_path = /obj/item/export/bottle/gin
/datum/design/bottle/export/whiskey
name = "Export Design (Whiskey)"
desc = "Allows for the blowing, and bottling of Whiskey bottles."
id = "whiskey_export"
reagents_list = list(/datum/reagent/consumable/ethanol/whiskey = 100)
reagents_list = list("whiskey" = 100)
build_path = /obj/item/export/bottle/whiskey
/datum/design/bottle/export/vodka
name = "Export Design (Vodka)"
desc = "Allows for the blowing, and bottling of 99% Vodka bottles."
id = "vodka_export"
reagents_list = list(/datum/reagent/consumable/ethanol/vodka = 99, /datum/reagent/water = 1)
reagents_list = list("vodka" = 99, "water" = 1)
build_path = /obj/item/export/bottle/vodka
/datum/design/bottle/export/tequila
name = "Export Design (Tequila)"
desc = "Allows for the blowing, and bottling of Tequila bottles."
id = "tequila_export"
reagents_list = list(/datum/reagent/consumable/ethanol/tequila = 80, /datum/reagent/consumable/lemonjuice = 20)
reagents_list = list("tequila" = 80, "lemon_juice" = 20)
build_path = /obj/item/export/bottle/tequila
/datum/design/bottle/export/patron
name = "Export Design (Patron)"
desc = "Allows for the blowing, and bottling of Patron bottles."
id = "patron_export"
reagents_list = list(/datum/reagent/consumable/ethanol/patron = 100)
reagents_list = list("patron" = 100)
build_path = /obj/item/export/bottle/patron
/datum/design/bottle/export/kahlua
name = "Export Design (Kahlua)"
desc = "Allows for the blowing, and bottling of Kahlua bottles."
id = "kahlua_export"
reagents_list = list(/datum/reagent/consumable/ethanol/kahlua = 100)
reagents_list = list("kahlua" = 100)
build_path = /obj/item/export/bottle/kahlua
/datum/design/bottle/export/sake
name = "Export Design (Sake)"
desc = "Allows for the blowing, and bottling of Sake bottles."
id = "sake_export"
reagents_list = list(/datum/reagent/consumable/ethanol/sake = 80, /datum/reagent/consumable/rice = 10, /datum/reagent/consumable/sugar = 10)
reagents_list = list("sake" = 80, "rice" = 10, "sugar" = 10)
build_path = /obj/item/export/bottle/sake
/datum/design/bottle/export/vermouth
name = "Export Design (Vermouth)"
desc = "Allows for the blowing, and bottling of Vermouth bottles."
id = "vermouth_export"
reagents_list = list(/datum/reagent/consumable/ethanol/vermouth = 100)
reagents_list = list("vermouth" = 100)
build_path = /obj/item/export/bottle/vermouth
/datum/design/bottle/export/goldschlager
name = "Export Design (Goldschlager)"
desc = "Allows for the blowing, and bottling of Goldschlager bottles."
id = "goldschlager_export"
reagents_list = list(/datum/reagent/consumable/ethanol/goldschlager = 100)
reagents_list = list("goldschlager" = 100)
build_path = /obj/item/export/bottle/goldschlager
/datum/design/bottle/export/hcider
name = "Export Design (Cider)"
desc = "Allows for the blowing, and bottling of Cider bottles."
id = "hcider_export"
reagents_list = list(/datum/reagent/consumable/ethanol/hcider = 30, /datum/reagent/water = 20)
reagents_list = list("hcider" = 30, "water" = 20)
build_path = /obj/item/export/bottle/hcider
/datum/design/bottle/export/cognac
name = "Export Design (Cognac)"
desc = "Allows for the blowing, and bottling of Cognac bottles."
id = "cognac_export"
reagents_list = list(/datum/reagent/consumable/ethanol/cognac = 100)
reagents_list = list("cognac" = 100)
build_path = /obj/item/export/bottle/cognac
/datum/design/bottle/export/absinthe
name = "Export Design (Absinthe)"
desc = "Allows for the blowing, and bottling of Absinthe bottles."
reagents_list = list(/datum/reagent/consumable/ethanol/absinthe = 100)
reagents_list = list("absinthe" = 100)
id = "absinthe_export"
build_path = /obj/item/export/bottle/absinthe
@@ -249,49 +249,49 @@
name = "Export Design (Grappa)"
desc = "Allows for the blowing, and bottling of Grappa bottles."
id = "grappa_export"
reagents_list = list(/datum/reagent/consumable/ethanol/grappa = 100)
reagents_list = list("grappa" = 100)
build_path = /obj/item/export/bottle/grappa
/datum/design/bottle/export/fernet
name = "Export Design (Fernet)"
desc = "Allows for the blowing, and bottling of Fernet bottles."
id = "fernet_export"
reagents_list = list(/datum/reagent/consumable/ethanol/fernet = 100)
reagents_list = list("fernet" = 100)
build_path = /obj/item/export/bottle/fernet
/datum/design/bottle/export/applejack
name = "Export Design (Applejack)"
desc = "Allows for the blowing, and bottling of Applejack bottles."
id = "applejack_export"
reagents_list = list(/datum/reagent/consumable/ethanol/applejack = 50, /datum/reagent/consumable/ethanol/gin = 10)
reagents_list = list("applejack" = 50, "gin" = 10)
build_path = /obj/item/export/bottle/applejack
/datum/design/bottle/export/champagne
name = "Export Design (Champagne)"
desc = "Allows for the blowing, and bottling of Champagne bottles."
id = "champagne_export"
reagents_list = list(/datum/reagent/consumable/ethanol/champagne = 90, /datum/reagent/carbondioxide = 10)
reagents_list = list("champagne" = 90, "co2" = 10)
build_path = /obj/item/export/bottle/champagne
/datum/design/bottle/export/blazaam
name = "Export Design (Blazaam)"
desc = "Allows for the blowing, and bottling of Blazaam bottles."
id = "blazaam_export"
reagents_list = list(/datum/reagent/consumable/ethanol/blazaam = 80, /datum/reagent/water/holywater = 20)
reagents_list = list("blazaam" = 80, "holywater" = 20)
build_path = /obj/item/export/bottle/blazaam
/datum/design/bottle/export/trappist
name = "Export Design (Trappist)"
desc = "Allows for the blowing, and bottling of Trappist bottles."
id = "trappist_export"
reagents_list = list(/datum/reagent/consumable/ethanol/trappist = 100)
reagents_list = list("trappist" = 100)
build_path = /obj/item/export/bottle/trappist
/datum/design/bottle/export/grenadine
name = "Export Design (Grenadine)"
desc = "Allows for the blowing, and bottling of Grenadine bottles."
id = "grenadine_export"
reagents_list = list(/datum/reagent/consumable/grenadine = 100)
reagents_list = list("grenadine" = 100)
build_path = /obj/item/export/bottle/grenadine
/datum/design/bottle/export/minikeg
@@ -299,7 +299,7 @@
desc = "Allows for the fabication, and bottling of Minikeg of craft beer."
id = "minikeg"
category = list("Beers")
reagents_list = list(/datum/reagent/consumable/ethanol/beer/light = 100)
reagents_list = list("light_beer" = 100)
build_path = /obj/item/export/bottle/minikeg
/datum/design/bottle/export/blooddrop
@@ -307,7 +307,7 @@
desc = "Allows for the blowing, and bottling of Blooddrop bottles."
id = "blooddrop"
category = list("Wines")
reagents_list = list(/datum/reagent/consumable/ethanol/champagne = 30, /datum/reagent/carbondioxide = 30, /datum/reagent/consumable/ethanol/wine = 10, /datum/reagent/consumable/grapejuice = 30)
reagents_list = list("champagne" = 30, "co2" = 30, "wine" = 10, "grapejuice" = 30)
build_path = /obj/item/export/bottle/blooddrop
/datum/design/bottle/export/slim_gold
@@ -315,7 +315,7 @@
desc = "Allows for the blowing, and bottling of Slim Gold bottles."
id = "slim_gold"
category = list("Beers")
reagents_list = list(/datum/reagent/gold = 10, /datum/reagent/carbondioxide = 10, /datum/reagent/consumable/ethanol/rum = 30, /datum/reagent/consumable/ethanol/beer = 40)
reagents_list = list("gold" = 10, "co2" = 10, "rum" = 30, "beer" = 40)
build_path = /obj/item/export/bottle/slim_gold
/datum/design/bottle/export/white_bloodmoon
@@ -323,13 +323,13 @@
desc = "Allows for the blowing, and bottling of White Bloodmoon bottles."
id = "white_bloodmoon"
category = list("Wines")
reagents_list = list(/datum/reagent/medicine/synthflesh = 50, /datum/reagent/blood = 50, /datum/reagent/liquidgibs = 10)
reagents_list = list("synthflesh" = 50, "blood" = 50, "liquidgibs" = 10)
build_path = /obj/item/export/bottle/white_bloodmoon
/datum/design/bottle/export/greenroad
name = "Export Design (Greenroad)"
desc = "Allows for the blowing, and bottling of Greenroad bottles."
id = "greenroad"
reagents_list = list(/datum/reagent/consumable/vitfro = 50, /datum/reagent/consumable/ethanol/rum = 50, /datum/reagent/ash = 10)
reagents_list = list("vitfro" = 50, "rum" = 50, "ash" = 10)
category = list("Beers")
build_path = /obj/item/export/bottle/greenroad
@@ -7,7 +7,7 @@
id = "milk"
build_type = BIOGENERATOR
materials = list(MAT_BIOMASS = 20)
make_reagents = list(/datum/reagent/consumable/milk = 10)
make_reagents = list("milk" = 10)
category = list("initial","Food")
/datum/design/cream
@@ -15,7 +15,7 @@
id = "cream"
build_type = BIOGENERATOR
materials = list(MAT_BIOMASS = 30)
make_reagents = list(/datum/reagent/consumable/cream = 10)
make_reagents = list("cream" = 10)
category = list("initial","Food")
/datum/design/milk_carton
@@ -39,7 +39,7 @@
id = "black_pepper"
build_type = BIOGENERATOR
materials = list(MAT_BIOMASS = 25)
make_reagents = list(/datum/reagent/consumable/blackpepper = 10)
make_reagents = list("blackpepper" = 10)
category = list("initial","Food")
/datum/design/pepper_mill
@@ -1,86 +1,76 @@
/////////////////////////////////////////
//////////////Blue Space/////////////////
/////////////////////////////////////////
/datum/design/beacon
name = "Tracking Beacon"
desc = "A blue space tracking beacon."
id = "beacon"
build_type = PROTOLATHE
materials = list(MAT_METAL = 150, MAT_GLASS = 100)
build_path = /obj/item/beacon
category = list("Bluespace Designs")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_SECURITY
/datum/design/bag_holding
name = "Bag of Holding"
desc = "A backpack that opens into a localized pocket of bluespace."
id = "bag_holding"
build_type = PROTOLATHE
materials = list(MAT_GOLD = 3000, MAT_DIAMOND = 1500, MAT_URANIUM = 250, MAT_BLUESPACE = 2000)
build_path = /obj/item/storage/backpack/holding
category = list("Bluespace Designs")
dangerous_construction = TRUE
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
/datum/design/satchel_holding
name = "Satchel of Holding"
desc = "A satchel that opens into a localized pocket of bluespace."
id = "satchel_holding"
build_type = PROTOLATHE
materials = list(MAT_GOLD = 3000, MAT_DIAMOND = 1500, MAT_URANIUM = 250, MAT_BLUESPACE = 2000)
build_path = /obj/item/storage/backpack/holding/satchel
category = list("Bluespace Designs")
dangerous_construction = TRUE
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
/datum/design/biobag_holding
name = "Bio Bag of Holding"
desc = "A chemical holding thingy. Mostly used for xenobiology."
id = "biobag_holding"
build_type = PROTOLATHE
materials = list(MAT_GOLD = 1500, MAT_DIAMOND = 750, MAT_URANIUM = 250, MAT_BLUESPACE = 1000)
build_path = /obj/item/storage/bag/bio/holding
category = list("Bluespace Designs")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
/datum/design/bluespace_crystal
name = "Artificial Bluespace Crystal"
desc = "A small blue crystal with mystical properties."
id = "bluespace_crystal"
build_type = PROTOLATHE
materials = list(MAT_DIAMOND = 1500, MAT_PLASMA = 1500)
build_path = /obj/item/stack/ore/bluespace_crystal/artificial
category = list("Bluespace Designs")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
/datum/design/telesci_gps
name = "GPS Device"
desc = "Little thingie that can track its position at all times."
id = "telesci_gps"
build_type = PROTOLATHE
materials = list(MAT_METAL = 500, MAT_GLASS = 1000)
build_path = /obj/item/gps
category = list("Bluespace Designs")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_CARGO
/datum/design/desynchronizer
name = "Desynchronizer"
desc = "A device that can desynchronize the user from spacetime."
id = "desynchronizer"
build_type = PROTOLATHE
materials = list(MAT_METAL = 1000, MAT_GLASS = 500, MAT_SILVER = 1500, MAT_BLUESPACE = 1000)
build_path = /obj/item/desynchronizer
category = list("Bluespace Designs")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
/datum/design/miningsatchel_holding
name = "Mining Satchel of Holding"
desc = "A mining satchel that can hold an infinite amount of ores."
id = "minerbag_holding"
build_type = PROTOLATHE
materials = list(MAT_GOLD = 250, MAT_URANIUM = 500) //quite cheap, for more convenience
build_path = /obj/item/storage/bag/ore/holding
category = list("Bluespace Designs")
departmental_flags = DEPARTMENTAL_FLAG_CARGO
/////////////////////////////////////////
//////////////Blue Space/////////////////
/////////////////////////////////////////
/datum/design/beacon
name = "Tracking Beacon"
desc = "A blue space tracking beacon."
id = "beacon"
build_type = PROTOLATHE
materials = list(MAT_METAL = 150, MAT_GLASS = 100)
build_path = /obj/item/beacon
category = list("Bluespace Designs")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_SECURITY
/datum/design/bag_holding
name = "Bag of Holding"
desc = "A backpack that opens into a localized pocket of bluespace."
id = "bag_holding"
build_type = PROTOLATHE
materials = list(MAT_GOLD = 3000, MAT_DIAMOND = 1500, MAT_URANIUM = 250, MAT_BLUESPACE = 2000)
build_path = /obj/item/storage/backpack/holding
category = list("Bluespace Designs")
dangerous_construction = TRUE
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
/datum/design/satchel_holding
name = "Satchel of Holding"
desc = "A satchel that opens into a localized pocket of bluespace."
id = "satchel_holding"
build_type = PROTOLATHE
materials = list(MAT_GOLD = 3000, MAT_DIAMOND = 1500, MAT_URANIUM = 250, MAT_BLUESPACE = 2000)
build_path = /obj/item/storage/backpack/holding/satchel
category = list("Bluespace Designs")
dangerous_construction = TRUE
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
/datum/design/biobag_holding
name = "Bio Bag of Holding"
desc = "A chemical holding thingy. Mostly used for xenobiology."
id = "biobag_holding"
build_type = PROTOLATHE
materials = list(MAT_GOLD = 1500, MAT_DIAMOND = 750, MAT_URANIUM = 250, MAT_BLUESPACE = 1000)
build_path = /obj/item/storage/bag/bio/holding
category = list("Bluespace Designs")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
/datum/design/bluespace_crystal
name = "Artificial Bluespace Crystal"
desc = "A small blue crystal with mystical properties."
id = "bluespace_crystal"
build_type = PROTOLATHE
materials = list(MAT_DIAMOND = 1500, MAT_PLASMA = 1500)
build_path = /obj/item/stack/ore/bluespace_crystal/artificial
category = list("Bluespace Designs")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
/datum/design/telesci_gps
name = "GPS Device"
desc = "Little thingie that can track its position at all times."
id = "telesci_gps"
build_type = PROTOLATHE
materials = list(MAT_METAL = 500, MAT_GLASS = 1000)
build_path = /obj/item/gps
category = list("Bluespace Designs")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_CARGO
/datum/design/miningsatchel_holding
name = "Mining Satchel of Holding"
desc = "A mining satchel that can hold an infinite amount of ores."
id = "minerbag_holding"
build_type = PROTOLATHE
materials = list(MAT_GOLD = 250, MAT_URANIUM = 500) //quite cheap, for more convenience
build_path = /obj/item/storage/bag/ore/holding
category = list("Bluespace Designs")
departmental_flags = DEPARTMENTAL_FLAG_CARGO
@@ -6,7 +6,7 @@
name = "Left Arm"
id = "leftarm"
build_type = LIMBGROWER
reagents_list = list(/datum/reagent/medicine/synthflesh = 25)
reagents_list = list("synthflesh" = 25)
build_path = /obj/item/bodypart/l_arm
category = list("initial","human","lizard","fly","moth","plasmaman")
@@ -14,7 +14,7 @@
name = "Right Arm"
id = "rightarm"
build_type = LIMBGROWER
reagents_list = list(/datum/reagent/medicine/synthflesh = 25)
reagents_list = list("synthflesh" = 25)
build_path = /obj/item/bodypart/r_arm
category = list("initial","human","lizard","fly","moth","plasmaman")
@@ -22,7 +22,7 @@
name = "Left Leg"
id = "leftleg"
build_type = LIMBGROWER
reagents_list = list(/datum/reagent/medicine/synthflesh = 25)
reagents_list = list("synthflesh" = 25)
build_path = /obj/item/bodypart/l_leg
category = list("initial","human","lizard","fly","moth","plasmaman")
@@ -30,7 +30,7 @@
name = "Right Leg"
id = "rightleg"
build_type = LIMBGROWER
reagents_list = list(/datum/reagent/medicine/synthflesh = 25)
reagents_list = list("synthflesh" = 25)
build_path = /obj/item/bodypart/r_leg
category = list("initial","human","lizard","fly","moth","plasmaman")
@@ -38,6 +38,6 @@
name = "Arm Blade"
id = "armblade"
build_type = LIMBGROWER
reagents_list = list(/datum/reagent/medicine/synthflesh = 75)
reagents_list = list("synthflesh" = 75)
build_path = /obj/item/melee/synthetic_arm_blade
category = list("other","emagged")
@@ -768,6 +768,15 @@
construction_time = 120
category = list("Cyborg Upgrade Modules")
/datum/design/borg_upgrade_circuit_app
name = "Cyborg Upgrade (Circuit Manipulator)"
id = "borg_upgrade_circuitapp"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/circuit_app
materials = list(MAT_METAL=2000, MAT_TITANIUM=500)
construction_time = 120
category = list("Cyborg Upgrade Modules")
/datum/design/borg_upgrade_pinpointer
name = "Cyborg Upgrade (Crew pinpointer)"
id = "borg_upgrade_pinpointer"
@@ -609,6 +609,36 @@
/////////////////////
//Adv Surgery Tools//
/////////////////////
/datum/design/laserscalpel
name = "Laser Scalpel"
desc = "A laser scalpel used for precise cutting."
id = "laserscalpel"
build_path = /obj/item/scalpel/advanced
build_type = PROTOLATHE
materials = list(MAT_METAL = 6000, MAT_GLASS = 1500, MAT_SILVER = 2000, MAT_GOLD = 1500, MAT_DIAMOND = 200, MAT_TITANIUM = 4000)
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
/datum/design/mechanicalpinches
name = "Mechanical Pinches"
desc = "These pinches can be either used as retractor or hemostat."
id = "mechanicalpinches"
build_path = /obj/item/retractor/advanced
build_type = PROTOLATHE
materials = list(MAT_METAL = 12000, MAT_GLASS = 4000, MAT_SILVER = 4000, MAT_TITANIUM = 5000)
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
/datum/design/searingtool
name = "Searing Tool"
desc = "Used to mend tissue togheter."
id = "searingtool"
build_path = /obj/item/cautery/advanced
build_type = PROTOLATHE
materials = list(MAT_METAL = 4000, MAT_GLASS = 2000, MAT_PLASMA = 2000, MAT_URANIUM = 3000, MAT_TITANIUM = 3000)
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
/datum/design/drapes
name = "Plastic Drapes"
desc = "A large surgery drape made of plastic."
@@ -619,35 +649,6 @@
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
/datum/design/retractor_adv
name = "Advanced Retractor"
desc = "An almagation of rods and gears, able to function as both a surgical clamp and retractor. "
id = "retractor_adv"
build_type = PROTOLATHE
materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_SILVER = 1500, MAT_GOLD = 1000)
build_path = /obj/item/retractor/advanced
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
/datum/design/surgicaldrill_adv
name = "Surgical Laser Drill"
desc = "It projects a high power laser used for medical applications."
id = "surgicaldrill_adv"
build_type = PROTOLATHE
materials = list(MAT_METAL = 2500, MAT_GLASS = 2500, MAT_SILVER = 6000, MAT_GOLD = 5500, MAT_DIAMOND = 3500)
build_path = /obj/item/surgicaldrill/advanced
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
/datum/design/scalpel_adv
name = "Laser Scalpel"
desc = "An advanced scalpel which uses laser technology to cut."
id = "scalpel_adv"
build_type = PROTOLATHE
materials = list(MAT_METAL = 1500, MAT_GLASS = 1500, MAT_SILVER = 4000, MAT_GOLD = 2500)
build_path = /obj/item/scalpel/advanced
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
/////////////////////////////////////////
//////////Alien Surgery Tools////////////
@@ -748,21 +749,11 @@
var/surgery
/datum/design/surgery/experimental_dissection
name = "Advanced Dissection"
desc = "A surgical procedure which analyzes the biology of a corpse, and automatically adds new findings to the research database."
id = "surgery_adv_dissection"
surgery = /datum/surgery/advanced/experimental_dissection/adv
research_icon_state = "surgery_chest"
/datum/design/surgery/experimental_dissection/exp
name = "Experimental Dissection"
desc = "A surgical procedure which deeply analyzes the biology of a corpse, and automatically adds new findings to the research database."
id = "surgery_exp_dissection"
surgery = /datum/surgery/advanced/experimental_dissection/exp
/datum/design/surgery/experimental_dissection/ext
name = "Extraterrestrial Dissection"
id = "surgery_ext_dissection"
surgery = /datum/surgery/advanced/experimental_dissection/alien
surgery = /datum/surgery/advanced/bioware/experimental_dissection
research_icon_state = "surgery_chest"
/datum/design/surgery/lobotomy
name = "Lobotomy"
@@ -785,49 +776,13 @@
surgery = /datum/surgery/advanced/viral_bonding
research_icon_state = "surgery_chest"
/datum/design/surgery/healing
name = "Tend Wounds"
desc = "An upgraded version of the original surgery."
id = "surgery_healing_base" //holder because travis cries otherwise. Not used in techweb unlocks.
/datum/design/surgery/reconstruction
name = "Reconstruction"
desc = "A surgical procedure that gradually repairs damage done to a body without the assistance of chemicals. Unlike classic medicine, it is effective on corpses."
id = "surgery_reconstruction"
surgery = /datum/surgery/advanced/reconstruction
research_icon_state = "surgery_chest"
/datum/design/surgery/healing/brute_upgrade
name = "Tend Wounds (Brute) Upgrade"
surgery = /datum/surgery/healing/brute/upgraded
id = "surgery_heal_brute_upgrade"
/datum/design/surgery/healing/brute_upgrade_2
name = "Tend Wounds (Brute) Upgrade"
surgery = /datum/surgery/healing/brute/upgraded/femto
id = "surgery_heal_brute_upgrade_femto"
/datum/design/surgery/healing/burn_upgrade
name = "Tend Wounds (Burn) Upgrade"
surgery = /datum/surgery/healing/burn/upgraded
id = "surgery_heal_burn_upgrade"
/datum/design/surgery/healing/burn_upgrade_2
name = "Tend Wounds (Burn) Upgrade"
surgery = /datum/surgery/healing/burn/upgraded/femto
id = "surgery_heal_burn_upgrade_femto"
/datum/design/surgery/healing/combo
name = "Tend Wounds (Mixture)"
desc = "A surgical procedure that repairs both bruises and burns. Repair efficiency is not as high as the individual surgeries but it is faster."
surgery = /datum/surgery/healing/combo
id = "surgery_heal_combo"
/datum/design/surgery/healing/combo_upgrade
name = "Tend Wounds (Mixture) Upgrade"
surgery = /datum/surgery/healing/combo/upgraded
id = "surgery_heal_combo_upgrade"
/datum/design/surgery/healing/combo_upgrade_2
name = "Tend Wounds (Mixture) Upgrade"
desc = "A surgical procedure that repairs both bruises and burns faster than their individual counterparts. It is more effective than both the individual surgeries."
surgery = /datum/surgery/healing/combo/upgraded/femto
id = "surgery_heal_combo_upgrade_femto"
/datum/design/surgery/surgery_toxinhealing
name = "Body Rejuvenation"
desc = "A surgical procedure that helps deal with oxygen deprecation, and treat toxic damaged. Works on corpses and alive alike without chemicals."
@@ -870,13 +825,6 @@
surgery = /datum/surgery/advanced/bioware/vein_threading
research_icon_state = "surgery_chest"
/datum/design/surgery/muscled_veins
name = "Vein Muscle Membrane"
desc = "A surgical procedure which adds a muscled membrane to blood vessels, allowing them to pump blood without a heart."
id = "surgery_muscled_veins"
surgery = /datum/surgery/advanced/bioware/muscled_veins
research_icon_state = "surgery_chest"
/datum/design/surgery/ligament_hook
name = "Ligament Hook"
desc = "A surgical procedure which reshapes the connections between torso and limbs, making it so limbs can be attached manually if severed. \
@@ -488,20 +488,20 @@
desc = "A tool that can construct and deconstruct walls, airlocks and floors on the fly."
id = "rcd_loaded"
build_type = PROTOLATHE
materials = list(MAT_METAL = MINERAL_MATERIAL_AMOUNT, MAT_GLASS = MINERAL_MATERIAL_AMOUNT) // costs more than what it did in the autolathe, this one comes loaded.
materials = list(MAT_METAL=48000, MAT_GLASS=32000) // costs more than what it did in the autolathe, this one comes loaded.
build_path = /obj/item/construction/rcd/loaded
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
/datum/design/rpd_loaded
/datum/design/pipe_dispenser
name = "Rapid Pipe Dispenser (RPD)"
desc = "A tool that can construct and deconstruct pipes on the fly."
id = "rpd_loaded"
id = "pipe_dispenser"
build_type = PROTOLATHE
materials = list(MAT_METAL = 70000, MAT_GLASS = 37500)
materials = list(MAT_METAL = 75000, MAT_GLASS = 37500)
build_path = /obj/item/pipe_dispenser
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
/datum/design/alienwrench
name = "Alien Wrench"
@@ -588,7 +588,7 @@
desc = "A a electrode attached to a small circuit box that will tell you the pH of a solution."
id = "pHmeter"
build_type = PROTOLATHE
materials = list(MAT_METAL = 1000, MAT_SILVER = 100, MAT_PLASTIC = 100)
materials = list(MAT_METAL = 1000, MAT_SILVER = 100, MAT_DIAMOND = 100)
build_path = /obj/item/fermichem/pHmeter
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
@@ -231,7 +231,7 @@
id = "decloner"
build_type = PROTOLATHE
materials = list(MAT_GOLD = 5000,MAT_URANIUM = 10000)
reagents_list = list(/datum/reagent/toxin/mutagen = 40)
reagents_list = list("mutagen" = 40)
build_path = /obj/item/gun/energy/decloner
category = list("Weapons")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -262,7 +262,7 @@
id = "flora_gun"
build_type = PROTOLATHE
materials = list(MAT_METAL = 2000, MAT_GLASS = 500)
reagents_list = list(/datum/reagent/radium = 20)
reagents_list = list("radium" = 20)
build_path = /obj/item/gun/energy/floragun
category = list("Weapons")
departmental_flags = DEPARTMENTAL_FLAG_SERVICE
@@ -102,7 +102,7 @@ Note: Must be placed within 3 tiles of the R&D Console
return FALSE
if (id && id != RESEARCH_MATERIAL_RECLAMATION_ID)
var/datum/techweb_node/TN = SSresearch.techweb_node_by_id(id)
var/datum/techweb_node/TN = get_techweb_node_by_id(id)
if(!istype(TN))
return FALSE
var/dpath = loaded_item.type
@@ -123,7 +123,7 @@ Note: Must be placed within 3 tiles of the R&D Console
return FALSE
SSblackbox.record_feedback("nested tally", "item_deconstructed", 1, list("[TN.id]", "[loaded_item.type]"))
if(destroy_item(loaded_item))
linked_console.stored_research.boost_with_path(SSresearch.techweb_node_by_id(TN.id), dpath)
linked_console.stored_research.boost_with_path(SSresearch.techweb_nodes[TN.id], dpath)
else
var/list/point_value = techweb_item_point_check(loaded_item)
File diff suppressed because it is too large Load Diff
+364 -364
View File
@@ -1,364 +1,364 @@
/obj/machinery/rnd/production
name = "technology fabricator"
desc = "Makes researched and prototype items with materials and energy."
layer = BELOW_OBJ_LAYER
var/consoleless_interface = FALSE //Whether it can be used without a console.
var/efficiency_coeff = 1 //Materials needed / coeff = actual.
var/list/categories = list()
var/datum/component/remote_materials/materials
var/allowed_department_flags = ALL
var/production_animation //What's flick()'d on print.
var/allowed_buildtypes = NONE
var/list/datum/design/cached_designs
var/list/datum/design/matching_designs
var/department_tag = "Unidentified" //used for material distribution among other things.
var/datum/techweb/stored_research
var/datum/techweb/host_research
var/screen = RESEARCH_FABRICATOR_SCREEN_MAIN
var/selected_category
/obj/machinery/rnd/production/Initialize(mapload)
. = ..()
create_reagents(0, OPENCONTAINER)
matching_designs = list()
cached_designs = list()
stored_research = new
host_research = SSresearch.science_tech
update_research()
materials = AddComponent(/datum/component/remote_materials, "lathe", mapload)
RefreshParts()
/obj/machinery/rnd/production/proc/update_research()
host_research.copy_research_to(stored_research, TRUE)
update_designs()
/obj/machinery/rnd/production/proc/update_designs()
cached_designs.Cut()
for(var/i in stored_research.researched_designs)
var/datum/design/d = SSresearch.techweb_design_by_id(i)
if((isnull(allowed_department_flags) || (d.departmental_flags & allowed_department_flags)) && (d.build_type & allowed_buildtypes))
cached_designs |= d
/obj/machinery/rnd/production/RefreshParts()
calculate_efficiency()
/obj/machinery/rnd/production/ui_interact(mob/user)
if(!consoleless_interface)
return ..()
user.set_machine(src)
var/datum/browser/popup = new(user, "rndconsole", name, 460, 550)
popup.set_content(generate_ui())
popup.open()
/obj/machinery/rnd/production/Destroy()
QDEL_NULL(stored_research)
return ..()
/obj/machinery/rnd/production/proc/calculate_efficiency()
efficiency_coeff = 1
if(reagents) //If reagents/materials aren't initialized, don't bother, we'll be doing this again after reagents init anyways.
reagents.maximum_volume = 0
for(var/obj/item/reagent_containers/glass/G in component_parts)
reagents.maximum_volume += G.volume
G.reagents.trans_to(src, G.reagents.total_volume)
if(materials)
var/total_storage = 0
for(var/obj/item/stock_parts/matter_bin/M in component_parts)
total_storage += M.rating * 75000
materials.set_local_size(total_storage)
var/total_rating = 0
for(var/obj/item/stock_parts/manipulator/M in component_parts)
total_rating += M.rating
total_rating = max(1, total_rating)
efficiency_coeff = total_rating
//we eject the materials upon deconstruction.
/obj/machinery/rnd/production/on_deconstruction()
for(var/obj/item/reagent_containers/glass/G in component_parts)
reagents.trans_to(G, G.reagents.maximum_volume)
return ..()
/obj/machinery/rnd/production/proc/do_print(path, amount, list/matlist, notify_admins, mob/user)
if(notify_admins)
investigate_log("[key_name(user)] built [amount] of [path] at [src]([type]).", INVESTIGATE_RESEARCH)
message_admins("[ADMIN_LOOKUPFLW(user)] has built [amount] of [path] at a [src]([type]).")
for(var/i in 1 to amount)
var/obj/item/I = new path(get_turf(src))
if(efficient_with(I.type))
I.materials = matlist.Copy()
SSblackbox.record_feedback("nested tally", "item_printed", amount, list("[type]", "[path]"))
/obj/machinery/rnd/production/proc/check_mat(datum/design/being_built, M) // now returns how many times the item can be built with the material
if (!materials.mat_container) // no connected silo
return 0
var/list/all_materials = being_built.reagents_list + being_built.materials
var/A = materials.mat_container.amount(M)
if(!A)
A = reagents.get_reagent_amount(M)
// these types don't have their .materials set in do_print, so don't allow
// them to be constructed efficiently
var/ef = efficient_with(being_built.build_path) ? efficiency_coeff : 1
return round(A / max(1, all_materials[M] / ef))
/obj/machinery/rnd/production/proc/efficient_with(path)
return !ispath(path, /obj/item/stack/sheet) && !ispath(path, /obj/item/stack/ore/bluespace_crystal)
/obj/machinery/rnd/production/proc/user_try_print_id(id, amount)
if((!istype(linked_console) && requires_console) || !id)
return FALSE
if(istext(amount))
amount = text2num(amount)
if(isnull(amount))
amount = 1
var/datum/design/D = (linked_console || requires_console)? (linked_console.stored_research.researched_designs[id]? SSresearch.techweb_design_by_id(id) : null) : SSresearch.techweb_design_by_id(id)
if(!istype(D))
return FALSE
if(!(isnull(allowed_department_flags) || (D.departmental_flags & allowed_department_flags)))
say("Warning: Printing failed: This fabricator does not have the necessary keys to decrypt design schematics. Please update the research data with the on-screen button and contact Kinaris Support!")
return FALSE
if(D.build_type && !(D.build_type & allowed_buildtypes))
say("This machine does not have the necessary manipulation systems for this design. Please contact Kinaris Support!")
return FALSE
if(!materials.mat_container)
say("No connection to material storage, please contact the quartermaster.")
return FALSE
if(materials.on_hold())
say("Mineral access is on hold, please contact the quartermaster.")
return FALSE
var/power = 1000
amount = CLAMP(amount, 1, 50)
for(var/M in D.materials)
power += round(D.materials[M] * amount / 35)
power = min(3000, power)
use_power(power)
var/coeff = efficient_with(D.build_path) ? efficiency_coeff : 1
var/list/efficient_mats = list()
for(var/MAT in D.materials)
efficient_mats[MAT] = D.materials[MAT]/coeff
if(!materials.mat_container.has_materials(efficient_mats, amount))
say("Not enough materials to complete prototype[amount > 1? "s" : ""].")
return FALSE
for(var/R in D.reagents_list)
if(!reagents.has_reagent(R, D.reagents_list[R]*amount/coeff))
say("Not enough reagents to complete prototype[amount > 1? "s" : ""].")
return FALSE
materials.mat_container.use_amount(efficient_mats, amount)
materials.silo_log(src, "built", -amount, "[D.name]", efficient_mats)
for(var/R in D.reagents_list)
reagents.remove_reagent(R, D.reagents_list[R]*amount/coeff)
busy = TRUE
if(production_animation)
flick(production_animation, src)
var/timecoeff = D.lathe_time_factor / efficiency_coeff
addtimer(CALLBACK(src, .proc/reset_busy), (30 * timecoeff * amount) ** 0.5)
addtimer(CALLBACK(src, .proc/do_print, D.build_path, amount, efficient_mats, D.dangerous_construction, usr), (32 * timecoeff * amount) ** 0.8)
return TRUE
/obj/machinery/rnd/production/proc/search(string)
matching_designs.Cut()
for(var/v in stored_research.researched_designs)
var/datum/design/D = SSresearch.techweb_design_by_id(v)
if(!(D.build_type & allowed_buildtypes) || !(isnull(allowed_department_flags) || (D.departmental_flags & allowed_department_flags)))
continue
if(findtext(D.name,string))
matching_designs.Add(D)
/obj/machinery/rnd/production/proc/generate_ui()
var/list/ui = list()
ui += ui_header()
switch(screen)
if(RESEARCH_FABRICATOR_SCREEN_MATERIALS)
ui += ui_screen_materials()
if(RESEARCH_FABRICATOR_SCREEN_CHEMICALS)
ui += ui_screen_chemicals()
if(RESEARCH_FABRICATOR_SCREEN_SEARCH)
ui += ui_screen_search()
if(RESEARCH_FABRICATOR_SCREEN_CATEGORYVIEW)
ui += ui_screen_category_view()
else
ui += ui_screen_main()
for(var/i in 1 to length(ui))
if(!findtextEx(ui[i], RDSCREEN_NOBREAK))
ui[i] += "<br>"
ui[i] = replacetextEx(ui[i], RDSCREEN_NOBREAK, "")
return ui.Join("")
/obj/machinery/rnd/production/proc/ui_header()
var/list/l = list()
l += "<div class='statusDisplay'><b>[host_research.organization] [department_tag] Department Lathe</b>"
l += "Security protocols: [(obj_flags & EMAGGED)? "<font color='red'>Disabled</font>" : "<font color='green'>Enabled</font>"]"
if (materials.mat_container)
l += "<A href='?src=[REF(src)];switch_screen=[RESEARCH_FABRICATOR_SCREEN_MATERIALS]'><B>Material Amount:</B> [materials.format_amount()]</A>"
else
l += "<font color='red'>No material storage connected, please contact the quartermaster.</font>"
l += "<A href='?src=[REF(src)];switch_screen=[RESEARCH_FABRICATOR_SCREEN_CHEMICALS]'><B>Chemical volume:</B> [reagents.total_volume] / [reagents.maximum_volume]</A>"
l += "<a href='?src=[REF(src)];sync_research=1'>Synchronize Research</a>"
l += "<a href='?src=[REF(src)];switch_screen=[RESEARCH_FABRICATOR_SCREEN_MAIN]'>Main Screen</a></div>[RDSCREEN_NOBREAK]"
return l
/obj/machinery/rnd/production/proc/ui_screen_materials()
if (!materials.mat_container)
screen = RESEARCH_FABRICATOR_SCREEN_MAIN
return ui_screen_main()
var/list/l = list()
l += "<div class='statusDisplay'><h3>Material Storage:</h3>"
for(var/mat_id in materials.mat_container.materials)
var/datum/material/M = materials.mat_container.materials[mat_id]
l += "* [M.amount] of [M.name]: "
if(M.amount >= MINERAL_MATERIAL_AMOUNT) l += "<A href='?src=[REF(src)];ejectsheet=[M.id];eject_amt=1'>Eject</A> [RDSCREEN_NOBREAK]"
if(M.amount >= MINERAL_MATERIAL_AMOUNT*5) l += "<A href='?src=[REF(src)];ejectsheet=[M.id];eject_amt=5'>5x</A> [RDSCREEN_NOBREAK]"
if(M.amount >= MINERAL_MATERIAL_AMOUNT) l += "<A href='?src=[REF(src)];ejectsheet=[M.id];eject_amt=50'>All</A>[RDSCREEN_NOBREAK]"
l += ""
l += "</div>[RDSCREEN_NOBREAK]"
return l
/obj/machinery/rnd/production/proc/ui_screen_chemicals()
var/list/l = list()
l += "<div class='statusDisplay'><A href='?src=[REF(src)];disposeall=1'>Disposal All Chemicals in Storage</A>"
l += "<h3>Chemical Storage:</h3>"
for(var/datum/reagent/R in reagents.reagent_list)
l += "[R.name]: [R.volume]"
l += "<A href='?src=[REF(src)];dispose=[R.type]'>Purge</A>"
l += "</div>"
return l
/obj/machinery/rnd/production/proc/ui_screen_search()
var/list/l = list()
var/coeff = efficiency_coeff
l += "<h2>Search Results:</h2>"
l += "<form name='search' action='?src=[REF(src)]'>\
<input type='hidden' name='src' value='[REF(src)]'>\
<input type='hidden' name='search' value='to_search'>\
<input type='text' name='to_search'>\
<input type='submit' value='Search'>\
</form><HR>"
for(var/datum/design/D in matching_designs)
l += design_menu_entry(D, coeff)
l += "</div>"
return l
/obj/machinery/rnd/production/proc/design_menu_entry(datum/design/D, coeff)
if(!istype(D))
return
if(!coeff)
coeff = efficiency_coeff
if(!efficient_with(D.build_path))
coeff = 1
var/list/l = list()
var/temp_material
var/c = 50
var/t
var/all_materials = D.materials + D.reagents_list
for(var/M in all_materials)
t = check_mat(D, M)
temp_material += " | "
if (t < 1)
temp_material += "<span class='bad'>[all_materials[M]/coeff] [CallMaterialName(M)]</span>"
else
temp_material += " [all_materials[M]/coeff] [CallMaterialName(M)]"
c = min(c,t)
if (c >= 1)
l += "<A href='?src=[REF(src)];build=[D.id];amount=1'>[D.name]</A>[RDSCREEN_NOBREAK]"
if(c >= 5)
l += "<A href='?src=[REF(src)];build=[D.id];amount=5'>x5</A>[RDSCREEN_NOBREAK]"
if(c >= 10)
l += "<A href='?src=[REF(src)];build=[D.id];amount=10'>x10</A>[RDSCREEN_NOBREAK]"
l += "[temp_material][RDSCREEN_NOBREAK]"
else
l += "<span class='linkOff'>[D.name]</span>[temp_material][RDSCREEN_NOBREAK]"
l += ""
return l
/obj/machinery/rnd/production/Topic(raw, ls)
if(..())
return
add_fingerprint(usr)
usr.set_machine(src)
if(ls["switch_screen"])
screen = text2num(ls["switch_screen"])
if(ls["build"]) //Causes the Protolathe to build something.
if(busy)
say("Warning: Fabricators busy!")
else
user_try_print_id(ls["build"], ls["amount"])
if(ls["search"]) //Search for designs with name matching pattern
search(ls["to_search"])
screen = RESEARCH_FABRICATOR_SCREEN_SEARCH
if(ls["sync_research"])
update_research()
say("Synchronizing research with host technology database.")
if(ls["category"])
selected_category = ls["category"]
if(ls["dispose"]) //Causes the protolathe to dispose of a single reagent (all of it)
reagents.del_reagent(ls["dispose"])
if(ls["disposeall"]) //Causes the protolathe to dispose of all it's reagents.
reagents.clear_reagents()
if(ls["ejectsheet"]) //Causes the protolathe to eject a sheet of material
eject_sheets(ls["ejectsheet"], ls["eject_amt"])
updateUsrDialog()
/obj/machinery/rnd/production/proc/eject_sheets(eject_sheet, eject_amt)
var/datum/component/material_container/mat_container = materials.mat_container
if (!mat_container)
say("No access to material storage, please contact the quartermaster.")
return 0
if (materials.on_hold())
say("Mineral access is on hold, please contact the quartermaster.")
return 0
var/count = mat_container.retrieve_sheets(text2num(eject_amt), eject_sheet, drop_location())
var/list/matlist = list()
matlist[eject_sheet] = MINERAL_MATERIAL_AMOUNT
materials.silo_log(src, "ejected", -count, "sheets", matlist)
return count
/obj/machinery/rnd/production/proc/ui_screen_main()
var/list/l = list()
l += "<form name='search' action='?src=[REF(src)]'>\
<input type='hidden' name='src' value='[REF(src)]'>\
<input type='hidden' name='search' value='to_search'>\
<input type='hidden' name='type' value='proto'>\
<input type='text' name='to_search'>\
<input type='submit' value='Search'>\
</form><HR>"
l += list_categories(categories, RESEARCH_FABRICATOR_SCREEN_CATEGORYVIEW)
return l
/obj/machinery/rnd/production/proc/ui_screen_category_view()
if(!selected_category)
return ui_screen_main()
var/list/l = list()
l += "<div class='statusDisplay'><h3>Browsing [selected_category]:</h3>"
var/coeff = efficiency_coeff
for(var/v in stored_research.researched_designs)
var/datum/design/D = SSresearch.techweb_design_by_id(v)
if(!(selected_category in D.category)|| !(D.build_type & allowed_buildtypes))
continue
if(!(isnull(allowed_department_flags) || (D.departmental_flags & allowed_department_flags)))
continue
l += design_menu_entry(D, coeff)
l += "</div>"
return l
/obj/machinery/rnd/production/proc/list_categories(list/categories, menu_num)
if(!categories)
return
var/line_length = 1
var/list/l = "<table style='width:100%' align='center'><tr>"
for(var/C in categories)
if(line_length > 2)
l += "</tr><tr>"
line_length = 1
l += "<td><A href='?src=[REF(src)];category=[C];switch_screen=[menu_num]'>[C]</A></td>"
line_length++
l += "</tr></table></div>"
return l
/obj/machinery/rnd/production
name = "technology fabricator"
desc = "Makes researched and prototype items with materials and energy."
layer = BELOW_OBJ_LAYER
var/consoleless_interface = FALSE //Whether it can be used without a console.
var/efficiency_coeff = 1 //Materials needed / coeff = actual.
var/list/categories = list()
var/datum/component/remote_materials/materials
var/allowed_department_flags = ALL
var/production_animation //What's flick()'d on print.
var/allowed_buildtypes = NONE
var/list/datum/design/cached_designs
var/list/datum/design/matching_designs
var/department_tag = "Unidentified" //used for material distribution among other things.
var/datum/techweb/stored_research
var/datum/techweb/host_research
var/screen = RESEARCH_FABRICATOR_SCREEN_MAIN
var/selected_category
/obj/machinery/rnd/production/Initialize(mapload)
. = ..()
create_reagents(0, OPENCONTAINER)
matching_designs = list()
cached_designs = list()
stored_research = new
host_research = SSresearch.science_tech
update_research()
materials = AddComponent(/datum/component/remote_materials, "lathe", mapload)
RefreshParts()
/obj/machinery/rnd/production/proc/update_research()
host_research.copy_research_to(stored_research, TRUE)
update_designs()
/obj/machinery/rnd/production/proc/update_designs()
cached_designs.Cut()
for(var/i in stored_research.researched_designs)
var/datum/design/d = stored_research.researched_designs[i]
if((isnull(allowed_department_flags) || (d.departmental_flags & allowed_department_flags)) && (d.build_type & allowed_buildtypes))
cached_designs |= d
/obj/machinery/rnd/production/RefreshParts()
calculate_efficiency()
/obj/machinery/rnd/production/ui_interact(mob/user)
if(!consoleless_interface)
return ..()
user.set_machine(src)
var/datum/browser/popup = new(user, "rndconsole", name, 460, 550)
popup.set_content(generate_ui())
popup.open()
/obj/machinery/rnd/production/Destroy()
QDEL_NULL(stored_research)
return ..()
/obj/machinery/rnd/production/proc/calculate_efficiency()
efficiency_coeff = 1
if(reagents) //If reagents/materials aren't initialized, don't bother, we'll be doing this again after reagents init anyways.
reagents.maximum_volume = 0
for(var/obj/item/reagent_containers/glass/G in component_parts)
reagents.maximum_volume += G.volume
G.reagents.trans_to(src, G.reagents.total_volume)
if(materials)
var/total_storage = 0
for(var/obj/item/stock_parts/matter_bin/M in component_parts)
total_storage += M.rating * 75000
materials.set_local_size(total_storage)
var/total_rating = 0
for(var/obj/item/stock_parts/manipulator/M in component_parts)
total_rating += M.rating
total_rating = max(1, total_rating)
efficiency_coeff = total_rating
//we eject the materials upon deconstruction.
/obj/machinery/rnd/production/on_deconstruction()
for(var/obj/item/reagent_containers/glass/G in component_parts)
reagents.trans_to(G, G.reagents.maximum_volume)
return ..()
/obj/machinery/rnd/production/proc/do_print(path, amount, list/matlist, notify_admins, mob/user)
if(notify_admins)
investigate_log("[key_name(user)] built [amount] of [path] at [src]([type]).", INVESTIGATE_RESEARCH)
message_admins("[ADMIN_LOOKUPFLW(user)] has built [amount] of [path] at a [src]([type]).")
for(var/i in 1 to amount)
var/obj/item/I = new path(get_turf(src))
if(efficient_with(I.type))
I.materials = matlist.Copy()
SSblackbox.record_feedback("nested tally", "item_printed", amount, list("[type]", "[path]"))
/obj/machinery/rnd/production/proc/check_mat(datum/design/being_built, M) // now returns how many times the item can be built with the material
if (!materials.mat_container) // no connected silo
return 0
var/list/all_materials = being_built.reagents_list + being_built.materials
var/A = materials.mat_container.amount(M)
if(!A)
A = reagents.get_reagent_amount(M)
// these types don't have their .materials set in do_print, so don't allow
// them to be constructed efficiently
var/ef = efficient_with(being_built.build_path) ? efficiency_coeff : 1
return round(A / max(1, all_materials[M] / ef))
/obj/machinery/rnd/production/proc/efficient_with(path)
return !ispath(path, /obj/item/stack/sheet) && !ispath(path, /obj/item/stack/ore/bluespace_crystal)
/obj/machinery/rnd/production/proc/user_try_print_id(id, amount)
if((!istype(linked_console) && requires_console) || !id)
return FALSE
if(istext(amount))
amount = text2num(amount)
if(isnull(amount))
amount = 1
var/datum/design/D = (linked_console || requires_console)? linked_console.stored_research.researched_designs[id] : get_techweb_design_by_id(id)
if(!istype(D))
return FALSE
if(!(isnull(allowed_department_flags) || (D.departmental_flags & allowed_department_flags)))
say("Warning: Printing failed: This fabricator does not have the necessary keys to decrypt design schematics. Please update the research data with the on-screen button and contact Nanotrasen Support!")
return FALSE
if(D.build_type && !(D.build_type & allowed_buildtypes))
say("This machine does not have the necessary manipulation systems for this design. Please contact Nanotrasen Support!")
return FALSE
if(!materials.mat_container)
say("No connection to material storage, please contact the quartermaster.")
return FALSE
if(materials.on_hold())
say("Mineral access is on hold, please contact the quartermaster.")
return FALSE
var/power = 1000
amount = CLAMP(amount, 1, 50)
for(var/M in D.materials)
power += round(D.materials[M] * amount / 35)
power = min(3000, power)
use_power(power)
var/coeff = efficient_with(D.build_path) ? efficiency_coeff : 1
var/list/efficient_mats = list()
for(var/MAT in D.materials)
efficient_mats[MAT] = D.materials[MAT]/coeff
if(!materials.mat_container.has_materials(efficient_mats, amount))
say("Not enough materials to complete prototype[amount > 1? "s" : ""].")
return FALSE
for(var/R in D.reagents_list)
if(!reagents.has_reagent(R, D.reagents_list[R]*amount/coeff))
say("Not enough reagents to complete prototype[amount > 1? "s" : ""].")
return FALSE
materials.mat_container.use_amount(efficient_mats, amount)
materials.silo_log(src, "built", -amount, "[D.name]", efficient_mats)
for(var/R in D.reagents_list)
reagents.remove_reagent(R, D.reagents_list[R]*amount/coeff)
busy = TRUE
if(production_animation)
flick(production_animation, src)
var/timecoeff = D.lathe_time_factor / efficiency_coeff
addtimer(CALLBACK(src, .proc/reset_busy), (30 * timecoeff * amount) ** 0.5)
addtimer(CALLBACK(src, .proc/do_print, D.build_path, amount, efficient_mats, D.dangerous_construction, usr), (32 * timecoeff * amount) ** 0.8)
return TRUE
/obj/machinery/rnd/production/proc/search(string)
matching_designs.Cut()
for(var/v in stored_research.researched_designs)
var/datum/design/D = stored_research.researched_designs[v]
if(!(D.build_type & allowed_buildtypes) || !(isnull(allowed_department_flags) || (D.departmental_flags & allowed_department_flags)))
continue
if(findtext(D.name,string))
matching_designs.Add(D)
/obj/machinery/rnd/production/proc/generate_ui()
var/list/ui = list()
ui += ui_header()
switch(screen)
if(RESEARCH_FABRICATOR_SCREEN_MATERIALS)
ui += ui_screen_materials()
if(RESEARCH_FABRICATOR_SCREEN_CHEMICALS)
ui += ui_screen_chemicals()
if(RESEARCH_FABRICATOR_SCREEN_SEARCH)
ui += ui_screen_search()
if(RESEARCH_FABRICATOR_SCREEN_CATEGORYVIEW)
ui += ui_screen_category_view()
else
ui += ui_screen_main()
for(var/i in 1 to length(ui))
if(!findtextEx(ui[i], RDSCREEN_NOBREAK))
ui[i] += "<br>"
ui[i] = replacetextEx(ui[i], RDSCREEN_NOBREAK, "")
return ui.Join("")
/obj/machinery/rnd/production/proc/ui_header()
var/list/l = list()
l += "<div class='statusDisplay'><b>[host_research.organization] [department_tag] Department Lathe</b>"
l += "Security protocols: [(obj_flags & EMAGGED)? "<font color='red'>Disabled</font>" : "<font color='green'>Enabled</font>"]"
if (materials.mat_container)
l += "<A href='?src=[REF(src)];switch_screen=[RESEARCH_FABRICATOR_SCREEN_MATERIALS]'><B>Material Amount:</B> [materials.format_amount()]</A>"
else
l += "<font color='red'>No material storage connected, please contact the quartermaster.</font>"
l += "<A href='?src=[REF(src)];switch_screen=[RESEARCH_FABRICATOR_SCREEN_CHEMICALS]'><B>Chemical volume:</B> [reagents.total_volume] / [reagents.maximum_volume]</A>"
l += "<a href='?src=[REF(src)];sync_research=1'>Synchronize Research</a>"
l += "<a href='?src=[REF(src)];switch_screen=[RESEARCH_FABRICATOR_SCREEN_MAIN]'>Main Screen</a></div>[RDSCREEN_NOBREAK]"
return l
/obj/machinery/rnd/production/proc/ui_screen_materials()
if (!materials.mat_container)
screen = RESEARCH_FABRICATOR_SCREEN_MAIN
return ui_screen_main()
var/list/l = list()
l += "<div class='statusDisplay'><h3>Material Storage:</h3>"
for(var/mat_id in materials.mat_container.materials)
var/datum/material/M = materials.mat_container.materials[mat_id]
l += "* [M.amount] of [M.name]: "
if(M.amount >= MINERAL_MATERIAL_AMOUNT) l += "<A href='?src=[REF(src)];ejectsheet=[M.id];eject_amt=1'>Eject</A> [RDSCREEN_NOBREAK]"
if(M.amount >= MINERAL_MATERIAL_AMOUNT*5) l += "<A href='?src=[REF(src)];ejectsheet=[M.id];eject_amt=5'>5x</A> [RDSCREEN_NOBREAK]"
if(M.amount >= MINERAL_MATERIAL_AMOUNT) l += "<A href='?src=[REF(src)];ejectsheet=[M.id];eject_amt=50'>All</A>[RDSCREEN_NOBREAK]"
l += ""
l += "</div>[RDSCREEN_NOBREAK]"
return l
/obj/machinery/rnd/production/proc/ui_screen_chemicals()
var/list/l = list()
l += "<div class='statusDisplay'><A href='?src=[REF(src)];disposeall=1'>Disposal All Chemicals in Storage</A>"
l += "<h3>Chemical Storage:</h3>"
for(var/datum/reagent/R in reagents.reagent_list)
l += "[R.name]: [R.volume]"
l += "<A href='?src=[REF(src)];dispose=[R.id]'>Purge</A>"
l += "</div>"
return l
/obj/machinery/rnd/production/proc/ui_screen_search()
var/list/l = list()
var/coeff = efficiency_coeff
l += "<h2>Search Results:</h2>"
l += "<form name='search' action='?src=[REF(src)]'>\
<input type='hidden' name='src' value='[REF(src)]'>\
<input type='hidden' name='search' value='to_search'>\
<input type='text' name='to_search'>\
<input type='submit' value='Search'>\
</form><HR>"
for(var/datum/design/D in matching_designs)
l += design_menu_entry(D, coeff)
l += "</div>"
return l
/obj/machinery/rnd/production/proc/design_menu_entry(datum/design/D, coeff)
if(!istype(D))
return
if(!coeff)
coeff = efficiency_coeff
if(!efficient_with(D.build_path))
coeff = 1
var/list/l = list()
var/temp_material
var/c = 50
var/t
var/all_materials = D.materials + D.reagents_list
for(var/M in all_materials)
t = check_mat(D, M)
temp_material += " | "
if (t < 1)
temp_material += "<span class='bad'>[all_materials[M]/coeff] [CallMaterialName(M)]</span>"
else
temp_material += " [all_materials[M]/coeff] [CallMaterialName(M)]"
c = min(c,t)
if (c >= 1)
l += "<A href='?src=[REF(src)];build=[D.id];amount=1'>[D.name]</A>[RDSCREEN_NOBREAK]"
if(c >= 5)
l += "<A href='?src=[REF(src)];build=[D.id];amount=5'>x5</A>[RDSCREEN_NOBREAK]"
if(c >= 10)
l += "<A href='?src=[REF(src)];build=[D.id];amount=10'>x10</A>[RDSCREEN_NOBREAK]"
l += "[temp_material][RDSCREEN_NOBREAK]"
else
l += "<span class='linkOff'>[D.name]</span>[temp_material][RDSCREEN_NOBREAK]"
l += ""
return l
/obj/machinery/rnd/production/Topic(raw, ls)
if(..())
return
add_fingerprint(usr)
usr.set_machine(src)
if(ls["switch_screen"])
screen = text2num(ls["switch_screen"])
if(ls["build"]) //Causes the Protolathe to build something.
if(busy)
say("Warning: Fabricators busy!")
else
user_try_print_id(ls["build"], ls["amount"])
if(ls["search"]) //Search for designs with name matching pattern
search(ls["to_search"])
screen = RESEARCH_FABRICATOR_SCREEN_SEARCH
if(ls["sync_research"])
update_research()
say("Synchronizing research with host technology database.")
if(ls["category"])
selected_category = ls["category"]
if(ls["dispose"]) //Causes the protolathe to dispose of a single reagent (all of it)
reagents.del_reagent(ls["dispose"])
if(ls["disposeall"]) //Causes the protolathe to dispose of all it's reagents.
reagents.clear_reagents()
if(ls["ejectsheet"]) //Causes the protolathe to eject a sheet of material
eject_sheets(ls["ejectsheet"], ls["eject_amt"])
updateUsrDialog()
/obj/machinery/rnd/production/proc/eject_sheets(eject_sheet, eject_amt)
var/datum/component/material_container/mat_container = materials.mat_container
if (!mat_container)
say("No access to material storage, please contact the quartermaster.")
return 0
if (materials.on_hold())
say("Mineral access is on hold, please contact the quartermaster.")
return 0
var/count = mat_container.retrieve_sheets(text2num(eject_amt), eject_sheet, drop_location())
var/list/matlist = list()
matlist[eject_sheet] = MINERAL_MATERIAL_AMOUNT
materials.silo_log(src, "ejected", -count, "sheets", matlist)
return count
/obj/machinery/rnd/production/proc/ui_screen_main()
var/list/l = list()
l += "<form name='search' action='?src=[REF(src)]'>\
<input type='hidden' name='src' value='[REF(src)]'>\
<input type='hidden' name='search' value='to_search'>\
<input type='hidden' name='type' value='proto'>\
<input type='text' name='to_search'>\
<input type='submit' value='Search'>\
</form><HR>"
l += list_categories(categories, RESEARCH_FABRICATOR_SCREEN_CATEGORYVIEW)
return l
/obj/machinery/rnd/production/proc/ui_screen_category_view()
if(!selected_category)
return ui_screen_main()
var/list/l = list()
l += "<div class='statusDisplay'><h3>Browsing [selected_category]:</h3>"
var/coeff = efficiency_coeff
for(var/v in stored_research.researched_designs)
var/datum/design/D = stored_research.researched_designs[v]
if(!(selected_category in D.category)|| !(D.build_type & allowed_buildtypes))
continue
if(!(isnull(allowed_department_flags) || (D.departmental_flags & allowed_department_flags)))
continue
l += design_menu_entry(D, coeff)
l += "</div>"
return l
/obj/machinery/rnd/production/proc/list_categories(list/categories, menu_num)
if(!categories)
return
var/line_length = 1
var/list/l = "<table style='width:100%' align='center'><tr>"
for(var/C in categories)
if(line_length > 2)
l += "</tr><tr>"
line_length = 1
l += "<td><A href='?src=[REF(src)];category=[C];switch_screen=[menu_num]'>[C]</A></td>"
line_length++
l += "</tr></table></div>"
return l
@@ -89,7 +89,7 @@
var/mob/living/L = chamber.occupant
if((MOB_SILICON in L.mob_biotypes))
if(!(MOB_ORGANIC in L.mob_biotypes) && !(MOB_UNDEAD in L.mob_biotypes))
data["status_msg"] = "Occupant not compatible with nanites."
return data
@@ -14,7 +14,6 @@
return
if(disk)
eject()
return TRUE
/obj/item/nanite_hijacker/examine(mob/user)
. = ..()
@@ -69,7 +69,7 @@
if(current_category != "Main")
var/list/program_list = list()
for(var/i in linked_techweb.researched_designs)
var/datum/design/nanites/D = SSresearch.techweb_design_by_id(i)
var/datum/design/nanites/D = linked_techweb.researched_designs[i]
if(!istype(D))
continue
if(current_category in D.category)
@@ -116,9 +116,9 @@
disk.program = null
disk.name = initial(disk.name)
. = TRUE
/obj/machinery/nanite_program_hub/admin/Initialize()
. = ..()
linked_techweb = SSresearch.admin_tech
@@ -208,6 +208,9 @@ datum/nanite_program/proc/on_mob_remove()
/datum/nanite_program/proc/on_death()
return
/datum/nanite_program/proc/on_hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode)
return
/datum/nanite_program/proc/software_error(type)
if(!type)
type = rand(1,5)
@@ -35,7 +35,7 @@
host_mob.adjustStaminaLoss(-10) //stimulants give stamina heal now
host_mob.lying = 0
host_mob.update_canmove()
host_mob.reagents.add_reagent(/datum/reagent/medicine/stimulants, 1.5)
host_mob.reagents.add_reagent("stimulants", 1.5)
/datum/nanite_program/hardening
name = "Dermal Hardening"
@@ -61,10 +61,7 @@
/datum/nanite_program/purging/active_effect()
host_mob.adjustToxLoss(-1)
for(var/datum/reagent/R in host_mob.reagents.reagent_list)
if(R.type == /datum/reagent/fermi/nanite_b_gone)
host_mob.adjustToxLoss(4)
continue
host_mob.reagents.remove_reagent(R.type,1)
host_mob.reagents.remove_reagent(R.id,1)
/datum/nanite_program/brain_heal
name = "Neural Regeneration"
@@ -98,7 +95,7 @@
/datum/nanite_program/blood_restoring/check_conditions()
if(iscarbon(host_mob))
var/mob/living/carbon/C = host_mob
if(C.blood_volume >= (BLOOD_VOLUME_SAFE*C.blood_ratio) || (HAS_TRAIT(C, TRAIT_NOMARROW)))
if(C.blood_volume >= (BLOOD_VOLUME_SAFE*C.blood_ratio))
return FALSE
else
return FALSE
@@ -164,7 +161,7 @@
/datum/nanite_program/purging_advanced/active_effect()
host_mob.adjustToxLoss(-1, forced = TRUE)
for(var/datum/reagent/toxin/R in host_mob.reagents.reagent_list)
host_mob.reagents.remove_reagent(R.type,1)
host_mob.reagents.remove_reagent(R.id,1)
/datum/nanite_program/regenerative_advanced
name = "Bio-Reconstruction"
@@ -345,14 +345,6 @@
var/sentence = ""
var/inclusive = TRUE
/datum/nanite_program/sensor/voice/on_mob_add()
. = ..()
RegisterSignal(host_mob, COMSIG_MOVABLE_HEAR, .proc/on_hear)
/datum/nanite_program/sensor/voice/on_mob_remove()
UnregisterSignal(host_mob, COMSIG_MOVABLE_HEAR, .proc/on_hear)
/datum/nanite_program/sensor/voice/set_extra_setting(user, setting)
if(setting == "Sent Code")
var/new_code = input(user, "Set the sent code (1-9999):", name, null) as null|num
@@ -386,12 +378,15 @@
target.sentence = sentence
target.inclusive = inclusive
/datum/nanite_program/sensor/voice/proc/on_hear(datum/source, list/hearing_args)
/datum/nanite_program/sensor/voice/on_hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode)
if(!sentence)
return
//To make it not case sensitive
var/low_message = lowertext(raw_message)
var/low_sentence = lowertext(sentence)
if(inclusive)
if(findtextEx(hearing_args[HEARING_RAW_MESSAGE], sentence))
if(findtext(low_message, low_sentence))
send_code()
else
if(hearing_args[HEARING_RAW_MESSAGE] == sentence)
if(low_message == low_sentence)
send_code()
@@ -130,7 +130,7 @@
var/new_sentence = stripped_input(user, "Choose the sentence that the host will be forced to say.", "Sentence", sentence, MAX_MESSAGE_LEN)
if(!new_sentence)
return
if(new_sentence[1] == "*") //emotes are abusable, like surrender
if(copytext(new_sentence, 1, 2) == "*") //emotes are abusable, like surrender
return
sentence = new_sentence
@@ -237,7 +237,7 @@
if(prob(10))
var/list/mob/living/target_hosts = list()
for(var/mob/living/L in oview(5, host_mob))
if((MOB_SILICON in L.mob_biotypes))
if(!(MOB_ORGANIC in L.mob_biotypes) && !(MOB_UNDEAD in L.mob_biotypes))
continue
target_hosts += L
if(!target_hosts.len)
@@ -35,7 +35,6 @@
update_icon()
else
to_chat(user, "<span class='warning'>Access denied.</span>")
return TRUE
/obj/item/nanite_remote/emag_act(mob/user)
if(obj_flags & EMAGGED)
@@ -137,7 +137,7 @@
var/mob/living/L = occupant
if(SEND_SIGNAL(L, COMSIG_HAS_NANITES))
return
if((MOB_ORGANIC in L.mob_biotypes) || (MOB_UNDEAD in L.mob_biotypes) || (MOB_ROBOTIC in L.mob_biotypes))
if((MOB_ORGANIC in L.mob_biotypes) || (MOB_UNDEAD in L.mob_biotypes))
inject_nanites()
/obj/machinery/public_nanite_chamber/open_machine()
+70 -71
View File
@@ -36,10 +36,10 @@ Nothing else in the console has ID requirements.
var/locked = FALSE
var/tdisk_uple = FALSE
var/ddisk_uple = FALSE
var/datum/selected_node_id
var/datum/selected_design_id
var/datum/techweb_node/selected_node
var/datum/design/selected_design
var/selected_category
var/list/matching_design_ids
var/list/datum/design/matching_designs
var/disk_slot_selected
var/searchstring = ""
var/searchtype = ""
@@ -52,12 +52,13 @@ Nothing else in the console has ID requirements.
research_control = FALSE
/proc/CallMaterialName(ID)
if(GLOB.chemical_reagents_list[ID])
var/datum/reagent/reagent = GLOB.chemical_reagents_list[ID]
return reagent.name
if (ID[1] == "$" && GLOB.materials_list[ID])
if (copytext(ID, 1, 2) == "$" && GLOB.materials_list[ID])
var/datum/material/material = GLOB.materials_list[ID]
return material.name
else if(GLOB.chemical_reagents_list[ID])
var/datum/reagent/reagent = GLOB.chemical_reagents_list[ID]
return reagent.name
return "ERROR: Report This"
/obj/machinery/computer/rdconsole/proc/SyncRDevices() //Makes sure it is properly sync'ed up with the devices attached to it (if any).
@@ -87,7 +88,7 @@ Nothing else in the console has ID requirements.
. = ..()
stored_research = SSresearch.science_tech
stored_research.consoles_accessing[src] = TRUE
matching_design_ids = list()
matching_designs = list()
SyncRDevices()
/obj/machinery/computer/rdconsole/Destroy()
@@ -108,7 +109,9 @@ Nothing else in the console has ID requirements.
if(d_disk)
d_disk.forceMove(get_turf(src))
d_disk = null
matching_design_ids = null
matching_designs = null
selected_node = null
selected_design = null
return ..()
/obj/machinery/computer/rdconsole/attackby(obj/item/D, mob/user, params)
@@ -141,7 +144,7 @@ Nothing else in the console has ID requirements.
if(!stored_research.available_nodes[id] || stored_research.researched_nodes[id])
say("Node unlock failed: Either already researched or not available!")
return FALSE
var/datum/techweb_node/TN = SSresearch.techweb_node_by_id(id)
var/datum/techweb_node/TN = SSresearch.techweb_nodes[id]
if(!istype(TN))
say("Node unlock failed: Unknown error.")
return FALSE
@@ -150,7 +153,7 @@ Nothing else in the console has ID requirements.
investigate_log("[key_name(user)] researched [id]([json_encode(price)]) on techweb id [stored_research.id].", INVESTIGATE_RESEARCH)
if(stored_research == SSresearch.science_tech)
SSblackbox.record_feedback("associative", "science_techweb_unlock", 1, list("id" = "[id]", "name" = TN.display_name, "price" = "[json_encode(price)]", "time" = SQLtime()))
if(stored_research.research_node_id(id))
if(stored_research.research_node(SSresearch.techweb_nodes[id]))
say("Successfully researched [TN.display_name].")
var/logname = "Unknown"
if(isAI(user))
@@ -277,7 +280,7 @@ Nothing else in the console has ID requirements.
l += ui_protolathe_header()
l += "<div class='statusDisplay'><h3>Browsing [selected_category]:</h3>"
for(var/v in stored_research.researched_designs)
var/datum/design/D = SSresearch.techweb_design_by_id(v)
var/datum/design/D = stored_research.researched_designs[v]
if(!(selected_category in D.category)|| !(D.build_type & PROTOLATHE))
continue
if(!(isnull(linked_lathe.allowed_department_flags) || (D.departmental_flags & linked_lathe.allowed_department_flags)))
@@ -332,8 +335,7 @@ Nothing else in the console has ID requirements.
RDSCREEN_UI_LATHE_CHECK
var/list/l = list()
l += ui_protolathe_header()
for(var/id in matching_design_ids)
var/datum/design/D = SSresearch.techweb_design_by_id(id)
for(var/datum/design/D in matching_designs)
if(!(isnull(linked_lathe.allowed_department_flags) || (D.departmental_flags & linked_lathe.allowed_department_flags)))
continue
var/temp_material
@@ -391,7 +393,7 @@ Nothing else in the console has ID requirements.
l += "<h3>Chemical Storage:</h3>"
for(var/datum/reagent/R in linked_lathe.reagents.reagent_list)
l += "[R.name]: [R.volume]"
l += "<A href='?src=[REF(src)];disposeP=[R]'>Purge</A>"
l += "<A href='?src=[REF(src)];disposeP=[R.id]'>Purge</A>"
l += "</div>"
return l
@@ -429,7 +431,7 @@ Nothing else in the console has ID requirements.
l += "<div class='statusDisplay'><h3>Browsing [selected_category]:</h3>"
for(var/v in stored_research.researched_designs)
var/datum/design/D = SSresearch.techweb_design_by_id(v)
var/datum/design/D = stored_research.researched_designs[v]
if(!(selected_category in D.category) || !(D.build_type & IMPRINTER))
continue
if(!(isnull(linked_imprinter.allowed_department_flags) || (D.departmental_flags & linked_imprinter.allowed_department_flags)))
@@ -462,8 +464,7 @@ Nothing else in the console has ID requirements.
l += ui_circuit_header()
l += "<div class='statusDisplay'><h3>Search results:</h3>"
for(var/id in matching_design_ids)
var/datum/design/D = SSresearch.techweb_design_by_id(id)
for(var/datum/design/D in matching_designs)
if(!(isnull(linked_imprinter.allowed_department_flags) || (D.departmental_flags & linked_imprinter.allowed_department_flags)))
continue
var/temp_materials
@@ -494,7 +495,7 @@ Nothing else in the console has ID requirements.
l += "<h3>Chemical Storage:</h3>"
for(var/datum/reagent/R in linked_imprinter.reagents.reagent_list)
l += "[R.name]: [R.volume]"
l += "<A href='?src=[REF(src)];disposeI=[R]'>Purge</A>"
l += "<A href='?src=[REF(src)];disposeI=[R.id]'>Purge</A>"
return l
/obj/machinery/computer/rdconsole/proc/ui_circuit_materials() //Legacy code!
@@ -523,7 +524,7 @@ Nothing else in the console has ID requirements.
l += "<A href='?src=[REF(src)];copy_tech=1'>Load Technology to Disk</A></div>"
l += "<div class='statusDisplay'><h3>Stored Technology Nodes:</h3>"
for(var/i in t_disk.stored_research.researched_nodes)
var/datum/techweb_node/N = SSresearch.techweb_node_by_id(i)
var/datum/techweb_node/N = t_disk.stored_research.researched_nodes[i]
l += "<A href='?src=[REF(src)];view_node=[i];back_screen=[screen]'>[N.display_name]</A>"
l += "</div>"
return l
@@ -549,7 +550,7 @@ Nothing else in the console has ID requirements.
l += "<A href='?src=[REF(src)];switch_screen=[RDSCREEN_DESIGNDISK];back_screen=[screen]'>Return to Disk Operations</A><div class='statusDisplay'>"
l += "<h3>Load Design to Disk:</h3>"
for(var/v in stored_research.researched_designs)
var/datum/design/D = SSresearch.techweb_design_by_id(v)
var/datum/design/D = stored_research.researched_designs[v]
l += "[D.name] "
l += "<A href='?src=[REF(src)];copy_design=[disk_slot_selected];copy_design_ID=[D.id]'>Copy to Disk</A>"
l += "</div>"
@@ -570,7 +571,7 @@ Nothing else in the console has ID requirements.
for(var/id in boostable_nodes)
anything = TRUE
var/list/worth = boostable_nodes[id]
var/datum/techweb_node/N = SSresearch.techweb_node_by_id(id)
var/datum/techweb_node/N = get_techweb_node_by_id(id)
l += "<div class='statusDisplay'>[RDSCREEN_NOBREAK]"
if (stored_research.researched_nodes[N.id]) // already researched
@@ -634,33 +635,32 @@ Nothing else in the console has ID requirements.
var/list/columns = list()
var/max_tier = 0
for (var/node_ in stored_research.tiers)
var/datum/techweb_node/node = SSresearch.techweb_node_by_id(node_)
var/tier = stored_research.tiers[node.id]
var/datum/techweb_node/node = node_
var/tier = stored_research.tiers[node]
LAZYINITLIST(columns["[tier]"]) // String hackery to make the numbers associative
columns["[tier]"] += ui_techweb_single_node(node, minimal=(tier != 1))
max_tier = max(max_tier, tier)
l += "<table><tr><th align='left'>Researched</th><th align='left'>Available</th><th align='left'>Future</th></tr><tr>[RDSCREEN_NOBREAK]"
if(max_tier)
for(var/tier in 0 to max_tier)
l += "<td valign='top'>[RDSCREEN_NOBREAK]"
l += columns["[tier]"]
l += "</td>[RDSCREEN_NOBREAK]"
for(var/tier in 0 to max_tier)
l += "<td valign='top'>[RDSCREEN_NOBREAK]"
l += columns["[tier]"]
l += "</td>[RDSCREEN_NOBREAK]"
l += "</tr></table>[RDSCREEN_NOBREAK]"
else
var/list/avail = list() //This could probably be optimized a bit later.
var/list/unavail = list()
var/list/res = list()
for(var/v in stored_research.researched_nodes)
res += SSresearch.techweb_node_by_id(v)
res += stored_research.researched_nodes[v]
for(var/v in stored_research.available_nodes)
if(stored_research.researched_nodes[v])
continue
avail += SSresearch.techweb_node_by_id(v)
avail += stored_research.available_nodes[v]
for(var/v in stored_research.visible_nodes)
if(stored_research.available_nodes[v])
continue
unavail += SSresearch.techweb_node_by_id(v)
unavail += stored_research.visible_nodes[v]
l += "<h2>Technology Nodes:</h2>[RDSCREEN_NOBREAK]"
l += "<div><h3>Available for Research:</h3>"
for(var/datum/techweb_node/N in avail)
@@ -702,14 +702,13 @@ Nothing else in the console has ID requirements.
l += "<BR><span class='linkOff bad'>[node.price_display(stored_research)]</span>" // red - missing prereqs
if(ui_mode == RDCONSOLE_UI_MODE_NORMAL)
l += "[node.description]"
for(var/i in node.design_ids)
var/datum/design/D = SSresearch.techweb_design_by_id(i)
for(var/i in node.designs)
var/datum/design/D = node.designs[i]
l += "<span data-tooltip='[D.name]' onclick='location=\"?src=[REF(src)];view_design=[i];back_screen=[screen]\"'>[D.icon_html(usr)]</span>[RDSCREEN_NOBREAK]"
l += "</div>[RDSCREEN_NOBREAK]"
return l
/obj/machinery/computer/rdconsole/proc/ui_techweb_nodeview()
var/datum/techweb_node/selected_node = SSresearch.techweb_node_by_id(selected_node_id)
RDSCREEN_UI_SNODE_CHECK
var/list/l = list()
if(stored_research.hidden_nodes[selected_node.id])
@@ -717,65 +716,65 @@ Nothing else in the console has ID requirements.
return
l += "<table><tr>[RDSCREEN_NOBREAK]"
if (length(selected_node.prereq_ids))
if (length(selected_node.prerequisites))
l += "<th align='left'>Requires</th>[RDSCREEN_NOBREAK]"
l += "<th align='left'>Current Node</th>[RDSCREEN_NOBREAK]"
if (length(selected_node.unlock_ids))
if (length(selected_node.unlocks))
l += "<th align='left'>Unlocks</th>[RDSCREEN_NOBREAK]"
l += "</tr><tr>[RDSCREEN_NOBREAK]"
if (length(selected_node.unlock_ids))
if (length(selected_node.prerequisites))
l += "<td valign='top'>[RDSCREEN_NOBREAK]"
for (var/i in selected_node.prereq_ids)
l += ui_techweb_single_node(SSresearch.techweb_node_by_id(i))
for (var/i in selected_node.prerequisites)
l += ui_techweb_single_node(selected_node.prerequisites[i])
l += "</td>[RDSCREEN_NOBREAK]"
l += "<td valign='top'>[RDSCREEN_NOBREAK]"
l += ui_techweb_single_node(selected_node, selflink=FALSE)
l += "</td>[RDSCREEN_NOBREAK]"
if (length(selected_node.unlock_ids))
if (length(selected_node.unlocks))
l += "<td valign='top'>[RDSCREEN_NOBREAK]"
for (var/i in selected_node.unlock_ids)
l += ui_techweb_single_node(SSresearch.techweb_node_by_id(i))
for (var/i in selected_node.unlocks)
l += ui_techweb_single_node(selected_node.unlocks[i])
l += "</td>[RDSCREEN_NOBREAK]"
l += "</tr></table>[RDSCREEN_NOBREAK]"
return l
/obj/machinery/computer/rdconsole/proc/ui_techweb_designview() //Legacy code
var/datum/design/selected_design = SSresearch.techweb_design_by_id(selected_design_id)
RDSCREEN_UI_SDESIGN_CHECK
var/list/l = list()
l += "<div><table><tr><td>[selected_design.icon_html(usr)]</td><td><b>[selected_design.name]</b></td></tr></table>[RDSCREEN_NOBREAK]"
if(selected_design.build_type)
var/datum/design/D = selected_design
l += "<div><table><tr><td>[D.icon_html(usr)]</td><td><b>[D.name]</b></td></tr></table>[RDSCREEN_NOBREAK]"
if(D.build_type)
var/lathes = list()
if(selected_design.build_type & IMPRINTER)
if(D.build_type & IMPRINTER)
lathes += "<span data-tooltip='Circuit Imprinter'>[machine_icon(/obj/machinery/rnd/production/circuit_imprinter)]</span>[RDSCREEN_NOBREAK]"
if (linked_imprinter && stored_research.researched_designs[selected_design.id])
l += "<A href='?src=[REF(src)];search=1;type=imprint;to_search=[selected_design.name]'>Imprint</A>"
if(selected_design.build_type & PROTOLATHE)
if (linked_imprinter && D.id in stored_research.researched_designs)
l += "<A href='?src=[REF(src)];search=1;type=imprint;to_search=[D.name]'>Imprint</A>"
if(D.build_type & PROTOLATHE)
lathes += "<span data-tooltip='Protolathe'>[machine_icon(/obj/machinery/rnd/production/protolathe)]</span>[RDSCREEN_NOBREAK]"
if (linked_lathe && stored_research.researched_designs[selected_design.id])
l += "<A href='?src=[REF(src)];search=1;type=proto;to_search=[selected_design.name]'>Construct</A>"
if(selected_design.build_type & AUTOLATHE)
if (linked_lathe && D.id in stored_research.researched_designs)
l += "<A href='?src=[REF(src)];search=1;type=proto;to_search=[D.name]'>Construct</A>"
if(D.build_type & AUTOLATHE)
lathes += "<span data-tooltip='Autolathe'>[machine_icon(/obj/machinery/autolathe)]</span>[RDSCREEN_NOBREAK]"
if(selected_design.build_type & MECHFAB)
if(D.build_type & MECHFAB)
lathes += "<span data-tooltip='Exosuit Fabricator'>[machine_icon(/obj/machinery/mecha_part_fabricator)]</span>[RDSCREEN_NOBREAK]"
if(selected_design.build_type & BIOGENERATOR)
if(D.build_type & BIOGENERATOR)
lathes += "<span data-tooltip='Biogenerator'>[machine_icon(/obj/machinery/biogenerator)]</span>[RDSCREEN_NOBREAK]"
if(selected_design.build_type & LIMBGROWER)
if(D.build_type & LIMBGROWER)
lathes += "<span data-tooltip='Limbgrower'>[machine_icon(/obj/machinery/limbgrower)]</span>[RDSCREEN_NOBREAK]"
if(selected_design.build_type & SMELTER)
if(D.build_type & SMELTER)
lathes += "<span data-tooltip='Smelter'>[machine_icon(/obj/machinery/mineral/processing_unit)]</span>[RDSCREEN_NOBREAK]"
l += "Construction types:"
l += lathes
l += ""
l += "Required materials:"
var/all_mats = selected_design.materials + selected_design.reagents_list
var/all_mats = D.materials + D.reagents_list
for(var/M in all_mats)
l += "* [CallMaterialName(M)] x [all_mats[M]]"
l += "Unlocked by:"
for (var/i in selected_design.unlocked_by)
l += ui_techweb_single_node(SSresearch.techweb_node_by_id(i))
for (var/node in D.unlocked_by)
l += ui_techweb_single_node(node)
l += "[RDSCREEN_NOBREAK]</div>"
return l
@@ -966,7 +965,7 @@ Nothing else in the console has ID requirements.
qdel(t_disk.stored_research)
t_disk.stored_research = new
say("Wiping technology disk.")
if(ls["copy_tech"]) //Copy some technology from the research holder to the disk.
if(ls["copy_tech"]) //Copy some technology la from the research holder to the disk.
if(QDELETED(t_disk))
say("No Technology Disk Inserted!")
return
@@ -1000,12 +999,12 @@ Nothing else in the console has ID requirements.
return
say("Uploading technology disk.")
t_disk.stored_research.copy_research_to(stored_research)
if(ls["copy_design"]) //Copy design from the research holder to the design disk.
if(ls["copy_design"]) //Copy design la from the research holder to the design disk.
if(QDELETED(d_disk))
say("No Design Disk Inserted!")
return
var/slot = text2num(ls["copy_design"])
var/datum/design/D = SSresearch.techweb_design_by_id(ls["copy_design_ID"])
var/datum/design/D = stored_research.researched_designs[ls["copy_design_ID"]]
if(D)
var/autolathe_friendly = TRUE
if(D.reagents_list.len)
@@ -1032,12 +1031,12 @@ Nothing else in the console has ID requirements.
linked_destroy.unload_item()
screen = RDSCREEN_MENU
if(ls["view_node"])
selected_node_id = ls["view_node"]
selected_node = SSresearch.techweb_nodes[ls["view_node"]]
screen = RDSCREEN_TECHWEB_NODEVIEW
if(ls["view_design"])
selected_design_id = ls["view_design"]
selected_design = SSresearch.techweb_designs[ls["view_design"]]
screen = RDSCREEN_TECHWEB_DESIGNVIEW
if(ls["updt_design"]) //Uploads a design from disk to the techweb.
if(ls["updt_design"]) //Uples the research holder with design la from the design disk.
if(QDELETED(d_disk))
say("No design disk found.")
return
@@ -1045,9 +1044,9 @@ Nothing else in the console has ID requirements.
if(!n)
for(var/D in d_disk.blueprints)
if(D)
stored_research.add_design(D, TRUE)
stored_research.add_design(D)
else
stored_research.add_design(d_disk.blueprints[n], TRUE)
stored_research.add_design(d_disk.blueprints[n])
updateUsrDialog()
@@ -1076,17 +1075,17 @@ Nothing else in the console has ID requirements.
/obj/machinery/computer/rdconsole/proc/rescan_views()
var/compare
matching_design_ids.Cut()
matching_designs.Cut()
if(searchtype == "proto")
compare = PROTOLATHE
else if(searchtype == "imprint")
compare = IMPRINTER
for(var/v in stored_research.researched_designs)
var/datum/design/D = SSresearch.techweb_design_by_id(v)
var/datum/design/D = stored_research.researched_designs[v]
if(!(D.build_type & compare))
continue
if(findtext(D.name,searchstring))
matching_design_ids.Add(D.id)
matching_designs.Add(D)
/obj/machinery/computer/rdconsole/proc/check_canprint(datum/design/D, buildtype)
var/amount = 50
@@ -1,3 +1,48 @@
/proc/initialize_all_techweb_nodes(clearall = FALSE)
if(islist(SSresearch.techweb_nodes) && clearall)
QDEL_LIST(SSresearch.techweb_nodes)
if(islist(SSresearch.techweb_nodes_starting && clearall))
QDEL_LIST(SSresearch.techweb_nodes_starting)
var/list/returned = list()
for(var/path in subtypesof(/datum/techweb_node))
var/datum/techweb_node/TN = path
if(isnull(initial(TN.id)))
continue
TN = new path
if(returned[initial(TN.id)])
stack_trace("WARNING: Techweb node ID clash with ID [initial(TN.id)] detected!")
SSresearch.errored_datums[TN] = initial(TN.id)
continue
returned[initial(TN.id)] = TN
if(TN.starting_node)
SSresearch.techweb_nodes_starting[TN.id] = TN
SSresearch.techweb_nodes = returned
verify_techweb_nodes() //Verify all nodes have ids and such.
calculate_techweb_nodes()
calculate_techweb_boost_list()
verify_techweb_nodes() //Verify nodes and designs have been crosslinked properly.
/proc/initialize_all_techweb_designs(clearall = FALSE)
if(islist(SSresearch.techweb_designs) && clearall)
QDEL_LIST(SSresearch.techweb_designs)
var/list/returned = list()
for(var/path in subtypesof(/datum/design))
var/datum/design/DN = path
if(isnull(initial(DN.id)))
stack_trace("WARNING: Design with null ID detected. Build path: [initial(DN.build_path)]")
continue
else if(initial(DN.id) == DESIGN_ID_IGNORE)
continue
DN = new path
if(returned[initial(DN.id)])
stack_trace("WARNING: Design ID clash with ID [initial(DN.id)] detected!")
SSresearch.errored_datums[DN] = initial(DN.id)
continue
returned[initial(DN.id)] = DN
SSresearch.techweb_designs = returned
verify_techweb_designs()
/proc/count_unique_techweb_nodes()
var/static/list/L = typesof(/datum/techweb_node)
return L.len
@@ -6,10 +51,135 @@
var/static/list/L = typesof(/datum/design)
return L.len
/proc/get_techweb_node_by_id(id)
if(SSresearch.techweb_nodes[id])
return SSresearch.techweb_nodes[id]
/proc/get_techweb_design_by_id(id)
if(SSresearch.techweb_designs[id])
return SSresearch.techweb_designs[id]
/proc/research_node_id_error(id)
if(SSresearch.invalid_node_ids[id])
SSresearch.invalid_node_ids[id]++
else
SSresearch.invalid_node_ids[id] = 1
/proc/design_id_error(id)
if(SSresearch.invalid_design_ids[id])
SSresearch.invalid_design_ids[id]++
else
SSresearch.invalid_design_ids[id] = 1
/proc/node_boost_error(id, message)
WARNING("Invalid boost information for node \[[id]\]: [message]")
SSresearch.invalid_node_boost[id] = message
/proc/verify_techweb_nodes()
for(var/n in SSresearch.techweb_nodes)
var/datum/techweb_node/N = SSresearch.techweb_nodes[n]
if(!istype(N))
WARNING("Invalid research node with ID [n] detected and removed.")
SSresearch.techweb_nodes -= n
research_node_id_error(n)
for(var/p in N.prereq_ids)
var/datum/techweb_node/P = SSresearch.techweb_nodes[p]
if(!istype(P))
WARNING("Invalid research prerequisite node with ID [p] detected in node [N.display_name]\[[N.id]\] removed.")
N.prereq_ids -= p
research_node_id_error(p)
for(var/d in N.design_ids)
var/datum/design/D = SSresearch.techweb_designs[d]
if(!istype(D))
WARNING("Invalid research design with ID [d] detected in node [N.display_name]\[[N.id]\] removed.")
N.designs -= d
design_id_error(d)
for(var/p in N.prerequisites)
var/datum/techweb_node/P = N.prerequisites[p]
if(!istype(P))
WARNING("Invalid research prerequisite node with ID [p] detected in node [N.display_name]\[[N.id]\] removed.")
N.prerequisites -= p
research_node_id_error(p)
for(var/u in N.unlocks)
var/datum/techweb_node/U = N.unlocks[u]
if(!istype(U))
WARNING("Invalid research unlock node with ID [u] detected in node [N.display_name]\[[N.id]\] removed.")
N.unlocks -= u
research_node_id_error(u)
for(var/d in N.designs)
var/datum/design/D = N.designs[d]
if(!istype(D))
WARNING("Invalid research design with ID [d] detected in node [N.display_name]\[[N.id]\] removed.")
N.designs -= d
design_id_error(d)
for(var/p in N.boost_item_paths)
if(!ispath(p))
N.boost_item_paths -= p
node_boost_error(N.id, "[p] is not a valid path.")
var/list/points = N.boost_item_paths[p]
if(islist(points))
for(var/i in points)
if(!isnum(points[i]))
node_boost_error(N.id, "[points[i]] is not a valid number.")
else if(!SSresearch.point_types[i])
node_boost_error(N.id, "[i] is not a valid point type.")
else if(!isnull(points))
N.boost_item_paths -= p
node_boost_error(N.id, "No valid list.")
CHECK_TICK
/proc/verify_techweb_designs()
for(var/d in SSresearch.techweb_designs)
var/datum/design/D = SSresearch.techweb_designs[d]
if(!istype(D))
stack_trace("WARNING: Invalid research design with ID [d] detected and removed.")
SSresearch.techweb_designs -= d
CHECK_TICK
/proc/calculate_techweb_nodes()
for(var/design_id in SSresearch.techweb_designs)
var/datum/design/D = SSresearch.techweb_designs[design_id]
D.unlocked_by.Cut()
for(var/node_id in SSresearch.techweb_nodes)
var/datum/techweb_node/node = SSresearch.techweb_nodes[node_id]
node.prerequisites = list()
node.unlocks = list()
node.designs = list()
for(var/i in node.prereq_ids)
node.prerequisites[i] = SSresearch.techweb_nodes[i]
for(var/i in node.design_ids)
var/datum/design/D = SSresearch.techweb_designs[i]
node.designs[i] = D
D.unlocked_by += node
if(node.hidden)
SSresearch.techweb_nodes_hidden[node.id] = node
CHECK_TICK
generate_techweb_unlock_linking()
/proc/generate_techweb_unlock_linking()
for(var/node_id in SSresearch.techweb_nodes) //Clear all unlock links to avoid duplication.
var/datum/techweb_node/node = SSresearch.techweb_nodes[node_id]
node.unlocks = list()
for(var/node_id in SSresearch.techweb_nodes)
var/datum/techweb_node/node = SSresearch.techweb_nodes[node_id]
for(var/prereq_id in node.prerequisites)
var/datum/techweb_node/prereq_node = node.prerequisites[prereq_id]
prereq_node.unlocks[node.id] = node
/proc/calculate_techweb_boost_list(clearall = FALSE)
if(clearall)
SSresearch.techweb_boost_items = list()
for(var/node_id in SSresearch.techweb_nodes)
var/datum/techweb_node/node = SSresearch.techweb_nodes[node_id]
for(var/path in node.boost_item_paths)
if(!ispath(path))
continue
if(length(SSresearch.techweb_boost_items[path]))
SSresearch.techweb_boost_items[path][node.id] = node.boost_item_paths[path]
else
SSresearch.techweb_boost_items[path] = list(node.id = node.boost_item_paths[path])
CHECK_TICK
/proc/techweb_item_boost_check(obj/item/I) //Returns an associative list of techweb node datums with values of the boost it gives. var/list/returned = list()
if(SSresearch.techweb_boost_items[I.type])
return SSresearch.techweb_boost_items[I.type] //It should already be formatted in node datum = list(point type = value)
+62 -69
View File
@@ -5,13 +5,12 @@
//Techweb datums are meant to store unlocked research, being able to be stored on research consoles, servers, and disks. They are NOT global.
/datum/techweb
var/list/researched_nodes = list() //Already unlocked and all designs are now available. Assoc list, id = TRUE
var/list/visible_nodes = list() //Visible nodes, doesn't mean it can be researched. Assoc list, id = TRUE
var/list/available_nodes = list() //Nodes that can immediately be researched, all reqs met. assoc list, id = TRUE
var/list/researched_designs = list() //Designs that are available for use. Assoc list, id = TRUE
var/list/custom_designs = list() //Custom inserted designs like from disks that should survive recalculation.
var/list/boosted_nodes = list() //Already boosted nodes that can't be boosted again. node id = path of boost object.
var/list/hidden_nodes = list()
var/list/datum/techweb_node/researched_nodes = list() //Already unlocked and all designs are now available. Assoc list, id = datum
var/list/datum/techweb_node/visible_nodes = list() //Visible nodes, doesn't mean it can be researched. Assoc list, id = datum
var/list/datum/techweb_node/available_nodes = list() //Nodes that can immediately be researched, all reqs met. assoc list, id = datum
var/list/datum/design/researched_designs = list() //Designs that are available for use. Assoc list, id = datum
var/list/datum/techweb_node/boosted_nodes = list() //Already boosted nodes that can't be boosted again. node datum = path of boost object.
var/list/datum/techweb_node/hidden_nodes = list() //Hidden nodes. id = datum. Used for unhiding nodes when requirements are met by removing the entry of the node.
var/list/deconstructed_items = list() //items already deconstructed for a generic point boost. path = list(point_type = points)
var/list/research_points = list() //Available research points. type = number
var/list/obj/machinery/computer/rdconsole/consoles_accessing = list()
@@ -21,13 +20,13 @@
var/organization = "Third-Party" //Organization name, used for display.
var/list/last_bitcoins = list() //Current per-second production, used for display only.
var/list/discovered_mutations = list() //Mutations discovered by genetics, this way they are shared and cant be destroyed by destroying a single console
var/list/tiers = list() //Assoc list, id = number, 1 is available, 2 is all reqs are 1, so on
var/list/tiers = list() //Assoc list, datum = number, 1 is available, 2 is all reqs are 1, so on
/datum/techweb/New()
for(var/i in SSresearch.techweb_nodes_starting)
var/datum/techweb_node/DN = SSresearch.techweb_node_by_id(i)
var/datum/techweb_node/DN = SSresearch.techweb_nodes_starting[i]
research_node(DN, TRUE, FALSE)
hidden_nodes = SSresearch.techweb_nodes_hidden.Copy()
hidden_nodes = SSresearch.techweb_nodes_hidden
return ..()
/datum/techweb/admin
@@ -60,24 +59,23 @@
researched_designs = null
available_nodes = null
visible_nodes = null
custom_designs = null
SSresearch.techwebs -= src
return ..()
/datum/techweb/proc/recalculate_nodes(recalculate_designs = FALSE, wipe_custom_designs = FALSE)
/datum/techweb/proc/recalculate_nodes(recalculate_designs = FALSE)
var/list/datum/techweb_node/processing = list()
for(var/id in researched_nodes)
processing[id] = TRUE
for(var/id in visible_nodes)
processing[id] = TRUE
for(var/id in available_nodes)
processing[id] = TRUE
if(recalculate_designs)
researched_designs = custom_designs.Copy()
if(wipe_custom_designs)
custom_designs = list()
for(var/id in processing)
update_node_status(SSresearch.techweb_node_by_id(id), FALSE)
for(var/i in researched_nodes)
processing[i] = researched_nodes[i]
for(var/i in visible_nodes)
processing[i] = visible_nodes[i]
for(var/i in available_nodes)
processing[i] = available_nodes[i]
for(var/i in processing)
update_node_status(processing[i])
if(recalculate_designs) //Wipes custom added designs like from design disks or anything like that!
researched_designs = list()
for(var/i in processing)
var/datum/techweb_node/TN = processing[i]
update_node_status(TN, FALSE)
CHECK_TICK
for(var/v in consoles_accessing)
var/obj/machinery/computer/rdconsole/V = v
@@ -167,27 +165,21 @@
research_points[type] = max(0, research_points[type] - amount)
return TRUE
/datum/techweb/proc/add_design_by_id(id, custom = FALSE)
return add_design(SSresearch.techweb_design_by_id(id), custom)
/datum/techweb/proc/add_design_by_id(id)
return add_design(get_techweb_design_by_id(id))
/datum/techweb/proc/add_design(datum/design/design, custom = FALSE)
/datum/techweb/proc/add_design(datum/design/design)
if(!istype(design))
return FALSE
researched_designs[design.id] = design
researched_designs[design.id] = TRUE
if(custom)
custom_designs[design.id] = TRUE
return TRUE
/datum/techweb/proc/remove_design_by_id(id, custom = FALSE)
return remove_design(SSresearch.techweb_design_by_id(id), custom)
/datum/techweb/proc/remove_design_by_id(id)
return remove_design(get_techweb_design_by_id(id))
/datum/techweb/proc/remove_design(datum/design/design, custom = FALSE)
/datum/techweb/proc/remove_design(datum/design/design)
if(!istype(design))
return FALSE
if(custom_designs[design.id] && !custom)
return FALSE
custom_designs -= design.id
researched_designs -= design.id
return TRUE
@@ -201,7 +193,7 @@
return techweb_point_display_generic(research_points)
/datum/techweb/proc/research_node_id(id, force, auto_update_points)
return research_node(SSresearch.techweb_node_by_id(id), force, auto_update_points)
return research_node(get_techweb_node_by_id(id), force, auto_update_points)
/datum/techweb/proc/research_node(datum/techweb_node/node, force = FALSE, auto_adjust_cost = TRUE)
if(!istype(node))
@@ -212,17 +204,17 @@
return FALSE
if(auto_adjust_cost)
remove_point_list(node.get_price(src))
researched_nodes[node.id] = TRUE //Add to our researched list
for(var/id in node.unlock_ids)
visible_nodes[id] = TRUE
update_node_status(SSresearch.techweb_node_by_id(id))
for(var/id in node.design_ids)
add_design_by_id(id)
researched_nodes[node.id] = node //Add to our researched list
for(var/i in node.unlocks)
visible_nodes[i] = node.unlocks[i]
update_node_status(node.unlocks[i])
for(var/i in node.designs)
add_design(node.designs[i])
update_node_status(node)
return TRUE
/datum/techweb/proc/unresearch_node_id(id)
return unresearch_node(SSresearch.techweb_node_by_id(id))
return unresearch_node(get_techweb_node_by_id(id))
/datum/techweb/proc/unresearch_node(datum/techweb_node/node)
if(!istype(node))
@@ -233,9 +225,9 @@
/datum/techweb/proc/boost_with_path(datum/techweb_node/N, itempath)
if(!istype(N) || !ispath(itempath))
return FALSE
LAZYINITLIST(boosted_nodes[N.id])
LAZYINITLIST(boosted_nodes[N])
for(var/i in N.boost_item_paths[itempath])
boosted_nodes[N.id][i] = max(boosted_nodes[N.id][i], N.boost_item_paths[itempath][i])
boosted_nodes[N][i] = max(boosted_nodes[N][i], N.boost_item_paths[itempath][i])
if(N.autounlock_by_boost)
hidden_nodes -= N.id
update_node_status(N)
@@ -250,13 +242,13 @@
var/tier = 0
if (!researched_nodes[node.id]) // researched is tier 0
for (var/id in node.prereq_ids)
var/prereq_tier = tiers[id]
var/prereq_tier = tiers[node.prerequisites[id]]
tier = max(tier, prereq_tier + 1)
if (tier != tiers[node.id])
tiers[node.id] = tier
for (var/id in node.unlock_ids)
next += SSresearch.techweb_node_by_id(id)
if (tier != tiers[node])
tiers[node] = tier
for (var/id in node.unlocks)
next += node.unlocks[id]
current = next
/datum/techweb/proc/update_node_status(datum/techweb_node/node, autoupdate_consoles = TRUE)
@@ -266,8 +258,8 @@
if(researched_nodes[node.id])
researched = TRUE
var/needed = node.prereq_ids.len
for(var/id in node.prereq_ids)
if(researched_nodes[id])
for(var/i in node.prereq_ids)
if(researched_nodes[i])
visible = TRUE
needed--
if(!needed)
@@ -278,15 +270,15 @@
if(hidden_nodes[node.id]) //Hidden.
return
if(researched)
researched_nodes[node.id] = TRUE
for(var/id in node.design_ids)
add_design(SSresearch.techweb_design_by_id(id))
researched_nodes[node.id] = node
for(var/i in node.designs)
add_design(node.designs[i])
else
if(available)
available_nodes[node.id] = TRUE
available_nodes[node.id] = node
else
if(visible)
visible_nodes[node.id] = TRUE
visible_nodes[node.id] = node
update_tiers(node)
if(autoupdate_consoles)
for(var/v in consoles_accessing)
@@ -297,34 +289,35 @@
//Laggy procs to do specific checks, just in case. Don't use them if you can just use the vars that already store all this!
/datum/techweb/proc/designHasReqs(datum/design/D)
for(var/i in researched_nodes)
var/datum/techweb_node/N = SSresearch.techweb_node_by_id(i)
if(N.design_ids[D.id])
return TRUE
var/datum/techweb_node/N = researched_nodes[i]
for(var/I in N.designs)
if(D == N.designs[I])
return TRUE
return FALSE
/datum/techweb/proc/isDesignResearched(datum/design/D)
return isDesignResearchedID(D.id)
/datum/techweb/proc/isDesignResearchedID(id)
return researched_designs[id]? SSresearch.techweb_design_by_id(id) : FALSE
return researched_designs[id]
/datum/techweb/proc/isNodeResearched(datum/techweb_node/N)
return isNodeResearchedID(N.id)
/datum/techweb/proc/isNodeResearchedID(id)
return researched_nodes[id]? SSresearch.techweb_design_by_id(id) : FALSE
return researched_nodes[id]
/datum/techweb/proc/isNodeVisible(datum/techweb_node/N)
return isNodeResearchedID(N.id)
/datum/techweb/proc/isNodeVisibleID(id)
return visible_nodes[id]? SSresearch.techweb_design_by_id(id) : FALSE
return visible_nodes[id]
/datum/techweb/proc/isNodeAvailable(datum/techweb_node/N)
return isNodeAvailableID(N.id)
/datum/techweb/proc/isNodeAvailableID(id)
return available_nodes[id]? SSresearch.techweb_design_by_id(id) : FALSE
return available_nodes[id]
/datum/techweb/specialized
var/allowed_buildtypes = ALL
@@ -347,11 +340,11 @@
for(var/id in node_autounlock_ids)
research_node_id(id, TRUE, FALSE)
for(var/id in SSresearch.techweb_designs)
var/datum/design/D = SSresearch.techweb_design_by_id(id)
var/datum/design/D = SSresearch.techweb_designs[id]
if(D.build_type & design_autounlock_buildtypes)
for(var/i in D.category)
if(i in design_autounlock_categories)
add_design_by_id(D.id)
add_design(D)
break
/datum/techweb/specialized/autounlocking/autolathe
@@ -375,4 +368,4 @@
/datum/techweb/specialized/autounlocking/autobottler
design_autounlock_buildtypes = AUTOBOTTLER
allowed_buildtypes = AUTOBOTTLER
allowed_buildtypes = AUTOBOTTLER
+6 -71
View File
@@ -9,85 +9,20 @@
var/starting_node = FALSE //Whether it's available without any research.
var/list/prereq_ids = list()
var/list/design_ids = list()
var/list/unlock_ids = list()
var/list/datum/techweb_node/prerequisites = list() //Assoc list id = datum
var/list/datum/techweb_node/unlocks = list() //CALCULATED FROM OTHER NODE'S PREREQUISITES. Assoc list id = datum.
var/list/datum/design/designs = list() //Assoc list id = datum
var/list/boost_item_paths = list() //Associative list, path = list(point type = point_value).
var/autounlock_by_boost = TRUE //boosting this will autounlock this node.
var/export_price = 0 //Cargo export price.
var/list/research_costs = list() //Point cost to research. type = amount
var/list/research_costs = 0 //Point cost to research. type = amount
var/category = "Misc" //Category
/datum/techweb_node/error_node
id = "ERROR"
display_name = "ERROR"
description = "This usually means something in the database has corrupted. If it doesn't go away automatically, inform Central Command for their techs to fix it ASAP(tm)"
/datum/techweb_node/proc/Initialize()
//Make lists associative for lookup
for(var/id in prereq_ids)
prereq_ids[id] = TRUE
for(var/id in design_ids)
design_ids[id] = TRUE
for(var/id in unlock_ids)
unlock_ids[id] = TRUE
/datum/techweb_node/Destroy()
SSresearch.techweb_nodes -= id
return ..()
/datum/techweb_node/serialize_list(list/options)
. = list()
VARSET_TO_LIST(., id)
VARSET_TO_LIST(., display_name)
VARSET_TO_LIST(., hidden)
VARSET_TO_LIST(., starting_node)
VARSET_TO_LIST(., assoc_list_strip_value(prereq_ids))
VARSET_TO_LIST(., assoc_list_strip_value(design_ids))
VARSET_TO_LIST(., assoc_list_strip_value(unlock_ids))
VARSET_TO_LIST(., boost_item_paths)
VARSET_TO_LIST(., autounlock_by_boost)
VARSET_TO_LIST(., export_price)
VARSET_TO_LIST(., research_costs)
VARSET_TO_LIST(., category)
/datum/techweb_node/deserialize_list(list/input, list/options)
if(!input["id"])
return
VARSET_FROM_LIST(input, id)
VARSET_FROM_LIST(input, display_name)
VARSET_FROM_LIST(input, hidden)
VARSET_FROM_LIST(input, starting_node)
VARSET_FROM_LIST(input, prereq_ids)
VARSET_FROM_LIST(input, design_ids)
VARSET_FROM_LIST(input, unlock_ids)
VARSET_FROM_LIST(input, boost_item_paths)
VARSET_FROM_LIST(input, autounlock_by_boost)
VARSET_FROM_LIST(input, export_price)
VARSET_FROM_LIST(input, research_costs)
VARSET_FROM_LIST(input, category)
Initialize()
return src
/datum/techweb_node/proc/on_design_deletion(datum/design/D)
prune_design_id(D.id)
/datum/techweb_node/proc/on_node_deletion(datum/techweb_node/TN)
prune_node_id(TN.id)
/datum/techweb_node/proc/prune_design_id(design_id)
design_ids -= design_id
/datum/techweb_node/proc/prune_node_id(node_id)
prereq_ids -= node_id
unlock_ids -= node_id
/datum/techweb_node/proc/get_price(datum/techweb/host)
if(host)
var/list/actual_costs = research_costs
if(host.boosted_nodes[id])
var/list/L = host.boosted_nodes[id]
if(host.boosted_nodes[src])
var/list/L = host.boosted_nodes[src]
for(var/i in L)
if(actual_costs[i])
actual_costs[i] -= L[i]
+16 -36
View File
@@ -116,7 +116,7 @@
display_name = "Advanced Surgery Tools"
description = "Refined and improved redesigns for the run-of-the-mill medical utensils."
prereq_ids = list("adv_biotech", "adv_surgery")
design_ids = list("drapes", "retractor_adv", "surgicaldrill_adv", "scalpel_adv")
design_ids = list("drapes", "laserscalpel", "mechanicalpinches", "searingtool" )
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
export_price = 5000
@@ -130,21 +130,12 @@
export_price = 5000
/////////////////////////Advanced Surgery/////////////////////////
/datum/techweb_node/imp_wt_surgery
id = "imp_wt_surgery"
display_name = "Improved Wound-Tending Surgery"
description = "Who would have known being more gentle with a hemostat decreases patient pain?"
prereq_ids = list("biotech")
design_ids = list("surgery_heal_brute_upgrade", "surgery_heal_burn_upgrade")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 1000)
export_price = 1000
/datum/techweb_node/adv_surgery
id = "adv_surgery"
display_name = "Advanced Surgery"
description = "When simple medicine doesn't cut it."
prereq_ids = list("imp_wt_surgery")
design_ids = list("surgery_revival", "surgery_lobotomy", "surgery_heal_brute_upgrade_femto", "surgery_heal_burn_upgrade_femto", "surgery_heal_combo", "surgery_toxinhealing", "organbox", "surgery_adv_dissection")
prereq_ids = list("adv_biotech")
design_ids = list("surgery_lobotomy", "surgery_reconstruction","surgery_toxinhealing", "organbox", "surgery_exp_dissection")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
export_price = 5000
@@ -153,7 +144,7 @@
display_name = "Experimental Surgery"
description = "When evolution isn't fast enough."
prereq_ids = list("adv_surgery")
design_ids = list("surgery_pacify", "surgery_vein_thread", "surgery_muscled_veins", "surgery_nerve_splice", "surgery_nerve_ground", "surgery_ligament_hook", "surgery_ligament_reinforcement", "surgery_viral_bond", "surgery_exp_dissection", "surgery_heal_combo_upgrade")
design_ids = list("surgery_revival","surgery_pacify","surgery_vein_thread","surgery_nerve_splice","surgery_ligament_hook","surgery_ligament_reinforcement","surgery_nerve_ground","surgery_viral_bond")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 5000)
export_price = 5000
@@ -162,7 +153,7 @@
display_name = "Alien Surgery"
description = "Abductors did nothing wrong."
prereq_ids = list("exp_surgery", "alientech")
design_ids = list("surgery_brainwashing", "surgery_zombie", "surgery_ext_dissection", "surgery_heal_combo_upgrade_femto")
design_ids = list("surgery_brainwashing","surgery_zombie")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 10000)
export_price = 5000
@@ -201,7 +192,7 @@
display_name = "Advanced Engineering"
description = "Pushing the boundaries of physics, one chainsaw-fist at a time."
prereq_ids = list("engineering", "emp_basic")
design_ids = list("engine_goggles", "magboots", "forcefield_projector", "weldingmask", "rcd_loaded", "rpd_loaded", "tray_goggles_prescription", "engine_goggles_prescription", "mesons_prescription","rcd_upgrade_frames", "rcd_upgrade_simple_circuits", "double_emergency_oxygen")
design_ids = list("engine_goggles", "magboots", "forcefield_projector", "weldingmask", "tray_goggles_prescription", "engine_goggles_prescription", "mesons_prescription", "double_emergency_oxygen","rcd_loaded", "pipe_dispenser","rcd_upgrade_frames", "rcd_upgrade_simple_circuits")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 4000)
export_price = 5000
@@ -255,21 +246,10 @@
display_name = "Games and Toys"
description = "For the slackers on the station."
prereq_ids = list("comptech")
design_ids = list("arcade_battle", "arcade_orion", "arcade_minesweeper", "slotmachine", "autoylathe")
design_ids = list("arcade_battle", "arcade_orion", "slotmachine", "autoylathe")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 1000)
export_price = 5000
///datum/techweb_node/computer_board_gaming
// id = "computer_board_gaming"
// display_name = "Arcade Games"
// description = "For the slackers on the station."
// prereq_ids = list("comptech")
// design_ids = list("arcade_battle", "arcade_orion", "slotmachine") // Magic money
// research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 1500)
// export_price = 2000
/////////////////////////Bluespace tech/////////////////////////
/datum/techweb_node/bluespace_basic //Bluespace-memery
id = "bluespace_basic"
@@ -334,15 +314,6 @@
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
export_price = 5000
/datum/techweb_node/unregulated_bluespace
id = "unregulated_bluespace"
display_name = "Unregulated Bluespace Research"
description = "Bluespace technology using unstable or unbalanced procedures, prone to damaging the fabric of bluespace. Outlawed by galactic conventions."
prereq_ids = list("bluespace_warping", "syndicate_basic")
design_ids = list("desynchronizer")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
export_price = 2500
/////////////////////////plasma tech/////////////////////////
/datum/techweb_node/basic_plasma
id = "basic_plasma"
@@ -496,6 +467,15 @@
"portadrive_basic", "portadrive_advanced", "portadrive_super", "cardslot", "aislot", "miniprinter", "APClink", "bat_control", "bat_normal", "bat_advanced",
"bat_super", "bat_micro", "bat_nano", "cpu_normal", "pcpu_normal", "cpu_small", "pcpu_small")
/datum/techweb_node/computer_board_gaming
id = "computer_board_gaming"
display_name = "Arcade Games"
description = "For the slackers on the station."
prereq_ids = list("comptech")
design_ids = list("arcade_battle", "arcade_orion", "slotmachine") // Magic money
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 1500)
export_price = 2000
/datum/techweb_node/comp_recordkeeping
id = "comp_recordkeeping"
display_name = "Computerized Recordkeeping"
@@ -114,19 +114,19 @@ To add a crossbreed:
name = "blood extract"
desc = "A sphere of liquid blood, somehow managing to stay together."
color = "#FF0000"
list_reagents = list(/datum/reagent/blood = 50)
list_reagents = list("blood" = 50)
/obj/item/slimecrossbeaker/pax //5u synthpax.
name = "peace-inducing extract"
desc = "A small blob of synthetic pax."
color = "#FFCCCC"
list_reagents = list(/datum/reagent/pax/peaceborg = 5)
list_reagents = list("synthpax" = 5)
/obj/item/slimecrossbeaker/omnizine //15u omnizine.
name = "healing extract"
desc = "A gelatinous extract of pure omnizine."
color = "#FF00FF"
list_reagents = list(/datum/reagent/medicine/omnizine = 15)
list_reagents = list("omnizine" = 15)
/obj/item/slimecrossbeaker/autoinjector //As with the above, but automatically injects whomever it is used on with contents.
var/ignore_flags = FALSE
@@ -160,7 +160,7 @@ To add a crossbreed:
name = "mending solution"
desc = "A strange glob of sweet-smelling semifluid, which seems to stick to skin rather easily."
color = "#FF00FF"
list_reagents = list(/datum/reagent/medicine/regen_jelly = 20)
list_reagents = list("regen_jelly" = 20)
/obj/item/slimecrossbeaker/autoinjector/slimejelly //Primarily for slimepeople, but you do you.
self_use_only = TRUE
@@ -168,13 +168,13 @@ To add a crossbreed:
name = "slime jelly bubble"
desc = "A sphere of slime jelly. It seems to stick to your skin, but avoids other surfaces."
color = "#00FF00"
list_reagents = list(/datum/reagent/toxin/slimejelly = 50)
list_reagents = list("slimejelly" = 50)
/obj/item/slimecrossbeaker/autoinjector/peaceandlove
name = "peaceful distillation"
desc = "A light pink gooey sphere. Simply touching it makes you a little dizzy."
color = "#DDAAAA"
list_reagents = list(/datum/reagent/pax/peaceborg = 10, /datum/reagent/drug/space_drugs = 15) //Peace, dudes
list_reagents = list("synthpax" = 10, "space_drugs" = 15) //Peace, dudes
/obj/item/slimecrossbeaker/autoinjector/peaceandlove/Initialize()
. = ..()
@@ -184,4 +184,4 @@ To add a crossbreed:
name = "invigorating gel"
desc = "A bubbling purple mixture, designed to heal and boost movement."
color = "#FF00FF"
list_reagents = list(/datum/reagent/medicine/regen_jelly = 30, /datum/reagent/drug/methamphetamine = 9)
list_reagents = list("regen_jelly" = 30, "methamphetamine" = 9)
@@ -50,7 +50,7 @@
filling_color = "#964B00"
tastes = list("cardboard" = 3, "sadness" = 3)
foodtype = null //Don't ask what went into them. You're better off not knowing.
list_reagents = list(/datum/reagent/consumable/nutriment/stabilized = 10, /datum/reagent/consumable/nutriment = 2) //Won't make you fat. Will make you question your sanity.
list_reagents = list("stabilizednutriment" = 10, "nutriment" = 2) //Won't make you fat. Will make you question your sanity.
/obj/item/reagent_containers/food/snacks/rationpack/checkLiked(fraction, mob/M) //Nobody likes rationpacks. Nobody.
if(last_check_time + 50 < world.time)
@@ -922,9 +922,9 @@ datum/status_effect/stabilized/blue/on_remove()
/datum/status_effect/stabilized/lightpink/tick()
for(var/mob/living/carbon/human/H in range(1, get_turf(owner)))
if(H != owner && H.stat != DEAD && H.health <= 0 && !H.reagents.has_reagent(/datum/reagent/medicine/epinephrine))
if(H != owner && H.stat != DEAD && H.health <= 0 && !H.reagents.has_reagent("epinephrine"))
to_chat(owner, "[linked_extract] pulses in sync with [H]'s heartbeat, trying to keep [H.p_them()] alive.")
H.reagents.add_reagent(/datum/reagent/medicine/epinephrine,5)
H.reagents.add_reagent("epinephrine",5)
return ..()
/datum/status_effect/stabilized/lightpink/on_remove()
@@ -14,10 +14,10 @@ Burning extracts:
create_reagents(10, INJECTABLE | DRAWABLE)
/obj/item/slimecross/burning/attack_self(mob/user)
if(!reagents.has_reagent(/datum/reagent/toxin/plasma,10))
if(!reagents.has_reagent("plasma",10))
to_chat(user, "<span class='warning'>This extract needs to be full of plasma to activate!</span>")
return
reagents.remove_reagent(/datum/reagent/toxin/plasma,10)
reagents.remove_reagent("plasma",10)
to_chat(user, "<span class='notice'>You squeeze the extract, and it absorbs the plasma!</span>")
playsound(src, 'sound/effects/bubbles.ogg', 50, 1)
playsound(src, 'sound/magic/fireball.ogg', 50, 1)
@@ -44,7 +44,7 @@ Burning extracts:
/obj/item/slimecross/burning/orange/do_effect(mob/user)
user.visible_message("<span class='danger'>[src] boils over with a caustic gas!</span>")
var/datum/reagents/R = new/datum/reagents(100)
R.add_reagent(/datum/reagent/consumable/condensedcapsaicin, 100)
R.add_reagent("condensedcapsaicin", 100)
var/datum/effect_system/smoke_spread/chem/smoke = new
smoke.set_up(R, 7, get_turf(user))
@@ -113,8 +113,8 @@ Burning extracts:
/obj/item/slimecross/burning/darkblue/do_effect(mob/user)
user.visible_message("<span class='danger'>[src] releases a burst of chilling smoke!</span>")
var/datum/reagents/R = new/datum/reagents(100)
R.add_reagent(/datum/reagent/consumable/frostoil, 40)
user.reagents.add_reagent(/datum/reagent/medicine/cryoxadone,10)
R.add_reagent("frostoil", 40)
user.reagents.add_reagent("cryoxadone",10)
var/datum/effect_system/smoke_spread/chem/smoke = new
smoke.set_up(R, 7, get_turf(user))
smoke.start()
@@ -131,7 +131,7 @@ Burning extracts:
for(var/i = 0, i < amount, i++)
var/path = get_random_food()
var/obj/item/O = new path(pick(turfs))
O.reagents.add_reagent(/datum/reagent/toxin/slimejelly, 5) //Oh god it burns
O.reagents.add_reagent("slimejelly",5) //Oh god it burns
if(prob(50))
O.desc += " It smells strange..."
user.visible_message("<span class='danger'>[src] produces a few pieces of food!</span>")
@@ -268,7 +268,7 @@ Burning extracts:
/obj/item/slimecross/burning/lightpink/do_effect(mob/user)
user.visible_message("<span class='danger'>[src] lets off a hypnotizing pink glow!</span>")
for(var/mob/living/carbon/C in view(7, get_turf(user)))
C.reagents.add_reagent(/datum/reagent/pax, 5)
C.reagents.add_reagent("pax",5)
..()
/obj/item/slimecross/burning/adamantine
@@ -15,10 +15,10 @@ Charged extracts:
create_reagents(10, INJECTABLE | DRAWABLE)
/obj/item/slimecross/charged/attack_self(mob/user)
if(!reagents.has_reagent(/datum/reagent/toxin/plasma,10))
if(!reagents.has_reagent("plasma",10))
to_chat(user, "<span class='warning'>This extract needs to be full of plasma to activate!</span>")
return
reagents.remove_reagent(/datum/reagent/toxin/plasma,10)
reagents.remove_reagent("plasma",10)
to_chat(user, "<span class='notice'>You squeeze the extract, and it absorbs the plasma!</span>")
playsound(src, 'sound/effects/bubbles.ogg', 50, 1)
playsound(src, 'sound/effects/light_flicker.ogg', 50, 1)
@@ -14,10 +14,10 @@ Chilling extracts:
create_reagents(10, INJECTABLE | DRAWABLE)
/obj/item/slimecross/chilling/attack_self(mob/user)
if(!reagents.has_reagent(/datum/reagent/toxin/plasma,10))
if(!reagents.has_reagent("plasma",10))
to_chat(user, "<span class='warning'>This extract needs to be full of plasma to activate!</span>")
return
reagents.remove_reagent(/datum/reagent/toxin/plasma,10)
reagents.remove_reagent("plasma",10)
to_chat(user, "<span class='notice'>You squeeze the extract, and it absorbs the plasma!</span>")
playsound(src, 'sound/effects/bubbles.ogg', 50, 1)
playsound(src, 'sound/effects/glassbr1.ogg', 50, 1)
@@ -56,7 +56,7 @@ Chilling extracts:
return
user.visible_message("<span class='notice'>[src] shatters, and a healing aura fills the room briefly.</span>")
for(var/mob/living/carbon/C in A)
C.reagents.add_reagent(/datum/reagent/medicine/regen_jelly,10)
C.reagents.add_reagent("regen_jelly",10)
..()
/obj/item/slimecross/chilling/blue
@@ -20,7 +20,7 @@ Consuming extracts:
if(last_produced + cooldown > world.time)
to_chat(user, "<span class='warning'>[src] is still digesting after its last meal!<span>")
return
var/datum/reagent/N = O.reagents.has_reagent(/datum/reagent/consumable/nutriment)
var/datum/reagent/N = O.reagents.has_reagent("nutriment")
if(N)
nutriment_eaten += N.volume
to_chat(user, "<span class='notice'>[src] opens up and swallows [O] whole!</span>")
@@ -73,7 +73,7 @@ Consuming extracts:
to_chat(M, "Tastes like [taste].")
playsound(get_turf(M), 'sound/items/eatfood.ogg', 20, 1)
if(nutrition)
M.reagents.add_reagent(/datum/reagent/consumable/nutriment,nutrition)
M.reagents.add_reagent("nutriment",nutrition)
do_effect(M, user)
qdel(src)
return
@@ -199,7 +199,7 @@ Consuming extracts:
nutrition = 0 //We don't want normal nutriment
/obj/item/slime_cookie/silver/do_effect(mob/living/M, mob/user)
M.reagents.add_reagent(/datum/reagent/consumable/nutriment/stabilized, 10)
M.reagents.add_reagent("stabilizednutriment",10)
/obj/item/slimecross/consuming/bluespace
colour = "bluespace"
@@ -30,13 +30,13 @@ Industrial extracts:
/obj/item/slimecross/industrial/process()
var/IsWorking = FALSE
if(reagents.has_reagent(/datum/reagent/toxin/plasma,amount = 2) && plasmarequired > 1) //Can absorb as much as 2
if(reagents.has_reagent("plasma",amount = 2) && plasmarequired > 1) //Can absorb as much as 2
IsWorking = TRUE
reagents.remove_reagent(/datum/reagent/toxin/plasma,2)
reagents.remove_reagent("plasma",2)
plasmaabsorbed += 2
else if(reagents.has_reagent(/datum/reagent/toxin/plasma,amount = 1)) //Can absorb as little as 1
else if(reagents.has_reagent("plasma",amount = 1)) //Can absorb as little as 1
IsWorking = TRUE
reagents.remove_reagent(/datum/reagent/toxin/plasma,1)
reagents.remove_reagent("plasma",1)
plasmaabsorbed += 1
if(plasmaabsorbed >= plasmarequired)
@@ -51,7 +51,7 @@ Regenerative extracts:
colour = "purple"
/obj/item/slimecross/regenerative/purple/core_effect(mob/living/target, mob/user)
target.reagents.add_reagent(/datum/reagent/medicine/regen_jelly,10)
target.reagents.add_reagent("regen_jelly",10)
/obj/item/slimecross/regenerative/blue
colour = "blue"
@@ -174,7 +174,7 @@ Regenerative extracts:
/obj/item/slimecross/regenerative/red/core_effect(mob/living/target, mob/user)
to_chat(target, "<span class='notice'>You feel... <i>faster.</i></span>")
target.reagents.add_reagent(/datum/reagent/medicine/ephedrine,3)
target.reagents.add_reagent("ephedrine",3)
/obj/item/slimecross/regenerative/green
colour = "green"
@@ -185,7 +185,7 @@ Regenerative extracts:
var/mob/living/simple_animal/slime/S = target
S.random_colour()
if(isjellyperson(target))
target.reagents.add_reagent(/datum/reagent/slime_toxin,5)
target.reagents.add_reagent("slime_toxin",5)
/obj/item/slimecross/regenerative/pink
@@ -193,7 +193,7 @@ Regenerative extracts:
/obj/item/slimecross/regenerative/pink/core_effect(mob/living/target, mob/user)
to_chat(target, "<span class='notice'>You feel more calm.</span>")
target.reagents.add_reagent(/datum/reagent/drug/krokodil,4)
target.reagents.add_reagent("krokodil",4)
/obj/item/slimecross/regenerative/gold
colour = "gold"
@@ -41,10 +41,10 @@ Self-sustaining extracts:
return
if(reagentselect == "lesser plasma")
amount = 4
reagentselect = /datum/reagent/toxin/plasma
reagentselect = "plasma"
if(reagentselect == "holy water and uranium")
reagentselect = /datum/reagent/water/holywater
secondary = /datum/reagent/uranium
reagentselect = "holywater"
secondary = "uranium"
extract.forceMove(user.drop_location())
qdel(src)
user.put_in_active_hand(extract)
@@ -134,7 +134,7 @@ Stabilized extracts:
saved_mind = null
START_PROCESSING(SSobj, src)
if(choice == "Familiar Name")
var/newname = reject_bad_name(stripped_input(user, "Would you like to change the name of [mob_name]", "Name change", mob_name, MAX_NAME_LEN), TRUE)
var/newname = copytext(sanitize(input(user, "Would you like to change the name of [mob_name]", "Name change", mob_name) as null|text),1,MAX_NAME_LEN)
if(newname)
mob_name = newname
to_chat(user, "<span class='notice'>You speak softly into [src], and it shakes slightly in response.</span>")
@@ -42,7 +42,7 @@
/obj/item/slime_extract/on_grind()
if(Uses)
grind_results[/datum/reagent/toxin/slimejelly] = 20
grind_results["slimejelly"] = 20
//Effect when activated by a Luminescent. Separated into a minor and major effect. Returns cooldown in deciseconds.
/obj/item/slime_extract/proc/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
@@ -78,7 +78,7 @@
name = "grey slime extract"
icon_state = "grey slime extract"
effectmod = "reproductive"
activate_reagents = list(/datum/reagent/blood,/datum/reagent/toxin/plasma,/datum/reagent/water)
activate_reagents = list("blood","plasma","water")
/obj/item/slime_extract/grey/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
switch(activation_type)
@@ -103,7 +103,7 @@
name = "gold slime extract"
icon_state = "gold slime extract"
effectmod = "symbiont"
activate_reagents = list(/datum/reagent/blood,/datum/reagent/toxin/plasma,/datum/reagent/water)
activate_reagents = list("blood","plasma","water")
/obj/item/slime_extract/gold/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
switch(activation_type)
@@ -132,7 +132,7 @@
name = "silver slime extract"
icon_state = "silver slime extract"
effectmod = "consuming"
activate_reagents = list(/datum/reagent/toxin/plasma,/datum/reagent/water)
activate_reagents = list("plasma","water")
/obj/item/slime_extract/silver/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
switch(activation_type)
@@ -157,7 +157,7 @@
name = "metal slime extract"
icon_state = "metal slime extract"
effectmod = "industrial"
activate_reagents = list(/datum/reagent/toxin/plasma,/datum/reagent/water)
activate_reagents = list("plasma","water")
/obj/item/slime_extract/metal/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
switch(activation_type)
@@ -181,7 +181,7 @@
name = "purple slime extract"
icon_state = "purple slime extract"
effectmod = "regenerative"
activate_reagents = list(/datum/reagent/blood,/datum/reagent/toxin/plasma)
activate_reagents = list("blood","plasma")
/obj/item/slime_extract/purple/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
switch(activation_type)
@@ -193,14 +193,14 @@
if(SLIME_ACTIVATE_MAJOR)
to_chat(user, "<span class='notice'>You activate [src], and it releases regenerative chemicals!</span>")
user.reagents.add_reagent(/datum/reagent/medicine/regen_jelly,10)
user.reagents.add_reagent("regen_jelly",10)
return 600
/obj/item/slime_extract/darkpurple
name = "dark purple slime extract"
icon_state = "dark purple slime extract"
effectmod = "self-sustaining"
activate_reagents = list(/datum/reagent/toxin/plasma)
activate_reagents = list("plasma")
/obj/item/slime_extract/darkpurple/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
switch(activation_type)
@@ -223,19 +223,19 @@
name = "orange slime extract"
icon_state = "orange slime extract"
effectmod = "burning"
activate_reagents = list(/datum/reagent/blood,/datum/reagent/toxin/plasma,/datum/reagent/water)
activate_reagents = list("blood","plasma","water")
/obj/item/slime_extract/orange/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
switch(activation_type)
if(SLIME_ACTIVATE_MINOR)
to_chat(user, "<span class='notice'>You activate [src]. You start feeling hot!</span>")
user.reagents.add_reagent(/datum/reagent/consumable/capsaicin,10)
user.reagents.add_reagent("capsaicin",10)
return 150
if(SLIME_ACTIVATE_MAJOR)
user.reagents.add_reagent(/datum/reagent/phosphorus,5)
user.reagents.add_reagent(/datum/reagent/potassium,5) // = smoke, along with any reagents inside mr. slime
user.reagents.add_reagent(/datum/reagent/consumable/sugar,5)
user.reagents.add_reagent("phosphorus",5)//
user.reagents.add_reagent("potassium",5) // = smoke, along with any reagents inside mr. slime
user.reagents.add_reagent("sugar",5) //
to_chat(user, "<span class='warning'>You activate [src], and a cloud of smoke bursts out of your skin!</span>")
return 450
@@ -243,7 +243,7 @@
name = "yellow slime extract"
icon_state = "yellow slime extract"
effectmod = "charged"
activate_reagents = list(/datum/reagent/blood,/datum/reagent/toxin/plasma,/datum/reagent/water)
activate_reagents = list("blood","plasma","water")
/obj/item/slime_extract/yellow/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
switch(activation_type)
@@ -266,13 +266,13 @@
name = "red slime extract"
icon_state = "red slime extract"
effectmod = "sanguine"
activate_reagents = list(/datum/reagent/blood,/datum/reagent/toxin/plasma,/datum/reagent/water)
activate_reagents = list("blood","plasma","water")
/obj/item/slime_extract/red/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
switch(activation_type)
if(SLIME_ACTIVATE_MINOR)
to_chat(user, "<span class='notice'>You activate [src]. You start feeling fast!</span>")
user.reagents.add_reagent(/datum/reagent/medicine/ephedrine,5)
user.reagents.add_reagent("ephedrine",5)
return 450
if(SLIME_ACTIVATE_MAJOR)
@@ -286,15 +286,15 @@
name = "blue slime extract"
icon_state = "blue slime extract"
effectmod = "stabilized"
activate_reagents = list(/datum/reagent/blood, /datum/reagent/toxin/plasma, /datum/reagent/water)
activate_reagents = list("blood","plasma","water")
/obj/item/slime_extract/blue/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
switch(activation_type)
if(SLIME_ACTIVATE_MINOR)
to_chat(user, "<span class='notice'>You activate [src]. Your genome feels more stable!</span>")
user.adjustCloneLoss(-15)
user.reagents.add_reagent(/datum/reagent/medicine/mutadone, 10)
user.reagents.add_reagent(/datum/reagent/medicine/potass_iodide, 10)
user.reagents.add_reagent("mutadone", 10)
user.reagents.add_reagent("potass_iodide", 10)
return 250
if(SLIME_ACTIVATE_MAJOR)
@@ -310,7 +310,7 @@
name = "dark blue slime extract"
icon_state = "dark blue slime extract"
effectmod = "chilling"
activate_reagents = list(/datum/reagent/toxin/plasma, /datum/reagent/water)
activate_reagents = list("plasma","water")
/obj/item/slime_extract/darkblue/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
switch(activation_type)
@@ -318,8 +318,8 @@
to_chat(user, "<span class='notice'>You activate [src]. You start feeling colder!</span>")
user.ExtinguishMob()
user.adjust_fire_stacks(-20)
user.reagents.add_reagent(/datum/reagent/consumable/frostoil,4)
user.reagents.add_reagent(/datum/reagent/medicine/cryoxadone,5)
user.reagents.add_reagent("frostoil",4)
user.reagents.add_reagent("cryoxadone",5)
return 100
if(SLIME_ACTIVATE_MAJOR)
@@ -333,7 +333,7 @@
name = "pink slime extract"
icon_state = "pink slime extract"
effectmod = "gentle"
activate_reagents = list(/datum/reagent/blood, /datum/reagent/toxin/plasma)
activate_reagents = list("blood","plasma")
/obj/item/slime_extract/pink/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
switch(activation_type)
@@ -354,14 +354,14 @@
user.visible_message("<span class='warning'>[user]'s skin starts flashing hypnotically...</span>", "<span class='notice'>Your skin starts forming odd patterns, pacifying creatures around you.</span>")
for(var/mob/living/carbon/C in viewers(user, null))
if(C != user)
C.reagents.add_reagent(/datum/reagent/pax,2)
C.reagents.add_reagent("pax",2)
return 600
/obj/item/slime_extract/green
name = "green slime extract"
icon_state = "green slime extract"
effectmod = "mutative"
activate_reagents = list(/datum/reagent/blood, /datum/reagent/toxin/plasma, /datum/reagent/radium)
activate_reagents = list("blood","plasma","radium")
/obj/item/slime_extract/green/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
switch(activation_type)
@@ -385,7 +385,7 @@
name = "light pink slime extract"
icon_state = "light pink slime extract"
effectmod = "loyal"
activate_reagents = list(/datum/reagent/toxin/plasma)
activate_reagents = list("plasma")
/obj/item/slime_extract/lightpink/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
switch(activation_type)
@@ -409,7 +409,7 @@
name = "black slime extract"
icon_state = "black slime extract"
effectmod = "transformative"
activate_reagents = list(/datum/reagent/toxin/plasma)
activate_reagents = list("plasma")
/obj/item/slime_extract/black/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
switch(activation_type)
@@ -430,7 +430,7 @@
name = "oil slime extract"
icon_state = "oil slime extract"
effectmod = "detonating"
activate_reagents = list(/datum/reagent/blood, /datum/reagent/toxin/plasma)
activate_reagents = list("blood","plasma")
/obj/item/slime_extract/oil/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
switch(activation_type)
@@ -453,7 +453,7 @@
name = "adamantine slime extract"
icon_state = "adamantine slime extract"
effectmod = "crystalline"
activate_reagents = list(/datum/reagent/toxin/plasma)
activate_reagents = list("plasma")
/obj/item/slime_extract/adamantine/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
switch(activation_type)
@@ -482,7 +482,7 @@
name = "bluespace slime extract"
icon_state = "bluespace slime extract"
effectmod = "warping"
activate_reagents = list(/datum/reagent/blood, /datum/reagent/toxin/plasma)
activate_reagents = list("blood","plasma")
var/teleport_ready = FALSE
var/teleport_x = 0
var/teleport_y = 0
@@ -518,7 +518,7 @@
name = "pyrite slime extract"
icon_state = "pyrite slime extract"
effectmod = "prismatic"
activate_reagents = list(/datum/reagent/blood, /datum/reagent/toxin/plasma)
activate_reagents = list("blood","plasma")
/obj/item/slime_extract/pyrite/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
switch(activation_type)
@@ -544,12 +544,12 @@
name = "cerulean slime extract"
icon_state = "cerulean slime extract"
effectmod = "recurring"
activate_reagents = list(/datum/reagent/blood, /datum/reagent/toxin/plasma)
activate_reagents = list("blood","plasma")
/obj/item/slime_extract/cerulean/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
switch(activation_type)
if(SLIME_ACTIVATE_MINOR)
user.reagents.add_reagent(/datum/reagent/medicine/salbutamol,15)
user.reagents.add_reagent("salbutamol",15)
to_chat(user, "<span class='notice'>You feel like you don't need to breathe!</span>")
return 150
@@ -564,7 +564,7 @@
name = "sepia slime extract"
icon_state = "sepia slime extract"
effectmod = "lengthened"
activate_reagents = list(/datum/reagent/blood, /datum/reagent/toxin/plasma, /datum/reagent/water)
activate_reagents = list("blood","plasma","water")
/obj/item/slime_extract/sepia/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
switch(activation_type)
@@ -586,7 +586,7 @@
name = "rainbow slime extract"
icon_state = "rainbow slime extract"
effectmod = "hyperchromatic"
activate_reagents = list(/datum/reagent/blood, /datum/reagent/toxin/plasma,"lesser plasma", /datum/reagent/toxin/slimejelly,"holy water and uranium") //Curse this snowflake reagent list.
activate_reagents = list("blood","plasma","lesser plasma","slimejelly","holy water and uranium") //Curse this snowflake reagent list.
/obj/item/slime_extract/rainbow/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
switch(activation_type)
@@ -643,7 +643,7 @@
M.nutrition = 700
to_chat(M, "<span class='warning'>You absorb the potion and feel your intense desire to feed melt away.</span>")
to_chat(user, "<span class='notice'>You feed the slime the potion, removing its hunger and calming it.</span>")
var/newname = reject_bad_name(stripped_input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime", MAX_NAME_LEN), TRUE)
var/newname = copytext(sanitize(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text),1,MAX_NAME_LEN)
if (!newname)
newname = "pet slime"