")
var/any = FALSE
for(var/M in materials.materials)
- var/datum/material/mat = materials.materials[M]
- var/sheets = round(mat.amount) / MINERAL_MATERIAL_AMOUNT
+ var/datum/material/mat = M
+ var/amount = materials.materials[M]
+ var/sheets = round(amount) / MINERAL_MATERIAL_AMOUNT
+ var/ref = REF(M)
if (sheets)
if (sheets >= 1)
- ui += "
"
@@ -148,7 +152,7 @@ GLOBAL_LIST_EMPTY(silo_access_logs)
updateUsrDialog()
return TRUE
else if(href_list["ejectsheet"])
- var/eject_sheet = href_list["ejectsheet"]
+ var/datum/material/eject_sheet = locate(href_list["ejectsheet"])
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
var/count = materials.retrieve_sheets(text2num(href_list["eject_amt"]), eject_sheet, drop_location())
var/list/matlist = list()
@@ -227,8 +231,9 @@ GLOBAL_LIST_EMPTY(silo_access_logs)
var/list/msg = list("([timestamp])
")
var/sep = ""
for(var/key in materials)
+ var/datum/material/M = key
var/val = round(materials[key]) / MINERAL_MATERIAL_AMOUNT
msg += sep
sep = ", "
- msg += "[amount < 0 ? "-" : "+"][val] [copytext(key, length(key[1]) + 1)]"
+ msg += "[amount < 0 ? "-" : "+"][val] [M.name]"
formatted = msg.Join()
diff --git a/code/modules/mining/machine_stacking.dm b/code/modules/mining/machine_stacking.dm
index 31e977c6cf..5a83955bce 100644
--- a/code/modules/mining/machine_stacking.dm
+++ b/code/modules/mining/machine_stacking.dm
@@ -86,6 +86,11 @@
proximity_monitor = new(src, 1)
materials = AddComponent(/datum/component/remote_materials, "stacking", mapload, FALSE, mapload && force_connect)
+/obj/machinery/mineral/stacking_machine/Destroy()
+ CONSOLE = null
+ materials = null
+ return ..()
+
/obj/machinery/mineral/stacking_machine/HasProximity(atom/movable/AM)
if(istype(AM, /obj/item/stack/sheet) && AM.loc == get_step(src, input_dir))
process_sheet(AM)
@@ -107,9 +112,9 @@
qdel(inp)
if(materials.silo && !materials.on_hold()) //Dump the sheets to the silo
- var/matlist = storage.materials & materials.mat_container.materials
+ var/matlist = storage.custom_materials & materials.mat_container.materials
if (length(matlist))
- var/inserted = materials.mat_container.insert_stack(storage)
+ var/inserted = materials.mat_container.insert_item(storage)
materials.silo_log(src, "collected", inserted, "sheets", matlist)
if (QDELETED(storage))
stack_list -= key
diff --git a/code/modules/mining/machine_vending.dm b/code/modules/mining/machine_vending.dm
index 54f8e11b07..78b1a665db 100644
--- a/code/modules/mining/machine_vending.dm
+++ b/code/modules/mining/machine_vending.dm
@@ -122,13 +122,10 @@
to_chat(usr, "
")
flick(icon_deny, src)
else
- if (I.mining_points -= prize.cost)
- to_chat(usr, "
")
- new prize.equipment_path(src.loc)
- SSblackbox.record_feedback("nested tally", "mining_equipment_bought", 1, list("[type]", "[prize.equipment_path]"))
- else
- to_chat(usr, "
")
- flick(icon_deny, src)
+ I.mining_points -= prize.cost
+ to_chat(usr, "
")
+ new prize.equipment_path(src.loc)
+ SSblackbox.record_feedback("nested tally", "mining_equipment_bought", 1, list("[type]", "[prize.equipment_path]"))
else
to_chat(usr, "
")
flick(icon_deny, src)
diff --git a/code/modules/mining/mint.dm b/code/modules/mining/mint.dm
index f32afb2898..c9f9a2cfbb 100644
--- a/code/modules/mining/mint.dm
+++ b/code/modules/mining/mint.dm
@@ -8,14 +8,28 @@
density = TRUE
var/newCoins = 0 //how many coins the machine made in it's last load
var/processing = FALSE
- var/chosen = MAT_METAL //which material will be used to make coins
+ var/chosen = /datum/material/iron //which material will be used to make coins
var/coinsToProduce = 10
speed_process = TRUE
/obj/machinery/mineral/mint/Initialize()
. = ..()
- AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_PLASMA, MAT_SILVER, MAT_GOLD, MAT_URANIUM, MAT_DIAMOND, MAT_BANANIUM), MINERAL_MATERIAL_AMOUNT * 50, FALSE, /obj/item/stack)
+ AddComponent(/datum/component/material_container, list(
+ /datum/material/iron,
+ /datum/material/plasma,
+ /datum/material/silver,
+ /datum/material/gold,
+ /datum/material/uranium,
+ /datum/material/titanium,
+ /datum/material/diamond,
+ /datum/material/bananium,
+ /datum/material/adamantine,
+ /datum/material/mythril,
+ /datum/material/plastic,
+ /datum/material/runite
+ ), MINERAL_MATERIAL_AMOUNT * 50, FALSE, /obj/item/stack)
+ chosen = getmaterialref(chosen)
/obj/machinery/mineral/mint/process()
var/turf/T = get_step(src, input_dir)
@@ -24,7 +38,9 @@
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
for(var/obj/item/stack/sheet/O in T)
- materials.insert_stack(O, O.amount)
+ var/inserted = materials.insert_item(O)
+ if(inserted)
+ qdel(O)
/obj/machinery/mineral/mint/attack_hand(mob/user)
. = ..()
@@ -33,17 +49,17 @@
var/dat = "
"
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
- for(var/mat_id in materials.materials)
- var/datum/material/M = materials.materials[mat_id]
- if(!M.amount && chosen != mat_id)
+ for(var/datum/material/M in materials.materials)
+ var/amount = materials.get_material_amount(M)
+ if(!amount && chosen != M)
continue
- dat += "
"
- var/datum/material/M = materials.materials[chosen]
+ var/datum/material/M = chosen
dat += "
Will produce [coinsToProduce] [lowertext(M.name)] coins if enough materials are available.
"
@@ -67,22 +83,24 @@
return
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
if(href_list["choose"])
- if(materials.materials[href_list["choose"]])
- chosen = href_list["choose"]
+ var/datum/material/new_material = locate(href_list["choose"])
+ if(istype(new_material))
+ chosen = new_material
if(href_list["chooseAmt"])
coinsToProduce = CLAMP(coinsToProduce + text2num(href_list["chooseAmt"]), 0, 1000)
+ updateUsrDialog()
if(href_list["makeCoins"])
var/temp_coins = coinsToProduce
processing = TRUE
icon_state = "coinpress1"
var/coin_mat = MINERAL_MATERIAL_AMOUNT * 0.2
- var/datum/material/M = materials.materials[chosen]
- if(!M || !M.coin_type)
+ var/datum/material/M = chosen
+ if(!M)
updateUsrDialog()
return
- while(coinsToProduce > 0 && materials.use_amount_type(coin_mat, chosen))
- create_coins(M.coin_type)
+ while(coinsToProduce > 0 && materials.use_amount_mat(coin_mat, chosen))
+ create_coins()
coinsToProduce--
newCoins++
src.updateUsrDialog()
@@ -94,12 +112,15 @@
src.updateUsrDialog()
return
-/obj/machinery/mineral/mint/proc/create_coins(P)
+/obj/machinery/mineral/mint/proc/create_coins()
var/turf/T = get_step(src,output_dir)
+ var/temp_list = list()
+ temp_list[chosen] = 400
if(T)
- var/obj/item/O = new P(src)
- var/obj/item/storage/bag/money/M = locate(/obj/item/storage/bag/money, T)
- if(!M)
- M = new /obj/item/storage/bag/money(src)
- unload_mineral(M)
- O.forceMove(M)
+ var/obj/item/O = new /obj/item/coin(src)
+ var/obj/item/storage/bag/money/B = locate(/obj/item/storage/bag/money, T)
+ O.set_custom_materials(temp_list)
+ if(!B)
+ B = new /obj/item/storage/bag/money(src)
+ unload_mineral(B)
+ O.forceMove(B)
diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm
index 7765bf8713..67c26abaef 100644
--- a/code/modules/mining/ores_coins.dm
+++ b/code/modules/mining/ores_coins.dm
@@ -17,6 +17,7 @@
var/points = 0 //How many points this ore gets you from the ore redemption machine
var/refined_type = null //What this ore defaults to being refined into
novariants = TRUE // Ore stacks handle their icon updates themselves to keep the illusion that there's more going
+ mats_per_stack = MINERAL_MATERIAL_AMOUNT
var/list/stack_overlays
/obj/item/stack/ore/update_icon()
@@ -69,7 +70,8 @@
item_state = "Uranium ore"
singular_name = "uranium ore chunk"
points = 30
- materials = list(MAT_URANIUM=MINERAL_MATERIAL_AMOUNT)
+ custom_materials = list(/datum/material/uranium=MINERAL_MATERIAL_AMOUNT)
+ material_flags = MATERIAL_NO_EFFECTS
refined_type = /obj/item/stack/sheet/mineral/uranium
/obj/item/stack/ore/iron
@@ -78,7 +80,7 @@
item_state = "Iron ore"
singular_name = "iron ore chunk"
points = 1
- materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT)
+ custom_materials = list(/datum/material/iron=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/metal
/obj/item/stack/ore/glass
@@ -87,17 +89,17 @@
item_state = "Glass ore"
singular_name = "sand pile"
points = 1
- materials = list(MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
+ custom_materials = list(/datum/material/glass=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/glass
w_class = WEIGHT_CLASS_TINY
GLOBAL_LIST_INIT(sand_recipes, list(\
- new /datum/stack_recipe("sandstone", /obj/item/stack/sheet/mineral/sandstone, 1, 1, 50)\
- ))
+ new/datum/stack_recipe("sandstone", /obj/item/stack/sheet/mineral/sandstone, 1, 1, 50),\
+ ))
-/obj/item/stack/ore/glass/Initialize(mapload, new_amount, merge = TRUE)
- recipes = GLOB.sand_recipes
+/obj/item/stack/ore/glass/get_main_recipes()
. = ..()
+ . += GLOB.sand_recipes
/obj/item/stack/ore/glass/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(..() || !ishuman(hit_atom))
@@ -135,21 +137,20 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
item_state = "Plasma ore"
singular_name = "plasma ore chunk"
points = 15
- materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT)
+ custom_materials = list(/datum/material/plasma=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/plasma
/obj/item/stack/ore/plasma/welder_act(mob/living/user, obj/item/I)
to_chat(user, "
")
return TRUE
-
/obj/item/stack/ore/silver
name = "silver ore"
icon_state = "Silver ore"
item_state = "Silver ore"
singular_name = "silver ore chunk"
points = 16
- materials = list(MAT_SILVER=MINERAL_MATERIAL_AMOUNT)
+ custom_materials = list(/datum/material/silver=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/silver
/obj/item/stack/ore/gold
@@ -158,7 +159,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
icon_state = "Gold ore"
singular_name = "gold ore chunk"
points = 18
- materials = list(MAT_GOLD=MINERAL_MATERIAL_AMOUNT)
+ custom_materials = list(/datum/material/gold=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/gold
/obj/item/stack/ore/diamond
@@ -167,7 +168,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
item_state = "Diamond ore"
singular_name = "diamond ore chunk"
points = 50
- materials = list(MAT_DIAMOND=MINERAL_MATERIAL_AMOUNT)
+ custom_materials = list(/datum/material/diamond=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/diamond
/obj/item/stack/ore/bananium
@@ -176,7 +177,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
item_state = "Bananium ore"
singular_name = "bananium ore chunk"
points = 60
- materials = list(MAT_BANANIUM=MINERAL_MATERIAL_AMOUNT)
+ custom_materials = list(/datum/material/bananium=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/bananium
/obj/item/stack/ore/titanium
@@ -185,7 +186,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
item_state = "Titanium ore"
singular_name = "titanium ore chunk"
points = 50
- materials = list(MAT_TITANIUM=MINERAL_MATERIAL_AMOUNT)
+ custom_materials = list(/datum/material/titanium=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/titanium
/obj/item/stack/ore/slag
@@ -313,17 +314,33 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
/obj/item/coin
icon = 'icons/obj/economy.dmi'
name = "coin"
- icon_state = "coin__heads"
+ icon_state = "coin"
flags_1 = CONDUCT_1
force = 1
throwforce = 2
w_class = WEIGHT_CLASS_TINY
+ custom_materials = list(/datum/material/iron = 400)
+ material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR
var/string_attached
var/list/sideslist = list("heads","tails")
- var/cmineral = null
var/cooldown = 0
- var/value = 1
+ var/value
var/coinflip
+ item_flags = NO_MAT_REDEMPTION //You know, it's kind of a problem that money is worth more extrinsicly than intrinsically in this universe.
+
+/obj/item/coin/Initialize()
+ . = ..()
+ coinflip = pick(sideslist)
+ icon_state = "coin_[coinflip]"
+ pixel_x = rand(0,16)-8
+ pixel_y = rand(0,8)-8
+
+/obj/item/coin/set_custom_materials(list/materials, multiplier = 1)
+ . = ..()
+ value = 0
+ for(var/i in custom_materials)
+ var/datum/material/M = i
+ value += M.value_per_unit * custom_materials[M]
/obj/item/coin/suicide_act(mob/living/user)
user.visible_message("
")
@@ -342,101 +359,9 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
else
user.visible_message("
")
-/obj/item/coin/Initialize()
- . = ..()
- pixel_x = rand(0,16)-8
- pixel_y = rand(0,8)-8
-
/obj/item/coin/examine(mob/user)
. = ..()
- if(value)
- . += "
"
-
-/obj/item/coin/gold
- name = "gold coin"
- cmineral = "gold"
- icon_state = "coin_gold_heads"
- value = 50
- materials = list(MAT_GOLD = MINERAL_MATERIAL_AMOUNT*0.2)
- grind_results = list(/datum/reagent/gold = 4)
-
-/obj/item/coin/silver
- name = "silver coin"
- cmineral = "silver"
- icon_state = "coin_silver_heads"
- value = 20
- materials = list(MAT_SILVER = MINERAL_MATERIAL_AMOUNT*0.2)
- grind_results = list(/datum/reagent/silver = 4)
-
-/obj/item/coin/diamond
- name = "diamond coin"
- cmineral = "diamond"
- icon_state = "coin_diamond_heads"
- value = 500
- materials = list(MAT_DIAMOND = MINERAL_MATERIAL_AMOUNT*0.2)
- grind_results = list(/datum/reagent/carbon = 4)
-
-/obj/item/coin/iron
- name = "iron coin"
- cmineral = "iron"
- icon_state = "coin_iron_heads"
- value = 1
- materials = list(MAT_METAL = MINERAL_MATERIAL_AMOUNT*0.2)
- grind_results = list(/datum/reagent/iron = 4)
-
-/obj/item/coin/plasma
- name = "plasma coin"
- cmineral = "plasma"
- icon_state = "coin_plasma_heads"
- value = 100
- materials = list(MAT_PLASMA = MINERAL_MATERIAL_AMOUNT*0.2)
- grind_results = list(/datum/reagent/toxin/plasma = 4)
-
-/obj/item/coin/uranium
- name = "uranium coin"
- cmineral = "uranium"
- icon_state = "coin_uranium_heads"
- value = 80
- materials = list(MAT_URANIUM = MINERAL_MATERIAL_AMOUNT*0.2)
- grind_results = list(/datum/reagent/uranium = 4)
-
-/obj/item/coin/bananium
- name = "bananium coin"
- cmineral = "bananium"
- icon_state = "coin_bananium_heads"
- value = 1000 //makes the clown cry
- materials = list(MAT_BANANIUM = MINERAL_MATERIAL_AMOUNT*0.2)
- grind_results = list(/datum/reagent/consumable/banana = 4)
-
-/obj/item/coin/adamantine
- name = "adamantine coin"
- cmineral = "adamantine"
- icon_state = "coin_adamantine_heads"
- value = 1500
-
-/obj/item/coin/mythril
- name = "mythril coin"
- cmineral = "mythril"
- icon_state = "coin_mythril_heads"
- value = 3000
-
-/obj/item/coin/twoheaded
- cmineral = "iron"
- icon_state = "coin_iron_heads"
- desc = "Hey, this coin's the same on both sides!"
- sideslist = list("heads")
- materials = list(MAT_METAL = MINERAL_MATERIAL_AMOUNT*0.2)
- value = 1
- grind_results = list(/datum/reagent/iron = 4)
-
-/obj/item/coin/antagtoken
- name = "antag token"
- icon_state = "coin_valid_valid"
- cmineral = "valid"
- desc = "A novelty coin that helps the heart know what hard evidence cannot prove."
- sideslist = list("valid", "salad")
- value = 0
- grind_results = list(/datum/reagent/consumable/sodiumchloride = 4)
+ . += "
"
/obj/item/coin/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stack/cable_coil))
@@ -470,10 +395,10 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
if(string_attached) //does the coin have a wire attached
to_chat(user, "
" )
return FALSE//do not flip the coin
- coinflip = pick(sideslist)
cooldown = world.time + 15
- flick("coin_[cmineral]_flip", src)
- icon_state = "coin_[cmineral]_[coinflip]"
+ flick("coin_[coinflip]_flip", src)
+ coinflip = pick(sideslist)
+ icon_state = "coin_[coinflip]"
playsound(user.loc, 'sound/items/coinflip.ogg', 50, 1)
var/oldloc = loc
sleep(15)
@@ -483,5 +408,51 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
"
")
return TRUE//did the coin flip? useful for suicide_act
+/obj/item/coin/gold
+ custom_materials = list(/datum/material/gold = 400)
+
+/obj/item/coin/silver
+ custom_materials = list(/datum/material/silver = 400)
+
+/obj/item/coin/diamond
+ custom_materials = list(/datum/material/diamond = 400)
+
+/obj/item/coin/plasma
+ custom_materials = list(/datum/material/plasma = 400)
+
+/obj/item/coin/uranium
+ custom_materials = list(/datum/material/uranium = 400)
+
+/obj/item/coin/titanium
+ custom_materials = list(/datum/material/titanium = 400)
+
+/obj/item/coin/bananium
+ custom_materials = list(/datum/material/bananium = 400)
+
+/obj/item/coin/adamantine
+ custom_materials = list(/datum/material/adamantine = 400)
+
+/obj/item/coin/mythril
+ custom_materials = list(/datum/material/mythril = 400)
+
+/obj/item/coin/plastic
+ custom_materials = list(/datum/material/plastic = 400)
+
+/obj/item/coin/runite
+ custom_materials = list(/datum/material/runite = 400)
+
+/obj/item/coin/twoheaded
+ desc = "Hey, this coin's the same on both sides!"
+ sideslist = list("heads")
+
+/obj/item/coin/antagtoken
+ name = "antag token"
+ desc = "A novelty coin that helps the heart know what hard evidence cannot prove."
+ icon_state = "coin_valid"
+ custom_materials = list(/datum/material/plastic = 400)
+ sideslist = list("valid", "salad")
+ material_flags = NONE
+
+/obj/item/coin/iron
#undef ORESTACK_OVERLAYS_MAX
diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/satchel_ore_boxdm.dm
index d78a406b80..1d803371be 100644
--- a/code/modules/mining/satchel_ore_boxdm.dm
+++ b/code/modules/mining/satchel_ore_boxdm.dm
@@ -18,6 +18,10 @@
else
return ..()
+/obj/structure/ore_box/ComponentInitialize()
+ . = ..()
+ AddComponent(/datum/component/rad_insulation, 0.01) //please datum mats no more cancer
+
/obj/structure/ore_box/crowbar_act(mob/living/user, obj/item/I)
if(I.use_tool(src, user, 50, volume=50))
user.visible_message("[user] pries \the [src] apart.",
diff --git a/code/modules/mob/dead/observer/login.dm b/code/modules/mob/dead/observer/login.dm
index 1b328dbc69..8daf8ec052 100644
--- a/code/modules/mob/dead/observer/login.dm
+++ b/code/modules/mob/dead/observer/login.dm
@@ -6,7 +6,7 @@
var/preferred_form = null
if(IsAdminGhost(src))
- has_unlimited_silicon_privilege = 1
+ silicon_privileges = ALL
if(client.prefs.unlock_content)
preferred_form = client.prefs.ghost_form
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 6460d8331d..574a5aedd2 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -834,12 +834,31 @@
update_inv_handcuffed()
update_hud_handcuffed()
+/mob/living/carbon/proc/can_defib()
+ var/tlimit = DEFIB_TIME_LIMIT * 10
+ var/obj/item/organ/heart = getorgan(/obj/item/organ/heart)
+ if(suiciding || hellbound || HAS_TRAIT(src, TRAIT_HUSK))
+ return
+ if((world.time - timeofdeath) > tlimit)
+ return
+ if((getBruteLoss() >= MAX_REVIVE_BRUTE_DAMAGE) || (getFireLoss() >= MAX_REVIVE_FIRE_DAMAGE))
+ return
+ if(!heart || (heart.organ_flags & ORGAN_FAILING))
+ return
+ var/obj/item/organ/brain/BR = getorgan(/obj/item/organ/brain)
+ if(QDELETED(BR) || BR.brain_death || (BR.organ_flags & ORGAN_FAILING) || suiciding)
+ return
+ return TRUE
+
/mob/living/carbon/fully_heal(admin_revive = FALSE)
if(reagents)
reagents.clear_reagents()
var/obj/item/organ/brain/B = getorgan(/obj/item/organ/brain)
if(B)
B.brain_death = FALSE
+ for(var/O in internal_organs)
+ var/obj/item/organ/organ = O
+ organ.setOrganDamage(0)
for(var/thing in diseases)
var/datum/disease/D = thing
if(D.severity != DISEASE_SEVERITY_POSITIVE)
@@ -852,7 +871,8 @@
qdel(R)
update_handcuffed()
if(reagents)
- reagents.addiction_list = list()
+ for(var/addi in reagents.addiction_list)
+ reagents.remove_addiction(addi)
cure_all_traumas(TRAUMA_RESILIENCE_MAGIC)
..()
// heal ears after healing traits, since ears check TRAIT_DEAF trait
@@ -987,3 +1007,6 @@
return TRUE
if(isclothing(wear_mask) && (wear_mask.clothing_flags & SCAN_REAGENTS))
return TRUE
+
+/mob/living/carbon/can_hold_items()
+ return TRUE
diff --git a/code/modules/mob/living/carbon/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm
index 5020cc7379..414f339b28 100644
--- a/code/modules/mob/living/carbon/damage_procs.dm
+++ b/code/modules/mob/living/carbon/damage_procs.dm
@@ -1,6 +1,7 @@
/mob/living/carbon/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked = FALSE, forced = FALSE)
+ SEND_SIGNAL(src, COMSIG_MOB_APPLY_DAMGE, damage, damagetype, def_zone)
var/hit_percent = (100-blocked)/100
if(!forced && hit_percent <= 0)
return 0
diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm
index 8e19fa7776..fec82b357f 100644
--- a/code/modules/mob/living/carbon/human/examine.dm
+++ b/code/modules/mob/living/carbon/human/examine.dm
@@ -397,7 +397,7 @@
var/flavor = print_flavor_text(flavor_text)
if(flavor)
. += flavor
- var/temp_flavor = print_flavor_text(flavor_text_2)
+ var/temp_flavor = print_flavor_text(flavor_text_2,TRUE)
if(temp_flavor)
. += temp_flavor
SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, .)
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index ef3d4cbb98..423277863f 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -803,7 +803,7 @@
hud_used.staminas?.update_icon_state()
hud_used.staminabuffer?.update_icon_state()
-/mob/living/carbon/human/fully_heal(admin_revive = 0)
+/mob/living/carbon/human/fully_heal(admin_revive = FALSE)
if(admin_revive)
regenerate_limbs()
regenerate_organs()
@@ -823,9 +823,6 @@
. += dna.species.check_weakness(weapon, attacker)
/mob/living/carbon/human/is_literate()
- return 1
-
-/mob/living/carbon/human/can_hold_items()
return TRUE
/mob/living/carbon/human/update_gravity(has_gravity,override = 0)
@@ -834,7 +831,7 @@
..()
/mob/living/carbon/human/vomit(lost_nutrition = 10, blood = 0, stun = 1, distance = 0, message = 1, toxic = 0)
- if(blood && (NOBLOOD in dna.species.species_traits))
+ if(blood && dna?.species && (NOBLOOD in dna.species.species_traits))
if(message)
visible_message("
")
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index accaab3ac1..57b8f59780 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -20,7 +20,7 @@
/mob/living/carbon/human/proc/checkarmor(obj/item/bodypart/def_zone, d_type)
- if(!d_type)
+ if(!d_type || !def_zone)
return 0
var/protection = 0
var/list/body_parts = list(head, wear_mask, wear_suit, w_uniform, back, gloves, shoes, belt, s_store, glasses, ears, wear_id, wear_neck) //Everything but pockets. Pockets are l_store and r_store. (if pockets were allowed, putting something armored, gloves or hats for example, would double up on the armor)
diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm
index e62177abbb..b1bc47ea4a 100644
--- a/code/modules/mob/living/carbon/human/species.dm
+++ b/code/modules/mob/living/carbon/human/species.dm
@@ -1924,6 +1924,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
log_combat(user, target, "shoved", append_message)
/datum/species/proc/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked, mob/living/carbon/human/H, forced = FALSE)
+ SEND_SIGNAL(src, COMSIG_MOB_APPLY_DAMGE, damage, damagetype, def_zone)
var/hit_percent = (100-(blocked+armor))/100
hit_percent = (hit_percent * (100-H.physiology.damage_resistance))/100
if(!forced && hit_percent <= 0)
diff --git a/code/modules/mob/living/carbon/human/species_types/dullahan.dm b/code/modules/mob/living/carbon/human/species_types/dullahan.dm
index 220e639e34..499e3b0276 100644
--- a/code/modules/mob/living/carbon/human/species_types/dullahan.dm
+++ b/code/modules/mob/living/carbon/human/species_types/dullahan.dm
@@ -135,7 +135,7 @@
RegisterSignal(owner, COMSIG_CLICK_SHIFT, .proc/examinate_check)
RegisterSignal(src, COMSIG_ATOM_HEARER_IN_VIEW, .proc/include_owner)
RegisterSignal(owner, COMSIG_LIVING_REGENERATE_LIMBS, .proc/unlist_head)
- RegisterSignal(owner, COMSIG_LIVING_FULLY_HEAL, .proc/retrieve_head)
+ RegisterSignal(owner, COMSIG_LIVING_REVIVE, .proc/retrieve_head)
/obj/item/dullahan_relay/proc/examinate_check(atom/source, mob/user)
if(user.client.eye == src)
@@ -148,8 +148,9 @@
/obj/item/dullahan_relay/proc/unlist_head(datum/source, noheal = FALSE, list/excluded_limbs)
excluded_limbs |= BODY_ZONE_HEAD // So we don't gib when regenerating limbs.
-/obj/item/dullahan_relay/proc/retrieve_head(datum/source, admin_revive = FALSE)
- if(admin_revive) //retrieving the owner's head for ahealing purposes.
+//Retrieving the owner's head for better ahealing.
+/obj/item/dullahan_relay/proc/retrieve_head(datum/source, full_heal, admin_revive)
+ if(admin_revive)
var/obj/item/bodypart/head/H = loc
var/turf/T = get_turf(owner)
if(H && istype(H) && T && !(H in owner.GetAllContents()))
diff --git a/code/modules/mob/living/carbon/human/species_types/podpeople.dm b/code/modules/mob/living/carbon/human/species_types/podpeople.dm
index 1bed3b08d4..b29890a97d 100644
--- a/code/modules/mob/living/carbon/human/species_types/podpeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/podpeople.dm
@@ -71,14 +71,42 @@
if(/obj/item/projectile/energy/florayield)
H.nutrition = min(H.nutrition+30, NUTRITION_LEVEL_FULL)
+
/datum/species/pod/pseudo_weak
name = "Anthromorphic Plant"
id = "podweak"
- limbs_id = "pod"
species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS,MUTCOLORS)
mutant_bodyparts = list("mam_tail", "mam_ears", "mam_body_markings", "mam_snouts", "taur", "legs")
default_features = list("mcolor" = "FFF","mcolor2" = "FFF","mcolor3" = "FFF", "mam_snouts" = "Husky", "mam_tail" = "Husky", "mam_ears" = "Husky", "mam_body_markings" = "Husky", "taur" = "None", "legs" = "Normal Legs")
+ limbs_id = "pod"
light_nutrition_gain_factor = 7.5
light_bruteheal = 0.2
light_burnheal = 0.2
light_toxheal = 0.7
+
+/datum/species/pod/pseudo_weak/spec_death(gibbed, mob/living/carbon/human/H)
+ if(H)
+ stop_wagging_tail(H)
+
+/datum/species/pod/pseudo_weak/spec_stun(mob/living/carbon/human/H,amount)
+ if(H)
+ stop_wagging_tail(H)
+ . = ..()
+
+/datum/species/pod/pseudo_weak/can_wag_tail(mob/living/carbon/human/H)
+ return ("mam_tail" in mutant_bodyparts) || ("mam_waggingtail" in mutant_bodyparts)
+
+/datum/species/pod/pseudo_weak/is_wagging_tail(mob/living/carbon/human/H)
+ return ("mam_waggingtail" in mutant_bodyparts)
+
+/datum/species/pod/pseudo_weak/start_wagging_tail(mob/living/carbon/human/H)
+ if("mam_tail" in mutant_bodyparts)
+ mutant_bodyparts -= "mam_tail"
+ mutant_bodyparts |= "mam_waggingtail"
+ H.update_body()
+
+/datum/species/pod/pseudo_weak/stop_wagging_tail(mob/living/carbon/human/H)
+ if("mam_waggingtail" in mutant_bodyparts)
+ mutant_bodyparts -= "mam_waggingtail"
+ mutant_bodyparts |= "mam_tail"
+ H.update_body()
diff --git a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm
index 49af501942..70abba5a01 100644
--- a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm
@@ -213,6 +213,16 @@
PDA.f_lum = 0
PDA.update_icon()
visible_message("
")
+ else if(istype(O, /obj/item/gun))
+ var/obj/item/gun/weapon = O
+ if(weapon.gun_light)
+ var/obj/item/flashlight/seclite/light = weapon.gun_light
+ light.forceMove(get_turf(weapon))
+ light.burn()
+ weapon.gun_light = null
+ weapon.update_gunlight()
+ QDEL_NULL(weapon.alight)
+ visible_message("
")
O.burn()
diff --git a/code/modules/mob/living/carbon/inventory.dm b/code/modules/mob/living/carbon/inventory.dm
index bbae050bba..24acccdd2e 100644
--- a/code/modules/mob/living/carbon/inventory.dm
+++ b/code/modules/mob/living/carbon/inventory.dm
@@ -72,7 +72,7 @@
put_in_hands(I)
update_inv_hands()
if(SLOT_IN_BACKPACK)
- if(!SEND_SIGNAL(back, COMSIG_TRY_STORAGE_INSERT, I, src, TRUE))
+ if(!back || !SEND_SIGNAL(back, COMSIG_TRY_STORAGE_INSERT, I, src, TRUE))
not_handled = TRUE
else
not_handled = TRUE
diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm
index 433f6a43b5..ccca90807b 100644
--- a/code/modules/mob/living/carbon/life.dm
+++ b/code/modules/mob/living/carbon/life.dm
@@ -357,8 +357,8 @@
if(istype(loc, /obj/structure/closet/crate/coffin)|| istype(loc, /obj/structure/closet/body_bag) || istype(loc, /obj/structure/bodycontainer))
return
- // No decay if formaldehyde in corpse or when the corpse is charred
- if(reagents.has_reagent(/datum/reagent/toxin/formaldehyde, 1) || HAS_TRAIT(src, TRAIT_HUSK))
+ // No decay if formaldehyde/preservahyde in corpse or when the corpse is charred
+ if(reagents.has_reagent(/datum/reagent/toxin/formaldehyde, 1) || HAS_TRAIT(src, TRAIT_HUSK) || reagents.has_reagent(/datum/reagent/preservahyde, 1))
return
// Also no decay if corpse chilled or not organic/undead
@@ -397,7 +397,7 @@
if(O)
O.on_life()
else
- if(reagents.has_reagent(/datum/reagent/toxin/formaldehyde, 1)) // No organ decay if the body contains formaldehyde.
+ if(reagents.has_reagent(/datum/reagent/toxin/formaldehyde, 1) || reagents.has_reagent(/datum/reagent/preservahyde, 1)) // No organ decay if the body contains formaldehyde. Or preservahyde.
return
for(var/V in internal_organs)
var/obj/item/organ/O = V
diff --git a/code/modules/mob/living/death.dm b/code/modules/mob/living/death.dm
index 7cd79bb1ab..a33eebf12a 100644
--- a/code/modules/mob/living/death.dm
+++ b/code/modules/mob/living/death.dm
@@ -25,7 +25,7 @@
/mob/living/proc/spawn_gibs(with_bodyparts, atom/loc_override)
var/location = loc_override ? loc_override.drop_location() : drop_location()
- if((MOB_ROBOTIC) in (mob_biotypes))
+ if(mob_biotypes & MOB_ROBOTIC)
new /obj/effect/gibspawner/robot(location, src, get_static_viruses())
else
new /obj/effect/gibspawner/generic(location, src, get_static_viruses())
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 0c11d6ab42..e8cf0225e6 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -482,7 +482,8 @@
med_hud_set_status()
//proc used to ressuscitate a mob
-/mob/living/proc/revive(full_heal = 0, admin_revive = 0)
+/mob/living/proc/revive(full_heal = FALSE, admin_revive = FALSE)
+ SEND_SIGNAL(src, COMSIG_LIVING_REVIVE, full_heal, admin_revive)
if(full_heal)
fully_heal(admin_revive)
if(stat == DEAD && can_be_revived()) //in some cases you can't revive (e.g. no brain)
@@ -528,11 +529,6 @@
fire_stacks = 0
confused = 0
update_canmove()
- var/datum/component/mood/mood = GetComponent(/datum/component/mood)
- if (mood)
- QDEL_LIST_ASSOC_VAL(mood.mood_events)
- mood.sanity = SANITY_GREAT
- mood.update_mood()
//Heal all organs
if(iscarbon(src))
var/mob/living/carbon/C = src
@@ -540,8 +536,6 @@
for(var/organ in C.internal_organs)
var/obj/item/organ/O = organ
O.setOrganDamage(0)
- SEND_SIGNAL(src, COMSIG_LIVING_FULLY_HEAL, admin_revive)
-
//proc called by revive(), to check if we can actually ressuscitate the mob (we don't want to revive him and have him instantly die again)
/mob/living/proc/can_be_revived()
@@ -552,6 +546,12 @@
/mob/living/proc/update_damage_overlays()
return
+/mob/living/Crossed(atom/movable/AM)
+ . = ..()
+ for(var/i in get_equipped_items())
+ var/obj/item/item = i
+ SEND_SIGNAL(item, COMSIG_ITEM_WEARERCROSSED, AM)
+
/mob/living/Move(atom/newloc, direct)
if (buckled && buckled.loc != newloc) //not updating position
if (!buckled.anchored)
diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm
index 409665f792..daaf9afbe2 100644
--- a/code/modules/mob/living/silicon/pai/pai.dm
+++ b/code/modules/mob/living/silicon/pai/pai.dm
@@ -2,7 +2,6 @@
name = "pAI"
icon = 'icons/mob/pai.dmi'
icon_state = "repairbot"
- mouse_opacity = MOUSE_OPACITY_OPAQUE
density = FALSE
pass_flags = PASSTABLE | PASSMOB
mob_size = MOB_SIZE_TINY
@@ -11,6 +10,7 @@
health = 500
maxHealth = 500
layer = BELOW_MOB_LAYER
+ silicon_privileges = PRIVILEDGES_PAI
var/datum/element/mob_holder/current_mob_holder //because only a few of their chassis can be actually held.
var/network = "ss13"
@@ -74,7 +74,7 @@
var/emitteroverloadcd = 100
var/radio_short = FALSE
- var/radio_short_cooldown = 5 MINUTES
+ var/radio_short_cooldown = 3 MINUTES
var/radio_short_timerid
canmove = FALSE
diff --git a/code/modules/mob/living/silicon/pai/pai_defense.dm b/code/modules/mob/living/silicon/pai/pai_defense.dm
index d8e910642d..93cf10706a 100644
--- a/code/modules/mob/living/silicon/pai/pai_defense.dm
+++ b/code/modules/mob/living/silicon/pai/pai_defense.dm
@@ -56,7 +56,8 @@
if(P.stun)
fold_in(force = TRUE)
visible_message("
")
- return ..()
+ . = ..()
+ return BULLET_ACT_FORCE_PIERCE
/mob/living/silicon/pai/stripPanelUnequip(obj/item/what, mob/who, where) //prevents stripping
to_chat(src, "
")
diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm
index c6af8bd4c2..f3e0816b1b 100644
--- a/code/modules/mob/living/silicon/robot/robot_modules.dm
+++ b/code/modules/mob/living/silicon/robot/robot_modules.dm
@@ -97,8 +97,8 @@
var/obj/item/stack/S = I
if(is_type_in_list(S, list(/obj/item/stack/sheet/metal, /obj/item/stack/rods, /obj/item/stack/tile/plasteel)))
- if(S.materials[MAT_METAL])
- S.cost = S.materials[MAT_METAL] * 0.25
+ if(S.custom_materials?.len && S.custom_materials[getmaterialref(/datum/material/iron)])
+ S.cost = S.custom_materials[getmaterialref(/datum/material/iron)] * 0.25
S.source = get_or_create_estorage(/datum/robot_energy_storage/metal)
else if(istype(S, /obj/item/stack/sheet/glass))
@@ -127,7 +127,7 @@
S.source = get_or_create_estorage(/datum/robot_energy_storage/wrapping_paper)
if(S && S.source)
- S.materials = list()
+ S.custom_materials = null
S.is_cyborg = 1
if(I.loc != src)
@@ -596,8 +596,8 @@
/obj/item/robot_module/peacekeeper/do_transform_animation()
..()
- to_chat(loc, "
")
/obj/item/robot_module/peacekeeper/be_transformed_to(obj/item/robot_module/old_module)
var/mob/living/silicon/robot/R = loc
diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm
index 72e98e348c..531faff056 100644
--- a/code/modules/mob/living/silicon/silicon.dm
+++ b/code/modules/mob/living/silicon/silicon.dm
@@ -1,6 +1,6 @@
/mob/living/silicon
gender = NEUTER
- has_unlimited_silicon_privilege = 1
+ silicon_privileges = PRIVILEDGES_SILICON
verb_say = "states"
verb_ask = "queries"
verb_exclaim = "declares"
diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm
index 7da0ad13da..d5e6f687fb 100644
--- a/code/modules/mob/living/simple_animal/bot/bot.dm
+++ b/code/modules/mob/living/simple_animal/bot/bot.dm
@@ -15,7 +15,7 @@
maxbodytemp = INFINITY
minbodytemp = 0
blood_volume = 0
- has_unlimited_silicon_privilege = 1
+ silicon_privileges = PRIVILEDGES_BOT
sentience_type = SENTIENCE_ARTIFICIAL
status_flags = NONE //no default canpush
verb_say = "states"
@@ -194,10 +194,12 @@
if(locked) //First emag application unlocks the bot's interface. Apply a screwdriver to use the emag again.
locked = FALSE
emagged = 1
- to_chat(user, "
")
return
emagged = 2
remote_disabled = 1 //Manually emagging the bot locks out the AI built in panel.
@@ -205,7 +207,8 @@
bot_reset()
turn_on() //The bot automatically turns on when emagged, unless recently hit with EMP.
to_chat(src, "
")
- log_combat(user, src, "emagged")
+ if(user)
+ log_combat(user, src, "emagged")
return TRUE
/mob/living/simple_animal/bot/examine(mob/user)
diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm
index b23f3f2baa..b5aa8b6967 100644
--- a/code/modules/mob/living/simple_animal/bot/mulebot.dm
+++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm
@@ -123,7 +123,8 @@
emagged = TRUE
if(!open)
locked = !locked
- to_chat(user, "
")
flick("mulebot-emagged", src)
playsound(src, "sparks", 100, FALSE)
@@ -180,7 +181,7 @@
var/list/data = list()
data["on"] = on
data["locked"] = locked
- data["siliconUser"] = user.has_unlimited_silicon_privilege
+ data["siliconUser"] = hasSiliconAccessInArea(usr)
data["mode"] = mode ? mode_name[mode] : "Ready"
data["modeStatus"] = ""
switch(mode)
@@ -205,11 +206,12 @@
return data
/mob/living/simple_animal/bot/mulebot/ui_act(action, params)
- if(..() || (locked && !usr.has_unlimited_silicon_privilege))
+ var/silicon_access = hasSiliconAccessInArea(usr)
+ if(..() || (locked && silicon_access))
return
switch(action)
if("lock")
- if(usr.has_unlimited_silicon_privilege)
+ if(silicon_access)
locked = !locked
. = TRUE
if("power")
@@ -766,4 +768,3 @@
/obj/machinery/bot_core/mulebot
req_access = list(ACCESS_CARGO)
-
\ No newline at end of file
diff --git a/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm b/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm
index 7dd373b49f..43149e6ba7 100644
--- a/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm
+++ b/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm
@@ -41,7 +41,7 @@
bubble_icon = "machine"
initial_language_holder = /datum/language_holder/drone
mob_size = MOB_SIZE_SMALL
- has_unlimited_silicon_privilege = 1
+ silicon_privileges = PRIVILEDGES_DRONE
damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0)
hud_possible = list(DIAG_STAT_HUD, DIAG_HUD, ANTAG_HUD)
unique_name = TRUE
diff --git a/code/modules/mob/living/simple_animal/hostile/dark_wizard.dm b/code/modules/mob/living/simple_animal/hostile/dark_wizard.dm
new file mode 100644
index 0000000000..aec136af7d
--- /dev/null
+++ b/code/modules/mob/living/simple_animal/hostile/dark_wizard.dm
@@ -0,0 +1,39 @@
+/mob/living/simple_animal/hostile/dark_wizard
+ name = "Dark Wizard"
+ desc = "Killing amateurs since the dawn of times."
+ icon = 'icons/mob/simple_human.dmi'
+ icon_state = "dark_wizard"
+ icon_living = "dark_wizard"
+ move_to_delay = 10
+ projectiletype = /obj/item/projectile/temp/earth_bolt
+ projectilesound = 'sound/magic/ethereal_enter.ogg'
+ ranged = TRUE
+ ranged_message = "earth bolts"
+ ranged_cooldown_time = 20
+ maxHealth = 50
+ health = 50
+ harm_intent_damage = 5
+ obj_damage = 20
+ melee_damage_lower = 5
+ melee_damage_upper = 5
+ attacktext = "staves"
+ a_intent = INTENT_HARM
+ speak_emote = list("chants")
+ attack_sound = 'sound/weapons/bladeslice.ogg'
+ aggro_vision_range = 9
+ turns_per_move = 5
+ gold_core_spawnable = HOSTILE_SPAWN
+ faction = list(ROLE_WIZARD)
+ do_footstep = TRUE
+ weather_immunities = list("lava","ash")
+ minbodytemp = 0
+ maxbodytemp = INFINITY
+ atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
+ loot = list(/obj/effect/decal/remains/human)
+
+/obj/item/projectile/temp/earth_bolt
+ name = "earth_bolt"
+ icon_state = "declone"
+ damage = 4
+ damage_type = BURN
+ flag = "energy"
\ No newline at end of file
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/hivelord.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/hivelord.dm
index 11de9df70b..f949df8012 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/hivelord.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/hivelord.dm
@@ -81,11 +81,13 @@
throw_message = "falls right through the strange body of the"
obj_damage = 0
environment_smash = ENVIRONMENT_SMASH_NONE
- pass_flags = PASSTABLE
+ pass_flags = PASSTABLE | PASSMOB //they shouldn't get stuck behind hivelords.
+ density = FALSE
del_on_death = 1
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/Initialize()
. = ..()
+ AddComponent(/datum/component/swarming) //oh god not the bees
addtimer(CALLBACK(src, .proc/death), 100)
//Legion
@@ -174,7 +176,6 @@
speak_emote = list("echoes")
attack_sound = 'sound/weapons/pierce.ogg'
throw_message = "is shrugged off by"
- pass_flags = PASSTABLE
del_on_death = TRUE
stat_attack = UNCONSCIOUS
robust_searching = 1
diff --git a/code/modules/mob/living/simple_animal/hostile/sharks.dm b/code/modules/mob/living/simple_animal/hostile/sharks.dm
new file mode 100644
index 0000000000..c94e49b286
--- /dev/null
+++ b/code/modules/mob/living/simple_animal/hostile/sharks.dm
@@ -0,0 +1,91 @@
+//shameless copies of carps.
+
+/mob/living/simple_animal/hostile/shark
+ name = "Space Shark"
+ desc = "The best terror of the seas, next to the kraken."
+ icon_state = "shark"
+ icon_living = "shark"
+ icon = 'icons/mob/sharks.dmi'
+ icon_dead = "shark_dead"
+ icon_gib = "carp_gib"
+ environment_smash = 0
+ speak_chance = 0
+ turns_per_move = 3
+ butcher_results = list(/obj/item/reagent_containers/food/snacks/carpmeat = 3)
+ response_help = "pets"
+ response_disarm = "gently pushes aside"
+ response_harm = "hits"
+ speed = 0
+ maxHealth = 75
+ health = 75
+ harm_intent_damage = 18
+ melee_damage_lower = 18
+ melee_damage_upper = 18
+ attacktext = "maims"
+ attack_sound = 'sound/weapons/bite.ogg'
+ gold_core_spawnable = 1
+ //Space shark aren't affected by cold.
+ atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
+ minbodytemp = 0
+ maxbodytemp = 1500
+
+ faction = list("shark")
+
+/mob/living/simple_animal/hostile/shark/Process_Spacemove(var/movement_dir = 0)
+ return 1 //No drifting in space for space sharks....either!
+
+/mob/living/simple_animal/hostile/shark/FindTarget()
+ . = ..()
+ if(.)
+ emote("me", 1, "growls at [.]!")
+
+/mob/living/simple_animal/hostile/shark/AttackingTarget()
+ . =..()
+ var/mob/living/carbon/L = .
+ if(istype(L))
+ if(prob(25))
+ L.Knockdown(20)
+ L.visible_message("
")
+
+
+/mob/living/simple_animal/hostile/shark/laser
+ name = "Laser-Shark"
+ desc = "NOW we've jumped the shark."
+ icon_state = "lasershark"
+ icon_living = "lasershark"
+ icon_dead = "lasershark_dead"
+ icon_gib = "carp_gib"
+ ranged = 1
+ retreat_distance = 3
+ minimum_distance = 0 //Between shots they can and will close in to nash
+ projectiletype = /obj/item/projectile/beam/laser/heavylaser
+ projectilesound = 'sound/weapons/lasercannonfire.ogg'
+ maxHealth = 50
+ health = 50
+
+/mob/living/simple_animal/hostile/shark/kawaii
+ name = "Kawaii Shark"
+ desc = "Senpai~ Notice me.."
+ icon_state = "kawaiishark"
+ icon_living = "kawaiishark"
+ icon_dead = "kawaiishark_dead"
+ speak = list("Oh Senpai","Notice me senpai!","Oh my...","Kawaii~")
+ speak_emote = list("lovingly says","says")
+ speak_chance = 2
+ turns_per_move = 3
+ butcher_results = list(/mob/living/simple_animal/butterfly = 3)
+ maxHealth = 50
+ health = 50
+ maxbodytemp = INFINITY
+
+ harm_intent_damage = 0
+ melee_damage_lower = 0
+ melee_damage_upper = 0
+ attacktext = "violently hugs"
+ vision_range = 0
+
+/mob/living/simple_animal/hostile/shark/kawaii/death()
+ say("Senpai, you noticed~!")
+ LoseAggro()
+ ..()
+ walk(src, 0)
diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm
index 5ad787b143..2bab332cd0 100644
--- a/code/modules/mob/living/simple_animal/hostile/statue.dm
+++ b/code/modules/mob/living/simple_animal/hostile/statue.dm
@@ -126,7 +126,7 @@
// This loop will, at most, loop twice.
for(var/atom/check in check_list)
for(var/mob/living/M in viewers(world.view + 1, check) - src)
- if(M.client && CanAttack(M) && !M.has_unlimited_silicon_privilege)
+ if(M.client && CanAttack(M) && !M.silicon_privileges)
if(!M.eye_blind)
return M
for(var/obj/mecha/M in view(world.view + 1, check)) //assuming if you can see them they can see you
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index 6d5ae72e77..c45f6eec13 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -95,7 +95,7 @@
var/digitalinvis = 0 //Are they ivisible to the AI?
var/image/digitaldisguise = null //what does the AI see instead of them?
- var/has_unlimited_silicon_privilege = 0 // Can they interact with station electronics
+ var/silicon_privileges = NONE // Can they interact with station electronics
var/obj/control_object //Used by admins to possess objects. All mobs should have this var
var/atom/movable/remote_control //Calls relaymove() to whatever it is
diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm
index b25531f0e0..12d74d2f8f 100644
--- a/code/modules/mob/mob_helpers.dm
+++ b/code/modules/mob/mob_helpers.dm
@@ -406,8 +406,8 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
return
return TRUE
-/atom/proc/hasSiliconAccessInArea(mob/user)
- return user && (issilicon(user) || (user.siliconaccesstoggle && (get_area(src) in user.siliconaccessareas)))
+/atom/proc/hasSiliconAccessInArea(mob/user, flags = PRIVILEDGES_SILICON)
+ return user.silicon_privileges & (flags) || (user.siliconaccesstoggle && (get_area(src) in user.siliconaccessareas))
/mob/proc/toggleSiliconAccessArea(area/area)
if (area in siliconaccessareas)
@@ -555,4 +555,4 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
//Can the mob see reagents inside of containers?
/mob/proc/can_see_reagents()
- return stat == DEAD || has_unlimited_silicon_privilege //Dead guys and silicons can always see reagents
+ return stat == DEAD || silicon_privileges //Dead guys and silicons can always see reagents
diff --git a/code/modules/modular_computers/computers/item/computer.dm b/code/modules/modular_computers/computers/item/computer.dm
index 551b77dec3..a83720dc23 100644
--- a/code/modules/modular_computers/computers/item/computer.dm
+++ b/code/modules/modular_computers/computers/item/computer.dm
@@ -29,7 +29,7 @@
var/max_hardware_size = 0 // Maximal hardware w_class. Tablets/PDAs have 1, laptops 2, consoles 4.
var/steel_sheet_cost = 5 // Amount of steel sheets refunded when disassembling an empty frame of this computer.
- integrity_failure = 50
+ integrity_failure = 0.5
max_integrity = 100
armor = list("melee" = 0, "bullet" = 20, "laser" = 20, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 0, "acid" = 0)
@@ -203,7 +203,7 @@
/obj/item/modular_computer/examine(mob/user)
. = ..()
- if(obj_integrity <= integrity_failure)
+ if(obj_integrity <= integrity_failure * max_integrity)
. += "
"
else if(obj_integrity < max_integrity)
. += "
"
@@ -219,7 +219,7 @@
else
add_overlay(icon_state_menu)
- if(obj_integrity <= integrity_failure)
+ if(obj_integrity <= integrity_failure * max_integrity)
add_overlay("bsod")
add_overlay("broken")
@@ -233,7 +233,7 @@
/obj/item/modular_computer/proc/turn_on(mob/user)
var/issynth = issilicon(user) // Robots and AIs get different activation messages.
- if(obj_integrity <= integrity_failure)
+ if(obj_integrity <= integrity_failure * max_integrity)
if(issynth)
to_chat(user, "
")
else
@@ -265,7 +265,7 @@
last_power_usage = 0
return 0
- if(obj_integrity <= integrity_failure)
+ if(obj_integrity <= integrity_failure * max_integrity)
shutdown_computer()
return 0
diff --git a/code/modules/modular_computers/computers/machinery/modular_computer.dm b/code/modules/modular_computers/computers/machinery/modular_computer.dm
index 39b2c45d99..a1f13878c1 100644
--- a/code/modules/modular_computers/computers/machinery/modular_computer.dm
+++ b/code/modules/modular_computers/computers/machinery/modular_computer.dm
@@ -65,7 +65,7 @@
else
add_overlay(screen_icon_state_menu)
- if(cpu && cpu.obj_integrity <= cpu.integrity_failure)
+ if(cpu && cpu.obj_integrity <= cpu.integrity_failure * cpu.max_integrity)
add_overlay("bsod")
add_overlay("broken")
diff --git a/code/modules/modular_computers/computers/machinery/modular_console.dm b/code/modules/modular_computers/computers/machinery/modular_console.dm
index 026091f88b..3d4ec22e89 100644
--- a/code/modules/modular_computers/computers/machinery/modular_console.dm
+++ b/code/modules/modular_computers/computers/machinery/modular_console.dm
@@ -15,7 +15,7 @@
steel_sheet_cost = 10
light_strength = 2
max_integrity = 300
- integrity_failure = 150
+ integrity_failure = 0.5
var/console_department = "" // Used in New() to set network tag according to our area.
/obj/machinery/modular_computer/console/buildable/Initialize()
diff --git a/code/modules/newscaster/newscaster_machine.dm b/code/modules/newscaster/newscaster_machine.dm
index cb2016a1a1..46dc52e286 100644
--- a/code/modules/newscaster/newscaster_machine.dm
+++ b/code/modules/newscaster/newscaster_machine.dm
@@ -4,7 +4,7 @@ GLOBAL_LIST_EMPTY(allCasters)
name = "newscaster frame"
desc = "Used to build newscasters, just secure to the wall."
icon_state = "newscaster"
- materials = list(MAT_METAL=14000, MAT_GLASS=8000)
+ custom_materials = list(/datum/material/iron=14000, /datum/material/glass=8000)
result_path = /obj/machinery/newscaster
/obj/machinery/newscaster
@@ -17,7 +17,7 @@ GLOBAL_LIST_EMPTY(allCasters)
verb_exclaim = "beeps"
armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
max_integrity = 200
- integrity_failure = 50
+ integrity_failure = 0.25
var/screen = 0
var/paper_remaining = 15
var/securityCaster = 0
diff --git a/code/modules/oracle_ui/hookup_procs.dm b/code/modules/oracle_ui/hookup_procs.dm
index 18d7bbfd8c..30db9d92b9 100644
--- a/code/modules/oracle_ui/hookup_procs.dm
+++ b/code/modules/oracle_ui/hookup_procs.dm
@@ -5,7 +5,7 @@
return "Default Implementation"
/datum/proc/oui_canuse(mob/user)
- if(isobserver(user) && !user.has_unlimited_silicon_privilege)
+ if(isobserver(user) && !user.silicon_privileges)
return FALSE
return oui_canview(user)
@@ -35,7 +35,7 @@
return ..()
/obj/machinery/oui_canview(mob/user)
- if(user.has_unlimited_silicon_privilege || hasSiliconAccessInArea(user))
+ if(hasSiliconAccessInArea(user, ALL))
return TRUE
if(!can_interact(user))
return FALSE
diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm
index 2650da8c7a..fad4ec80b4 100644
--- a/code/modules/paperwork/pen.dm
+++ b/code/modules/paperwork/pen.dm
@@ -21,7 +21,7 @@
w_class = WEIGHT_CLASS_TINY
throw_speed = 3
throw_range = 7
- materials = list(MAT_METAL=10)
+ custom_materials = list(/datum/material/iron=10)
pressure_resistance = 2
grind_results = list(/datum/reagent/iron = 2, /datum/reagent/iodine = 1)
var/colour = "black" //what colour the ink is!
@@ -79,7 +79,7 @@
throwforce = 5
throw_speed = 4
colour = "crimson"
- materials = list(MAT_GOLD = 750)
+ custom_materials = list(/datum/material/gold = 750)
sharpness = IS_SHARP
resistance_flags = FIRE_PROOF
unique_reskin = list("Oak" = "pen-fountain-o",
diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm
index 182806388a..97d28d7674 100644
--- a/code/modules/paperwork/photocopier.dm
+++ b/code/modules/paperwork/photocopier.dm
@@ -18,7 +18,7 @@
active_power_usage = 200
power_channel = EQUIP
max_integrity = 300
- integrity_failure = 100
+ integrity_failure = 0.33
var/obj/item/paper/copy = null //what's in the copier!
var/obj/item/photo/photocopy = null
var/obj/item/documents/doccopy = null
diff --git a/code/modules/paperwork/stamps.dm b/code/modules/paperwork/stamps.dm
index 1fe59623fb..2beb9296b3 100644
--- a/code/modules/paperwork/stamps.dm
+++ b/code/modules/paperwork/stamps.dm
@@ -8,7 +8,7 @@
w_class = WEIGHT_CLASS_TINY
throw_speed = 3
throw_range = 7
- materials = list(MAT_METAL=60)
+ custom_materials = list(/datum/material/iron=60)
item_color = "cargo"
pressure_resistance = 2
attack_verb = list("stamped")
diff --git a/code/modules/photography/camera/camera.dm b/code/modules/photography/camera/camera.dm
index 140167c2f0..b7b7bc36b7 100644
--- a/code/modules/photography/camera/camera.dm
+++ b/code/modules/photography/camera/camera.dm
@@ -14,7 +14,7 @@
w_class = WEIGHT_CLASS_SMALL
flags_1 = CONDUCT_1
slot_flags = ITEM_SLOT_NECK
- materials = list(MAT_METAL = 50, MAT_GLASS = 150)
+ custom_materials = list(/datum/material/iron = 50, /datum/material/glass = 150)
var/flash_enabled = TRUE
var/state_on = "camera"
var/state_off = "camera_off"
diff --git a/code/modules/photography/camera/film.dm b/code/modules/photography/camera/film.dm
index b1cd6bae66..b44b933610 100644
--- a/code/modules/photography/camera/film.dm
+++ b/code/modules/photography/camera/film.dm
@@ -11,4 +11,4 @@
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
w_class = WEIGHT_CLASS_TINY
resistance_flags = FLAMMABLE
- materials = list(MAT_METAL = 10, MAT_GLASS = 10)
+ custom_materials = list(/datum/material/iron = 10, /datum/material/glass = 10)
diff --git a/code/modules/photography/photos/frame.dm b/code/modules/photography/photos/frame.dm
index f86cae8095..d20a71d1c6 100644
--- a/code/modules/photography/photos/frame.dm
+++ b/code/modules/photography/photos/frame.dm
@@ -4,7 +4,7 @@
name = "picture frame"
desc = "The perfect showcase for your favorite deathtrap memories."
icon = 'icons/obj/decals.dmi'
- materials = list()
+ custom_materials = null
flags_1 = 0
icon_state = "frame-empty"
result_path = /obj/structure/sign/picture_frame
diff --git a/code/modules/pool/pool_controller.dm b/code/modules/pool/pool_controller.dm
new file mode 100644
index 0000000000..681adb0ef3
--- /dev/null
+++ b/code/modules/pool/pool_controller.dm
@@ -0,0 +1,422 @@
+#define POOL_NO_OVERDOSE_MEDICINE_MAX 5 //max units of no-overdose medicine to allow mobs to have through duplication
+
+//Originally stolen from paradise. Credits to tigercat2000.
+//Modified a lot by Kokojo and Tortellini Tony for hippiestation.
+//Heavily refactored by tgstation
+/obj/machinery/pool
+ icon = 'icons/obj/machines/pool.dmi'
+ anchored = TRUE
+ resistance_flags = INDESTRUCTIBLE
+
+/obj/machinery/pool/controller
+ name = "\improper Pool Controller"
+ desc = "An advanced substance generation and fluid tank management system that can refill the contents of a pool to a completely different substance in minutes."
+ icon_state = "poolc_3"
+ density = TRUE
+ use_power = TRUE
+ idle_power_usage = 75
+ /// How far it scans for pool objects
+ var/scan_range = 6
+ /// Is pool mist currently on?
+ var/mist_state = FALSE
+ /// Linked mist effects
+ var/list/obj/effect/mist/linked_mist = list()
+ /// Pool turfs
+ var/list/turf/open/pool/linked_turfs = list()
+ /// All mobs in pool
+ var/list/mob/living/mobs_in_pool = list()
+ /// Is the pool bloody?
+ var/bloody = 0
+ /// Last time we process_reagents()'d
+ var/last_reagent_process = 0
+ /// Maximum amount we will take from a beaker
+ var/max_beaker_transfer = 100
+ /// Minimum amount of a reagent for it to work on us
+ var/min_reagent_amount = 10
+ /// ADMINBUS ONLY - WHETHER OR NOT WE HAVE NOREACT ;)
+ var/noreact_reagents = FALSE
+ /// how fast in deciseconds between reagent processes
+ var/reagent_tick_interval = 5
+ /// Can we use unsafe temperatures
+ var/temperature_unlocked = FALSE
+ /// See __DEFINES/pool.dm, temperature defines
+ var/temperature = POOL_NORMAL
+ /// Whether or not the pool can be drained
+ var/drainable = FALSE
+ // Whether or not the pool is drained
+ var/drained = FALSE
+ /// Pool drain
+ var/obj/machinery/pool/drain/linked_drain
+ /// Pool filter
+ var/obj/machinery/pool/filter/linked_filter
+ /// Next world.time you can interact with settings
+ var/interact_delay = 0
+ /// Airlock style shocks
+ var/shocked = FALSE
+ /// Old reagent color, used to determine if update_color needs to reset colors.
+ var/old_rcolor
+ /// Just to prevent spam
+ var/draining = FALSE
+ /// Reagent blacklisting
+ var/respect_reagent_blacklist = TRUE
+
+/obj/machinery/pool/controller/examine(mob/user)
+ . = ..()
+ . += "
"
+
+/obj/machinery/pool/controller/Initialize()
+ . = ..()
+ START_PROCESSING(SSfastprocess, src)
+ create_reagents(1000)
+ if(noreact_reagents)
+ reagents.reagents_holder_flags |= NO_REACT
+ wires = new /datum/wires/poolcontroller(src)
+ scan_things()
+
+/obj/machinery/pool/controller/Destroy()
+ STOP_PROCESSING(SSprocessing, src)
+ linked_drain = null
+ linked_filter = null
+ linked_turfs.Cut()
+ mobs_in_pool.Cut()
+ return ..()
+
+/obj/machinery/pool/controller/proc/scan_things()
+ var/list/cached = range(scan_range, src)
+ for(var/turf/open/pool/W in cached)
+ linked_turfs += W
+ W.controller = src
+ for(var/obj/machinery/pool/drain/pooldrain in cached)
+ linked_drain = pooldrain
+ linked_drain.controller = src
+ break
+ for(var/obj/machinery/pool/filter/F in cached)
+ linked_filter = F
+ linked_filter.controller = src
+ break
+
+/obj/machinery/pool/controller/emag_act(mob/user)
+ . = ..()
+ if(!(obj_flags & EMAGGED)) //If it is not already emagged, emag it.
+ to_chat(user, "
")
+ do_sparks(5, TRUE, src)
+ obj_flags |= EMAGGED
+ temperature_unlocked = TRUE
+ drainable = TRUE
+ log_game("[key_name(user)] emagged [src]")
+ message_admins("[key_name_admin(user)] emagged [src]")
+ else
+ to_chat(user, "
")
+ return
+
+/obj/machinery/pool/controller/AltClick(mob/user)
+ . = ..()
+ if(!isliving(user) || !user.Adjacent(src) || !user.CanReach(src) || user.IsStun() || user.IsKnockdown() || user.incapacitated())
+ return FALSE
+ visible_message("
")
+ draining = TRUE
+ if(!do_after(user, 50, target = src))
+ draining = FALSE
+ return TRUE
+ reagents.remove_all(INFINITY)
+ visible_message("
")
+ say("Reagents cleared.")
+ update_color()
+ draining = FALSE
+ return TRUE
+
+/obj/machinery/pool/controller/attackby(obj/item/W, mob/user)
+ if(shocked && !(stat & NOPOWER))
+ shock(user,50)
+ if(stat & (BROKEN))
+ return
+ if(istype(W,/obj/item/reagent_containers))
+ if(W.reagents.total_volume) //check if there's reagent
+ user.visible_message("
")
+ if(do_after(user, 50, target = src))
+ for(var/datum/reagent/R in W.reagents.reagent_list)
+ if(R.type in GLOB.blacklisted_pool_reagents)
+ to_chat(user, "[src] cannot accept [R.name].")
+ return
+ if(R.reagent_state == SOLID)
+ to_chat(user, "The pool cannot accept reagents in solid form!.")
+ return
+ reagents.clear_reagents()
+ // This also reacts them. No nitroglycerin deathpools, sorry gamers :(
+ W.reagents.trans_to(reagents, max_beaker_transfer)
+ user.visible_message("
= min_reagent_amount) && (!respect_reagent_blacklist || R.can_synth))
+ reagent_names += R.name
+ else
+ reagents.remove_reagent(R.type, INFINITY)
+ rejected += R.name
+ if(length(reagent_names))
+ reagent_names = english_list(reagent_names)
+ var/msg = "POOL: [key_name(user)] has changed [src]'s chems to [reagent_names]"
+ log_game(msg)
+ message_admins(msg)
+ if(length(rejected))
+ rejected = english_list(rejected)
+ to_chat(user, "
")
+ return
+ else if(panel_open && is_wire_tool(W))
+ wires.interact(user)
+ else
+ return ..()
+
+/obj/machinery/pool/controller/screwdriver_act(mob/living/user, obj/item/W)
+ . = ..()
+ if(.)
+ return TRUE
+ cut_overlays()
+ panel_open = !panel_open
+ to_chat(user, "You [panel_open ? "open" : "close"] the maintenance panel.")
+ W.play_tool_sound(src)
+ if(panel_open)
+ add_overlay("wires")
+ return TRUE
+
+//procs
+/obj/machinery/pool/controller/proc/shock(mob/user, prb)
+ if(stat & (BROKEN|NOPOWER)) // unpowered, no shock
+ return FALSE
+ if(!prob(prb))
+ return FALSE
+ var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
+ s.set_up(5, 1, src)
+ s.start()
+ if(electrocute_mob(user, get_area(src), src, 0.7))
+ return TRUE
+ else
+ return FALSE
+
+/obj/machinery/pool/controller/proc/process_reagents()
+ if(last_reagent_process > world.time + reagent_tick_interval)
+ return
+ if(!length(reagents.reagent_list))
+ return
+ for(var/turf/open/pool/W in linked_turfs)
+ for(var/mob/living/carbon/human/swimee in W)
+ for(var/datum/reagent/R in reagents.reagent_list)
+ if(R.reagent_state == SOLID)
+ R.reagent_state = LIQUID
+ if(!swimee.reagents.has_reagent(POOL_NO_OVERDOSE_MEDICINE_MAX))
+ swimee.reagents.add_reagent(R.type, 0.5) //osmosis
+ reagents.reaction(swimee, VAPOR, 0.03) //3 percent. Need to find a way to prevent this from stacking chems at some point like the above.
+ for(var/obj/objects in W)
+ if(W.reagents)
+ W.reagents.reaction(objects, VAPOR, 1)
+ last_reagent_process = world.time
+
+/obj/machinery/pool/controller/process()
+ updateUsrDialog()
+ if(stat & (NOPOWER|BROKEN))
+ return
+ if(drained)
+ return
+ process_pool()
+ process_reagents()
+
+/obj/machinery/pool/controller/proc/process_pool()
+ if(drained)
+ return
+ for(var/mob/living/M in mobs_in_pool)
+ switch(temperature) //Apply different effects based on what the temperature is set to.
+ if(POOL_SCALDING) //Scalding
+ M.adjust_bodytemperature(50,0,500)
+ if(POOL_WARM) //Warm
+ M.adjust_bodytemperature(20,0,360) //Heats up mobs till the termometer shows up
+ //Normal temp does nothing, because it's just room temperature water.
+ if(POOL_COOL)
+ M.adjust_bodytemperature(-20,250) //Cools mobs till the termometer shows up
+ if(POOL_FRIGID) //Freezing
+ M.adjust_bodytemperature(-60) //cool mob at -35k per cycle, less would not affect the mob enough.
+ if(M.bodytemperature <= 50 && !M.stat)
+ M.apply_status_effect(/datum/status_effect/freon)
+ if(ishuman(M))
+ var/mob/living/carbon/human/drownee = M
+ if(!drownee || drownee.stat == DEAD)
+ return
+ if(drownee.resting && !drownee.internal)
+ if(drownee.stat != CONSCIOUS)
+ drownee.adjustOxyLoss(9)
+ else
+ drownee.adjustOxyLoss(4)
+ if(prob(35))
+ to_chat(drownee, "
")
+
+/obj/machinery/pool/controller/proc/set_bloody(state)
+ if(bloody == state)
+ return
+ bloody = state
+ update_color()
+
+/obj/machinery/pool/controller/proc/update_color()
+ if(drained)
+ return
+ var/rcolor
+ if(reagents.reagent_list.len)
+ rcolor = mix_color_from_reagents(reagents.reagent_list)
+ if(rcolor == old_rcolor)
+ return // small performance upgrade hopefully?
+ old_rcolor = rcolor
+ for(var/X in linked_turfs)
+ var/turf/open/pool/color1 = X
+ if(bloody)
+ if(rcolor)
+ var/thecolor = BlendRGB(rgb(150, 20, 20), rcolor, 0.5)
+ color1.watereffect.add_atom_colour(thecolor, FIXED_COLOUR_PRIORITY)
+ color1.watertop.add_atom_colour(thecolor, FIXED_COLOUR_PRIORITY)
+ else
+ var/thecolor = rgb(150, 20, 20)
+ color1.watereffect.add_atom_colour(thecolor, FIXED_COLOUR_PRIORITY)
+ color1.watertop.add_atom_colour(thecolor, FIXED_COLOUR_PRIORITY)
+ else if(!bloody && rcolor)
+ color1.watereffect.add_atom_colour(rcolor, FIXED_COLOUR_PRIORITY)
+ color1.watertop.add_atom_colour(rcolor, FIXED_COLOUR_PRIORITY)
+ else
+ color1.watereffect.remove_atom_colour(FIXED_COLOUR_PRIORITY)
+ color1.watertop.remove_atom_colour(FIXED_COLOUR_PRIORITY)
+
+/obj/machinery/pool/controller/proc/update_temp()
+ if(mist_state)
+ if(temperature < POOL_SCALDING)
+ mist_off()
+ else
+ if(temperature == POOL_SCALDING)
+ mist_on()
+ update_icon()
+
+/obj/machinery/pool/controller/update_icon()
+ . = ..()
+ icon_state = "poolc_[temperature]"
+
+/obj/machinery/pool/controller/proc/CanUpTemp(mob/user)
+ if(temperature == POOL_WARM && (temperature_unlocked || issilicon(user) || IsAdminGhost(user)) || temperature < POOL_WARM)
+ return TRUE
+ return FALSE
+
+/obj/machinery/pool/controller/proc/CanDownTemp(mob/user)
+ if(temperature == POOL_COOL && (temperature_unlocked || issilicon(user) || IsAdminGhost(user)) || temperature > POOL_COOL)
+ return TRUE
+ return FALSE
+
+/obj/machinery/pool/controller/Topic(href, href_list)
+ if(..())
+ return
+ if(interact_delay > world.time)
+ return
+ if(href_list["IncreaseTemp"])
+ if(CanUpTemp(usr))
+ visible_message("
")
+ temperature++
+ update_temp()
+ var/msg = "POOL: [key_name(usr)] increased [src]'s pool temperature at [COORD(src)] to [temperature]"
+ log_game(msg)
+ message_admins(msg)
+ interact_delay = world.time + 15
+ if(href_list["DecreaseTemp"])
+ if(CanDownTemp(usr))
+ visible_message("
")
+ temperature--
+ update_temp()
+ var/msg = "POOL: [key_name(usr)] decreased [src]'s pool temperature at [COORD(src)] to [temperature]"
+ log_game(msg)
+ message_admins(msg)
+ interact_delay = world.time + 15
+ if(href_list["Activate Drain"])
+ if((drainable || issilicon(usr) || IsAdminGhost(usr)) && !linked_drain.active)
+ var/msg = "POOL: [key_name(usr)] activated [src]'s pool drain in [linked_drain.filling? "FILLING" : "DRAINING"] mode at [COORD(src)]"
+ log_game(msg)
+ message_admins(msg)
+ visible_message("
")
+ mist_off()
+ interact_delay = world.time + 60
+ linked_drain.active = TRUE
+ linked_drain.cycles_left = 75
+ if(!linked_drain.filling)
+ new /obj/effect/whirlpool(linked_drain.loc)
+ temperature = POOL_NORMAL
+ else
+ new /obj/effect/waterspout(linked_drain.loc)
+ temperature = POOL_NORMAL
+ update_temp()
+ bloody = FALSE
+ updateUsrDialog()
+
+/obj/machinery/pool/controller/proc/temp2text()
+ switch(temperature)
+ if(POOL_FRIGID)
+ return "
"
+ else
+ return "Outside of possible range."
+
+/obj/machinery/pool/controller/ui_interact(mob/user)
+ . = ..()
+ if(.)
+ return
+ if(shocked && !(stat & NOPOWER))
+ shock(user,50)
+ if(panel_open && !isAI(user))
+ return wires.interact(user)
+ if(stat & (NOPOWER|BROKEN))
+ return
+ var/datum/browser/popup = new(user, "Pool Controller", name, 300, 450)
+ var/dat = ""
+ if(interact_delay > world.time)
+ dat += "
+
Drain status: [(issilicon(user) || IsAdminGhost(user) || drainable) ? "
Enabled" : "
Disabled"]
+
Pool status: "})
+ if(!drained)
+ dat += "
Full"
+ else
+ dat += "
Drained"
+ if((issilicon(user) || IsAdminGhost(user) || drainable) && !linked_drain.active)
+ dat += "
[drained ? "Fill" : "Drain"] Pool"
+ popup.set_content(dat)
+ popup.open()
+
+/obj/machinery/pool/controller/proc/reset(wire)
+ switch(wire)
+ if(WIRE_SHOCK)
+ if(!wires.is_cut(wire))
+ shocked = FALSE
+
+/obj/machinery/pool/controller/proc/mist_on() //Spawn /obj/effect/mist (from the shower) on all linked pool tiles
+ if(mist_state)
+ return
+ mist_state = TRUE
+ for(var/X in linked_turfs)
+ var/turf/open/pool/W = X
+ if(W.filled)
+ var/M = new /obj/effect/mist(W)
+ linked_mist += M
+
+/obj/machinery/pool/controller/proc/mist_off() //Delete all /obj/effect/mist from all linked pool tiles.
+ for(var/M in linked_mist)
+ qdel(M)
+ mist_state = FALSE
diff --git a/code/modules/pool/pool_drain.dm b/code/modules/pool/pool_drain.dm
new file mode 100644
index 0000000000..940f7cd219
--- /dev/null
+++ b/code/modules/pool/pool_drain.dm
@@ -0,0 +1,160 @@
+/obj/machinery/pool/drain
+ name = "drain"
+ icon_state = "drain"
+ desc = "A suction system to remove the contents of the pool, and sometimes small objects. Do not insert fingers."
+ anchored = TRUE
+ /// Active/on?
+ var/active = FALSE
+ /// Filling or draining
+ var/filling = FALSE
+ /// Drain item suction range
+ var/item_suction_range = 2
+ /// Fill mode knock away range
+ var/fill_push_range = 6
+ /// Drain mode suction range
+ var/drain_suck_range = 6
+ /// Parent controller
+ var/obj/machinery/pool/controller/controller
+ /// Cycles left for fill/drain while active
+ var/cycles_left = 0
+ /// Mobs we are swirling around
+ var/list/whirling_mobs
+ /// Suck in once per x ticks
+ var/suck_in_once_per = 3
+
+ var/cooldown
+
+/obj/machinery/pool/drain/Initialize()
+ START_PROCESSING(SSfastprocess, src)
+ whirling_mobs = list()
+ return ..()
+
+/obj/machinery/pool/drain/Destroy()
+ STOP_PROCESSING(SSfastprocess, src)
+ controller.linked_drain = null
+ controller = null
+ whirling_mobs = null
+ return ..()
+
+/obj/machinery/pool/drain/proc/is_in_our_pool(atom/A)
+ . = FALSE
+ if(istype(A.loc, /turf/open/pool))
+ var/turf/open/pool/P = A.loc
+ if(P.controller == controller)
+ . = TRUE
+
+// This should probably start using move force sometime in the future but I'm lazy.
+/obj/machinery/pool/drain/process()
+ if(!filling)
+ for(var/obj/item/I in range(min(item_suction_range, 10), src))
+ if(!I.anchored && (I.w_class <= WEIGHT_CLASS_SMALL))
+ step_towards(I, src)
+ if((I.w_class <= WEIGHT_CLASS_TINY) && (get_dist(I, src) == 0))
+ I.forceMove(controller.linked_filter)
+ if(active)
+ if(filling)
+ if(cycles_left-- > 0)
+ playsound(src, 'sound/effects/fillingwatter.ogg', 100, TRUE)
+ for(var/obj/O in orange(min(fill_push_range, 10), src))
+ if(!O.anchored && is_in_our_pool(O))
+ step_away(O, src)
+ for(var/mob/M in orange(min(fill_push_range, 10), src)) //compiler fastpath apparently?
+ if(!M.anchored && isliving(M) && is_in_our_pool(M))
+ step_away(M, src)
+ else
+ for(var/turf/open/pool/P in controller.linked_turfs)
+ P.filled = TRUE
+ P.update_icon()
+ for(var/obj/effect/waterspout/S in range(1, src))
+ qdel(S)
+ controller.drained = FALSE
+ if(controller.bloody < 1000)
+ controller.bloody /= 2
+ else
+ controller.bloody /= 4
+ controller.update_color()
+ filling = FALSE
+ active = FALSE
+ else
+ if(cycles_left-- > 0)
+ playsound(src, 'sound/effects/pooldrain.ogg', 100, TRUE)
+ playsound(src, "water_wade", 60, TRUE)
+ for(var/obj/O in orange(min(drain_suck_range, 10), src))
+ if(!O.anchored && is_in_our_pool(O))
+ step_towards(O, src)
+ for(var/mob/M in orange(min(drain_suck_range, 10), src))
+ if(isliving(M) && !M.anchored && is_in_our_pool(M))
+ if(!(cycles_left % suck_in_once_per))
+ step_towards(M, src)
+ whirl_mob(M)
+ if(ishuman(M) && (get_dist(M, src) <= 1))
+ var/mob/living/carbon/human/H = M
+ playsound(src, pick('sound/misc/crack.ogg','sound/misc/crunch.ogg'), 50, TRUE)
+ if(H.lying) //down for any reason
+ H.adjustBruteLoss(2)
+ to_chat(H, "
You're caught in the drain!")
+ else
+ H.apply_damage(2.5, BRUTE, pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)) //drain should only target the legs
+ to_chat(H, "
Your legs are caught in the drain!")
+ else
+ for(var/turf/open/pool/P in controller.linked_turfs)
+ P.filled = FALSE
+ P.update_icon()
+ for(var/obj/effect/whirlpool/W in range(1, src))
+ qdel(W)
+ controller.drained = TRUE
+ controller.mist_off()
+ active = FALSE
+ filling = TRUE
+
+/// dangerous proc don't fuck with, admins
+/obj/machinery/pool/drain/proc/whirl_mob(mob/living/L, duration = 8, delay = 1)
+ set waitfor = FALSE
+ if(whirling_mobs[L])
+ return
+ whirling_mobs[L] = TRUE
+ for(var/i in 1 to min(duration, 100))
+ L.setDir(turn(L.dir, 90))
+ sleep(delay)
+ if(QDELETED(L))
+ break
+ if(QDELETED(src))
+ return
+ whirling_mobs -= L
+
+/obj/machinery/pool/filter
+ name = "Filter"
+ icon_state = "filter"
+ desc = "The part of the pool where all the IDs, ATV keys, and pens, and other dangerous things get trapped."
+ var/obj/machinery/pool/controller/controller
+
+/obj/machinery/pool/filter/Destroy()
+ controller.linked_filter = null
+ controller = null
+ return ..()
+
+/obj/machinery/pool/filter/emag_act(mob/living/user)
+ . = ..()
+ if(!(obj_flags & EMAGGED))
+ to_chat(user, "
You disable the [src]'s shark filter! Run!")
+ obj_flags |= EMAGGED
+ do_sparks(5, TRUE, src)
+ icon_state = "filter_b"
+ addtimer(CALLBACK(src, /obj/machinery/pool/filter/proc/spawn_shark), 50)
+ var/msg = "[key_name(user)] emagged the pool filter and spawned a shark"
+ log_game(msg)
+ message_admins(msg)
+
+/obj/machinery/pool/filter/proc/spawn_shark()
+ if(prob(50))
+ new /mob/living/simple_animal/hostile/shark(loc)
+ else
+ if(prob(50))
+ new /mob/living/simple_animal/hostile/shark/kawaii(loc)
+ else
+ new /mob/living/simple_animal/hostile/shark/laser(loc)
+
+/obj/machinery/pool/filter/attack_hand(mob/user)
+ to_chat(user, "You search the filter.")
+ for(var/obj/O in contents)
+ O.forceMove(loc)
diff --git a/code/modules/pool/pool_effects.dm b/code/modules/pool/pool_effects.dm
new file mode 100644
index 0000000000..8d5192cd30
--- /dev/null
+++ b/code/modules/pool/pool_effects.dm
@@ -0,0 +1,29 @@
+/obj/effect/splash
+ name = "splash"
+ desc = "Wataaa!."
+ icon = 'icons/turf/pool.dmi'
+ icon_state = "splash"
+ layer = ABOVE_ALL_MOB_LAYER
+
+/obj/effect/whirlpool
+ name = "Whirlpool"
+ icon = 'icons/effects/96x96.dmi'
+ icon_state = "whirlpool"
+ layer = 5
+ anchored = TRUE
+ mouse_opacity = 0
+ pixel_x = -32
+ pixel_y = -32
+ alpha = 90
+
+/obj/effect/waterspout
+ name = "Waterspout"
+ icon = 'icons/effects/96x96.dmi'
+ icon_state = "waterspout"
+ color = "#3399AA"
+ layer = 5
+ anchored = TRUE
+ mouse_opacity = 0
+ pixel_x = -32
+ pixel_y = -32
+ alpha = 120
diff --git a/code/modules/pool/pool_main.dm b/code/modules/pool/pool_main.dm
new file mode 100644
index 0000000000..2b260b5c0b
--- /dev/null
+++ b/code/modules/pool/pool_main.dm
@@ -0,0 +1,191 @@
+/turf/open/pool
+ icon = 'icons/turf/pool.dmi'
+ name = "poolwater"
+ desc = "You're safer here than in the deep."
+ icon_state = "pool_tile"
+ heat_capacity = INFINITY
+ var/filled = TRUE
+ var/next_splash = 0
+ var/obj/machinery/pool/controller/controller
+ var/obj/effect/overlay/water/watereffect
+ var/obj/effect/overlay/water/top/watertop
+
+/turf/open/pool/Initialize(mapload)
+ . = ..()
+ update_icon()
+
+/turf/open/pool/Destroy()
+ if(controller)
+ controller.linked_turfs -= src
+ controller = null
+ QDEL_NULL(watereffect)
+ QDEL_NULL(watertop)
+ return ..()
+
+/turf/open/pool/update_icon()
+ . = ..()
+ if(!filled)
+ name = "drained pool"
+ desc = "No diving!"
+ QDEL_NULL(watereffect)
+ QDEL_NULL(watertop)
+ else
+ name = "poolwater"
+ desc = "You're safer here than in the deep."
+ watereffect = new /obj/effect/overlay/water(src)
+ watertop = new /obj/effect/overlay/water/top(src)
+
+/obj/effect/overlay/water
+ name = "water"
+ icon = 'icons/turf/pool.dmi'
+ icon_state = "bottom"
+ density = FALSE
+ mouse_opacity = MOUSE_OPACITY_TRANSPARENT
+ layer = ABOVE_MOB_LAYER
+ anchored = TRUE
+ resistance_flags = INDESTRUCTIBLE
+
+/obj/effect/overlay/water/top
+ icon_state = "top"
+ layer = BELOW_MOB_LAYER
+
+// Mousedrop hook to normal turfs to get out of pools.
+/turf/open/MouseDrop_T(atom/from, mob/user)
+ // I could make this /open/floor and not have the !istype but ehh - kev
+ if(isliving(from) && HAS_TRAIT(from, TRAIT_SWIMMING) && isliving(user) && ((user == from) || user.CanReach(from)) && !user.IsStun() && !user.IsKnockdown() && !user.incapacitated() && !istype(src, /turf/open/pool))
+ var/mob/living/L = from
+ //The element only exists if you're on water and a living mob, so let's skip those checks.
+ var/pre_msg
+ var/post_msg
+ if(user == from)
+ pre_msg = "
[L] is getting out of the pool."
+ post_msg = "
[L] gets out of the pool."
+ else
+ pre_msg = "
[L] is being pulled out of the pool by [user]."
+ post_msg = "
[user] pulls [L] out of the pool."
+ L.visible_message(pre_msg)
+ if(do_mob(user, L, 20))
+ L.visible_message(post_msg)
+ L.forceMove(src)
+ else
+ return ..()
+
+// Exit check
+/turf/open/pool/Exit(atom/movable/AM, atom/newloc)
+ if(!AM.has_gravity(src))
+ return ..()
+ if(isliving(AM) || isstructure(AM))
+ if(AM.throwing)
+ return ..() //WHEEEEEEEEEEE
+ if(istype(AM, /obj/structure) && isliving(AM.pulledby))
+ return ..() //people pulling stuff out of pool
+ if(!ishuman(AM))
+ return ..() //human weak, monkey (and anyone else) ook ook eek eek strong
+ if(isliving(AM) && (locate(/obj/structure/pool/ladder) in src))
+ return ..() //climbing out
+ return istype(newloc, /turf/open/pool)
+ return ..()
+
+// Exited logic
+/turf/open/pool/Exited(atom/A, atom/newLoc)
+ . = ..()
+ if(isliving(A))
+ var/turf/open/pool/P = newLoc
+ if(!istype(P) || (P.controller != controller))
+ controller?.mobs_in_pool -= A
+
+// Entered logic
+/turf/open/pool/Entered(atom/movable/AM, atom/oldloc)
+ if(istype(AM, /obj/effect/decal/cleanable))
+ var/obj/effect/decal/cleanable/C = AM
+ if(prob(C.bloodiness))
+ controller.set_bloody(TRUE)
+ QDEL_IN(AM, 25)
+ animate(AM, alpha = 10, time = 20)
+ return ..()
+ if(!AM.has_gravity(src))
+ return ..()
+ if(isliving(AM))
+ var/mob/living/victim = AM
+ if(!HAS_TRAIT(victim, TRAIT_SWIMMING)) //poor guy not swimming time to dunk them!
+ victim.AddElement(/datum/element/swimming)
+ controller.mobs_in_pool += victim
+ if(locate(/obj/structure/pool/ladder) in src) //safe climbing
+ return
+ if(iscarbon(AM)) //FUN TIME!
+ var/mob/living/carbon/H = victim
+ if(filled)
+ if (H.wear_mask && H.wear_mask.flags_cover & MASKCOVERSMOUTH)
+ H.visible_message("
[H] falls in the water!",
+ "
You fall in the water!")
+ playsound(src, 'sound/effects/splash.ogg', 60, TRUE, 1)
+ H.Knockdown(20)
+ return
+ else
+ H.Knockdown(60)
+ H.adjustOxyLoss(5)
+ H.emote("cough")
+ H.visible_message("
[H] falls in and takes a drink!",
+ "
You fall in and swallow some water!")
+ playsound(src, 'sound/effects/splash.ogg', 60, TRUE, 1)
+ else if(!H.head || !(H.head.armor.getRating("melee") > 20))
+ if(prob(75))
+ H.visible_message("
[H] falls in the drained pool!",
+ "
You fall in the drained pool!")
+ H.adjustBruteLoss(7)
+ H.Knockdown(80)
+ playsound(src, 'sound/effects/woodhit.ogg', 60, TRUE, 1)
+ else
+ H.visible_message("
[H] falls in the drained pool, and cracks his skull!",
+ "
You fall in the drained pool, and crack your skull!")
+ H.apply_damage(15, BRUTE, "head")
+ H.Knockdown(200) // This should hurt. And it does.
+ playsound(src, 'sound/effects/woodhit.ogg', 60, TRUE, 1)
+ playsound(src, 'sound/misc/crack.ogg', 100, TRUE)
+ else
+ H.visible_message("
[H] falls in the drained pool, but had an helmet!",
+ "
You fall in the drained pool, but you had an helmet!")
+ H.Knockdown(40)
+ playsound(src, 'sound/effects/woodhit.ogg', 60, TRUE, 1)
+ else if(filled)
+ victim.adjustStaminaLoss(1)
+ playsound(src, "water_wade", 20, TRUE)
+ return ..()
+
+/turf/open/pool/MouseDrop_T(atom/from, mob/user)
+ . = ..()
+ if(!isliving(from))
+ return
+ var/mob/living/victim = from
+ if(user.stat || user.lying || !Adjacent(user) || !from.Adjacent(user) || !iscarbon(user) || !victim.has_gravity(src) || HAS_TRAIT(victim, TRAIT_SWIMMING))
+ return
+ var/victimname = victim == user? "themselves" : "[victim]"
+ var/starttext = victim == user? "[user] is descending into [src]." : "[user] is lowering [victim] into [src]."
+ user.visible_message("
[starttext]")
+ if(do_mob(user, victim, 20))
+ user.visible_message("
[user] lowers [victimname] into [src].")
+ victim.AddElement(/datum/element/swimming) //make sure they have it so they don't fall/whatever
+ victim.forceMove(src)
+
+/turf/open/pool/attackby(obj/item/W, mob/living/user)
+ if(istype(W, /obj/item/mop) && filled)
+ W.reagents.add_reagent("water", 5)
+ to_chat(user, "
You wet [W] in [src].")
+ playsound(loc, 'sound/effects/slosh.ogg', 25, TRUE)
+ else
+ return ..()
+
+/turf/open/pool/attack_hand(mob/living/user)
+ . = ..()
+ if(.)
+ return
+ if((user.loc != src) && !user.IsStun() && !user.IsKnockdown() && !user.incapacitated() && Adjacent(user) && HAS_TRAIT(user, TRAIT_SWIMMING) && filled && (next_splash < world.time))
+ playsound(src, 'sound/effects/watersplash.ogg', 8, TRUE, 1)
+ next_splash = world.time + 25
+ var/obj/effect/splash/S = new(src)
+ animate(S, alpha = 0, time = 8)
+ QDEL_IN(S, 10)
+ for(var/mob/living/carbon/human/H in src)
+ if(!H.wear_mask && (H.stat == CONSCIOUS))
+ H.emote("cough")
+ H.adjustStaminaLoss(4)
diff --git a/code/modules/pool/pool_noodles.dm b/code/modules/pool/pool_noodles.dm
new file mode 100644
index 0000000000..6118354792
--- /dev/null
+++ b/code/modules/pool/pool_noodles.dm
@@ -0,0 +1,32 @@
+//Pool noodles
+
+/obj/item/toy/poolnoodle
+ icon = 'icons/obj/toy.dmi'
+ icon_state = "noodle"
+ name = "pool noodle"
+ desc = "A strange, bulky, bendable toy that can annoy people."
+ force = 0
+ color = "#000000"
+ w_class = WEIGHT_CLASS_SMALL
+ throwforce = 1
+ throw_speed = 10 //weeee
+ hitsound = 'sound/weapons/tap.ogg'
+ attack_verb = list("flogged", "poked", "jabbed", "slapped", "annoyed")
+ lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
+ righthand_file = 'icons/mob/inhands/items_righthand.dmi'
+
+/obj/item/toy/poolnoodle/attack(target as mob, mob/living/user as mob)
+ . = ..()
+ user.spin(prob(20)? 16 : 8, 1)
+
+/obj/item/toy/poolnoodle/red
+ item_state = "noodlered"
+ color = "#ff4c4c"
+
+/obj/item/toy/poolnoodle/blue
+ item_state = "noodleblue"
+ color = "#3232ff"
+
+/obj/item/toy/poolnoodle/yellow
+ item_state = "noodleyellow"
+ color = "#ffff66"
diff --git a/code/modules/pool/pool_structures.dm b/code/modules/pool/pool_structures.dm
new file mode 100644
index 0000000000..92350abf44
--- /dev/null
+++ b/code/modules/pool/pool_structures.dm
@@ -0,0 +1,159 @@
+/obj/structure/pool
+ name = "pool"
+ icon = 'icons/obj/machines/pool.dmi'
+ anchored = TRUE
+ resistance_flags = UNACIDABLE|INDESTRUCTIBLE
+
+/obj/structure/pool/ladder
+ name = "Ladder"
+ icon_state = "ladder"
+ desc = "Are you getting in or are you getting out?."
+ layer = ABOVE_MOB_LAYER
+ dir = EAST
+
+/obj/structure/pool/ladder/attack_hand(mob/living/user)
+ . = ..()
+ if(.)
+ return
+ if(!HAS_TRAIT(user, TRAIT_SWIMMING))
+ if(user.CanReach(src))
+ user.AddElement(/datum/element/swimming)
+ user.forceMove(get_step(src, dir))
+ else
+ if(user.loc == loc)
+ user.forceMove(get_step(src, turn(dir, 180))) //If this moves them out the element cleans up after itself.
+
+/obj/structure/pool/Rboard
+ name = "JumpBoard"
+ density = FALSE
+ icon_state = "boardright"
+ desc = "The less-loved portion of the jumping board."
+ dir = EAST
+
+/obj/structure/pool/Lboard
+ name = "JumpBoard"
+ icon_state = "boardleft"
+ desc = "Get on there to jump!"
+ layer = FLY_LAYER
+ dir = WEST
+ var/jumping = FALSE
+ var/timer
+
+/obj/structure/pool/Lboard/proc/backswim()
+ if(jumping)
+ for(var/mob/living/jumpee in loc) //hackzors.
+ playsound(jumpee, 'sound/effects/splash.ogg', 60, TRUE, 1)
+ if(!HAS_TRAIT(jumpee, TRAIT_SWIMMING))
+ jumpee.AddElement(/datum/element/swimming)
+ jumpee.Stun(2)
+
+/obj/structure/pool/Lboard/proc/reset_position(mob/user, initial_layer, initial_px, initial_py)
+ user.layer = initial_layer
+ user.pixel_x = initial_px
+ user.pixel_y = initial_py
+
+/obj/structure/pool/Lboard/attack_hand(mob/living/user)
+ if(iscarbon(user))
+ var/mob/living/carbon/jumper = user
+ if(jumping)
+ to_chat(user, "
Someone else is already making a jump!")
+ return
+ var/turf/T = get_turf(src)
+ if(HAS_TRAIT(user, TRAIT_SWIMMING))
+ return
+ else
+ if(Adjacent(jumper))
+ jumper.visible_message("
[user] climbs up \the [src]!", \
+ "
You climb up \the [src] and prepares to jump!")
+ jumper.Stun(40)
+ jumping = TRUE
+ var/original_layer = jumper.layer
+ var/original_px = jumper.pixel_x
+ var/original_py = jumper.pixel_y
+ jumper.layer = RIPPLE_LAYER
+ jumper.pixel_x = 3
+ jumper.pixel_y = 7
+ jumper.dir = WEST
+ jumper.AddElement(/datum/element/swimming)
+ sleep(1)
+ jumper.forceMove(T)
+ addtimer(CALLBACK(src, .proc/dive, jumper, original_layer, original_px, original_py), 10)
+
+/obj/structure/pool/Lboard/proc/dive(mob/living/carbon/jumper, original_layer, original_px, original_py)
+ switch(rand(1, 100))
+ if(1 to 20)
+ jumper.visible_message("
[jumper] goes for a small dive!", \
+ "
You go for a small dive.")
+ sleep(15)
+ backswim()
+ var/atom/throw_target = get_edge_target_turf(src, dir)
+ jumper.throw_at(throw_target, 1, 1, callback = CALLBACK(src, .proc/on_finish_jump, jumper))
+
+ if(21 to 40)
+ jumper.visible_message("
[jumper] goes for a dive!", \
+ "
You're going for a dive!")
+ sleep(20)
+ backswim()
+ var/atom/throw_target = get_edge_target_turf(src, dir)
+ jumper.throw_at(throw_target, 2, 1, callback = CALLBACK(src, .proc/on_finish_jump, jumper))
+
+ if(41 to 60)
+ jumper.visible_message("
[jumper] goes for a long dive! Stay far away!", \
+ "
You're going for a long dive!!")
+ sleep(25)
+ backswim()
+ var/atom/throw_target = get_edge_target_turf(src, dir)
+ jumper.throw_at(throw_target, 3, 1, callback = CALLBACK(src, .proc/on_finish_jump, jumper))
+
+ if(61 to 80)
+ jumper.visible_message("
[jumper] goes for an awesome dive! Don't stand in [jumper.p_their()] way!", \
+ "
You feel like this dive will be awesome")
+ sleep(30)
+ backswim()
+ var/atom/throw_target = get_edge_target_turf(src, dir)
+ jumper.throw_at(throw_target, 4, 1, callback = CALLBACK(src, .proc/on_finish_jump, jumper))
+ if(81 to 91)
+ sleep(20)
+ backswim()
+ jumper.visible_message("
[jumper] misses [jumper.p_their()] step!", \
+ "
You misstep!")
+ var/atom/throw_target = get_edge_target_turf(src, dir)
+ jumper.throw_at(throw_target, 0, 1, callback = CALLBACK(src, .proc/on_finish_jump, jumper))
+ jumper.Knockdown(100)
+ jumper.adjustBruteLoss(10)
+
+ if(91 to 100)
+ jumper.visible_message("
[jumper] is preparing for the legendary dive! Can [jumper.p_they()] make it?", \
+ "
You start preparing for a legendary dive!")
+ jumper.SpinAnimation(7,1)
+
+ sleep(30)
+ if(prob(75))
+ backswim()
+ jumper.visible_message("
[jumper] fails!", \
+ "
You can't quite do it!")
+ var/atom/throw_target = get_edge_target_turf(src, dir)
+ jumper.throw_at(throw_target, 1, 1, callback = CALLBACK(src, .proc/on_finish_jump, jumper))
+ else
+ jumper.fire_stacks = min(1,jumper.fire_stacks + 1)
+ jumper.IgniteMob()
+ sleep(5)
+ backswim()
+ jumper.visible_message("
[jumper] bursts into flames of pure awesomness!", \
+ "
No one can stop you now!")
+ var/atom/throw_target = get_edge_target_turf(src, dir)
+ jumper.throw_at(throw_target, 6, 1, callback = CALLBACK(src, .proc/on_finish_jump, jumper))
+ addtimer(CALLBACK(src, .proc/togglejumping), 35)
+ reset_position(jumper, original_layer, original_px, original_py)
+
+/obj/structure/pool/Lboard/proc/togglejumping()
+ jumping = FALSE
+
+/obj/structure/pool/Lboard/proc/on_finish_jump(mob/living/victim)
+ if(istype(victim.loc, /turf/open/pool))
+ var/turf/open/pool/P = victim.loc
+ if(!P.filled) //you dun fucked up now
+ to_chat(victim, "
That was stupid of you..")
+ victim.visible_message("
[victim] smashes into the ground!")
+ victim.apply_damage(50)
+ victim.Knockdown(200)
diff --git a/code/modules/pool/pool_wires.dm b/code/modules/pool/pool_wires.dm
new file mode 100644
index 0000000000..7341c503a9
--- /dev/null
+++ b/code/modules/pool/pool_wires.dm
@@ -0,0 +1,59 @@
+#define POOL_WIRE_DRAIN "drain"
+#define POOL_WIRE_TEMP "temp"
+
+
+/datum/wires/poolcontroller
+ holder_type = /obj/machinery/pool/controller
+ proper_name = "Pool"
+
+/datum/wires/poolcontroller/New(atom/holder)
+ wires = list(
+ POOL_WIRE_DRAIN, WIRE_SHOCK, WIRE_ZAP, POOL_WIRE_TEMP
+ )
+ add_duds(3)
+ ..()
+
+/datum/wires/poolcontroller/interactable(mob/user)
+ var/obj/machinery/pool/controller/P = holder
+ if(P.panel_open)
+ return TRUE
+
+/datum/wires/poolcontroller/get_status()
+ var/obj/machinery/pool/controller/P = holder
+ var/list/status = list()
+ status += "The blue light is [P.drainable ? "on" : "off"]."
+ status += "The red light is [P.temperature_unlocked ? "on" : "off"]."
+ status += "The yellow light is [P.shocked ? "on" : "off"]."
+ return status
+
+/datum/wires/poolcontroller/on_pulse(wire)
+ var/obj/machinery/pool/controller/P = holder
+ switch(wire)
+ if(POOL_WIRE_DRAIN)
+ P.drainable = FALSE
+ if(POOL_WIRE_TEMP)
+ P.temperature_unlocked = FALSE
+ if(WIRE_SHOCK)
+ P.shocked = !P.shocked
+ addtimer(CALLBACK(P, /obj/machinery/autolathe.proc/reset, wire), 60)
+
+/datum/wires/poolcontroller/on_cut(wire, mend)
+ var/obj/machinery/pool/controller/P = holder
+ switch(wire)
+ if(POOL_WIRE_DRAIN)
+ if(mend)
+ P.drainable = FALSE
+ else
+ P.drainable = TRUE
+ if(POOL_WIRE_TEMP)
+ if(mend)
+ P.temperature_unlocked = FALSE
+ else
+ P.temperature_unlocked = TRUE
+ if(WIRE_ZAP)
+ P.shock(usr, 50)
+ if(WIRE_SHOCK)
+ if(mend)
+ P.stat &= ~NOPOWER
+ else
+ P.stat |= NOPOWER
\ No newline at end of file
diff --git a/code/modules/power/antimatter/shielding.dm b/code/modules/power/antimatter/shielding.dm
index 32950a2199..624c4c0316 100644
--- a/code/modules/power/antimatter/shielding.dm
+++ b/code/modules/power/antimatter/shielding.dm
@@ -243,7 +243,7 @@
throwforce = 5
throw_speed = 1
throw_range = 2
- materials = list(MAT_METAL=100)
+ custom_materials = list(/datum/material/iron=100)
/obj/item/am_shielding_container/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/multitool) && istype(src.loc, /turf))
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index 982afa49c8..43a1f94ca5 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -53,7 +53,7 @@
use_power = NO_POWER_USE
req_access = null
max_integrity = 300
- integrity_failure = 50
+ integrity_failure = 0.17
var/damage_deflection = 10
resistance_flags = FIRE_PROOF
armor = list("melee" = 40, "bullet" = 40, "laser" = 40, "energy" = 100, "bomb" = 30, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 50)
@@ -846,7 +846,7 @@
return
/obj/machinery/power/apc/oui_canview(mob/user)
- if(user.has_unlimited_silicon_privilege || area.hasSiliconAccessInArea(user))
+ if(area.hasSiliconAccessInArea(user)) //some APCs are mapped outside their assigned area, so this is required.
return TRUE
return ..()
@@ -864,7 +864,7 @@
if (H && !H.stealthmode && H.toggled)
abilitiesavail = TRUE
var/list/data = list(
- "locked" = locked && !(integration_cog && is_servant_of_ratvar(user)) && !area.hasSiliconAccessInArea(user),
+ "locked" = locked && !(integration_cog && is_servant_of_ratvar(user)) && !area.hasSiliconAccessInArea(user, PRIVILEDGES_SILICON|PRIVILEDGES_DRONE),
"lock_nightshift" = nightshift_requires_auth,
"failTime" = failure_timer,
"isOperating" = operating,
@@ -874,7 +874,7 @@
"chargingStatus" = charging,
"totalLoad" = DisplayPower(lastused_total),
"coverLocked" = coverlocked,
- "siliconUser" = user.has_unlimited_silicon_privilege || user.using_power_flow_console() || area.hasSiliconAccessInArea(user),
+ "siliconUser" = user.using_power_flow_console() || area.hasSiliconAccessInArea(user),
"malfStatus" = get_malf_status(user),
"emergencyLights" = !emergency_lights,
"nightshiftLights" = nightshift_lights,
@@ -951,7 +951,7 @@
return TRUE
if (user == hijacker || (area.hasSiliconAccessInArea(user) && !aidisabled))
return TRUE
- if(user.has_unlimited_silicon_privilege)
+ if(user.silicon_privileges & PRIVILEDGES_SILICON)
var/mob/living/silicon/ai/AI = user
var/mob/living/silicon/robot/robot = user
if (src.aidisabled || malfhack && istype(malfai) && ((istype(AI) && (malfai!=AI && malfai != AI.parent)) || (istype(robot) && (robot in malfai.connected_robots))))
@@ -985,7 +985,7 @@
if (action == "hijack" && can_use(usr, 1)) //don't need auth for hijack button
hijack(usr)
return
- var/authorized = (!locked || usr.has_unlimited_silicon_privilege || area.hasSiliconAccessInArea(usr) || (integration_cog && (is_servant_of_ratvar(usr))))
+ var/authorized = (!locked || area.hasSiliconAccessInArea(usr, PRIVILEDGES_SILICON|PRIVILEDGES_DRONE) || (integration_cog && (is_servant_of_ratvar(usr))))
if((action == "toggle_nightshift") && (!nightshift_requires_auth || authorized))
toggle_nightshift_lights()
return TRUE
@@ -993,7 +993,7 @@
return
switch(action)
if("lock")
- if(usr.has_unlimited_silicon_privilege || area.hasSiliconAccessInArea(usr))
+ if(area.hasSiliconAccessInArea(usr))
if((obj_flags & EMAGGED) || (stat & (BROKEN|MAINT)))
to_chat(usr, "The APC does not respond to the command.")
else
@@ -1027,7 +1027,7 @@
update()
return TRUE
if("overload")
- if(usr.has_unlimited_silicon_privilege || area.hasSiliconAccessInArea(usr))
+ if(area.hasSiliconAccessInArea(usr))
overload_lighting()
return TRUE
if("hack")
diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm
index 3c807390a0..b9d4d1adf1 100644
--- a/code/modules/power/cable.dm
+++ b/code/modules/power/cable.dm
@@ -488,7 +488,7 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
w_class = WEIGHT_CLASS_SMALL
throw_speed = 3
throw_range = 5
- materials = list(MAT_METAL=10, MAT_GLASS=5)
+ custom_materials = list(/datum/material/iron=10, /datum/material/glass=5)
flags_1 = CONDUCT_1
slot_flags = ITEM_SLOT_BELT
attack_verb = list("whipped", "lashed", "disciplined", "flogged")
@@ -499,7 +499,7 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
/obj/item/stack/cable_coil/cyborg
is_cyborg = 1
- materials = list()
+ custom_materials = null
cost = 1
/obj/item/stack/cable_coil/cyborg/attack_self(mob/user)
diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm
index 120303d4d7..a15580498c 100644
--- a/code/modules/power/cell.dm
+++ b/code/modules/power/cell.dm
@@ -13,8 +13,8 @@
w_class = WEIGHT_CLASS_SMALL
var/charge = 0 // note %age conveted to actual charge in New
var/maxcharge = 1000
+ custom_materials = list(/datum/material/iron=700, /datum/material/glass=50)
var/start_charged = TRUE
- materials = list(MAT_METAL=700, MAT_GLASS=50)
grind_results = list(/datum/reagent/lithium = 15, /datum/reagent/iron = 5, /datum/reagent/silicon = 5)
var/rigged = FALSE // true if rigged to explode
var/chargerate = 100 //how much power is given every tick in a recharger
@@ -172,7 +172,7 @@
name = "\improper Nanotrasen brand rechargeable AA battery"
desc = "You can't top the plasma top." //TOTALLY TRADEMARK INFRINGEMENT
maxcharge = 500
- materials = list(MAT_GLASS=40)
+ custom_materials = list(/datum/material/glass=40)
/obj/item/stock_parts/cell/crap/empty
start_charged = FALSE
@@ -181,7 +181,7 @@
name = "upgraded power cell"
desc = "A power cell with a slightly higher capacity than normal!"
maxcharge = 2500
- materials = list(MAT_GLASS=50)
+ custom_materials = list(/datum/material/glass=50)
chargerate = 1000
/obj/item/stock_parts/cell/upgraded/plus
@@ -192,7 +192,7 @@
/obj/item/stock_parts/cell/secborg
name = "security borg rechargeable D battery"
maxcharge = 1250 //25/12/6 disabler/laser/taser shots.
- materials = list(MAT_GLASS=40)
+ custom_materials = list(/datum/material/glass=40)
/obj/item/stock_parts/cell/secborg/empty
start_charged = FALSE
@@ -218,7 +218,7 @@
name = "high-capacity power cell"
icon_state = "hcell"
maxcharge = 10000
- materials = list(MAT_GLASS=60)
+ custom_materials = list(/datum/material/glass=60)
chargerate = 1500
/obj/item/stock_parts/cell/high/plus
@@ -235,7 +235,7 @@
name = "super-capacity power cell"
icon_state = "scell"
maxcharge = 20000
- materials = list(MAT_GLASS=300)
+ custom_materials = list(/datum/material/glass=300)
chargerate = 2000
/obj/item/stock_parts/cell/super/empty
@@ -245,7 +245,7 @@
name = "hyper-capacity power cell"
icon_state = "hpcell"
maxcharge = 30000
- materials = list(MAT_GLASS=400)
+ custom_materials = list(/datum/material/glass=400)
chargerate = 3000
/obj/item/stock_parts/cell/hyper/empty
@@ -256,7 +256,7 @@
desc = "A rechargeable transdimensional power cell."
icon_state = "bscell"
maxcharge = 40000
- materials = list(MAT_GLASS=600)
+ custom_materials = list(/datum/material/glass=600)
chargerate = 4000
/obj/item/stock_parts/cell/bluespace/empty
@@ -266,7 +266,7 @@
name = "infinite-capacity power cell!"
icon_state = "icell"
maxcharge = 30000
- materials = list(MAT_GLASS=1000)
+ custom_materials = list(/datum/material/glass=1000)
rating = 100
chargerate = 30000
@@ -292,7 +292,7 @@
icon_state = "potato"
charge = 100
maxcharge = 300
- materials = list()
+ custom_materials = null
grown_battery = TRUE //it has the overlays for wires
/obj/item/stock_parts/cell/high/slime
@@ -300,7 +300,7 @@
desc = "A yellow slime core infused with plasma, it crackles with power."
icon = 'icons/mob/slimes.dmi'
icon_state = "yellow slime extract"
- materials = list()
+ custom_materials = null
rating = 5 //self-recharge makes these desirable
self_recharge = 1 // Infused slime cores self-recharge, over time
@@ -339,7 +339,7 @@
name = "miniature power cell"
desc = "A tiny power cell with a very low power capacity. Used in light fixtures to power them in the event of an outage."
maxcharge = 120 //Emergency lights use 0.2 W per tick, meaning ~10 minutes of emergency power from a cell
- materials = list(MAT_GLASS = 20)
+ custom_materials = list(/datum/material/glass = 20)
w_class = WEIGHT_CLASS_TINY
/obj/item/stock_parts/cell/emergency_light/Initialize()
@@ -357,16 +357,10 @@
maxcharge = 12000
chargerate = 600
-/obj/item/stock_parts/cell/magnetic/empty
- start_charged = FALSE
-
/obj/item/stock_parts/cell/magnetic/pistol
name = "magpistol power supply"
maxcharge = 6000
-/obj/item/stock_parts/cell/magnetic/pistol/empty
- start_charged = FALSE
-
/obj/item/stock_parts/cell/toymagburst
name = "toy mag burst rifle power supply"
maxcharge = 4000
diff --git a/code/modules/power/floodlight.dm b/code/modules/power/floodlight.dm
index 8da3594d5e..9fb1a1ce7d 100644
--- a/code/modules/power/floodlight.dm
+++ b/code/modules/power/floodlight.dm
@@ -43,7 +43,7 @@
icon_state = "floodlight"
density = TRUE
max_integrity = 100
- integrity_failure = 80
+ integrity_failure = 0.8
idle_power_usage = 100
active_power_usage = 1000
var/list/light_setting_list = list(0, 5, 10, 15)
diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm
index 5ca09036ad..6cfcc5192a 100644
--- a/code/modules/power/lighting.dm
+++ b/code/modules/power/lighting.dm
@@ -23,7 +23,7 @@
name = "small light fixture frame"
icon_state = "bulb-construct-item"
result_path = /obj/structure/light_construct/small
- materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT)
+ custom_materials = list(/datum/material/iron=MINERAL_MATERIAL_AMOUNT)
/obj/item/wallframe/light_fixture/try_build(turf/on_wall, user)
if(!..())
@@ -726,7 +726,7 @@
var/status = LIGHT_OK // LIGHT_OK, LIGHT_BURNED or LIGHT_BROKEN
var/base_state
var/switchcount = 0 // number of times switched
- materials = list(MAT_GLASS=100)
+ custom_materials = list(/datum/material/glass=100)
grind_results = list(/datum/reagent/silicon = 5, /datum/reagent/nitrogen = 10) //Nitrogen is used as a cheaper alternative to argon in incandescent lighbulbs
var/rigged = 0 // true if rigged to explode
var/brightness = 2 //how much light it gives off
diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm
index 0375a00c39..be8d456f20 100644
--- a/code/modules/power/singularity/collector.dm
+++ b/code/modules/power/singularity/collector.dm
@@ -15,7 +15,7 @@
req_access = list(ACCESS_ENGINE_EQUIP)
// use_power = NO_POWER_USE
max_integrity = 350
- integrity_failure = 80
+ integrity_failure = 0.2
circuit = /obj/item/circuitboard/machine/rad_collector
var/obj/item/tank/internals/plasma/loaded_tank = null
var/stored_power = 0
diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm
index e6d44de194..92c86ba7b0 100644
--- a/code/modules/power/solar.dm
+++ b/code/modules/power/solar.dm
@@ -12,7 +12,7 @@
active_power_usage = 0
var/id = 0
max_integrity = 150
- integrity_failure = 50
+ integrity_failure = 0.33
var/obscured = 0
var/sunfrac = 0
var/adir = SOUTH // actual dir
@@ -24,7 +24,16 @@
/obj/machinery/power/solar/Initialize(mapload, obj/item/solar_assembly/S)
. = ..()
- Make(S)
+ if(!S)
+ assembly = new /obj/item/solar_assembly
+ assembly.glass_type = new /obj/item/stack/sheet/glass(null, 2)
+ assembly.anchored = TRUE
+ else
+ S.moveToNullspace()
+ assembly = S
+ assembly.glass_type.on_solar_construction(src)
+ obj_integrity = max_integrity
+ update_icon()
connect_to_network()
/obj/machinery/power/solar/Destroy()
@@ -45,17 +54,6 @@
control.connected_panels.Remove(src)
control = null
-/obj/machinery/power/solar/proc/Make(obj/item/solar_assembly/S)
- if(!S)
- S = new /obj/item/solar_assembly
- S.glass_type = new /obj/item/stack/sheet/glass(null, 2)
- S.anchored = TRUE
- else
- S.moveToNullspace()
- S.glass_type.on_solar_construction(src)
- obj_integrity = max_integrity
- update_icon()
-
/obj/machinery/power/solar/crowbar_act(mob/user, obj/item/I)
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
user.visible_message("[user] begins to take the glass off [src].", "
You begin to take the glass off [src]...")
@@ -201,7 +199,7 @@
new shard(Tsec)
new shard(Tsec)
else if(glass_type)
- forceMove(glass_type, Tsec)
+ glass_type.forceMove(Tsec)
glass_type = null
/obj/item/solar_assembly/attackby(obj/item/W, mob/user, params)
@@ -226,7 +224,8 @@
var/obj/item/stack/sheet/G = S.change_stack(null, 2)
if(G)
glass_type = G
- playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
+ G.moveToNullspace()
+ playsound(loc, 'sound/machines/click.ogg', 50, 1)
user.visible_message("[user] places the glass on the solar assembly.", "
You place the glass on the solar assembly.")
if(tracker)
new /obj/machinery/power/tracker(get_turf(src), src)
@@ -266,7 +265,7 @@
use_power = IDLE_POWER_USE
idle_power_usage = 250
max_integrity = 200
- integrity_failure = 100
+ integrity_failure = 0.5
var/icon_screen = "solar"
var/icon_keyboard = "power_key"
var/id = 0
diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm
index 0b0d968919..21003b5e86 100644
--- a/code/modules/power/supermatter/supermatter.dm
+++ b/code/modules/power/supermatter/supermatter.dm
@@ -346,6 +346,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
// Pass all the gas related code an empty gas container
removed = new()
+ damage = min(damage_archived + (DAMAGE_HARDCAP * explosion_point),damage) // hardcap any direct damage taken before doing atmos damage
damage_archived = damage
if(!removed || !removed.total_moles() || isspaceturf(T)) //we're in space or there is no gas to process
if(takes_damage)
diff --git a/code/modules/power/tracker.dm b/code/modules/power/tracker.dm
index c25ece3594..c3f284bf70 100644
--- a/code/modules/power/tracker.dm
+++ b/code/modules/power/tracker.dm
@@ -11,7 +11,7 @@
density = TRUE
use_power = NO_POWER_USE
max_integrity = 250
- integrity_failure = 50
+ integrity_failure = 0.2
var/id = 0
var/sun_angle = 0 // sun angle as set by sun datum
@@ -20,7 +20,15 @@
/obj/machinery/power/tracker/Initialize(mapload, obj/item/solar_assembly/S)
. = ..()
- Make(S)
+ if(!S)
+ assembly = new /obj/item/solar_assembly
+ assembly.glass_type = new /obj/item/stack/sheet/glass(null, 2)
+ assembly.tracker = TRUE
+ assembly.anchored = TRUE
+ else
+ S.moveToNullspace()
+ assembly = S
+ update_icon()
connect_to_network()
/obj/machinery/power/tracker/Destroy()
@@ -41,16 +49,6 @@
control.connected_tracker = null
control = null
-/obj/machinery/power/tracker/proc/Make(obj/item/solar_assembly/S)
- if(!S)
- S = new /obj/item/solar_assembly
- S.glass_type = new /obj/item/stack/sheet/glass(null, 2)
- S.tracker = TRUE
- S.anchored = TRUE
- else
- S.moveToNullspace()
- update_icon()
-
//updates the tracker icon and the facing angle for the control computer
/obj/machinery/power/tracker/proc/set_angle(angle)
sun_angle = angle
diff --git a/code/modules/projectiles/ammunition/_ammunition.dm b/code/modules/projectiles/ammunition/_ammunition.dm
index 1404529700..28b70bf276 100644
--- a/code/modules/projectiles/ammunition/_ammunition.dm
+++ b/code/modules/projectiles/ammunition/_ammunition.dm
@@ -7,7 +7,7 @@
slot_flags = ITEM_SLOT_BELT
throwforce = 0
w_class = WEIGHT_CLASS_TINY
- materials = list(MAT_METAL = 500)
+ custom_materials = list(/datum/material/iron = 500)
var/fire_sound = null //What sound should play when this ammo is fired
var/caliber = list() //Which kind of guns it can be loaded into
var/projectile_type = null //The bullet type to create when New() is called
diff --git a/code/modules/projectiles/ammunition/ballistic/shotgun.dm b/code/modules/projectiles/ammunition/ballistic/shotgun.dm
index 9aabd0e6b1..0599e52a73 100644
--- a/code/modules/projectiles/ammunition/ballistic/shotgun.dm
+++ b/code/modules/projectiles/ammunition/ballistic/shotgun.dm
@@ -6,14 +6,14 @@
icon_state = "blshell"
caliber = "shotgun"
projectile_type = /obj/item/projectile/bullet/shotgun_slug
- materials = list(MAT_METAL=4000)
+ custom_materials = list(/datum/material/iron=4000)
/obj/item/ammo_casing/shotgun/beanbag
name = "beanbag slug"
desc = "A weak beanbag slug for riot control."
icon_state = "bshell"
projectile_type = /obj/item/projectile/bullet/shotgun_beanbag
- materials = list(MAT_METAL=250)
+ custom_materials = list(/datum/material/iron=250)
/obj/item/ammo_casing/shotgun/incendiary
name = "incendiary slug"
@@ -34,7 +34,7 @@
desc = "A stunning taser slug."
icon_state = "stunshell"
projectile_type = /obj/item/projectile/bullet/shotgun_stunslug
- materials = list(MAT_METAL=250)
+ custom_materials = list(/datum/material/iron=250)
/obj/item/ammo_casing/shotgun/meteorslug
name = "meteorslug shell"
@@ -71,14 +71,14 @@
projectile_type = /obj/item/projectile/bullet/pellet/shotgun_rubbershot
pellets = 6
variance = 25
- materials = list(MAT_METAL=4000)
+ custom_materials = list(/datum/material/iron=4000)
/obj/item/ammo_casing/shotgun/improvised
name = "improvised shell"
desc = "An extremely weak shotgun shell with multiple small pellets made out of metal shards."
icon_state = "improvshell"
projectile_type = /obj/item/projectile/bullet/pellet/shotgun_improvised
- materials = list(MAT_METAL=250)
+ custom_materials = list(/datum/material/iron=250)
pellets = 10
variance = 25
diff --git a/code/modules/projectiles/ammunition/caseless/arrow.dm b/code/modules/projectiles/ammunition/caseless/arrow.dm
index e0ca637a8b..df4941aa6a 100644
--- a/code/modules/projectiles/ammunition/caseless/arrow.dm
+++ b/code/modules/projectiles/ammunition/caseless/arrow.dm
@@ -5,4 +5,22 @@
caliber = "arrow"
icon_state = "arrow"
throwforce = 3 //good luck hitting someone with the pointy end of the arrow
- throw_speed = 3
\ No newline at end of file
+ throw_speed = 3
+
+/obj/item/ammo_casing/caseless/arrow/ashen
+ name = "ashen arrow"
+ desc = "Fire harderned wooden arrow."
+ icon_state = "ashenarrow"
+ projectile_type = /obj/item/projectile/bullet/reusable/arrow/ashen
+
+/obj/item/ammo_casing/caseless/arrow/bone
+ name = "bone arrow"
+ desc = "Arrow made of bone and sinew. The tip is sharp enough to pierce into a goliath plate."
+ icon_state = "bonearrow"
+ projectile_type = /obj/item/projectile/bullet/reusable/arrow/bone
+
+/obj/item/ammo_casing/caseless/arrow/bronze
+ name = "bronze arrow"
+ desc = "Bronze tipped arrow."
+ icon_state = "bronzearrow"
+ projectile_type = /obj/item/projectile/bullet/reusable/arrow/bronze
diff --git a/code/modules/projectiles/ammunition/caseless/foam.dm b/code/modules/projectiles/ammunition/caseless/foam.dm
index dd29f075f1..311f76797c 100644
--- a/code/modules/projectiles/ammunition/caseless/foam.dm
+++ b/code/modules/projectiles/ammunition/caseless/foam.dm
@@ -5,7 +5,7 @@
caliber = "foam_force"
icon = 'icons/obj/guns/toy.dmi'
icon_state = "foamdart"
- materials = list(MAT_METAL = 11.25)
+ custom_materials = list(/datum/material/iron = 11.25)
harmful = FALSE
var/modified = FALSE
@@ -62,7 +62,7 @@
desc = "Whose smart idea was it to use toys as crowd control? Ages 18 and up."
projectile_type = /obj/item/projectile/bullet/reusable/foam_dart/riot
icon_state = "foamdart_riot"
- materials = list(MAT_METAL = 1125)
+ custom_materials = list(/datum/material/iron = 1125)
/obj/item/ammo_casing/caseless/foam_dart/mag
name = "magfoam dart"
diff --git a/code/modules/projectiles/boxes_magazines/_box_magazine.dm b/code/modules/projectiles/boxes_magazines/_box_magazine.dm
index 3cdb5ca06d..4f37cf3ba9 100644
--- a/code/modules/projectiles/boxes_magazines/_box_magazine.dm
+++ b/code/modules/projectiles/boxes_magazines/_box_magazine.dm
@@ -8,7 +8,7 @@
item_state = "syringe_kit"
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
- materials = list(MAT_METAL = 30000)
+ custom_materials = list(/datum/material/iron = 30000)
throwforce = 2
w_class = WEIGHT_CLASS_TINY
throw_speed = 3
@@ -26,8 +26,8 @@
/obj/item/ammo_box/Initialize()
. = ..()
if (!bullet_cost)
- for (var/material in materials)
- var/material_amount = materials[material]
+ for (var/material in custom_materials)
+ var/material_amount = custom_materials[material]
LAZYSET(base_cost, material, (material_amount * 0.10))
material_amount *= 0.90 // 10% for the container
@@ -121,7 +121,8 @@
for (var/material in bullet_cost)
var/material_amount = bullet_cost[material]
material_amount = (material_amount*stored_ammo.len) + base_cost[material]
- materials[material] = material_amount
+ custom_materials[material] = material_amount
+ set_custom_materials(custom_materials)//make sure we setup the correct properties again
//Behavior for magazines
/obj/item/ammo_box/magazine/proc/ammo_count()
diff --git a/code/modules/projectiles/boxes_magazines/ammo_boxes.dm b/code/modules/projectiles/boxes_magazines/ammo_boxes.dm
index 2842f13db5..fbbca99ec2 100644
--- a/code/modules/projectiles/boxes_magazines/ammo_boxes.dm
+++ b/code/modules/projectiles/boxes_magazines/ammo_boxes.dm
@@ -19,7 +19,7 @@
ammo_type = /obj/item/ammo_casing/c38
max_ammo = 6
multiple_sprites = 1
- materials = list(MAT_METAL = 20000)
+ custom_materials = list(/datum/material/iron = 20000)
/obj/item/ammo_box/c38/lethal
name = "speed loader (.38)"
@@ -85,7 +85,7 @@
icon_state = "foambox"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
max_ammo = 40
- materials = list(MAT_METAL = 500)
+ custom_materials = list(/datum/material/iron = 500)
/obj/item/ammo_box/foambox/mag
name = "ammo box (Magnetic Foam Darts)"
@@ -97,4 +97,4 @@
/obj/item/ammo_box/foambox/riot
icon_state = "foambox_riot"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot
- materials = list(MAT_METAL = 50000)
+ custom_materials = list(/datum/material/iron = 50000)
diff --git a/code/modules/projectiles/boxes_magazines/external/toy.dm b/code/modules/projectiles/boxes_magazines/external/toy.dm
index 04bcad284d..57da710ba4 100644
--- a/code/modules/projectiles/boxes_magazines/external/toy.dm
+++ b/code/modules/projectiles/boxes_magazines/external/toy.dm
@@ -64,4 +64,4 @@
max_ammo = 24
multiple_sprites = 2
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/mag
- materials = list(MAT_METAL = 200)
+ custom_materials = list(/datum/material/iron = 200)
diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm
index 34f7134591..1f9f211154 100644
--- a/code/modules/projectiles/gun.dm
+++ b/code/modules/projectiles/gun.dm
@@ -9,7 +9,7 @@
item_state = "gun"
flags_1 = CONDUCT_1
slot_flags = ITEM_SLOT_BELT
- materials = list(MAT_METAL=2000)
+ custom_materials = list(/datum/material/iron=2000)
w_class = WEIGHT_CLASS_NORMAL
throwforce = 5
throw_speed = 3
diff --git a/code/modules/projectiles/guns/ballistic/bow.dm b/code/modules/projectiles/guns/ballistic/bow.dm
index 448e2915d9..0fc181f71c 100644
--- a/code/modules/projectiles/guns/ballistic/bow.dm
+++ b/code/modules/projectiles/guns/ballistic/bow.dm
@@ -22,11 +22,9 @@
/obj/item/gun/ballistic/bow/chamber_round()
chambered = magazine.get_round(1)
-/obj/item/gun/ballistic/bow/afterattack()
- . = ..()
- if (chambered)
- chambered = null
- magazine.get_round(0)
+/obj/item/gun/ballistic/bow/process_chamber()
+ chambered = null
+ magazine.get_round(0)
update_icon()
/obj/item/gun/ballistic/bow/attack_self(mob/living/user)
@@ -47,7 +45,22 @@
update_icon()
/obj/item/gun/ballistic/bow/update_icon()
- icon_state = "bow_[get_ammo() ? (chambered ? "firing" : "loaded") : "unloaded"]"
+ icon_state = "[initial(icon_state)]_[get_ammo() ? (chambered ? "firing" : "loaded") : "unloaded"]"
/obj/item/gun/ballistic/bow/can_shoot()
- return chambered
\ No newline at end of file
+ return chambered
+
+/obj/item/gun/ballistic/bow/ashen
+ name = "bone bow"
+ desc = "Some sort of primitive projectile weapon made of bone and sinew. Used to fire arrows."
+ icon_state = "ashenbow"
+ item_state = "ashenbow"
+ force = 8
+
+/obj/item/gun/ballistic/bow/pipe
+ name = "pipe bow"
+ desc = "Some sort of pipe made projectile weapon made of a silk string and lots of bending. Used to fire arrows."
+ icon_state = "pipebow"
+ item_state = "pipebow"
+ inaccuracy_modifier = 1.1 //Made of pipe and in a rush
+ force = 0
\ No newline at end of file
diff --git a/code/modules/projectiles/guns/ballistic/laser_gatling.dm b/code/modules/projectiles/guns/ballistic/laser_gatling.dm
index 49ced8ff39..82f6fa700b 100644
--- a/code/modules/projectiles/guns/ballistic/laser_gatling.dm
+++ b/code/modules/projectiles/guns/ballistic/laser_gatling.dm
@@ -102,7 +102,7 @@
slowdown = 1
slot_flags = null
w_class = WEIGHT_CLASS_HUGE
- materials = list()
+ custom_materials = null
burst_size = 3
automatic = 0
fire_delay = 1
diff --git a/code/modules/projectiles/guns/ballistic/magweapon.dm b/code/modules/projectiles/guns/ballistic/magweapon.dm
index f366063a74..4e37017b79 100644
--- a/code/modules/projectiles/guns/ballistic/magweapon.dm
+++ b/code/modules/projectiles/guns/ballistic/magweapon.dm
@@ -61,7 +61,6 @@
/obj/item/gun/ballistic/automatic/magrifle/nopin
pin = null
spawnwithmagazine = FALSE
- cell_type = /obj/item/stock_parts/cell/magnetic/empty
/obj/item/gun/ballistic/automatic/magrifle/hyperburst
name = "\improper Hyper-Burst Rifle"
@@ -100,4 +99,3 @@
/obj/item/gun/ballistic/automatic/magrifle/pistol/nopin
pin = null
spawnwithmagazine = FALSE
- cell_type = /obj/item/stock_parts/cell/magnetic/pistol/empty
diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm
index be43bc48fd..401678512b 100644
--- a/code/modules/projectiles/guns/energy.dm
+++ b/code/modules/projectiles/guns/energy.dm
@@ -67,7 +67,8 @@
/obj/item/gun/energy/Destroy()
if(flags_1 & INITIALIZED_1)
QDEL_NULL(cell)
- QDEL_LIST(ammo_type)
+ if(!(flags_1 & HOLOGRAM_1)) //holodeck stuff.
+ QDEL_LIST(ammo_type)
STOP_PROCESSING(SSobj, src)
return ..()
diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm
index f45b5a29ba..2fe9b326eb 100644
--- a/code/modules/projectiles/guns/energy/laser.dm
+++ b/code/modules/projectiles/guns/energy/laser.dm
@@ -4,13 +4,14 @@
icon_state = "laser"
item_state = "laser"
w_class = WEIGHT_CLASS_NORMAL
- materials = list(MAT_METAL=2000)
+ custom_materials = list(/datum/material/iron=2000)
ammo_type = list(/obj/item/ammo_casing/energy/lasergun)
ammo_x_offset = 1
shaded_charge = 1
/obj/item/gun/energy/laser/practice
name = "practice laser gun"
+ icon_state = "laser-p"
desc = "A modified version of the basic laser gun, this one fires less concentrated energy bolts designed for target practice."
ammo_type = list(/obj/item/ammo_casing/energy/laser/practice)
clumsy_check = 0
diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm
index 9c6ec446bb..42de0dcae8 100644
--- a/code/modules/projectiles/guns/energy/special.dm
+++ b/code/modules/projectiles/guns/energy/special.dm
@@ -85,7 +85,7 @@
icon_state = "crossbow"
item_state = "crossbow"
w_class = WEIGHT_CLASS_SMALL
- materials = list(MAT_METAL=2000)
+ custom_materials = list(/datum/material/iron=2000)
suppressed = TRUE
ammo_type = list(/obj/item/ammo_casing/energy/bolt)
weapon_weight = WEAPON_LIGHT
@@ -108,7 +108,7 @@
desc = "A reverse engineered weapon using syndicate technology. This thing seems incredibly unwieldly, and seems to be using similar internals to the Proto-Kinetic Accelerator. It might not play nice when brought near weapons similar to it."
icon_state = "crossbowlarge"
w_class = WEIGHT_CLASS_BULKY
- materials = list(MAT_METAL=4000)
+ custom_materials = list(/datum/material/iron=4000)
suppressed = null
ammo_type = list(/obj/item/ammo_casing/energy/bolt/large)
weapon_weight = WEAPON_HEAVY
diff --git a/code/modules/projectiles/guns/misc/beam_rifle.dm b/code/modules/projectiles/guns/misc/beam_rifle.dm
index ec5eee7b6b..098395e0d4 100644
--- a/code/modules/projectiles/guns/misc/beam_rifle.dm
+++ b/code/modules/projectiles/guns/misc/beam_rifle.dm
@@ -19,7 +19,7 @@
fire_sound = 'sound/weapons/beam_sniper.ogg'
slot_flags = ITEM_SLOT_BACK
force = 15
- materials = list()
+ custom_materials = null
recoil = 4
ammo_x_offset = 3
ammo_y_offset = 3
diff --git a/code/modules/projectiles/guns/misc/chem_gun.dm b/code/modules/projectiles/guns/misc/chem_gun.dm
index 9f8e92a8f8..3d400f0e16 100644
--- a/code/modules/projectiles/guns/misc/chem_gun.dm
+++ b/code/modules/projectiles/guns/misc/chem_gun.dm
@@ -9,7 +9,7 @@
throw_speed = 3
throw_range = 7
force = 4
- materials = list(MAT_METAL=2000)
+ custom_materials = list(/datum/material/iron=2000)
clumsy_check = FALSE
fire_sound = 'sound/items/syringeproj.ogg'
var/time_per_syringe = 250
diff --git a/code/modules/projectiles/guns/misc/grenade_launcher.dm b/code/modules/projectiles/guns/misc/grenade_launcher.dm
index 5a8c5a066e..6113bc4857 100644
--- a/code/modules/projectiles/guns/misc/grenade_launcher.dm
+++ b/code/modules/projectiles/guns/misc/grenade_launcher.dm
@@ -10,7 +10,7 @@
force = 5
var/list/grenades = new/list()
var/max_grenades = 3
- materials = list(MAT_METAL=2000)
+ custom_materials = list(/datum/material/iron=2000)
/obj/item/gun/grenadelauncher/examine(mob/user)
. = ..()
diff --git a/code/modules/projectiles/guns/misc/syringe_gun.dm b/code/modules/projectiles/guns/misc/syringe_gun.dm
index 3a39d53d82..b3838751eb 100644
--- a/code/modules/projectiles/guns/misc/syringe_gun.dm
+++ b/code/modules/projectiles/guns/misc/syringe_gun.dm
@@ -7,7 +7,7 @@
throw_speed = 3
throw_range = 7
force = 4
- materials = list(MAT_METAL=2000)
+ custom_materials = list(/datum/material/iron=2000)
clumsy_check = 0
fire_sound = 'sound/items/syringeproj.ogg'
var/list/syringes = list()
@@ -108,7 +108,7 @@
desc = "A compressed air gun, designed to fit medicinal darts for application of medicine for those patients just out of reach."
icon_state = "dartgun"
item_state = "dartgun"
- materials = list(MAT_METAL=2000, MAT_GLASS=500)
+ custom_materials = list(/datum/material/iron=2000, /datum/material/glass=500)
suppressed = TRUE //Softer fire sound
can_unsuppress = FALSE
diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm
index 4521e4ea13..139f5a051c 100644
--- a/code/modules/projectiles/projectile.dm
+++ b/code/modules/projectiles/projectile.dm
@@ -52,7 +52,6 @@
var/hitscan = FALSE //Whether this is hitscan. If it is, speed is basically ignored.
var/list/beam_segments //assoc list of datum/point or datum/point/vector, start = end. Used for hitscan effect generation.
var/datum/point/beam_index
- var/turf/hitscan_last //last turf touched during hitscanning.
var/tracer_type
var/muzzle_type
var/impact_type
@@ -492,8 +491,6 @@
process_homing()
var/forcemoved = FALSE
for(var/i in 1 to SSprojectiles.global_iterations_per_move)
- if(QDELETED(src))
- return
trajectory.increment(trajectory_multiplier)
var/turf/T = trajectory.return_turf()
if(!istype(T))
@@ -506,14 +503,16 @@
forceMove(T)
trajectory_ignore_forcemove = FALSE
after_z_change(old, loc)
+ forcemoved = TRUE
+ if(QDELETED(src))
+ return
if(!hitscanning)
pixel_x = trajectory.return_px()
pixel_y = trajectory.return_py()
- forcemoved = TRUE
- hitscan_last = loc
else if(T != loc)
step_towards(src, T)
- hitscan_last = loc
+ if(QDELETED(src))
+ return
if(!hitscanning && !forcemoved)
pixel_x = trajectory.return_px() - trajectory.mpx * trajectory_multiplier * SSprojectiles.global_iterations_per_move
pixel_y = trajectory.return_py() - trajectory.mpy * trajectory_multiplier * SSprojectiles.global_iterations_per_move
diff --git a/code/modules/projectiles/projectile/energy/tesla.dm b/code/modules/projectiles/projectile/energy/tesla.dm
index 43c31816cd..2439cee429 100644
--- a/code/modules/projectiles/projectile/energy/tesla.dm
+++ b/code/modules/projectiles/projectile/energy/tesla.dm
@@ -7,10 +7,11 @@
var/zap_range = 3
var/power = 10000
-/obj/item/projectile/energy/tesla/fire(setAngle)
- if(firer)
- chain = firer.Beam(src, icon_state = "lightning[rand(1, 12)]", time = INFINITY, maxdistance = INFINITY)
- ..()
+/obj/item/projectile/energy/tesla/fire(setAngle, atom/direct_target)
+ var/atom/source = fired_from || firer
+ if(source)
+ chain = source.Beam(src, icon_state = "lightning[rand(1, 12)]", time = INFINITY, maxdistance = INFINITY)
+ return ..()
/obj/item/projectile/energy/tesla/on_hit(atom/target)
. = ..()
diff --git a/code/modules/projectiles/projectile/reusable/arrow.dm b/code/modules/projectiles/projectile/reusable/arrow.dm
index f1c9638fd9..d00de79eb1 100644
--- a/code/modules/projectiles/projectile/reusable/arrow.dm
+++ b/code/modules/projectiles/projectile/reusable/arrow.dm
@@ -3,4 +3,23 @@
desc = "Woosh!"
damage = 15
icon_state = "arrow"
- ammo_type = /obj/item/ammo_casing/caseless/arrow
\ No newline at end of file
+ ammo_type = /obj/item/ammo_casing/caseless/arrow
+
+/obj/item/projectile/bullet/reusable/arrow/ashen
+ name = "ashen arrow"
+ desc = "Fire harderned arrow."
+ damage = 25
+ ammo_type = /obj/item/ammo_casing/caseless/arrow/ashen
+
+/obj/item/projectile/bullet/reusable/arrow/bone //AP for ashwalkers
+ name = "bone arrow"
+ desc = "Arrow made of bone and sinew."
+ damage = 35
+ armour_penetration = 40
+ ammo_type = /obj/item/ammo_casing/caseless/arrow/bone
+
+/obj/item/projectile/bullet/reusable/arrow/bronze //Just some AP shots
+ name = "bronze arrow"
+ desc = "Bronze tipped arrow."
+ armour_penetration = 10
+ ammo_type = /obj/item/ammo_casing/caseless/arrow/bronze
diff --git a/code/modules/projectiles/projectile/special/rocket.dm b/code/modules/projectiles/projectile/special/rocket.dm
index 0cee20dd53..df417ad734 100644
--- a/code/modules/projectiles/projectile/special/rocket.dm
+++ b/code/modules/projectiles/projectile/special/rocket.dm
@@ -43,4 +43,34 @@
explosion(target, 0, 1, 2, 4)
else
explosion(target, 0, 0, 2, 4)
- return BULLET_ACT_HIT
\ No newline at end of file
+ return BULLET_ACT_HIT
+
+/obj/item/projectile/bullet/a84mm_br
+ name ="\improper HE missile"
+ desc = "Boom."
+ icon_state = "missile"
+ damage = 30
+ ricochets_max = 0 //it's a MISSILE
+ var/sturdy = list(
+ /turf/closed,
+ /obj/mecha,
+ /obj/machinery/door/,
+ /obj/machinery/door/poddoor/shutters
+ )
+
+/obj/item/broken_missile
+ name = "\improper broken missile"
+ desc = "A missile that did not detonate. The tail has snapped and it is in no way fit to be used again."
+ icon = 'icons/obj/projectiles.dmi'
+ icon_state = "missile_broken"
+ w_class = WEIGHT_CLASS_TINY
+
+
+/obj/item/projectile/bullet/a84mm_br/on_hit(atom/target, blocked=0)
+ ..()
+ for(var/i in sturdy)
+ if(istype(target, i))
+ explosion(target, 0, 1, 1, 2)
+ return BULLET_ACT_HIT
+ //if(istype(target, /turf/closed) || ismecha(target))
+ new /obj/item/broken_missile(get_turf(src), 1)
\ No newline at end of file
diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm
index 4c240660a9..8635626209 100644
--- a/code/modules/reagents/chemistry/holder.dm
+++ b/code/modules/reagents/chemistry/holder.dm
@@ -77,6 +77,8 @@
/datum/reagents/Destroy()
. = ..()
+ //We're about to delete all reagents, so lets cleanup
+ addiction_list.Cut()
var/list/cached_reagents = reagent_list
for(var/reagent in cached_reagents)
var/datum/reagent/R = reagent
@@ -332,9 +334,7 @@
if(R.addiction_stage3_end to R.addiction_stage4_end)
need_mob_update += R.addiction_act_stage4(C)
if(R.addiction_stage4_end to INFINITY)
- to_chat(C, "
You feel like you've gotten over your need for [R.name].")
- SEND_SIGNAL(C, COMSIG_CLEAR_MOOD_EVENT, "[R.type]_addiction")
- cached_addictions.Remove(R)
+ remove_addiction(R)
else
SEND_SIGNAL(C, COMSIG_CLEAR_MOOD_EVENT, "[R.type]_overdose")
addiction_tick++
@@ -344,6 +344,12 @@
C.update_stamina()
update_total()
+/datum/reagents/proc/remove_addiction(datum/reagent/R)
+ to_chat(my_atom, "
You feel like you've gotten over your need for [R.name].")
+ SEND_SIGNAL(my_atom, COMSIG_CLEAR_MOOD_EVENT, "[R.type]_overdose")
+ addiction_list.Remove(R)
+ qdel(R)
+
//Signals that metabolization has stopped, triggering the end of trait-based effects
/datum/reagents/proc/end_metabolization(mob/living/carbon/C, keep_liverless = TRUE)
var/list/cached_reagents = reagent_list
@@ -762,6 +768,8 @@
R.metabolizing = FALSE
R.on_mob_end_metabolize(M)
R.on_mob_delete(M)
+ //Clear from relevant lists
+ addiction_list -= R
qdel(R)
reagent_list -= R
update_total()
diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm
index ed68c25cb6..be15bb70cf 100644
--- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm
+++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm
@@ -408,7 +408,7 @@
if(beaker)
var/obj/item/reagent_containers/B = beaker
B.forceMove(drop_location())
- if(user && Adjacent(user) && !issiliconoradminghost(user))
+ if(user && Adjacent(user) && user.can_hold_items())
user.put_in_hands(B)
if(new_beaker)
beaker = new_beaker
diff --git a/code/modules/reagents/chemistry/machinery/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm
index 189d09b06f..4c4d0fdb6e 100644
--- a/code/modules/reagents/chemistry/machinery/chem_heater.dm
+++ b/code/modules/reagents/chemistry/machinery/chem_heater.dm
@@ -38,7 +38,7 @@
/obj/machinery/chem_heater/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker)
if(beaker)
beaker.forceMove(drop_location())
- if(user && Adjacent(user) && !issiliconoradminghost(user))
+ if(user && Adjacent(user) && user.can_hold_items())
user.put_in_hands(beaker)
if(new_beaker)
beaker = new_beaker
diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm
index 66c663e2e4..abfd00ed90 100644
--- a/code/modules/reagents/chemistry/machinery/chem_master.dm
+++ b/code/modules/reagents/chemistry/machinery/chem_master.dm
@@ -129,7 +129,7 @@
if(beaker)
var/obj/item/reagent_containers/B = beaker
B.forceMove(drop_location())
- if(user && Adjacent(user) && !issiliconoradminghost(user))
+ if(user && Adjacent(user) && user.can_hold_items())
user.put_in_hands(B)
if(new_beaker)
beaker = new_beaker
@@ -139,7 +139,7 @@
if(bottle)
var/obj/item/storage/pill_bottle/B = bottle
B.forceMove(drop_location())
- if(user && Adjacent(user) && !issiliconoradminghost(user))
+ if(user && Adjacent(user) && user.can_hold_items())
user.put_in_hands(B)
else
adjust_item_drop_location(B)
diff --git a/code/modules/reagents/chemistry/machinery/pandemic.dm b/code/modules/reagents/chemistry/machinery/pandemic.dm
index 3dea44cf40..7b25aa769d 100644
--- a/code/modules/reagents/chemistry/machinery/pandemic.dm
+++ b/code/modules/reagents/chemistry/machinery/pandemic.dm
@@ -192,7 +192,7 @@
update_icon()
var/turf/source_turf = get_turf(src)
log_virus("A culture bottle was printed for the virus [A.admin_details()] at [loc_name(source_turf)] by [key_name(usr)]")
-
+
. = TRUE
if("create_vaccine_bottle")
wait = TRUE
@@ -202,9 +202,9 @@
var/obj/item/reagent_containers/glass/bottle/B = new(drop_location())
B.name = "[D.name] vaccine bottle"
B.reagents.add_reagent(/datum/reagent/vaccine, 15, list(id))
-
+
update_icon()
-
+
. = TRUE
/obj/machinery/computer/pandemic/attackby(obj/item/I, mob/user, params)
@@ -229,7 +229,7 @@
/obj/machinery/computer/pandemic/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker)
if(beaker)
- if(user && Adjacent(user) && !issiliconoradminghost(user))
+ if(user && Adjacent(user) && user.can_hold_items())
if(!user.put_in_hands(beaker))
beaker.forceMove(drop_location())
if(new_beaker)
diff --git a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm
index b17c2dfb37..85cdc33e72 100644
--- a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm
+++ b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm
@@ -75,7 +75,7 @@
/obj/machinery/reagentgrinder/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker)
if(beaker)
beaker.forceMove(drop_location())
- if(user && Adjacent(user) && !issiliconoradminghost(user))
+ if(user && Adjacent(user) && user.can_hold_items())
user.put_in_hands(beaker)
if(new_beaker)
beaker = new_beaker
diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
index 6d37f30884..0a040a4f17 100644
--- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
@@ -1482,14 +1482,14 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
/datum/reagent/medicine/polypyr //This is intended to be an ingredient in advanced chems.
name = "Polypyrylium Oligomers"
- description = "A�purple mixture of short polyelectrolyte chains not easily synthesized in the laboratory. It is valued as an intermediate in the synthesis of the cutting edge pharmaceuticals."
+ description = "A purple mixture of short polyelectrolyte chains not easily synthesized in the laboratory. It is valued as an intermediate in the synthesis of the cutting edge pharmaceuticals."
reagent_state = SOLID
color = "#9423FF"
metabolization_rate = 0.25 * REAGENTS_METABOLISM
overdose_threshold = 50
taste_description = "numbing bitterness"
-/datum/reagent/medicine/polypyr/on_mob_life(mob/living/carbon/M) //I w�nted a collection of small positive effects, this is as hard to obtain as coniine after all.
+/datum/reagent/medicine/polypyr/on_mob_life(mob/living/carbon/M) //I wanted a collection of small positive effects, this is as hard to obtain as coniine after all.
M.adjustOrganLoss(ORGAN_SLOT_LUNGS, -0.25)
M.adjustBruteLoss(-0.35, 0)
if(prob(50))
@@ -1511,4 +1511,3 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
M.adjustOrganLoss(ORGAN_SLOT_LUNGS, 0.5)
..()
. = 1
-
diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm
index 6d33701a34..adc30ecdc9 100644
--- a/code/modules/reagents/chemistry/reagents/other_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm
@@ -93,8 +93,6 @@
taste_description = "something spicy"
pH = 6.85
-
-
/datum/reagent/blood/on_merge(list/mix_data)
if(data && mix_data)
if(data["blood_DNA"] != mix_data["blood_DNA"])
@@ -131,16 +129,10 @@
/datum/reagent/blood/synthetics
data = list("donor"=null,"viruses"=null,"blood_DNA"="REPLICATED", "bloodcolor" = BLOOD_COLOR_SYNTHETIC, "blood_type"="SY","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null)
name = "Synthetic Blood"
+ description = "A synthetically produced imitation of blood."
taste_description = "oily"
color = BLOOD_COLOR_SYNTHETIC // rgb: 11, 7, 48
-/datum/reagent/blood/lizard
- data = list("donor"=null,"viruses"=null,"blood_DNA"=null, "bloodcolor" = BLOOD_COLOR_LIZARD, "blood_type"="L","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null)
- name = "Lizard Blood"
- taste_description = "spicy"
- color = BLOOD_COLOR_LIZARD // rgb: 11, 7, 48
- pH = 6.85
-
/datum/reagent/blood/jellyblood
data = list("donor"=null,"viruses"=null,"blood_DNA"=null, "bloodcolor" = BLOOD_COLOR_SLIME, "blood_type"="GEL","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null)
name = "Slime Jelly Blood"
@@ -150,29 +142,6 @@
taste_mult = 1.3
pH = 4
-/datum/reagent/blood/xenomorph
- data = list("donor"=null,"viruses"=null,"blood_DNA"=null, "bloodcolor" = BLOOD_COLOR_XENO, "blood_type"="X*","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null)
- name = "Xenomorph Blood"
- taste_description = "acidic heresy"
- color = BLOOD_COLOR_XENO // greenish yellow ooze
- shot_glass_icon_state = "shotglassgreen"
- pH = 2.5
-
-/datum/reagent/blood/oil
- data = list("donor"=null,"viruses"=null,"blood_DNA"=null, "bloodcolor" = BLOOD_COLOR_OIL, "blood_type"="HF","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null)
- name = "Hydraulic Blood"
- taste_description = "burnt oil"
- color = BLOOD_COLOR_OIL // dark, y'know, expected batman colors.
- pH = 9.75
-
-/datum/reagent/blood/insect
- data = list("donor"=null,"viruses"=null,"blood_DNA"=null, "bloodcolor" = BLOOD_COLOR_BUG, "blood_type"="BUG","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null)
- name = "Insectoid Blood"
- taste_description = "waxy"
- color = BLOOD_COLOR_BUG // Bug colored, I guess.
- pH = 7.25
-
-
/datum/reagent/blood/jellyblood/on_mob_life(mob/living/carbon/M)
if(prob(10))
if(M.dna?.species?.exotic_bloodtype != "GEL")
@@ -2139,3 +2108,10 @@
to_chat(M, "
You feel like playing with your [G.name]!")
..()
+
+/datum/reagent/preservahyde
+ name = "Preservahyde"
+ description = "A powerful preservation agent, utilizing the preservative effects of formaldehyde with significantly less of the histamine."
+ reagent_state = LIQUID
+ color = "#f7685e"
+ metabolization_rate = REAGENTS_METABOLISM * 0.25
diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
index e649caafb5..946cb1307c 100644
--- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
@@ -504,7 +504,7 @@
toxpwr = 0
/datum/reagent/toxin/itching_powder/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
- if(method == TOUCH || method == VAPOR)
+ if((method == TOUCH || method == VAPOR) && M.reagents)
M.reagents.add_reagent(/datum/reagent/toxin/itching_powder, reac_volume)
/datum/reagent/toxin/itching_powder/on_mob_life(mob/living/carbon/M)
diff --git a/code/modules/reagents/chemistry/recipes/medicine.dm b/code/modules/reagents/chemistry/recipes/medicine.dm
index a07e7697bc..0b32952d20 100644
--- a/code/modules/reagents/chemistry/recipes/medicine.dm
+++ b/code/modules/reagents/chemistry/recipes/medicine.dm
@@ -68,6 +68,10 @@
results = list(/datum/reagent/medicine/synthflesh = 3)
required_reagents = list(/datum/reagent/blood = 1, /datum/reagent/carbon = 1, /datum/reagent/medicine/styptic_powder = 1)
+/datum/chemical_reaction/synthflesh/synthblood
+ id = "synthflesh_2"
+ required_reagents = list(/datum/reagent/blood/synthetics = 1, /datum/reagent/carbon = 1, /datum/reagent/medicine/styptic_powder = 1)
+
/datum/chemical_reaction/synthtissue
name = "Synthtissue"
id = /datum/reagent/synthtissue
diff --git a/code/modules/reagents/chemistry/recipes/others.dm b/code/modules/reagents/chemistry/recipes/others.dm
index b463b5758b..57748acb1a 100644
--- a/code/modules/reagents/chemistry/recipes/others.dm
+++ b/code/modules/reagents/chemistry/recipes/others.dm
@@ -47,6 +47,12 @@
results = list(/datum/reagent/consumable/sodiumchloride = 3)
required_reagents = list(/datum/reagent/water = 1, /datum/reagent/sodium = 1, /datum/reagent/chlorine = 1)
+/datum/chemical_reaction/preservahyde
+ name = "Preservahyde"
+ id = "preservahyde"
+ results = list(/datum/reagent/preservahyde = 3)
+ required_reagents = list(/datum/reagent/water = 1, /datum/reagent/toxin/formaldehyde = 1, /datum/reagent/bromine = 1)
+
/datum/chemical_reaction/plasmasolidification
name = "Solid Plasma"
id = "solidplasma"
@@ -228,7 +234,6 @@
var/level_max = 2
/datum/chemical_reaction/mix_virus/on_reaction(datum/reagents/holder, multiplier)
-
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in holder.reagent_list
if(B && B.data)
var/datum/disease/advance/D = locate(/datum/disease/advance) in B.data["viruses"]
@@ -236,94 +241,131 @@
for(var/i in 1 to min(multiplier, 5))
D.Evolve(level_min, level_max)
-/datum/chemical_reaction/mix_virus/mix_virus_2
+/datum/chemical_reaction/mix_virus/synth
+ id = "mixvirus_synth"
+ required_catalysts = list(/datum/reagent/blood/synthetics = 1)
+/datum/chemical_reaction/mix_virus/mix_virus_2
name = "Mix Virus 2"
id = "mixvirus2"
required_reagents = list(/datum/reagent/toxin/mutagen = 1)
level_min = 2
level_max = 4
-/datum/chemical_reaction/mix_virus/mix_virus_3
+/datum/chemical_reaction/mix_virus/mix_virus_2/synth
+ id = "mixvirus2_synth"
+ required_catalysts = list(/datum/reagent/blood/synthetics = 1)
+/datum/chemical_reaction/mix_virus/mix_virus_3
name = "Mix Virus 3"
id = "mixvirus3"
required_reagents = list(/datum/reagent/toxin/plasma = 1)
level_min = 4
level_max = 6
-/datum/chemical_reaction/mix_virus/mix_virus_4
+/datum/chemical_reaction/mix_virus/mix_virus_3/synth
+ id = "mixvirus3_synth"
+ required_catalysts = list(/datum/reagent/blood/synthetics = 1)
+/datum/chemical_reaction/mix_virus/mix_virus_4
name = "Mix Virus 4"
id = "mixvirus4"
required_reagents = list(/datum/reagent/uranium = 1)
level_min = 5
level_max = 6
-/datum/chemical_reaction/mix_virus/mix_virus_5
+/datum/chemical_reaction/mix_virus/mix_virus_4/synth
+ id = "mixvirus4_synth"
+ required_catalysts = list(/datum/reagent/blood/synthetics = 1)
+/datum/chemical_reaction/mix_virus/mix_virus_5
name = "Mix Virus 5"
id = "mixvirus5"
required_reagents = list(/datum/reagent/toxin/mutagen/mutagenvirusfood = 1)
level_min = 3
level_max = 3
-/datum/chemical_reaction/mix_virus/mix_virus_6
+/datum/chemical_reaction/mix_virus/mix_virus_5/synth
+ id = "mixvirus5_synth"
+ required_catalysts = list(/datum/reagent/blood/synthetics = 1)
+/datum/chemical_reaction/mix_virus/mix_virus_6
name = "Mix Virus 6"
id = "mixvirus6"
required_reagents = list(/datum/reagent/toxin/mutagen/mutagenvirusfood/sugar = 1)
level_min = 4
level_max = 4
-/datum/chemical_reaction/mix_virus/mix_virus_7
+/datum/chemical_reaction/mix_virus/mix_virus_6/synth
+ id = "mixvirus6_synth"
+ required_catalysts = list(/datum/reagent/blood/synthetics = 1)
+/datum/chemical_reaction/mix_virus/mix_virus_7
name = "Mix Virus 7"
id = "mixvirus7"
required_reagents = list(/datum/reagent/toxin/plasma/plasmavirusfood/weak = 1)
level_min = 5
level_max = 5
-/datum/chemical_reaction/mix_virus/mix_virus_8
+/datum/chemical_reaction/mix_virus/mix_virus_7/synth
+ id = "mixvirus7_synth"
+ required_catalysts = list(/datum/reagent/blood/synthetics = 1)
+/datum/chemical_reaction/mix_virus/mix_virus_8
name = "Mix Virus 8"
id = "mixvirus8"
required_reagents = list(/datum/reagent/toxin/plasma/plasmavirusfood = 1)
level_min = 6
level_max = 6
-/datum/chemical_reaction/mix_virus/mix_virus_9
+/datum/chemical_reaction/mix_virus/mix_virus_8/synth
+ id = "mixvirus8_synth"
+ required_catalysts = list(/datum/reagent/blood/synthetics = 1)
+/datum/chemical_reaction/mix_virus/mix_virus_9
name = "Mix Virus 9"
id = "mixvirus9"
required_reagents = list(/datum/reagent/medicine/synaptizine/synaptizinevirusfood = 1)
level_min = 1
level_max = 1
-/datum/chemical_reaction/mix_virus/mix_virus_10
+/datum/chemical_reaction/mix_virus/mix_virus_9/synth
+ id = "mixvirus9_synth"
+ required_catalysts = list(/datum/reagent/blood/synthetics = 1)
+/datum/chemical_reaction/mix_virus/mix_virus_10
name = "Mix Virus 10"
id = "mixvirus10"
required_reagents = list(/datum/reagent/uranium/uraniumvirusfood = 1)
level_min = 6
level_max = 7
-/datum/chemical_reaction/mix_virus/mix_virus_11
+/datum/chemical_reaction/mix_virus/mix_virus_10/synth
+ id = "mixvirus10_synth"
+ required_catalysts = list(/datum/reagent/blood/synthetics = 1)
+/datum/chemical_reaction/mix_virus/mix_virus_11
name = "Mix Virus 11"
id = "mixvirus11"
required_reagents = list(/datum/reagent/uranium/uraniumvirusfood/unstable = 1)
level_min = 7
level_max = 7
-/datum/chemical_reaction/mix_virus/mix_virus_12
+/datum/chemical_reaction/mix_virus/mix_virus_11/synth
+ id = "mixvirus11_synth"
+ required_catalysts = list(/datum/reagent/blood/synthetics = 1)
+/datum/chemical_reaction/mix_virus/mix_virus_12
name = "Mix Virus 12"
id = "mixvirus12"
required_reagents = list(/datum/reagent/uranium/uraniumvirusfood/stable = 1)
level_min = 8
level_max = 8
+/datum/chemical_reaction/mix_virus/mix_virus_12/synth
+ id = "mixvirus12_synth"
+ required_catalysts = list(/datum/reagent/blood/synthetics = 1)
+
/datum/chemical_reaction/mix_virus/rem_virus
name = "Devolve Virus"
id = "remvirus"
@@ -338,6 +380,10 @@
for(var/i in 1 to min(multiplier, 5))
D.Devolve()
+/datum/chemical_reaction/mix_virus/rem_virus/synth
+ id = "remvirus_synth"
+ required_catalysts = list(/datum/reagent/blood/synthetics = 1)
+
/datum/chemical_reaction/mix_virus/neuter_virus
name = "Neuter Virus"
id = "neutervirus"
@@ -352,6 +398,10 @@
for(var/i in 1 to min(multiplier, 5))
D.Neuter()
+/datum/chemical_reaction/mix_virus/neuter_virus/synth
+ id = "neutervirus_synth"
+ required_catalysts = list(/datum/reagent/blood/synthetics = 1)
+
////////////////////////////////// foam and foam precursor ///////////////////////////////////////////////////
@@ -743,3 +793,13 @@
id = "blue_glitter_white"
results = list(/datum/reagent/glitter/blue = 2)
required_reagents = list(/datum/reagent/glitter/white = 1, /datum/reagent/colorful_reagent/crayonpowder/blue = 1)
+
+//////////////////////////////////// Synthblood ///////////////////////////////////////////
+
+/datum/chemical_reaction/synth_blood
+ name = "Synthetic Blood"
+ id = /datum/reagent/blood/synthetics
+ results = list(/datum/reagent/blood/synthetics = 3)
+ required_reagents = list(/datum/reagent/medicine/salglu_solution = 1, /datum/reagent/iron = 1, /datum/reagent/stable_plasma = 1)
+ mix_message = "The mixture congeals and gives off a faint copper scent."
+ required_temp = 350
diff --git a/code/modules/reagents/chemistry/recipes/special.dm b/code/modules/reagents/chemistry/recipes/special.dm
index cc63a8c692..fb4552f96b 100644
--- a/code/modules/reagents/chemistry/recipes/special.dm
+++ b/code/modules/reagents/chemistry/recipes/special.dm
@@ -168,7 +168,7 @@ GLOBAL_LIST_INIT(food_reagents, build_reagents_to_food()) //reagentid = related
/obj/item/paper/secretrecipe
name = "old recipe"
- var/recipe_id = "secretsauce"
+ var/recipe_id = /datum/reagent/consumable/secretsauce
/obj/item/paper/secretrecipe/examine(mob/user) //Extra secret
if(isobserver(user))
diff --git a/code/modules/reagents/reagent_containers/bottle.dm b/code/modules/reagents/reagent_containers/bottle.dm
index c05f4f3e78..e4741bb858 100644
--- a/code/modules/reagents/reagent_containers/bottle.dm
+++ b/code/modules/reagents/reagent_containers/bottle.dm
@@ -431,4 +431,4 @@
/obj/item/reagent_containers/glass/bottle/hexacamphor
name = "Hexacamphor bottle"
desc = "A bottle of strong anaphrodisiac. Reduces libido."
- list_reagents = list(/datum/reagent/drug/anaphrodisiacplus = 30)
\ No newline at end of file
+ list_reagents = list(/datum/reagent/drug/anaphrodisiacplus = 30)
diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm
index db0aa8ce99..23f149ade4 100644
--- a/code/modules/reagents/reagent_containers/glass.dm
+++ b/code/modules/reagents/reagent_containers/glass.dm
@@ -109,7 +109,7 @@
volume = 60
icon_state = "beaker"
item_state = "beaker"
- materials = list(MAT_GLASS=500)
+ custom_materials = list(/datum/material/glass=500)
possible_transfer_amounts = list(5,10,15,20,25,30,50,60)
container_flags = PH_WEAK|APTFT_ALTCLICK|APTFT_VERB
@@ -159,7 +159,7 @@
/obj/item/reagent_containers/glass/beaker/glass_dish
name = "glass dish"
desc = "A tiny glass dish. It can hold up to 3 units. Unable to withstand reagents of an extreme pH."
- materials = list(MAT_GLASS=500)
+ custom_materials = list(/datum/material/glass = 500)
icon_state = "glass_disk"
possible_transfer_amounts = list(0.1,0.5,0.75,1,2,3)
volume = 3
@@ -167,21 +167,21 @@
/obj/item/reagent_containers/glass/beaker/flask/large
name = "large flask"
desc = "A large flask. It can hold up to 80 units. Unable to withstand reagents of an extreme pH."
- materials = list(MAT_GLASS=2500)
+ custom_materials = list(/datum/material/glass = 2500)
icon_state = "flasklarge"
volume = 80
/obj/item/reagent_containers/glass/beaker/flask
name = "small flask"
desc = "A small flask. It can hold up to 40 units. Unable to withstand reagents of an extreme pH."
- materials = list(MAT_GLASS=1000)
+ custom_materials = list(/datum/material/glass = 1000)
icon_state = "flasksmall"
volume = 40
/obj/item/reagent_containers/glass/beaker/flask/spouty
name = "flask with spout"
desc = "A flask with a spout! It can hold up to 120 units. Unable to withstand reagents of an extreme pH."
- materials = list(MAT_GLASS=2500)
+ custom_materials = list(/datum/material/glass = 2500)
icon_state = "flaskspouty"
possible_transfer_amounts = list(1,2,3,4,5,10,15,20,25,30,50,100,120)
volume = 120
@@ -190,7 +190,7 @@
name = "large beaker"
desc = "A large beaker. Can hold up to 120 units. Unable to withstand reagents of an extreme pH."
icon_state = "beakerlarge"
- materials = list(MAT_GLASS=2500)
+ custom_materials = list(/datum/material/glass=2500)
volume = 120
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,20,25,30,40,50,60,120)
@@ -200,7 +200,7 @@
name = "x-large beaker"
desc = "An extra-large beaker. Can hold up to 180 units. Is able to resist acid and alkaline solutions, but melts at 444 K."
icon_state = "beakerwhite"
- materials = list(MAT_GLASS=2500, MAT_PLASTIC=3000)
+ custom_materials = list(/datum/material/glass=2500, /datum/material/plastic=3000)
volume = 180
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,20,25,30,40,50,60,120,180)
@@ -215,7 +215,7 @@
name = "metamaterial beaker"
desc = "A large beaker. Can hold up to 240 units, and is able to withstand all chemical situations."
icon_state = "beakergold"
- materials = list(MAT_GLASS=2500, MAT_PLASTIC=3000, MAT_GOLD=1000, MAT_TITANIUM=1000)
+ custom_materials = list(/datum/material/glass=2500, /datum/material/plastic=3000, /datum/material/gold=1000, /datum/material/titanium=1000)
volume = 240
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,20,25,30,40,50,60,120,200,240)
@@ -226,7 +226,7 @@
desc = "A cryostasis beaker that allows for chemical storage without \
reactions. Can hold up to 50 units."
icon_state = "beakernoreact"
- materials = list(MAT_METAL=3000)
+ custom_materials = list(/datum/material/iron=3000)
reagent_flags = OPENCONTAINER | NO_REACT
volume = 50
amount_per_transfer_from_this = 10
@@ -239,8 +239,9 @@
and Element Cuban combined with the Compound Pete. Can hold up to \
300 units. Unable to withstand reagents of an extreme pH."
icon_state = "beakerbluespace"
- materials = list(MAT_GLASS=3000)
+ custom_materials = list(/datum/material/glass = 5000, /datum/material/plasma = 3000, /datum/material/diamond = 1000, /datum/material/bluespace = 1000)
volume = 300
+ material_flags = MATERIAL_NO_EFFECTS
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,20,25,30,50,100,300)
container_HP = 5
@@ -281,7 +282,7 @@
item_state = "bucket"
lefthand_file = 'icons/mob/inhands/equipment/custodial_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi'
- materials = list(MAT_METAL=200)
+ custom_materials = list(/datum/material/iron=200)
w_class = WEIGHT_CLASS_NORMAL
amount_per_transfer_from_this = 20
possible_transfer_amounts = list(5,10,15,20,25,30,50,70)
@@ -348,7 +349,7 @@
icon_state = "smallbottle"
item_state = "bottle"
list_reagents = list(/datum/reagent/water = 49.5, /datum/reagent/fluorine = 0.5)//see desc, don't think about it too hard
- materials = list(MAT_GLASS=0)
+ custom_materials = list(/datum/material/glass=0)
volume = 50
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,20,25,30,50)
@@ -361,7 +362,7 @@
/obj/item/reagent_containers/glass/beaker/waterbottle/large
desc = "A fresh commercial-sized bottle of water."
icon_state = "largebottle"
- materials = list(MAT_GLASS=0)
+ custom_materials = list(/datum/material/glass=0)
list_reagents = list(/datum/reagent/water = 100)
volume = 100
amount_per_transfer_from_this = 20
diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm
index fd4282b1b0..f29b785c95 100644
--- a/code/modules/reagents/reagent_containers/hypospray.dm
+++ b/code/modules/reagents/reagent_containers/hypospray.dm
@@ -95,7 +95,7 @@
ignore_flags = 1 //so you can medipen through hardsuits
reagent_flags = DRAWABLE
flags_1 = null
- list_reagents = list(/datum/reagent/medicine/epinephrine = 10, /datum/reagent/toxin/formaldehyde = 3)
+ list_reagents = list(/datum/reagent/medicine/epinephrine = 10, /datum/reagent/preservahyde = 3)
/obj/item/reagent_containers/hypospray/medipen/suicide_act(mob/living/carbon/user)
user.visible_message("
[user] begins to choke on \the [src]! It looks like [user.p_theyre()] trying to commit suicide!")
diff --git a/code/modules/reagents/reagent_containers/rags.dm b/code/modules/reagents/reagent_containers/rags.dm
index e7f340887c..c6903ff7b4 100644
--- a/code/modules/reagents/reagent_containers/rags.dm
+++ b/code/modules/reagents/reagent_containers/rags.dm
@@ -53,7 +53,7 @@
SEND_SIGNAL(A, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_MEDIUM)
return
-/obj/item/reagent_containers/rag/pre_altattackby(mob/living/M, mob/living/user, params)
+/obj/item/reagent_containers/rag/alt_pre_attack(mob/living/M, mob/living/user, params)
if(istype(M) && user.a_intent == INTENT_HELP)
user.changeNext_move(CLICK_CD_MELEE)
if(M.on_fire)
diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm
index 763184da46..45bf8591a8 100644
--- a/code/modules/reagents/reagent_containers/syringes.dm
+++ b/code/modules/reagents/reagent_containers/syringes.dm
@@ -12,7 +12,7 @@
var/mode = SYRINGE_DRAW
var/busy = FALSE // needed for delayed drawing of blood
var/proj_piercing = 0 //does it pierce through thick clothes when shot with syringe gun
- materials = list(MAT_METAL=10, MAT_GLASS=20)
+ custom_materials = list(/datum/material/iron=10, /datum/material/glass=20)
reagent_flags = TRANSPARENT
/obj/item/reagent_containers/syringe/Initialize()
diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm
index 812637efed..0f9c64545a 100644
--- a/code/modules/research/designs.dm
+++ b/code/modules/research/designs.dm
@@ -7,15 +7,6 @@ For the materials datum, it assumes you need reagents unless specified otherwise
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.
@@ -57,6 +48,17 @@ other types of metals and chemistry for reagents).
SSresearch.techweb_designs -= id
return ..()
+/datum/design/proc/InitializeMaterials()
+ var/list/temp_list = list()
+ for(var/i in materials) //Go through all of our materials, get the subsystem instance, and then replace the list.
+ var/amount = materials[i]
+ if(!istext(i)) //Not a category, so get the ref the normal way
+ var/datum/material/M = getmaterialref(i)
+ temp_list[M] = amount
+ else
+ temp_list[i] = amount
+ materials = temp_list
+
/datum/design/proc/icon_html(client/user)
var/datum/asset/spritesheet/sheet = get_asset_datum(/datum/asset/spritesheet/research_designs)
sheet.send(user)
@@ -70,7 +72,7 @@ other types of metals and chemistry for reagents).
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)
+ custom_materials = list(/datum/material/iron=300, /datum/material/glass=100)
var/list/blueprints = list()
var/max_blueprints = 1
@@ -84,5 +86,5 @@ other types of metals and chemistry for reagents).
/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)
+ custom_materials = list(/datum/material/iron=300, /datum/material/glass=100, /datum/material/silver = 50)
max_blueprints = 5
diff --git a/code/modules/research/designs/AI_module_designs.dm b/code/modules/research/designs/AI_module_designs.dm
index 305b39b694..98e295b83a 100644
--- a/code/modules/research/designs/AI_module_designs.dm
+++ b/code/modules/research/designs/AI_module_designs.dm
@@ -14,7 +14,7 @@
name = "Module Design (Safeguard)"
desc = "Allows for the construction of a Safeguard AI Module."
id = "safeguard_module"
- materials = list(MAT_GLASS = 1000, MAT_GOLD = 2000)
+ materials = list(/datum/material/glass = 1000, /datum/material/gold = 2000)
build_path = /obj/item/aiModule/supplied/safeguard
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -23,7 +23,7 @@
name = "Module Design (OneCrew)"
desc = "Allows for the construction of a OneCrew AI Module."
id = "onehuman_module"
- materials = list(MAT_GLASS = 1000, MAT_DIAMOND = 6000)
+ materials = list(/datum/material/glass = 1000, /datum/material/diamond = 6000)
build_path = /obj/item/aiModule/zeroth/oneHuman
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -32,7 +32,7 @@
name = "Module Design (ProtectStation)"
desc = "Allows for the construction of a ProtectStation AI Module."
id = "protectstation_module"
- materials = list(MAT_GLASS = 1000, MAT_GOLD = 2000)
+ materials = list(/datum/material/glass = 1000, /datum/material/gold = 2000)
build_path = /obj/item/aiModule/supplied/protectStation
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -41,7 +41,7 @@
name = "Module Design (Quarantine)"
desc = "Allows for the construction of a Quarantine AI Module."
id = "quarantine_module"
- materials = list(MAT_GLASS = 1000, MAT_GOLD = 2000)
+ materials = list(/datum/material/glass = 1000, /datum/material/gold = 2000)
build_path = /obj/item/aiModule/supplied/quarantine
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -50,7 +50,7 @@
name = "Module Design (OxygenIsToxicToHumans)"
desc = "Allows for the construction of a Safeguard AI Module."
id = "oxygen_module"
- materials = list(MAT_GLASS = 1000, MAT_GOLD = 2000)
+ materials = list(/datum/material/glass = 1000, /datum/material/gold = 2000)
build_path = /obj/item/aiModule/supplied/oxygen
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -59,7 +59,7 @@
name = "Module Design (Freeform)"
desc = "Allows for the construction of a Freeform AI Module."
id = "freeform_module"
- materials = list(MAT_GLASS = 1000, MAT_GOLD = 10000)//Custom inputs should be more expensive to get
+ materials = list(/datum/material/glass = 1000, /datum/material/gold = 10000)//Custom inputs should be more expensive to get
build_path = /obj/item/aiModule/supplied/freeform
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -68,7 +68,7 @@
name = "Module Design (Reset)"
desc = "Allows for the construction of a Reset AI Module."
id = "reset_module"
- materials = list(MAT_GLASS = 1000, MAT_GOLD = 2000)
+ materials = list(/datum/material/glass = 1000, /datum/material/gold = 2000)
build_path = /obj/item/aiModule/reset
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -77,7 +77,7 @@
name = "Module Design (Purge)"
desc = "Allows for the construction of a Purge AI Module."
id = "purge_module"
- materials = list(MAT_GLASS = 1000, MAT_DIAMOND = 2000)
+ materials = list(/datum/material/glass = 1000, /datum/material/diamond = 2000)
build_path = /obj/item/aiModule/reset/purge
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -86,7 +86,7 @@
name = "Module Design (Law Removal)"
desc = "Allows for the construction of a Law Removal AI Core Module."
id = "remove_module"
- materials = list(MAT_GLASS = 1000, MAT_DIAMOND = 2000)
+ materials = list(/datum/material/glass = 1000, /datum/material/diamond = 2000)
build_path = /obj/item/aiModule/remove
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -95,7 +95,7 @@
name = "AI Core Module (Freeform)"
desc = "Allows for the construction of a Freeform AI Core Module."
id = "freeformcore_module"
- materials = list(MAT_GLASS = 1000, MAT_DIAMOND = 10000)//Ditto
+ materials = list(/datum/material/glass = 1000, /datum/material/diamond = 10000)//Ditto
build_path = /obj/item/aiModule/core/freeformcore
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -104,7 +104,7 @@
name = "Core Module Design (Asimov)"
desc = "Allows for the construction of an Asimov AI Core Module."
id = "asimov_module"
- materials = list(MAT_GLASS = 1000, MAT_DIAMOND = 2000)
+ materials = list(/datum/material/glass = 1000, /datum/material/diamond = 2000)
build_path = /obj/item/aiModule/core/full/asimov
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -114,7 +114,7 @@
desc = "Allows for the construction of a P.A.L.A.D.I.N. AI Core Module."
id = "paladin_module"
build_type = IMPRINTER
- materials = list(MAT_GLASS = 1000, MAT_DIAMOND = 2000)
+ materials = list(/datum/material/glass = 1000, /datum/material/diamond = 2000)
build_path = /obj/item/aiModule/core/full/paladin
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -123,7 +123,7 @@
name = "Core Module Design (T.Y.R.A.N.T.)"
desc = "Allows for the construction of a T.Y.R.A.N.T. AI Module."
id = "tyrant_module"
- materials = list(MAT_GLASS = 1000, MAT_DIAMOND = 2000)
+ materials = list(/datum/material/glass = 1000, /datum/material/diamond = 2000)
build_path = /obj/item/aiModule/core/full/tyrant
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -132,7 +132,7 @@
name = "Core Module Design (Corporate)"
desc = "Allows for the construction of a Corporate AI Core Module."
id = "corporate_module"
- materials = list(MAT_GLASS = 1000, MAT_DIAMOND = 2000)
+ materials = list(/datum/material/glass = 1000, /datum/material/diamond = 2000)
build_path = /obj/item/aiModule/core/full/corp
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -141,7 +141,7 @@
name = "Core Module Design (Default)"
desc = "Allows for the construction of a Default AI Core Module."
id = "default_module"
- materials = list(MAT_GLASS = 1000, MAT_DIAMOND = 2000)
+ materials = list(/datum/material/glass = 1000, /datum/material/diamond = 2000)
build_path = /obj/item/aiModule/core/full/custom
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
diff --git a/code/modules/research/designs/autobotter_designs.dm b/code/modules/research/designs/autobotter_designs.dm
index 6eb7e8354b..eab7423b91 100644
--- a/code/modules/research/designs/autobotter_designs.dm
+++ b/code/modules/research/designs/autobotter_designs.dm
@@ -6,13 +6,13 @@
name = "Machine Design (AutoBottler)"
desc = "Allows for the construction of circuit boards used to build an Autobottler."
id = "autobottler"
- materials = list(MAT_GLASS = 2000)
+ materials = list(/datum/material/glass = 2000)
build_path = /obj/item/circuitboard/machine/autobottler
category = list ("Misc. Machinery")
departmental_flags = DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_SERVICE
/datum/design/bottle
- materials = list(MAT_GLASS = 1200)
+ materials = list(/datum/material/glass = 1200)
build_type = AUTOBOTTLER
category = list("Storge")
@@ -143,7 +143,7 @@
build_path = /obj/item/reagent_containers/food/drinks/bottle/grenadine/empty
/datum/design/bottle/export
- materials = list(MAT_GLASS = 1200)
+ materials = list(/datum/material/glass = 1200)
build_type = AUTOBOTTLER
category = list("Brands")
diff --git a/code/modules/research/designs/autolathe_desings/autolathe_designs_construction.dm b/code/modules/research/designs/autolathe_desings/autolathe_designs_construction.dm
index bfc92d24d8..ee9ee14e4a 100644
--- a/code/modules/research/designs/autolathe_desings/autolathe_designs_construction.dm
+++ b/code/modules/research/designs/autolathe_desings/autolathe_designs_construction.dm
@@ -11,7 +11,7 @@
name = "Metal Rod"
id = "rods"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 1000)
+ materials = list(/datum/material/iron = 1000)
build_path = /obj/item/stack/rods
category = list("initial","Construction")
maxstack = 50
@@ -20,7 +20,7 @@
name = "Metal"
id = "metal"
build_type = AUTOLATHE
- materials = list(MAT_METAL = MINERAL_MATERIAL_AMOUNT)
+ materials = list(/datum/material/iron = MINERAL_MATERIAL_AMOUNT)
build_path = /obj/item/stack/sheet/metal
category = list("initial","Construction")
maxstack = 50
@@ -29,7 +29,7 @@
name = "Glass"
id = "glass"
build_type = AUTOLATHE
- materials = list(MAT_GLASS = MINERAL_MATERIAL_AMOUNT)
+ materials = list(/datum/material/glass = MINERAL_MATERIAL_AMOUNT)
build_path = /obj/item/stack/sheet/glass
category = list("initial","Construction")
maxstack = 50
@@ -38,7 +38,7 @@
name = "Reinforced Glass"
id = "rglass"
build_type = AUTOLATHE | SMELTER | PROTOLATHE
- materials = list(MAT_METAL = 1000, MAT_GLASS = MINERAL_MATERIAL_AMOUNT)
+ materials = list(/datum/material/iron = 1000, /datum/material/glass = MINERAL_MATERIAL_AMOUNT)
build_path = /obj/item/stack/sheet/rglass
category = list("initial","Construction","Stock Parts")
maxstack = 50
@@ -47,7 +47,7 @@
name = "Light Tube"
id = "light_tube"
build_type = AUTOLATHE
- materials = list(MAT_GLASS = 100)
+ materials = list(/datum/material/glass = 100)
build_path = /obj/item/light/tube
category = list("initial", "Construction")
@@ -55,7 +55,7 @@
name = "Light Bulb"
id = "light_bulb"
build_type = AUTOLATHE
- materials = list(MAT_GLASS = 100)
+ materials = list(/datum/material/glass = 100)
build_path = /obj/item/light/bulb
category = list("initial", "Construction")
@@ -63,7 +63,7 @@
name = "Camera Assembly"
id = "camera_assembly"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 400, MAT_GLASS = 250)
+ materials = list(/datum/material/iron = 400, /datum/material/glass = 250)
build_path = /obj/item/wallframe/camera
category = list("initial", "Construction")
@@ -71,7 +71,7 @@
name = "Newscaster Frame"
id = "newscaster_frame"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 14000, MAT_GLASS = 8000)
+ materials = list(/datum/material/iron = 14000, /datum/material/glass = 8000)
build_path = /obj/item/wallframe/newscaster
category = list("initial", "Construction")
@@ -79,7 +79,7 @@
name = "Turret Control Frame"
id = "turret_control"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 12000)
+ materials = list(/datum/material/iron = 12000)
build_path = /obj/item/wallframe/turret_control
category = list("initial", "Construction")
@@ -87,7 +87,7 @@
name = "Conveyor Belt"
id = "conveyor_belt"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 3000)
+ materials = list(/datum/material/iron = 3000)
build_path = /obj/item/stack/conveyor
category = list("initial", "Construction")
maxstack = 30
@@ -96,7 +96,7 @@
name = "Conveyor Belt Switch"
id = "conveyor_switch"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 450, MAT_GLASS = 190)
+ materials = list(/datum/material/iron = 450, /datum/material/glass = 190)
build_path = /obj/item/conveyor_switch_construct
category = list("initial", "Construction")
@@ -104,7 +104,7 @@
name = "Compressed Matter Cartridge"
id = "rcd_ammo"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 12000, MAT_GLASS = 8000)
+ materials = list(/datum/material/iron = 12000, /datum/material/glass=8000)
build_path = /obj/item/rcd_ammo
category = list("initial","Construction","Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -113,7 +113,7 @@
name = "Large Compressed Matter Cartridge"
id = "rcd_ammo_large"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 48000, MAT_GLASS = 32000)
+ materials = list(/datum/material/iron = 48000, /datum/material/glass = 32000)
build_path = /obj/item/rcd_ammo/large
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
diff --git a/code/modules/research/designs/autolathe_desings/autolathe_designs_electronics.dm b/code/modules/research/designs/autolathe_desings/autolathe_designs_electronics.dm
index 4ca780620d..86e11010bc 100644
--- a/code/modules/research/designs/autolathe_desings/autolathe_designs_electronics.dm
+++ b/code/modules/research/designs/autolathe_desings/autolathe_designs_electronics.dm
@@ -10,7 +10,7 @@
name = "APC Module"
id = "power control"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 100, MAT_GLASS = 100)
+ materials = list(/datum/material/iron = 100, /datum/material/glass = 100)
build_path = /obj/item/electronics/apc
category = list("initial", "Electronics")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -19,7 +19,7 @@
name = "Airlock Electronics"
id = "airlock_board"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 50, MAT_GLASS = 50)
+ materials = list(/datum/material/iron = 50, /datum/material/glass = 50)
build_path = /obj/item/electronics/airlock
category = list("initial", "Electronics")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -28,7 +28,7 @@
name = "Firelock Circuitry"
id = "firelock_board"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 50, MAT_GLASS = 50)
+ materials = list(/datum/material/iron = 50, /datum/material/glass = 50)
build_path = /obj/item/electronics/firelock
category = list("initial", "Electronics")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -37,7 +37,7 @@
name = "Air Alarm Electronics"
id = "airalarm_electronics"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 50, MAT_GLASS = 50)
+ materials = list(/datum/material/iron = 50, /datum/material/glass = 50)
build_path = /obj/item/electronics/airalarm
category = list("initial", "Electronics")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -46,7 +46,7 @@
name = "Fire Alarm Electronics"
id = "firealarm_electronics"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 50, MAT_GLASS = 50)
+ materials = list(/datum/material/iron = 50, /datum/material/glass = 50)
build_path = /obj/item/electronics/firealarm
category = list("initial", "Electronics")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -55,7 +55,7 @@
name = "Destination Tagger"
id = "desttagger"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 250, MAT_GLASS = 125)
+ materials = list(/datum/material/iron = 250, /datum/material/glass = 125)
build_path = /obj/item/destTagger
category = list("initial", "Electronics")
@@ -63,7 +63,7 @@
name = "Hand Labeler"
id = "handlabel"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 150, MAT_GLASS = 125)
+ materials = list(/datum/material/iron = 150, /datum/material/glass = 125)
build_path = /obj/item/hand_labeler
category = list("initial", "Electronics")
@@ -71,6 +71,6 @@
name = "Light Fixture Battery"
id = "miniature_power_cell"
build_type = AUTOLATHE
- materials = list(MAT_GLASS = 20)
+ materials = list(/datum/material/glass = 20)
build_path = /obj/item/stock_parts/cell/emergency_light
category = list("initial", "Electronics")
diff --git a/code/modules/research/designs/autolathe_desings/autolathe_designs_medical_and_dinnerware.dm b/code/modules/research/designs/autolathe_desings/autolathe_designs_medical_and_dinnerware.dm
index 0d303c3968..b62f30e041 100644
--- a/code/modules/research/designs/autolathe_desings/autolathe_designs_medical_and_dinnerware.dm
+++ b/code/modules/research/designs/autolathe_desings/autolathe_designs_medical_and_dinnerware.dm
@@ -9,7 +9,7 @@
name = "Kitchen Knife"
id = "kitchen_knife"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 12000)
+ materials = list(/datum/material/iron = 12000)
build_path = /obj/item/kitchen/knife
category = list("initial","Dinnerware")
@@ -17,7 +17,7 @@
name = "Fork"
id = "fork"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 80)
+ materials = list(/datum/material/iron = 80)
build_path = /obj/item/kitchen/fork
category = list("initial","Dinnerware")
@@ -25,7 +25,7 @@
name = "Tray"
id = "tray"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 3000)
+ materials = list(/datum/material/iron = 3000)
build_path = /obj/item/storage/bag/tray
category = list("initial","Dinnerware")
@@ -33,7 +33,7 @@
name = "Bowl"
id = "bowl"
build_type = AUTOLATHE
- materials = list(MAT_GLASS = 500)
+ materials = list(/datum/material/glass = 500)
build_path = /obj/item/reagent_containers/glass/bowl
category = list("initial","Dinnerware")
@@ -41,7 +41,7 @@
name = "Drinking Glass"
id = "drinking_glass"
build_type = AUTOLATHE
- materials = list(MAT_GLASS = 500)
+ materials = list(/datum/material/glass = 500)
build_path = /obj/item/reagent_containers/food/drinks/drinkingglass
category = list("initial","Dinnerware")
@@ -49,7 +49,7 @@
name = "Shot Glass"
id = "shot_glass"
build_type = AUTOLATHE
- materials = list(MAT_GLASS = 100)
+ materials = list(/datum/material/glass = 100)
build_path = /obj/item/reagent_containers/food/drinks/drinkingglass/shotglass
category = list("initial","Dinnerware")
@@ -57,7 +57,7 @@
name = "Shaker"
id = "shaker"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 1500)
+ materials = list(/datum/material/iron = 1500)
build_path = /obj/item/reagent_containers/food/drinks/shaker
category = list("initial","Dinnerware")
@@ -69,7 +69,7 @@
name = "Scalpel"
id = "scalpel"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 4000, MAT_GLASS = 1000)
+ materials = list(/datum/material/iron = 4000, /datum/material/glass = 1000)
build_path = /obj/item/scalpel
category = list("initial", "Medical","Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
@@ -78,7 +78,7 @@
name = "Circular Saw"
id = "circular_saw"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 10000, MAT_GLASS = 6000)
+ materials = list(/datum/material/iron = 10000, /datum/material/glass = 6000)
build_path = /obj/item/circular_saw
category = list("initial", "Medical","Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
@@ -87,7 +87,7 @@
name = "Surgical Drill"
id = "surgicaldrill"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 10000, MAT_GLASS = 6000)
+ materials = list(/datum/material/iron = 10000, /datum/material/glass = 6000)
build_path = /obj/item/surgicaldrill
category = list("initial", "Medical","Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
@@ -96,7 +96,7 @@
name = "Retractor"
id = "retractor"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 6000, MAT_GLASS = 3000)
+ materials = list(/datum/material/iron = 6000, /datum/material/glass = 3000)
build_path = /obj/item/retractor
category = list("initial", "Medical","Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
@@ -105,7 +105,7 @@
name = "Cautery"
id = "cautery"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 2500, MAT_GLASS = 750)
+ materials = list(/datum/material/iron = 2500, /datum/material/glass = 750)
build_path = /obj/item/cautery
category = list("initial", "Medical","Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
@@ -114,7 +114,7 @@
name = "Hemostat"
id = "hemostat"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 5000, MAT_GLASS = 2500)
+ materials = list(/datum/material/iron = 5000, /datum/material/glass = 2500)
build_path = /obj/item/hemostat
category = list("initial", "Medical","Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
@@ -123,7 +123,7 @@
name = "Beaker"
id = "beaker"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_GLASS = 500)
+ materials = list(/datum/material/glass = 500)
build_path = /obj/item/reagent_containers/glass/beaker
category = list("initial", "Medical","Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SERVICE | DEPARTMENTAL_FLAG_SCIENCE
@@ -132,7 +132,7 @@
name = "Large Beaker"
id = "large_beaker"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_GLASS = 2500)
+ materials = list(/datum/material/glass = 2500)
build_path = /obj/item/reagent_containers/glass/beaker/large
category = list("initial", "Medical","Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SERVICE | DEPARTMENTAL_FLAG_SCIENCE
@@ -141,7 +141,7 @@
name = "Health Analyzer"
id = "healthanalyzer"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 500, MAT_GLASS = 50)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 50)
build_path = /obj/item/healthanalyzer
category = list("initial", "Medical")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -150,7 +150,7 @@
name = "Pill Bottle"
id = "pillbottle"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 20, MAT_GLASS = 100)
+ materials = list(/datum/material/iron = 20, /datum/material/glass = 100)
build_path = /obj/item/storage/pill_bottle
category = list("initial", "Medical","Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -159,7 +159,7 @@
name = "Syringe"
id = "syringe"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 10, MAT_GLASS = 20)
+ materials = list(/datum/material/iron = 10, /datum/material/glass = 20)
build_path = /obj/item/reagent_containers/syringe
category = list("initial", "Medical")
@@ -167,7 +167,7 @@
name = "Health Sensor"
id = "health_sensor"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 800, MAT_GLASS = 200)
+ materials = list(/datum/material/iron = 800, /datum/material/glass = 200)
build_path = /obj/item/assembly/health
category = list("initial", "Medical")
@@ -175,7 +175,7 @@
name = "Hypovial"
id = "hypovial"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 500)
+ materials = list(/datum/material/iron = 500)
build_path = /obj/item/reagent_containers/glass/bottle/vial/small
category = list("initial","Medical","Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -184,7 +184,7 @@
name = "Large Hypovial"
id = "large_hypovial"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 2500)
+ materials = list(/datum/material/iron = 2500)
build_path = /obj/item/reagent_containers/glass/bottle/vial/large
category = list("initial","Medical","Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
diff --git a/code/modules/research/designs/autolathe_desings/autolathe_designs_sec_and_hacked.dm b/code/modules/research/designs/autolathe_desings/autolathe_designs_sec_and_hacked.dm
index ae0f13764b..173240e196 100644
--- a/code/modules/research/designs/autolathe_desings/autolathe_designs_sec_and_hacked.dm
+++ b/code/modules/research/designs/autolathe_desings/autolathe_designs_sec_and_hacked.dm
@@ -9,7 +9,7 @@
name = "Beanbag Slug"
id = "beanbag_slug"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 250)
+ materials = list(/datum/material/iron = 250)
build_path = /obj/item/ammo_casing/shotgun/beanbag
category = list("initial", "Security")
@@ -17,7 +17,7 @@
name = "Rubber Shot"
id = "rubber_shot"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 4000)
+ materials = list(/datum/material/iron = 4000)
build_path = /obj/item/ammo_casing/shotgun/rubbershot
category = list("initial", "Security")
@@ -25,7 +25,7 @@
name = "Speed Loader (.38 rubber)"
id = "c38"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 20000)
+ materials = list(/datum/material/iron = 20000)
build_path = /obj/item/ammo_box/c38
category = list("initial", "Security")
@@ -37,7 +37,7 @@
name = "Industrial Welding Tool"
id = "large_welding_tool"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 70, MAT_GLASS = 60)
+ materials = list(/datum/material/iron = 70, /datum/material/glass = 60)
build_path = /obj/item/weldingtool/largetank
category = list("hacked", "Tools")
@@ -45,7 +45,7 @@
name = "Flamethrower"
id = "flamethrower"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 500)
+ materials = list(/datum/material/iron = 500)
build_path = /obj/item/flamethrower/full
category = list("hacked", "Security")
@@ -53,7 +53,7 @@
name = "Rapid Construction Device (RCD)"
id = "rcd"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 30000)
+ materials = list(/datum/material/iron = 30000)
build_path = /obj/item/construction/rcd
category = list("hacked", "Construction")
@@ -61,7 +61,7 @@
name = "Rapid Pipe Dispenser (RPD)"
id = "rpd"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 75000, MAT_GLASS = 37500)
+ materials = list(/datum/material/iron = 75000, /datum/material/glass = 37500)
build_path = /obj/item/pipe_dispenser
category = list("hacked", "Construction")
@@ -69,7 +69,7 @@
name = "Handcuffs"
id = "handcuffs"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 500)
+ materials = list(/datum/material/iron = 500)
build_path = /obj/item/restraints/handcuffs
category = list("hacked", "Security")
@@ -77,7 +77,7 @@
name = "Modular Receiver"
id = "receiver"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 15000)
+ materials = list(/datum/material/iron = 15000)
build_path = /obj/item/weaponcrafting/receiver
category = list("hacked", "Security")
@@ -85,7 +85,7 @@
name = "Shotgun Slug"
id = "shotgun_slug"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 4000)
+ materials = list(/datum/material/iron = 4000)
build_path = /obj/item/ammo_casing/shotgun
category = list("hacked", "Security")
@@ -93,7 +93,7 @@
name = "Buckshot Shell"
id = "buckshot_shell"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 4000)
+ materials = list(/datum/material/iron = 4000)
build_path = /obj/item/ammo_casing/shotgun/buckshot
category = list("hacked", "Security")
@@ -101,7 +101,7 @@
name = "Shotgun Dart"
id = "shotgun_dart"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 4000)
+ materials = list(/datum/material/iron = 4000)
build_path = /obj/item/ammo_casing/shotgun/dart
category = list("hacked", "Security")
@@ -109,7 +109,7 @@
name = "Incendiary Slug"
id = "incendiary_slug"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 4000)
+ materials = list(/datum/material/iron = 4000)
build_path = /obj/item/ammo_casing/shotgun/incendiary
category = list("hacked", "Security")
@@ -117,7 +117,7 @@
name = "Foam Riot Dart"
id = "riot_dart"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 1125) //Discount for making individually - no box = less metal!
+ materials = list(/datum/material/iron = 1125) //Discount for making individually - no box = less metal!
build_path = /obj/item/ammo_casing/caseless/foam_dart/riot
category = list("hacked", "Security")
@@ -125,7 +125,7 @@
name = "Foam Riot Dart Box"
id = "riot_darts"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 50000) //Comes with 40 darts
+ materials = list(/datum/material/iron = 50000) //Comes with 40 darts
build_path = /obj/item/ammo_box/foambox/riot
category = list("hacked", "Security")
@@ -133,7 +133,7 @@
name = "Revolver Bullet (.357)"
id = "a357"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 4000)
+ materials = list(/datum/material/iron = 4000)
build_path = /obj/item/ammo_casing/a357
category = list("hacked", "Security")
@@ -141,7 +141,7 @@
name = "Rifle Bullet (7.62mm)"
id = "a762"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 5000) //need seclathe for clips
+ materials = list(/datum/material/iron = 5000) //need seclathe for clips
build_path = /obj/item/ammo_casing/a762
category = list("hacked", "Security")
@@ -149,7 +149,7 @@
name = "Ammo Box (10mm)"
id = "c10mm"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 30000)
+ materials = list(/datum/material/iron = 30000)
build_path = /obj/item/ammo_box/c10mm
category = list("hacked", "Security")
@@ -157,7 +157,7 @@
name = "Ammo Box (.45)"
id = "c45"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 30000)
+ materials = list(/datum/material/iron = 30000)
build_path = /obj/item/ammo_box/c45
category = list("hacked", "Security")
@@ -165,7 +165,7 @@
name = "Ammo Box (9mm)"
id = "c9mm"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 30000)
+ materials = list(/datum/material/iron = 30000)
build_path = /obj/item/ammo_box/c9mm
category = list("hacked", "Security")
@@ -173,7 +173,7 @@
name = "Electropack"
id = "electropack"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 10000, MAT_GLASS = 2500)
+ materials = list(/datum/material/iron = 10000, /datum/material/glass = 2500)
build_path = /obj/item/electropack
category = list("hacked", "Security")
@@ -181,7 +181,7 @@
name = "Butcher's Cleaver"
id = "cleaver"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 18000)
+ materials = list(/datum/material/iron = 18000)
build_path = /obj/item/kitchen/knife/butcher
category = list("hacked", "Dinnerware")
@@ -189,6 +189,6 @@
name = "Tinfoil Hat"
id = "tinfoil_hat"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 5500)
+ materials = list(/datum/material/iron = 5500)
build_path = /obj/item/clothing/head/foilhat
category = list("hacked", "Misc")
diff --git a/code/modules/research/designs/autolathe_desings/autolathe_designs_tcomms_and_misc.dm b/code/modules/research/designs/autolathe_desings/autolathe_designs_tcomms_and_misc.dm
index a0af3d8b1e..30cd56c66a 100644
--- a/code/modules/research/designs/autolathe_desings/autolathe_designs_tcomms_and_misc.dm
+++ b/code/modules/research/designs/autolathe_desings/autolathe_designs_tcomms_and_misc.dm
@@ -9,7 +9,7 @@
name = "Remote Signaling Device"
id = "signaler"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 400, MAT_GLASS = 120)
+ materials = list(/datum/material/iron = 400, /datum/material/glass = 120)
build_path = /obj/item/assembly/signaler
category = list("initial", "T-Comm")
@@ -17,7 +17,7 @@
name = "Radio Headset"
id = "radio_headset"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 75)
+ materials = list(/datum/material/iron = 75)
build_path = /obj/item/radio/headset
category = list("initial", "T-Comm")
@@ -25,7 +25,7 @@
name = "Station Bounced Radio"
id = "bounced_radio"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 75, MAT_GLASS = 25)
+ materials = list(/datum/material/iron = 75, /datum/material/glass = 25)
build_path = /obj/item/radio/off
category = list("initial", "T-Comm")
@@ -33,7 +33,7 @@
name = "Intercom Frame"
id = "intercom_frame"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 75, MAT_GLASS = 25)
+ materials = list(/datum/material/iron = 75, /datum/material/glass = 25)
build_path = /obj/item/wallframe/intercom
category = list("initial", "T-Comm")
@@ -45,7 +45,7 @@
name = "Camera"
id = "camera"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 50, MAT_GLASS = 100)
+ materials = list(/datum/material/iron = 50, /datum/material/glass = 100)
build_path = /obj/item/camera
category = list("initial", "Misc")
@@ -53,7 +53,7 @@
name = "Camera Film Cartridge"
id = "camera_film"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 10, MAT_GLASS = 10)
+ materials = list(/datum/material/iron = 10, /datum/material/glass = 10)
build_path = /obj/item/camera_film
category = list("initial", "Misc")
@@ -61,7 +61,7 @@
name = "Earmuffs"
id = "earmuffs"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 500, MAT_GLASS = 500)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 500)
build_path = /obj/item/clothing/ears/earmuffs
category = list("initial", "Misc")
@@ -69,7 +69,7 @@
name = "Pipe Painter"
id = "pipe_painter"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 5000, MAT_GLASS = 2000)
+ materials = list(/datum/material/iron = 5000, /datum/material/glass = 2000)
build_path = /obj/item/pipe_painter
category = list("initial", "Misc","Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -78,7 +78,7 @@
name = "Airlock Painter"
id = "airlock_painter"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 50, MAT_GLASS = 50)
+ materials = list(/datum/material/iron = 50, /datum/material/glass = 50)
build_path = /obj/item/airlock_painter
category = list("initial", "Misc","Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -87,7 +87,7 @@
name = "Cultivator"
id = "cultivator"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL=50)
+ materials = list(/datum/material/iron=50)
build_path = /obj/item/cultivator
category = list("initial","Misc","Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_SERVICE
@@ -96,7 +96,7 @@
name = "Plant Analyzer"
id = "plant_analyzer"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 30, MAT_GLASS = 20)
+ materials = list(/datum/material/iron = 30, /datum/material/glass = 20)
build_path = /obj/item/plant_analyzer
category = list("initial","Misc","Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_SERVICE
@@ -105,7 +105,7 @@
name = "Shovel"
id = "shovel"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 50)
+ materials = list(/datum/material/iron = 50)
build_path = /obj/item/shovel
category = list("initial","Misc","Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_SERVICE | DEPARTMENTAL_FLAG_CARGO
@@ -114,7 +114,7 @@
name = "Spade"
id = "spade"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 50)
+ materials = list(/datum/material/iron = 50)
build_path = /obj/item/shovel/spade
category = list("initial","Misc","Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_SERVICE
@@ -123,7 +123,7 @@
name = "Hatchet"
id = "hatchet"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 15000)
+ materials = list(/datum/material/iron = 15000)
build_path = /obj/item/hatchet
category = list("initial","Misc","Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_SERVICE
@@ -132,7 +132,7 @@
name = "Universal Recorder"
id = "recorder"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 60, MAT_GLASS = 30)
+ materials = list(/datum/material/iron = 60, /datum/material/glass = 30)
build_path = /obj/item/taperecorder/empty
category = list("initial", "Misc")
@@ -140,7 +140,7 @@
name = "Tape"
id = "tape"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 20, MAT_GLASS = 5)
+ materials = list(/datum/material/iron = 20, /datum/material/glass = 5)
build_path = /obj/item/tape/random
category = list("initial", "Misc")
@@ -148,7 +148,7 @@
name = "Igniter"
id = "igniter"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 500, MAT_GLASS = 50)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 50)
build_path = /obj/item/assembly/igniter
category = list("initial", "Misc")
@@ -156,7 +156,7 @@
name = "Infrared Emitter"
id = "infrared_emitter"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 1000, MAT_GLASS = 500)
+ materials = list(/datum/material/iron = 1000, /datum/material/glass = 500)
build_path = /obj/item/assembly/infra
category = list("initial", "Misc")
@@ -164,7 +164,7 @@
name = "Timer"
id = "timer"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 500, MAT_GLASS = 50)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 50)
build_path = /obj/item/assembly/timer
category = list("initial", "Misc")
@@ -172,7 +172,7 @@
name = "Voice Analyser"
id = "voice_analyser"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 500, MAT_GLASS = 50)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 50)
build_path = /obj/item/assembly/voice
category = list("initial", "Misc")
@@ -180,7 +180,7 @@
name = "Proximity Sensor"
id = "prox_sensor"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 800, MAT_GLASS = 200)
+ materials = list(/datum/material/iron = 800, /datum/material/glass = 200)
build_path = /obj/item/assembly/prox_sensor
category = list("initial", "Misc")
@@ -188,7 +188,7 @@
name = "Box of Foam Darts"
id = "foam_dart"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 500)
+ materials = list(/datum/material/iron = 500)
build_path = /obj/item/ammo_box/foambox
category = list("initial", "Misc")
@@ -196,7 +196,7 @@
name = "Laptop Frame"
id = "laptop"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 10000, MAT_GLASS = 1000)
+ materials = list(/datum/material/iron = 10000, /datum/material/glass = 1000)
build_path = /obj/item/modular_computer/laptop/buildable
category = list("initial","Misc")
@@ -204,7 +204,7 @@
name = "Tablet Frame"
id = "tablet"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 2000, MAT_GLASS = 1000)
+ materials = list(/datum/material/iron = 2000, /datum/material/glass = 1000)
build_path = /obj/item/modular_computer/tablet
category = list("initial","Misc")
@@ -212,7 +212,7 @@
name = "Slime Scanner"
id = "slime_scanner"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 300, MAT_GLASS = 200)
+ materials = list(/datum/material/iron = 300, /datum/material/glass = 200)
build_path = /obj/item/slime_scanner
category = list("initial", "Misc")
@@ -220,7 +220,7 @@
name = "Pet Carrier"
id = "pet_carrier"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 7500, MAT_GLASS = 100)
+ materials = list(/datum/material/iron = 7500, /datum/material/glass = 100)
build_path = /obj/item/pet_carrier
category = list("initial", "Misc")
@@ -228,7 +228,7 @@
name = "Package Wrapping"
id = "packagewrap"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 200, MAT_GLASS = 200)
+ materials = list(/datum/material/iron = 200, /datum/material/glass = 200)
build_path = /obj/item/stack/packageWrap
category = list("initial", "Misc","Equipment")
maxstack = 30
@@ -237,7 +237,7 @@
name = "Holodisk"
id = "holodisk"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 100, MAT_GLASS = 100)
+ materials = list(/datum/material/iron = 100, /datum/material/glass = 100)
build_path = /obj/item/disk/holodisk
category = list("initial", "Misc")
@@ -245,7 +245,7 @@
name = "Lockable Collar"
id = "lock_collar"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 1200, MAT_GLASS = 100)
+ materials = list(/datum/material/iron = 1200, /datum/material/glass = 100)
build_path = /obj/item/clothing/neck/petcollar/locked
category = list("initial", "Misc")
@@ -253,6 +253,6 @@
name = "Collar Key"
id = "collar_key"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 300, MAT_GLASS = 150)
+ materials = list(/datum/material/iron = 300, /datum/material/glass = 150)
build_path = /obj/item/key/collar
category = list("initial", "Misc")
diff --git a/code/modules/research/designs/autolathe_desings/autolathe_designs_tools.dm b/code/modules/research/designs/autolathe_desings/autolathe_designs_tools.dm
index 6affacf1b1..8288ceff23 100644
--- a/code/modules/research/designs/autolathe_desings/autolathe_designs_tools.dm
+++ b/code/modules/research/designs/autolathe_desings/autolathe_designs_tools.dm
@@ -8,7 +8,7 @@
name = "Bucket"
id = "bucket"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 200)
+ materials = list(/datum/material/iron = 200)
build_path = /obj/item/reagent_containers/glass/bucket
category = list("initial","Tools","Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_SERVICE
@@ -17,7 +17,7 @@
name = "Pocket Crowbar"
id = "crowbar"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 50)
+ materials = list(/datum/material/iron = 50)
build_path = /obj/item/crowbar
category = list("initial","Tools","Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_SCIENCE
@@ -26,7 +26,7 @@
name = "Flashlight"
id = "flashlight"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 50, MAT_GLASS = 20)
+ materials = list(/datum/material/iron = 50, /datum/material/glass = 20)
build_path = /obj/item/flashlight
category = list("initial","Tools")
@@ -34,7 +34,7 @@
name = "Fire Extinguisher"
id = "extinguisher"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 90)
+ materials = list(/datum/material/iron = 90)
build_path = /obj/item/extinguisher
category = list("initial","Tools")
@@ -42,15 +42,15 @@
name = "Pocket Fire Extinguisher"
id = "pocketfireextinguisher"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 50, MAT_GLASS = 40)
+ materials = list(/datum/material/iron = 50, /datum/material/glass = 40)
build_path = /obj/item/extinguisher/mini
category = list("initial","Tools")
/datum/design/multitool
name = "Multitool"
id = "multitool"
- build_type = AUTOLATHE
- materials = list(MAT_METAL = 50, MAT_GLASS = 20)
+ build_type = AUTOLATHE | PROTOLATHE
+ materials = list(/datum/material/iron = 50, /datum/material/glass = 20)
build_path = /obj/item/multitool
category = list("initial","Tools","Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_SCIENCE
@@ -59,7 +59,7 @@
name = "Analyzer"
id = "analyzer"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 30, MAT_GLASS = 20)
+ materials = list(/datum/material/iron = 30, /datum/material/glass = 20)
build_path = /obj/item/analyzer
category = list("initial","Tools")
@@ -67,7 +67,7 @@
name = "T-Ray Scanner"
id = "tscanner"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 150)
+ materials = list(/datum/material/iron = 150)
build_path = /obj/item/t_scanner
category = list("initial","Tools","Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -76,7 +76,7 @@
name = "Welding Tool"
id = "welding_tool"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 70, MAT_GLASS = 20)
+ materials = list(/datum/material/iron = 70, /datum/material/glass = 20)
build_path = /obj/item/weldingtool
category = list("initial","Tools","Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_SCIENCE
@@ -85,7 +85,7 @@
name = "Emergency Welding Tool"
id = "mini_welding_tool"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 30, MAT_GLASS = 10)
+ materials = list(/datum/material/iron = 30, /datum/material/glass = 10)
build_path = /obj/item/weldingtool/mini
category = list("initial","Tools")
@@ -93,7 +93,7 @@
name = "Screwdriver"
id = "screwdriver"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 75)
+ materials = list(/datum/material/iron = 75)
build_path = /obj/item/screwdriver
category = list("initial","Tools","Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_SCIENCE
@@ -101,7 +101,7 @@
name = "Wirecutters"
id = "wirecutters"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 80)
+ materials = list(/datum/material/iron = 80)
build_path = /obj/item/wirecutters
category = list("initial","Tools","Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_SCIENCE
@@ -110,7 +110,7 @@
name = "Wrench"
id = "wrench"
build_type = AUTOLATHE | PROTOLATHE
- materials = list(MAT_METAL = 150)
+ materials = list(/datum/material/iron = 150)
build_path = /obj/item/wrench
category = list("initial","Tools","Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_SCIENCE
@@ -119,7 +119,7 @@
name = "Welding Helmet"
id = "welding_helmet"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 1750, MAT_GLASS = 400)
+ materials = list(/datum/material/iron = 1750, /datum/material/glass = 400)
build_path = /obj/item/clothing/head/welding
category = list("initial","Tools")
@@ -127,7 +127,7 @@
name = "Cable Coil"
id = "cable_coil"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 10, MAT_GLASS = 5)
+ materials = list(/datum/material/iron = 10, /datum/material/glass = 5)
build_path = /obj/item/stack/cable_coil/random
category = list("initial","Tools","Tool Designs")
maxstack = 30
@@ -137,7 +137,7 @@
name = "Toolbox"
id = "tool_box"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 500)
+ materials = list(MAT_CATEGORY_RIGID = 500)
build_path = /obj/item/storage/toolbox
category = list("initial","Tools")
@@ -145,7 +145,7 @@
name = "Spraycan"
id = "spraycan"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 100, MAT_GLASS = 100)
+ materials = list(/datum/material/iron = 100, /datum/material/glass = 100)
build_path = /obj/item/toy/crayon/spraycan
category = list("initial", "Tools")
@@ -153,6 +153,6 @@
name = "Geiger Counter"
id = "geigercounter"
build_type = AUTOLATHE
- materials = list(MAT_METAL = 150, MAT_GLASS = 150)
+ materials = list(/datum/material/iron = 150, /datum/material/glass = 150)
build_path = /obj/item/geiger_counter
category = list("initial", "Tools")
diff --git a/code/modules/research/designs/autoylathe_designs.dm b/code/modules/research/designs/autoylathe_designs.dm
index d54dce9e8a..7811cfdaad 100644
--- a/code/modules/research/designs/autoylathe_designs.dm
+++ b/code/modules/research/designs/autoylathe_designs.dm
@@ -13,508 +13,508 @@
/datum/design/autoylathe/balloon
name = "Empty Water balloon"
id = "waterballoon"
- materials = list(MAT_PLASTIC = 50)
+ materials = list(/datum/material/plastic = 50)
build_path = /obj/item/toy/balloon
category = list("initial", "Toys")
/datum/design/autoylathe/spinningtoy
name = "Toy Singularity"
id = "singuloutoy"
- materials = list(MAT_PLASTIC = 500)
+ materials = list(/datum/material/plastic = 500)
build_path = /obj/item/toy/spinningtoy
category = list("initial", "Toys")
/datum/design/autoylathe/capgun
name = "Cap Gun"
id = "capgun"
- materials = list(MAT_PLASTIC = 500)
+ materials = list(/datum/material/plastic = 500)
build_path = /obj/item/toy/gun
category = list("initial", "Pistols")
/datum/design/autoylathe/capgunammo
name = "Capgun Ammo"
id = "capgunammo"
- materials = list(MAT_PLASTIC = 50)
+ materials = list(/datum/material/plastic = 50)
build_path = /obj/item/toy/ammo/gun
category = list("initial", "misc")
/datum/design/autoylathe/toysword
name = "Toy Sword"
id = "toysword"
- materials = list(MAT_PLASTIC = 500)
+ materials = list(/datum/material/plastic = 500)
build_path = /obj/item/toy/sword
category = list("initial", "Melee")
/datum/design/autoylathe/foamblade
name = "Foam Armblade"
id = "foamblade"
- materials = list(MAT_PLASTIC = 500)
+ materials = list(/datum/material/plastic = 500)
build_path = /obj/item/toy/foamblade
category = list("initial", "Melee")
/datum/design/autoylathe/windupbox
name = "Wind Up Toolbox"
id = "windupbox"
- materials = list(MAT_PLASTIC = 500)
+ materials = list(/datum/material/plastic = 500)
build_path = /obj/item/toy/windupToolbox
category = list("initial", "Toys")
/datum/design/autoylathe/toydualsword
name = "Double-Bladed Toy Sword"
id = "dbtoysword"
- materials = list(MAT_PLASTIC = 1000)
+ materials = list(/datum/material/plastic = 1000)
build_path = /obj/item/twohanded/dualsaber/toy
category = list("initial", "Melee")
/datum/design/autoylathe/toykatana
name = "Replica Katana"
id = "toykatana"
- materials = list(MAT_PLASTIC = 50, MAT_METAL = 450)
+ materials = list(/datum/material/plastic = 50, /datum/material/iron = 450)
build_path = /obj/item/toy/katana
category = list("initial", "Melee")
/datum/design/autoylathe/snappop
name = "Snap Pop"
id = "snappop_phoenix"
- materials = list(MAT_PLASTIC = 50)
+ materials = list(/datum/material/plastic = 50)
build_path = /obj/item/toy/snappop
category = list("initial", "Toys")
/datum/design/autoylathe/mech/model1
name = "Toy Ripley"
id = "toymech1"
- materials = list(MAT_PLASTIC = 250)
+ materials = list(/datum/material/plastic = 250)
build_path = /obj/item/toy/prize/ripley
/datum/design/autoylathe/mech/model2
name = "Toy Firefighter Ripley"
id = "toymech2"
- materials = list(MAT_PLASTIC = 250)
+ materials = list(/datum/material/plastic = 250)
build_path = /obj/item/toy/prize/fireripley
/datum/design/autoylathe/mech/contraband/model3
name = "Toy Deathsquad fireripley "
id = "toymech3"
- materials = list(MAT_PLASTIC = 250)
+ materials = list(/datum/material/plastic = 250)
build_path = /obj/item/toy/prize/deathripley
/datum/design/autoylathe/mech/model4
name = "Toy Gygax"
id = "toymech4"
- materials = list(MAT_PLASTIC = 250)
+ materials = list(/datum/material/plastic = 250)
build_path = /obj/item/toy/prize/gygax
/datum/design/autoylathe/mech/model5
name = "Toy Durand"
id = "toymech5"
- materials = list(MAT_PLASTIC = 250)
+ materials = list(/datum/material/plastic = 250)
build_path = /obj/item/toy/prize/durand
/datum/design/autoylathe/mech/contraband/model6
name = "Toy H.O.N.K."
id = "toymech6"
- materials = list(MAT_PLASTIC = 250)
+ materials = list(/datum/material/plastic = 250)
build_path = /obj/item/toy/prize/honk
/datum/design/autoylathe/mech/contraband/model7
name = "Toy Marauder"
id = "toymech7"
- materials = list(MAT_PLASTIC = 250)
+ materials = list(/datum/material/plastic = 250)
build_path = /obj/item/toy/prize/marauder
/datum/design/autoylathe/mech/contraband/model8
name = "Toy Seraph"
id = "toymech8"
- materials = list(MAT_PLASTIC = 250)
+ materials = list(/datum/material/plastic = 250)
build_path = /obj/item/toy/prize/seraph
/datum/design/autoylathe/mech/contraband/model9
name = "Toy Mauler"
id = "toymech9"
- materials = list(MAT_PLASTIC = 250)
+ materials = list(/datum/material/plastic = 250)
build_path = /obj/item/toy/prize/mauler
/datum/design/autoylathe/mech/model10
name = "Toy Odysseus"
id = "toymech10"
- materials = list(MAT_PLASTIC = 250)
+ materials = list(/datum/material/plastic = 250)
build_path = /obj/item/toy/prize/odysseus
/datum/design/autoylathe/mech/model11
name = "Toy Phazon"
id = "toymech11"
- materials = list(MAT_PLASTIC = 250)
+ materials = list(/datum/material/plastic = 250)
build_path = /obj/item/toy/prize/phazon
/datum/design/autoylathe/mech/contraband/model12
name = "Toy Reticence"
id = "toymech12"
- materials = list(MAT_PLASTIC = 250)
+ materials = list(/datum/material/plastic = 250)
build_path = /obj/item/toy/prize/reticence
category = list("hacked", "Figurines")
/datum/design/autoylathe/talking/AI
name = "Toy AI"
id = "ToyAICore"
- materials = list(MAT_PLASTIC = 250, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 250, /datum/material/iron = 50)
build_path = /obj/item/toy/talking/AI
category = list("initial", "Toys")
/datum/design/autoylathe/talking/codex_gigas
name = "Toy Codex Gigas"
id = "ToyCodex"
- materials = list(MAT_PLASTIC = 250, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 250, /datum/material/iron = 50)
build_path = /obj/item/toy/talking/codex_gigas
category = list("initial", "Toys")
/datum/design/autoylathe/talking/owl
name = "Owl Action Figure"
id = "owlactionfig"
- materials = list(MAT_PLASTIC = 250, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 250, /datum/material/iron = 50)
build_path = /obj/item/toy/talking/owl
/datum/design/autoylathe/talking/griffin
name = "Griffon Action Figure"
id = "griffinactionfig"
- materials = list(MAT_PLASTIC = 250, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 250, /datum/material/iron = 50)
build_path = /obj/item/toy/talking/griffin
/datum/design/autoylathe/cards
name = "Deck of Cards"
id = "carddeck"
- materials = list(MAT_PLASTIC = 250)
+ materials = list(/datum/material/plastic = 250)
build_path = /obj/item/toy/cards/deck
category = list("initial", "Toys")
/datum/design/autoylathe/nuke
name = "Nuclear Fission Explosive Toy"
id = "nuketoy"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/nuke
category = list("initial", "Toys")
/datum/design/autoylathe/minimeteor
name = "Mini-Meteor"
id = "meattoy"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/minimeteor
category = list("hacked", "Misc")
/datum/design/autoylathe/redbutton
name = "Big Red Button"
id = "redbutton"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/redbutton
category = list("initial", "Toys")
/datum/design/autoylathe/beach_ball
name = "Beach Ball"
id = "beachball"
- materials = list(MAT_PLASTIC = 500)
+ materials = list(/datum/material/plastic = 500)
build_path = /obj/item/toy/beach_ball
category = list("initial", "Toys")
/datum/design/autoylathe/clockwork_watch
name = "Clockwork Watch"
id = "clockwatch"
- materials = list(MAT_PLASTIC = 1000)
+ materials = list(/datum/material/plastic = 1000)
build_path = /obj/item/toy/clockwork_watch
category = list("initial", "misc")
/datum/design/autoylathe/dagger
name = "Toy Dagger"
id = "toydagger"
- materials = list(MAT_PLASTIC = 1000)
+ materials = list(/datum/material/plastic = 1000)
build_path = /obj/item/toy/toy_dagger
category = list("initial", "Melee")
/datum/design/autoylathe/xeno
name = "Xenomorph"
id = "xenomorph"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/toy_xeno
/datum/design/autoylathe/cattoy
name = "Toy Mouse"
id = "cattoy"
- materials = list(MAT_PLASTIC = 500)
+ materials = list(/datum/material/plastic = 500)
build_path = /obj/item/toy/cattoy
category = list("initial", "Toys")
/datum/design/autoylathe/figure/assistant
name = "Assistant"
id = "assfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/assistant
/datum/design/autoylathe/figure/atmos
name = "Atmos Tech"
id = "atmfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/atmos
/datum/design/autoylathe/figure/bartender
name = "Bartender"
id = "barfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/bartender
/datum/design/autoylathe/figure/botanist
name = "Botanist"
id = "botfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/botanist
/datum/design/autoylathe/figure/captain
name = "Captain"
id = "capfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/captain
/datum/design/autoylathe/figure/cargotech
name = "Cargo Technician"
id = "carfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/cargotech
/datum/design/autoylathe/figure/ce
name = "Chief Engineer"
id = "cefigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/ce
/datum/design/autoylathe/figure/chaplain
name = "Chaplain"
id = "chafigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/chaplain
/datum/design/autoylathe/figure/chef
name = "Chef"
id = "chefigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/chef
/datum/design/autoylathe/figure/chemist
name = "Chemist"
id = "chmfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/chemist
/datum/design/autoylathe/figure/clown
name = "Clown"
id = "clnfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/clown
/datum/design/autoylathe/figure/cmo
name = "Chief Medical Officer"
id = "cmofigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/cmo
/datum/design/autoylathe/figure/curator
name = "Curator"
id = "curfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/curator
/datum/design/autoylathe/figure/borg
name = "Cyborg"
id = "cybfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/borg
/datum/design/autoylathe/figure/detective
name = "Detective"
id = "detfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/detective
/datum/design/autoylathe/figure/engineer
name = "Engineer"
id = "engfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/engineer
/datum/design/autoylathe/figure/geneticist
name = "Geneticist"
id = "genfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/geneticist
/datum/design/autoylathe/figure/hop
name = "Head of Personnel"
id = "hopfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/hop
/datum/design/autoylathe/figure/hos
name = "Head of Security"
id = "hosfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/hos
/datum/design/autoylathe/figure/janitor
name = "Janitor"
id = "janfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/janitor
/datum/design/autoylathe/figure/lawyer
name = "Lawyer"
id = "lawfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/lawyer
/datum/design/autoylathe/figure/md
name = "Medical Doctor"
id = "medfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/md
/datum/design/autoylathe/figure/mime
name = "Mime"
id = "mimfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/mime
/datum/design/autoylathe/figure/miner
name = "Miner"
id = "minfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/miner
/datum/design/autoylathe/figure/rd
name = "Research Director"
id = "rdfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/rd
/datum/design/autoylathe/figure/robotocist
name = "Robotocist"
id = "robfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/roboticist
/datum/design/autoylathe/figure/qm
name = "Quartermaster"
id = "qtmfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/qm
/datum/design/autoylathe/figure/scientist
name = "Scientist"
id = "scifigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/scientist
/datum/design/autoylathe/figure/secofficer
name = "Security Officer"
id = "secfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/secofficer
/datum/design/autoylathe/figure/virologist
name = "Virologist"
id = "virfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/virologist
/datum/design/autoylathe/figure/warden
name = "Warden"
id = "warfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/warden
/datum/design/autoylathe/figure/dsquad
name = "Deathsquad"
id = "dsqfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/dsquad
category = list("hacked", "Figurines")
/datum/design/autoylathe/figure/ian
name = "Ian"
id = "ianfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/ian
category = list("hacked", "Figurines")
/datum/design/autoylathe/figure/ninja
name = "Ninja"
id = "ninfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/ninja
category = list("hacked", "Figurines")
/datum/design/autoylathe/figure/syndie
name = "Nuclear Operative"
id = "nucfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/syndie
category = list("hacked", "Figurines")
/datum/design/autoylathe/figure/wizard
name = "Wizard"
id = "wizfigure"
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 50)
build_path = /obj/item/toy/figure/wizard
category = list("hacked", "Figurines")
/datum/design/autoylathe/dildo
name = "Customizable Dildo"
id = "dildo"
- materials = list(MAT_PLASTIC = 2000)
+ materials = list(/datum/material/plastic = 2000)
build_path = /obj/item/dildo/custom
category = list("initial", "Adult")
/datum/design/autoylathe/collar
name = "Collar"
id = "collar"
- materials = list(MAT_PLASTIC = 250, MAT_METAL = 50)
+ materials = list(/datum/material/plastic = 250, /datum/material/iron = 50)
build_path = /obj/item/clothing/neck/petcollar
category = list("initial", "Adult")
/datum/design/autoylathe/lastag/blue/gun
name = "Blue Lasertag Rifle"
id = "lastagrifleblue"
- materials = list(MAT_PLASTIC = 2000, MAT_METAL = 500, MAT_GLASS = 500)
+ materials = list(/datum/material/plastic = 2000, /datum/material/iron = 500, /datum/material/glass = 500)
build_path = /obj/item/gun/energy/laser/bluetag
category = list("initial", "Rifles")
/datum/design/autoylathe/lastag/red/gun
name = "Red Lasertag Rifle"
id = "lastagriflered"
- materials = list(MAT_PLASTIC = 2000, MAT_METAL = 500, MAT_GLASS = 500)
+ materials = list(/datum/material/plastic = 2000, /datum/material/iron = 500, /datum/material/glass = 500)
build_path = /obj/item/gun/energy/laser/redtag
category = list("initial", "Rifles")
/datum/design/autoylathe/lastag/blue/hat
name = "Blue Lasertag Helmet"
id = "lastaghatblue"
- materials = list(MAT_PLASTIC = 4000, MAT_METAL = 1000, MAT_GLASS = 500)
+ materials = list(/datum/material/plastic = 4000, /datum/material/iron = 1000, /datum/material/glass = 500)
build_path = /obj/item/clothing/head/helmet/bluetaghelm
category = list("initial", "Armor")
/datum/design/autoylathe/lastag/blue/armor
name = "Blue Lasertag Armor"
id = "lastagarmorblue"
- materials = list(MAT_PLASTIC = 8000, MAT_METAL = 2000, MAT_GLASS = 100)
+ materials = list(/datum/material/plastic = 8000, /datum/material/iron = 2000, /datum/material/glass = 100)
build_path = /obj/item/clothing/suit/bluetag
category = list("initial", "Armor")
/datum/design/autoylathe/lastag/red/hat
name = "Red Lasertag Helmet"
id = "lastaghelmetred"
- materials = list(MAT_PLASTIC = 4000, MAT_METAL = 1000, MAT_GLASS = 500)
+ materials = list(/datum/material/plastic = 4000, /datum/material/iron = 1000, /datum/material/glass = 500)
build_path = /obj/item/clothing/head/helmet/redtaghelm
category = list("initial", "Armor")
/datum/design/autoylathe/lastag/red/armor
name = "Red Lasertag Armor"
id = "lastagarmorred"
- materials = list(MAT_PLASTIC = 8000, MAT_METAL = 2000, MAT_GLASS = 1000)
+ materials = list(/datum/material/plastic = 8000, /datum/material/iron = 2000, /datum/material/glass = 1000)
build_path = /obj/item/clothing/suit/redtag
category = list("initial", "Armor")
@@ -544,14 +544,14 @@
/datum/design/autoylathe/lastag/blue
name = "Blue Lasertag Kit"
id = "lastagkitblue"
- materials = list(MAT_PLASTIC = 16000, MAT_METAL = 4000, MAT_GLASS = 2000)
+ materials = list(/datum/material/plastic = 16000, /datum/material/iron = 4000, /datum/material/glass = 2000)
build_path = /obj/item/storage/box/blueteam
category = list("initial", "Misc")
/datum/design/autoylathe/lastag/red
name = "Red Lasertag Kit"
id = "lastagkitred"
- materials = list(MAT_PLASTIC = 16000, MAT_METAL = 4000, MAT_GLASS = 2000)
+ materials = list(/datum/material/plastic = 16000, /datum/material/iron = 4000, /datum/material/glass = 2000)
build_path = /obj/item/storage/box/redteam
category = list("initial", "Misc")
@@ -559,7 +559,7 @@
name = "Foam Force X9 Rifle"
id = "foam_x9"
build_type = AUTOYLATHE
- materials = list(MAT_PLASTIC = 4000, MAT_METAL = 500)
+ materials = list(/datum/material/plastic = 4000, /datum/material/iron = 500)
build_path = /obj/item/gun/ballistic/automatic/x9/toy
category = list("initial", "Rifles")
@@ -567,7 +567,7 @@
name = "Box of Foam Darts"
id = "foam_dart"
build_type = AUTOYLATHE
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 100)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 100)
build_path = /obj/item/ammo_box/foambox
category = list("initial", "Misc")
@@ -575,7 +575,7 @@
name = "Foam Force Magpistol"
id = "magfoam_launcher"
build_type = AUTOYLATHE
- materials = list(MAT_PLASTIC = 2000, MAT_METAL = 250)
+ materials = list(/datum/material/plastic = 2000, /datum/material/iron = 250)
build_path = /obj/item/gun/ballistic/shotgun/toy/mag
category = list("initial", "Pistols")
@@ -583,7 +583,7 @@
name = "Foam Force MagRifle"
id = "foam_magrifle"
build_type = AUTOYLATHE
- materials = list(MAT_PLASTIC = 4000, MAT_METAL = 500)
+ materials = list(/datum/material/plastic = 4000, /datum/material/iron = 500)
build_path = /obj/item/gun/ballistic/automatic/toy/magrifle
category = list("initial", "Rifles")
@@ -591,7 +591,7 @@
name = "MagTag Hyper Rifle"
id = "foam_hyperburst"
build_type = AUTOYLATHE
- materials = list(MAT_PLASTIC = 4000, MAT_METAL = 2000, MAT_GLASS = 1000)
+ materials = list(/datum/material/plastic = 4000, /datum/material/iron = 2000, /datum/material/glass = 1000)
build_path = /obj/item/gun/energy/laser/practice/hyperburst
category = list("initial", "Rifles")
@@ -599,7 +599,7 @@
name = "Foam Force Stealth Pistol"
id = "foam_sp"
build_type = AUTOYLATHE
- materials = list(MAT_PLASTIC = 2000, MAT_METAL = 1000)
+ materials = list(/datum/material/plastic = 2000, /datum/material/iron = 1000)
build_path = /obj/item/gun/ballistic/automatic/toy/pistol/stealth
category = list("initial", "Pistols")
@@ -607,7 +607,7 @@
name = "RayTag Gun"
id = "toyray"
build_type = AUTOYLATHE
- materials = list(MAT_PLASTIC = 2000, MAT_METAL = 1000, MAT_GLASS = 1000)
+ materials = list(/datum/material/plastic = 2000, /datum/material/iron = 1000, /datum/material/glass = 1000)
build_path = /obj/item/gun/energy/laser/practice/raygun
category = list("initial", "Pistols")
@@ -615,7 +615,7 @@
name = "Foam Force AM4-C Rifle"
id = "foam_am4c"
build_type = AUTOYLATHE
- materials = list(MAT_PLASTIC = 4000, MAT_METAL = 500)
+ materials = list(/datum/material/plastic = 4000, /datum/material/iron = 500)
build_path = /obj/item/gun/ballistic/automatic/AM4C
category = list("initial", "Rifles")
@@ -623,7 +623,7 @@
name = "Replica F3 Justicar"
id = "foam_f3"
build_type = AUTOYLATHE
- materials = list(MAT_PLASTIC = 2000, MAT_METAL = 250)
+ materials = list(/datum/material/plastic = 2000, /datum/material/iron = 250)
build_path = /obj/item/toy/gun/justicar
category = list("initial", "Pistols")
@@ -631,7 +631,7 @@
name = "pump-action plastic blaster"
id = "toy_blaster"
build_type = AUTOYLATHE
- materials = list(MAT_PLASTIC = 2000, MAT_METAL = 750, MAT_GLASS = 1000)
+ materials = list(/datum/material/plastic = 2000, /datum/material/iron = 750, /datum/material/glass = 1000)
build_path = /obj/item/gun/energy/pumpaction/toy
category = list("initial", "Rifles")
@@ -639,7 +639,7 @@
name = "Box of Caps"
id = "capammo"
build_type = AUTOYLATHE
- materials = list(MAT_METAL = 10, MAT_GLASS = 10)
+ materials = list(/datum/material/iron = 10, /datum/material/glass = 10)
build_path = /obj/item/toy/ammo/gun
category = list("initial", "Misc")
@@ -647,7 +647,7 @@
name = "Foam Force SMG"
id = "foam_smg"
build_type = AUTOYLATHE
- materials = list(MAT_PLASTIC = 2000, MAT_METAL = 250)
+ materials = list(/datum/material/plastic = 2000, /datum/material/iron = 250)
build_path = /obj/item/gun/ballistic/automatic/toy/unrestricted
category = list("initial", "Pistols")
@@ -655,7 +655,7 @@
name = "Foam Force Pistol"
id = "foam_pistol"
build_type = AUTOYLATHE
- materials = list(MAT_PLASTIC = 2000, MAT_METAL = 250)
+ materials = list(/datum/material/plastic = 2000, /datum/material/iron = 250)
build_path = /obj/item/gun/ballistic/automatic/toy/pistol/unrestricted
category = list("initial", "Pistols")
@@ -663,7 +663,7 @@
name = "Foam Force Shotgun"
id = "foam_shotgun"
build_type = AUTOYLATHE
- materials = list(MAT_PLASTIC = 4000, MAT_METAL = 500)
+ materials = list(/datum/material/plastic = 4000, /datum/material/iron = 500)
build_path = /obj/item/gun/ballistic/shotgun/toy/unrestricted
category = list("initial", "Rifles")
@@ -671,7 +671,7 @@
name = "Box of Lastag Red Foam Darts"
id = "redfoam_dart"
build_type = AUTOYLATHE
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 100)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 100)
build_path = /obj/item/ammo_box/foambox/tag/red
category = list("initial", "Misc")
@@ -679,7 +679,7 @@
name = "Box of Lastag Blue Foam Darts"
id = "bluefoam_dart"
build_type = AUTOYLATHE
- materials = list(MAT_PLASTIC = 500, MAT_METAL = 100)
+ materials = list(/datum/material/plastic = 500, /datum/material/iron = 100)
build_path = /obj/item/ammo_box/foambox/tag/blue
category = list("initial", "Misc")
@@ -687,7 +687,7 @@
name = "Foam Force Crossbow"
id = "foam_bow"
build_type = AUTOYLATHE
- materials = list(MAT_PLASTIC = 2000, MAT_METAL = 250)
+ materials = list(/datum/material/plastic = 2000, /datum/material/iron = 250)
build_path = /obj/item/gun/ballistic/shotgun/toy/crossbow
category = list("initial", "Pistols")
@@ -695,7 +695,7 @@
name = "Donksoft C20R"
id = "foam_c20"
build_type = AUTOYLATHE
- materials = list(MAT_PLASTIC = 4000, MAT_METAL = 500)
+ materials = list(/datum/material/plastic = 4000, /datum/material/iron = 500)
build_path = /obj/item/gun/ballistic/automatic/c20r/toy/unrestricted
category = list("hacked", "Rifles")
@@ -703,6 +703,6 @@
name = "Donksoft LMG"
id = "foam_LMG"
build_type = AUTOYLATHE
- materials = list(MAT_PLASTIC = 4000, MAT_METAL = 500)
+ materials = list(/datum/material/plastic = 4000, /datum/material/iron = 500)
build_path = /obj/item/gun/ballistic/automatic/l6_saw/toy/unrestricted
category = list("hacked", "Rifles")
diff --git a/code/modules/research/designs/biogenerator_designs.dm b/code/modules/research/designs/biogenerator_designs.dm
index dd55697bee..e82dffbe07 100644
--- a/code/modules/research/designs/biogenerator_designs.dm
+++ b/code/modules/research/designs/biogenerator_designs.dm
@@ -3,18 +3,18 @@
///////////////////////////////////
/datum/design/milk
- name = "10 Milk"
+ name = "10u Milk"
id = "milk"
build_type = BIOGENERATOR
- materials = list(MAT_BIOMASS = 20)
+ materials = list(/datum/material/biomass = 20)
make_reagents = list(/datum/reagent/consumable/milk = 10)
category = list("initial","Food")
/datum/design/cream
- name = "10 Cream"
+ name = "10u Cream"
id = "cream"
build_type = BIOGENERATOR
- materials = list(MAT_BIOMASS = 30)
+ materials = list(/datum/material/biomass = 30)
make_reagents = list(/datum/reagent/consumable/cream = 10)
category = list("initial","Food")
@@ -22,7 +22,7 @@
name = "Milk Carton"
id = "milk_carton"
build_type = BIOGENERATOR
- materials = list(MAT_BIOMASS = 100)
+ materials = list(/datum/material/biomass = 100)
build_path = /obj/item/reagent_containers/food/condiment/milk
category = list("initial","Food")
@@ -30,7 +30,7 @@
name = "Cream Carton"
id = "cream_carton"
build_type = BIOGENERATOR
- materials = list(MAT_BIOMASS = 300)
+ materials = list(/datum/material/biomass = 300)
build_path = /obj/item/reagent_containers/food/drinks/bottle/cream
category = list("initial","Food")
@@ -38,7 +38,7 @@
name = "10u Black Pepper"
id = "black_pepper"
build_type = BIOGENERATOR
- materials = list(MAT_BIOMASS = 25)
+ materials = list(/datum/material/biomass = 25)
make_reagents = list(/datum/reagent/consumable/blackpepper = 10)
category = list("initial","Food")
@@ -46,7 +46,7 @@
name = "Pepper Mill"
id = "pepper_mill"
build_type = BIOGENERATOR
- materials = list(MAT_BIOMASS = 50)
+ materials = list(/datum/material/biomass = 50)
build_path = /obj/item/reagent_containers/food/condiment/peppermill
make_reagents = list()
category = list("initial","Food")
@@ -55,15 +55,15 @@
name = "10u Universal Enzyme"
id = "enzyme"
build_type = BIOGENERATOR
- materials = list(MAT_BIOMASS = 30)
- make_reagents = list("enzyme" = 10)
+ materials = list(/datum/material/biomass = 30)
+ make_reagents = list(/datum/reagent/consumable/enzyme = 10)
category = list("initial","Food")
/datum/design/flour_sack
name = "Flour Sack"
id = "flour_sack"
build_type = BIOGENERATOR
- materials = list(MAT_BIOMASS = 150)
+ materials = list(/datum/material/biomass = 150)
build_path = /obj/item/reagent_containers/food/condiment/flour
category = list("initial","Food")
@@ -71,7 +71,7 @@
name = "Monkey Cube"
id = "mcube"
build_type = BIOGENERATOR
- materials = list(MAT_BIOMASS = 250)
+ materials = list(/datum/material/biomass = 250)
build_path = /obj/item/reagent_containers/food/snacks/monkeycube
category = list("initial", "Food")
@@ -79,7 +79,7 @@
name = "Biomass Meat Slab"
id = "smeat"
build_type = BIOGENERATOR
- materials = list(MAT_BIOMASS = 175)
+ materials = list(/datum/material/biomass = 175)
build_path = /obj/item/reagent_containers/food/snacks/meat/slab/synthmeat
category = list("initial", "Food")
@@ -87,7 +87,7 @@
name = "E-Z Nutrient"
id = "ez_nut"
build_type = BIOGENERATOR
- materials = list(MAT_BIOMASS = 10)
+ materials = list(/datum/material/biomass = 10)
build_path = /obj/item/reagent_containers/glass/bottle/nutrient/ez
category = list("initial","Botany Chemicals")
@@ -95,7 +95,7 @@
name = "Left 4 Zed"
id = "l4z_nut"
build_type = BIOGENERATOR
- materials = list(MAT_BIOMASS = 20)
+ materials = list(/datum/material/biomass = 20)
build_path = /obj/item/reagent_containers/glass/bottle/nutrient/l4z
category = list("initial","Botany Chemicals")
@@ -103,7 +103,7 @@
name = "Robust Harvest"
id = "rh_nut"
build_type = BIOGENERATOR
- materials = list(MAT_BIOMASS = 25)
+ materials = list(/datum/material/biomass = 25)
build_path = /obj/item/reagent_containers/glass/bottle/nutrient/rh
category = list("initial","Botany Chemicals")
@@ -111,7 +111,7 @@
name = "Weed Killer"
id = "weed_killer"
build_type = BIOGENERATOR
- materials = list(MAT_BIOMASS = 50)
+ materials = list(/datum/material/biomass = 50)
build_path = /obj/item/reagent_containers/glass/bottle/killer/weedkiller
category = list("initial","Botany Chemicals")
@@ -119,15 +119,31 @@
name = "Pest Killer"
id = "pest_spray"
build_type = BIOGENERATOR
- materials = list(MAT_BIOMASS = 50)
+ materials = list(/datum/material/biomass = 50)
build_path = /obj/item/reagent_containers/glass/bottle/killer/pestkiller
category = list("initial","Botany Chemicals")
+/datum/design/ammonia
+ name = "10u Ammonia"
+ id = "ammonia_biogen"
+ build_type = BIOGENERATOR
+ materials = list(/datum/material/biomass = 25)
+ make_reagents = list(/datum/reagent/ammonia = 10)
+ category = list("initial","Botany Chemicals")
+
+/datum/design/saltpetre
+ name = "10u Saltpetre"
+ id = "saltpetre_biogen"
+ build_type = BIOGENERATOR
+ materials = list(/datum/material/biomass = 75)
+ make_reagents = list(/datum/reagent/saltpetre = 10)
+ category = list("initial","Botany Chemicals")
+
/datum/design/botany_bottle
name = "Empty Bottle"
id = "botany_bottle"
build_type = BIOGENERATOR
- materials = list(MAT_BIOMASS = 5)
+ materials = list(/datum/material/biomass = 5)
build_path = /obj/item/reagent_containers/glass/bottle/nutrient/empty
category = list("initial", "Botany Chemicals")
@@ -135,7 +151,7 @@
name = "Roll of Cloth"
id = "cloth"
build_type = BIOGENERATOR
- materials = list(MAT_BIOMASS = 50)
+ materials = list(/datum/material/biomass = 50)
build_path = /obj/item/stack/sheet/cloth
category = list("initial","Organic Materials")
@@ -143,7 +159,7 @@
name = "Sheet of Cardboard"
id = "cardboard"
build_type = BIOGENERATOR
- materials = list(MAT_BIOMASS = 25)
+ materials = list(/datum/material/biomass = 25)
build_path = /obj/item/stack/sheet/cardboard
category = list("initial","Organic Materials")
@@ -151,7 +167,7 @@
name = "Sheet of Leather"
id = "leather"
build_type = BIOGENERATOR
- materials = list(MAT_BIOMASS = 150)
+ materials = list(/datum/material/biomass = 150)
build_path = /obj/item/stack/sheet/leather
category = list("initial","Organic Materials")
@@ -159,7 +175,7 @@
name = "Security Belt"
id = "secbelt"
build_type = BIOGENERATOR
- materials = list(MAT_BIOMASS = 300)
+ materials = list(/datum/material/biomass = 300)
build_path = /obj/item/storage/belt/security
category = list("initial","Organic Materials")
@@ -167,7 +183,7 @@
name = "Medical Belt"
id = "medbel"
build_type = BIOGENERATOR
- materials = list(MAT_BIOMASS = 300)
+ materials = list(/datum/material/biomass = 300)
build_path = /obj/item/storage/belt/medical
category = list("initial","Organic Materials")
@@ -175,7 +191,7 @@
name = "Janitorial Belt"
id = "janibelt"
build_type = BIOGENERATOR
- materials = list(MAT_BIOMASS = 300)
+ materials = list(/datum/material/biomass = 300)
build_path = /obj/item/storage/belt/janitor
category = list("initial","Organic Materials")
@@ -183,7 +199,7 @@
name = "Shoulder Holster"
id = "s_holster"
build_type = BIOGENERATOR
- materials = list(MAT_BIOMASS = 400)
+ materials = list(/datum/material/biomass = 400)
build_path = /obj/item/storage/belt/holster
category = list("initial","Organic Materials")
@@ -191,6 +207,6 @@
name = "Rice Hat"
id = "rice_hat"
build_type = BIOGENERATOR
- materials = list(MAT_BIOMASS = 300)
+ materials = list(/datum/material/biomass = 300)
build_path = /obj/item/clothing/head/rice_hat
category = list("initial","Organic Materials")
diff --git a/code/modules/research/designs/bluespace_designs.dm b/code/modules/research/designs/bluespace_designs.dm
index 84fe526cd8..b03b85f99b 100644
--- a/code/modules/research/designs/bluespace_designs.dm
+++ b/code/modules/research/designs/bluespace_designs.dm
@@ -8,7 +8,7 @@
desc = "A blue space tracking beacon."
id = "beacon"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 150, MAT_GLASS = 100)
+ materials = list(/datum/material/iron = 150, /datum/material/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
@@ -18,7 +18,7 @@
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)
+ materials = list(/datum/material/gold = 3000, /datum/material/diamond = 1500, /datum/material/uranium = 250, /datum/material/bluespace = 2000)
build_path = /obj/item/storage/backpack/holding
category = list("Bluespace Designs")
dangerous_construction = TRUE
@@ -29,7 +29,7 @@
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)
+ materials = list(/datum/material/gold = 3000, /datum/material/diamond = 1500, /datum/material/uranium = 250, /datum/material/bluespace = 2000)
build_path = /obj/item/storage/backpack/holding/satchel
category = list("Bluespace Designs")
dangerous_construction = TRUE
@@ -40,7 +40,7 @@
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)
+ materials = list(/datum/material/gold = 1500, /datum/material/diamond = 750, /datum/material/uranium = 250, /datum/material/bluespace = 1000)
build_path = /obj/item/storage/bag/bio/holding
category = list("Bluespace Designs")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -50,7 +50,7 @@
desc = "A small blue crystal with mystical properties."
id = "bluespace_crystal"
build_type = PROTOLATHE
- materials = list(MAT_DIAMOND = 1500, MAT_PLASMA = 1500)
+ materials = list(/datum/material/diamond = 1500, /datum/material/plasma = 1500)
build_path = /obj/item/stack/ore/bluespace_crystal/artificial
category = list("Bluespace Designs")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -60,7 +60,7 @@
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)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 1000)
build_path = /obj/item/gps
category = list("Bluespace Designs")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_CARGO
@@ -70,7 +70,7 @@
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)
+ materials = list(/datum/material/iron = 1000, /datum/material/glass = 500, /datum/material/silver = 1500, /datum/material/bluespace = 1000)
build_path = /obj/item/desynchronizer
category = list("Bluespace Designs")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -80,7 +80,7 @@
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
+ materials = list(/datum/material/gold = 250, /datum/material/uranium = 500) //quite cheap, for more convenience
build_path = /obj/item/storage/bag/ore/holding
category = list("Bluespace Designs")
departmental_flags = DEPARTMENTAL_FLAG_CARGO
diff --git a/code/modules/research/designs/comp_board_designs/comp_board_designs_all_misc.dm b/code/modules/research/designs/comp_board_designs/comp_board_designs_all_misc.dm
index 65a435a309..27560f29a1 100644
--- a/code/modules/research/designs/comp_board_designs/comp_board_designs_all_misc.dm
+++ b/code/modules/research/designs/comp_board_designs/comp_board_designs_all_misc.dm
@@ -3,7 +3,7 @@
name = "Computer Design ( NULL ENTRY )"
desc = "A blank compurter board!"
build_type = IMPRINTER
- materials = list(MAT_GLASS = 1000)
+ materials = list(/datum/material/glass = 1000)
/datum/design/board/arcade_battle
name = "Computer Design (Battle Arcade Machine)"
diff --git a/code/modules/research/designs/comp_board_designs/comp_board_designs_sci.dm b/code/modules/research/designs/comp_board_designs/comp_board_designs_sci.dm
index e0b0a22be6..55171e2221 100644
--- a/code/modules/research/designs/comp_board_designs/comp_board_designs_sci.dm
+++ b/code/modules/research/designs/comp_board_designs/comp_board_designs_sci.dm
@@ -22,7 +22,7 @@
name = "Computer Design (AI Upload)"
desc = "Allows for the construction of circuit boards used to build an AI Upload Console."
id = "aiupload"
- materials = list(MAT_GLASS = 1000, MAT_GOLD = 2000)
+ materials = list(/datum/material/glass = 1000, /datum/material/gold = 2000)
build_path = /obj/item/circuitboard/computer/aiupload
category = list("Computer Boards")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -31,7 +31,7 @@
name = "Computer Design (Cyborg Upload)"
desc = "Allows for the construction of circuit boards used to build a Cyborg Upload Console."
id = "borgupload"
- materials = list(MAT_GLASS = 1000, MAT_GOLD = 2000)
+ materials = list(/datum/material/glass = 1000, /datum/material/gold = 2000)
build_path = /obj/item/circuitboard/computer/borgupload
category = list("Computer Boards")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
diff --git a/code/modules/research/designs/computer_part_designs.dm b/code/modules/research/designs/computer_part_designs.dm
index a8813b726d..ab487b0aaa 100644
--- a/code/modules/research/designs/computer_part_designs.dm
+++ b/code/modules/research/designs/computer_part_designs.dm
@@ -6,7 +6,7 @@
name = "Hard Disk Drive"
id = "hdd_basic"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 400, MAT_GLASS = 100)
+ materials = list(/datum/material/iron = 400, /datum/material/glass = 100)
build_path = /obj/item/computer_hardware/hard_drive
category = list("Computer Parts")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -15,7 +15,7 @@
name = "Advanced Hard Disk Drive"
id = "hdd_advanced"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 800, MAT_GLASS = 200)
+ materials = list(/datum/material/iron = 800, /datum/material/glass = 200)
build_path = /obj/item/computer_hardware/hard_drive/advanced
category = list("Computer Parts")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -24,7 +24,7 @@
name = "Super Hard Disk Drive"
id = "hdd_super"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 1600, MAT_GLASS = 400)
+ materials = list(/datum/material/iron = 1600, /datum/material/glass = 400)
build_path = /obj/item/computer_hardware/hard_drive/super
category = list("Computer Parts")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -33,7 +33,7 @@
name = "Cluster Hard Disk Drive"
id = "hdd_cluster"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 3200, MAT_GLASS = 800)
+ materials = list(/datum/material/iron = 3200, /datum/material/glass = 800)
build_path = /obj/item/computer_hardware/hard_drive/cluster
category = list("Computer Parts")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -42,7 +42,7 @@
name = "Solid State Drive"
id = "ssd_small"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 800, MAT_GLASS = 200)
+ materials = list(/datum/material/iron = 800, /datum/material/glass = 200)
build_path = /obj/item/computer_hardware/hard_drive/small
category = list("Computer Parts")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -51,7 +51,7 @@
name = "Micro Solid State Drive"
id = "ssd_micro"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 400, MAT_GLASS = 100)
+ materials = list(/datum/material/iron = 400, /datum/material/glass = 100)
build_path = /obj/item/computer_hardware/hard_drive/micro
category = list("Computer Parts")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -61,7 +61,7 @@
name = "Network Card"
id = "netcard_basic"
build_type = IMPRINTER
- materials = list(MAT_METAL = 250, MAT_GLASS = 100)
+ materials = list(/datum/material/iron = 250, /datum/material/glass = 100)
build_path = /obj/item/computer_hardware/network_card
category = list("Computer Parts")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -70,7 +70,7 @@
name = "Advanced Network Card"
id = "netcard_advanced"
build_type = IMPRINTER
- materials = list(MAT_METAL = 500, MAT_GLASS = 200)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 200)
build_path = /obj/item/computer_hardware/network_card/advanced
category = list("Computer Parts")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -79,7 +79,7 @@
name = "Wired Network Card"
id = "netcard_wired"
build_type = IMPRINTER
- materials = list(MAT_METAL = 2500, MAT_GLASS = 400)
+ materials = list(/datum/material/iron = 2500, /datum/material/glass = 400)
build_path = /obj/item/computer_hardware/network_card/wired
category = list("Computer Parts")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -89,7 +89,7 @@
name = "Data Disk"
id = "portadrive_basic"
build_type = IMPRINTER
- materials = list(MAT_GLASS = 800)
+ materials = list(/datum/material/glass = 800)
build_path = /obj/item/computer_hardware/hard_drive/portable
category = list("Computer Parts")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -98,7 +98,7 @@
name = "Advanced Data Disk"
id = "portadrive_advanced"
build_type = IMPRINTER
- materials = list(MAT_GLASS = 1600)
+ materials = list(/datum/material/glass = 1600)
build_path = /obj/item/computer_hardware/hard_drive/portable/advanced
category = list("Computer Parts")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -107,7 +107,7 @@
name = "Super Data Disk"
id = "portadrive_super"
build_type = IMPRINTER
- materials = list(MAT_GLASS = 3200)
+ materials = list(/datum/material/glass = 3200)
build_path = /obj/item/computer_hardware/hard_drive/portable/super
category = list("Computer Parts")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -117,7 +117,7 @@
name = "ID Card Slot"
id = "cardslot"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 600)
+ materials = list(/datum/material/iron = 600)
build_path = /obj/item/computer_hardware/card_slot
category = list("Computer Parts")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -127,7 +127,7 @@
name = "Intellicard Slot"
id = "aislot"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 600)
+ materials = list(/datum/material/iron = 600)
build_path = /obj/item/computer_hardware/ai_slot
category = list("Computer Parts")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -137,7 +137,7 @@
name = "Miniprinter"
id = "miniprinter"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 600)
+ materials = list(/datum/material/iron = 600)
build_path = /obj/item/computer_hardware/printer/mini
category = list("Computer Parts")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -147,7 +147,7 @@
name = "Area Power Connector"
id = "APClink"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 2000)
+ materials = list(/datum/material/iron = 2000)
build_path = /obj/item/computer_hardware/recharger/APC
category = list("Computer Parts")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -157,7 +157,7 @@
name = "Power Cell Controller"
id = "bat_control"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 400)
+ materials = list(/datum/material/iron = 400)
build_path = /obj/item/computer_hardware/battery
category = list("Computer Parts")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -166,7 +166,7 @@
name = "Battery Module"
id = "bat_normal"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 400)
+ materials = list(/datum/material/iron = 400)
build_path = /obj/item/stock_parts/cell/computer
category = list("Computer Parts")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -175,7 +175,7 @@
name = "Advanced Battery Module"
id = "bat_advanced"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 800)
+ materials = list(/datum/material/iron = 800)
build_path = /obj/item/stock_parts/cell/computer/advanced
category = list("Computer Parts")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -184,7 +184,7 @@
name = "Super Battery Module"
id = "bat_super"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 1600)
+ materials = list(/datum/material/iron = 1600)
build_path = /obj/item/stock_parts/cell/computer/super
category = list("Computer Parts")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -193,7 +193,7 @@
name = "Nano Battery Module"
id = "bat_nano"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 200)
+ materials = list(/datum/material/iron = 200)
build_path = /obj/item/stock_parts/cell/computer/nano
category = list("Computer Parts")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -202,7 +202,7 @@
name = "Micro Battery Module"
id = "bat_micro"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 400)
+ materials = list(/datum/material/iron = 400)
build_path = /obj/item/stock_parts/cell/computer/micro
category = list("Computer Parts")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -212,7 +212,7 @@
name = "Processor Board"
id = "cpu_normal"
build_type = IMPRINTER
- materials = list(MAT_GLASS = 1600)
+ materials = list(/datum/material/glass = 1600)
build_path = /obj/item/computer_hardware/processor_unit
category = list("Computer Parts")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -221,7 +221,7 @@
name = "Microprocessor"
id = "cpu_small"
build_type = IMPRINTER
- materials = list(MAT_GLASS = 800)
+ materials = list(/datum/material/glass = 800)
build_path = /obj/item/computer_hardware/processor_unit/small
category = list("Computer Parts")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -230,7 +230,7 @@
name = "Photonic Processor Board"
id = "pcpu_normal"
build_type = IMPRINTER
- materials = list(MAT_GLASS= 6400, MAT_GOLD = 2000)
+ materials = list(/datum/material/glass= 6400, /datum/material/gold = 2000)
build_path = /obj/item/computer_hardware/processor_unit/photonic
category = list("Computer Parts")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -239,7 +239,7 @@
name = "Photonic Microprocessor"
id = "pcpu_small"
build_type = IMPRINTER
- materials = list(MAT_GLASS = 3200, MAT_GOLD = 1000)
+ materials = list(/datum/material/glass = 3200, /datum/material/gold = 1000)
build_path = /obj/item/computer_hardware/processor_unit/photonic/small
category = list("Computer Parts")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
diff --git a/code/modules/research/designs/electronics_designs.dm b/code/modules/research/designs/electronics_designs.dm
index 82fd71d895..57d0b78547 100644
--- a/code/modules/research/designs/electronics_designs.dm
+++ b/code/modules/research/designs/electronics_designs.dm
@@ -8,7 +8,7 @@
desc = "Allows for the construction of an intellicard."
id = "intellicard"
build_type = PROTOLATHE
- materials = list(MAT_GLASS = 1000, MAT_GOLD = 200)
+ materials = list(/datum/material/glass = 1000, /datum/material/gold = 200)
build_path = /obj/item/aicard
category = list("Electronics")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -18,7 +18,7 @@
desc = "Allows for the construction of a pAI Card."
id = "paicard"
build_type = PROTOLATHE
- materials = list(MAT_GLASS = 500, MAT_METAL = 500)
+ materials = list(/datum/material/glass = 500, /datum/material/iron = 500)
build_path = /obj/item/paicard
category = list("Electronics")
departmental_flags = DEPARTMENTAL_FLAG_ALL
@@ -28,7 +28,7 @@
desc = "A software package that will allow an artificial intelligence to 'hear' from its cameras via lip reading."
id = "ai_cam_upgrade"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 5000, MAT_GLASS = 5000, MAT_GOLD = 15000, MAT_SILVER = 15000, MAT_DIAMOND = 20000, MAT_PLASMA = 10000)
+ materials = list(/datum/material/iron = 5000, /datum/material/glass = 5000, /datum/material/gold = 15000, /datum/material/silver = 15000, /datum/material/diamond = 20000, /datum/material/plasma = 10000)
build_path = /obj/item/surveillance_upgrade
category = list("Electronics")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -41,7 +41,7 @@
desc = "Allows for the construction of a nanite remote."
id = "nanite_remote"
build_type = PROTOLATHE
- materials = list(MAT_GLASS = 500, MAT_METAL = 500)
+ materials = list(/datum/material/glass = 500, /datum/material/iron = 500)
build_path = /obj/item/nanite_remote
category = list("Electronics")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -51,7 +51,7 @@
desc = "Allows for the construction of a nanite communication remote."
id = "nanite_comm_remote"
build_type = PROTOLATHE
- materials = list(MAT_GLASS = 500, MAT_METAL = 500)
+ materials = list(/datum/material/glass = 500, /datum/material/iron = 500)
build_path = /obj/item/nanite_remote/comm
category = list("Electronics")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -61,7 +61,7 @@
desc = "Allows for the construction of a nanite scanner."
id = "nanite_scanner"
build_type = PROTOLATHE
- materials = list(MAT_GLASS = 500, MAT_METAL = 500)
+ materials = list(/datum/material/glass = 500, /datum/material/iron = 500)
build_path = /obj/item/nanite_scanner
category = list("Electronics")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -74,7 +74,7 @@
desc = "Produce additional disks for storing device designs."
id = "design_disk"
build_type = PROTOLATHE | AUTOLATHE
- materials = list(MAT_METAL = 300, MAT_GLASS = 100)
+ materials = list(/datum/material/iron = 300, /datum/material/glass = 100)
build_path = /obj/item/disk/design_disk
category = list("Electronics")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -84,7 +84,7 @@
desc = "Produce additional disks for storing device designs."
id = "design_disk_adv"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 300, MAT_GLASS = 100, MAT_SILVER=50)
+ materials = list(/datum/material/iron = 300, /datum/material/glass = 100, /datum/material/silver=50)
build_path = /obj/item/disk/design_disk/adv
category = list("Electronics")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -94,7 +94,7 @@
desc = "Produce additional disks for storing technology data."
id = "tech_disk"
build_type = PROTOLATHE | AUTOLATHE
- materials = list(MAT_METAL = 300, MAT_GLASS = 100)
+ materials = list(/datum/material/iron = 300, /datum/material/glass = 100)
build_path = /obj/item/disk/tech_disk
category = list("Electronics")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -104,7 +104,7 @@
desc = "Stores nanite programs."
id = "nanite_disk"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 300, MAT_GLASS = 100)
+ materials = list(/datum/material/iron = 300, /datum/material/glass = 100)
build_path = /obj/item/disk/nanite_program
category = list("Electronics")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -114,7 +114,7 @@
desc = "This machine provides all necessary things for circuitry."
id = "icprinter"
build_type = PROTOLATHE
- materials = list(MAT_GLASS = 5000, MAT_METAL = 10000)
+ materials = list(/datum/material/glass = 5000, /datum/material/iron = 10000)
build_path = /obj/item/integrated_circuit_printer
category = list("Electronics")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -124,7 +124,7 @@
desc = "This disk allows for integrated circuit printers to print advanced circuitry designs."
id = "icupgadv"
build_type = PROTOLATHE
- materials = list(MAT_GLASS = 10000, MAT_METAL = 10000)
+ materials = list(/datum/material/glass = 10000, /datum/material/iron = 10000)
build_path = /obj/item/disk/integrated_circuit/upgrade/advanced
category = list("Electronics")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -134,7 +134,7 @@
desc = "This disk allows for integrated circuit printers to clone designs instantaneously."
id = "icupgclo"
build_type = PROTOLATHE
- materials = list(MAT_GLASS = 10000, MAT_METAL = 10000)
+ materials = list(/datum/material/glass = 10000, /datum/material/iron = 10000)
build_path = /obj/item/disk/integrated_circuit/upgrade/clone
category = list("Electronics")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -145,7 +145,7 @@
desc = "A shell of a maintenance drone, an expendable robot built to perform station repairs."
id = "drone_shell"
build_type = MECHFAB | PROTOLATHE
- materials = list(MAT_METAL = 800, MAT_GLASS = 350)
+ materials = list(/datum/material/iron = 800, /datum/material/glass = 350)
construction_time = 150
build_path = /obj/item/drone_shell
category = list("Misc")
@@ -155,7 +155,7 @@
name = "owo"
desc = "someone's bussin"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 300, MAT_GLASS = 100)
+ materials = list(/datum/material/iron = 300, /datum/material/glass = 100)
category = list("Electronics")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
diff --git a/code/modules/research/designs/equipment_designs.dm b/code/modules/research/designs/equipment_designs.dm
index 9f954adb33..de97747928 100644
--- a/code/modules/research/designs/equipment_designs.dm
+++ b/code/modules/research/designs/equipment_designs.dm
@@ -5,7 +5,7 @@
id = "flightsuit"
build_type = PROTOLATHE
build_path = /obj/item/clothing/suit/space/hardsuit/flightsuit
- materials = list(MAT_METAL=16000, MAT_GLASS = 8000, MAT_DIAMOND = 200, MAT_GOLD = 3000, MAT_SILVER = 3000, MAT_TITANIUM = 16000) //This expensive enough for you?
+ materials = list(/datum/material/iron=16000, /datum/material/glass = 8000, /datum/material/diamond = 200, /datum/material/gold = 3000, /datum/material/silver = 3000, /datum/material/titanium = 16000) //This expensive enough for you?
construction_time = 250
category = list("Misc")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -16,7 +16,7 @@
id = "flightpack"
build_type = PROTOLATHE
build_path = /obj/item/flightpack
- materials = list(MAT_METAL=16000, MAT_GLASS = 8000, MAT_DIAMOND = 4000, MAT_GOLD = 12000, MAT_SILVER = 12000, MAT_URANIUM = 20000, MAT_PLASMA = 16000, MAT_TITANIUM = 16000) //This expensive enough for you?
+ materials = list(/datum/material/iron=16000, /datum/material/glass = 8000, /datum/material/diamond = 4000, /datum/material/gold = 12000, /datum/material/silver = 12000, /datum/material/uranium = 20000, /datum/material/plasma = 16000, /datum/material/titanium = 16000) //This expensive enough for you?
construction_time = 250
category = list("Misc")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -27,7 +27,7 @@
id = "flightshoes"
build_type = PROTOLATHE
build_path = /obj/item/clothing/shoes/flightshoes
- materials = list(MAT_METAL = 5000, MAT_GLASS = 5000, MAT_GOLD = 1500, MAT_SILVER = 1500, MAT_PLASMA = 2000, MAT_TITANIUM = 2000)
+ materials = list(/datum/material/iron = 5000, /datum/material/glass = 5000, /datum/material/gold = 1500, /datum/material/silver = 1500, /datum/material/plasma = 2000, /datum/material/titanium = 2000)
construction_time = 100
category = list("Misc")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING */
@@ -38,7 +38,7 @@
id = "chardsuit"
build_type = PROTOLATHE
build_path = /obj/item/clothing/suit/space/hardsuit/engine
- materials = list(MAT_METAL=16000, MAT_GLASS = 8000, MAT_DIAMOND = 200, MAT_GOLD = 3000, MAT_SILVER = 3000, MAT_TITANIUM = 16000)
+ materials = list(/datum/material/iron=16000, /datum/material/glass = 8000, /datum/material/diamond = 200, /datum/material/gold = 3000, /datum/material/silver = 3000, /datum/material/titanium = 16000)
construction_time = 100
category = list("Misc")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -49,7 +49,7 @@
id = "hardsuitjpack"
build_type = PROTOLATHE
build_path = /obj/item/tank/jetpack/suit
- materials = list(MAT_METAL=16000, MAT_GLASS = 8000, MAT_DIAMOND = 2000, MAT_GOLD = 6000, MAT_SILVER = 6000, MAT_URANIUM = 10000, MAT_PLASMA = 8000, MAT_TITANIUM = 16000)
+ materials = list(/datum/material/iron=16000, /datum/material/glass = 8000, /datum/material/diamond = 2000, /datum/material/gold = 6000, /datum/material/silver = 6000, /datum/material/uranium = 10000, /datum/material/plasma = 8000, /datum/material/titanium = 16000)
construction_time = 100
category = list("Misc")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
\ No newline at end of file
diff --git a/code/modules/research/designs/machine_desings/machine_designs_all_misc.dm b/code/modules/research/designs/machine_desings/machine_designs_all_misc.dm
index 6ccbf32615..c5f6b01e57 100644
--- a/code/modules/research/designs/machine_desings/machine_designs_all_misc.dm
+++ b/code/modules/research/designs/machine_desings/machine_designs_all_misc.dm
@@ -38,7 +38,7 @@
name = "Machine Design (Weapon Recharger Board)"
desc = "The circuit board for a Weapon Recharger."
id = "recharger"
- materials = list(MAT_GLASS = 1000, MAT_GOLD = 2000)
+ materials = list(/datum/material/glass = 1000, /datum/material/gold = 2000)
build_path = /obj/item/circuitboard/machine/recharger
category = list("Misc. Machinery")
departmental_flags = DEPARTMENTAL_FLAG_ALL
diff --git a/code/modules/research/designs/mecha_designs.dm b/code/modules/research/designs/mecha_designs.dm
index 7ccc41c232..7d651a84d8 100644
--- a/code/modules/research/designs/mecha_designs.dm
+++ b/code/modules/research/designs/mecha_designs.dm
@@ -110,7 +110,7 @@
name = "\"Phazon\" Central Control module"
desc = "Allows for the construction of a \"Phazon\" Central Control module."
id = "phazon_main"
- materials = list(MAT_GLASS = 1000, MAT_BLUESPACE = 100)
+ materials = list(/datum/material/glass = 1000, /datum/material/bluespace = 100)
build_path = /obj/item/circuitboard/mecha/phazon/main
category = list("Exosuit Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -119,7 +119,7 @@
name = "\"Phazon\" Peripherals Control module"
desc = "Allows for the construction of a \"Phazon\" Peripheral Control module."
id = "phazon_peri"
- materials = list(MAT_GLASS = 1000, MAT_BLUESPACE = 100)
+ materials = list(/datum/material/glass = 1000, /datum/material/bluespace = 100)
build_path = /obj/item/circuitboard/mecha/phazon/peripherals
category = list("Exosuit Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -128,7 +128,7 @@
name = "\"Phazon\" Weapons & Targeting Control module"
desc = "Allows for the construction of a \"Phazon\" Weapons & Targeting Control module."
id = "phazon_targ"
- materials = list(MAT_GLASS = 1000, MAT_BLUESPACE = 100)
+ materials = list(/datum/material/glass = 1000, /datum/material/bluespace = 100)
build_path = /obj/item/circuitboard/mecha/phazon/targeting
category = list("Exosuit Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -143,7 +143,7 @@
id = "mech_scattershot"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot
- materials = list(MAT_METAL=10000)
+ materials = list(/datum/material/iron=10000)
construction_time = 100
category = list("Exosuit Equipment")
@@ -153,27 +153,49 @@
id = "mech_seedscatter"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/seedscatter
- materials = list(MAT_METAL=10000, MAT_GLASS = 10000)
+ materials = list(/datum/material/iron=10000, /datum/material/glass = 10000)
construction_time = 70
category = list("Exosuit Equipment")
+/datum/design/mech_scattershot_ammo
+ name = "Scattershot Ammunition"
+ desc = "Ammunition for the LBX AC 10 and Melon Seed exosuit weapon."
+ id = "mech_scattershot_ammo"
+ build_type = PROTOLATHE | MECHFAB
+ build_path = /obj/item/mecha_ammo/scattershot
+ materials = list(/datum/material/iron=6000)
+ construction_time = 20
+ category = list("Exosuit Ammunition", "Ammo")
+ departmental_flags = DEPARTMENTAL_FLAG_SECURITY
+
/datum/design/mech_carbine
name = "Exosuit Weapon (FNX-99 \"Hades\" Carbine)"
desc = "Allows for the construction of FNX-99 \"Hades\" Carbine."
id = "mech_carbine"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/carbine
- materials = list(MAT_METAL=10000)
+ materials = list(/datum/material/iron=10000)
construction_time = 100
category = list("Exosuit Equipment")
+/datum/design/mech_carbine_ammo
+ name = "FNX-99 Carbine Ammunition"
+ desc = "Ammunition for the FNX-99 \"Hades\" Carbine."
+ id = "mech_carbine_ammo"
+ build_type = PROTOLATHE | MECHFAB
+ build_path = /obj/item/mecha_ammo/incendiary
+ materials = list(/datum/material/iron=6000)
+ construction_time = 20
+ category = list("Exosuit Ammunition", "Ammo")
+ departmental_flags = DEPARTMENTAL_FLAG_SECURITY
+
/datum/design/mech_ion
name = "Exosuit Weapon (MKIV Ion Heavy Cannon)"
desc = "Allows for the construction of MKIV Ion Heavy Cannon."
id = "mech_ion"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/ion
- materials = list(MAT_METAL=20000,MAT_SILVER=6000,MAT_URANIUM=2000)
+ materials = list(/datum/material/iron=20000,/datum/material/silver=6000,/datum/material/uranium=2000)
construction_time = 100
category = list("Exosuit Equipment")
@@ -183,7 +205,7 @@
id = "mech_tesla"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/tesla
- materials = list(MAT_METAL=20000,MAT_SILVER=8000)
+ materials = list(/datum/material/iron=20000,/datum/material/silver=8000)
construction_time = 100
category = list("Exosuit Equipment")
@@ -193,7 +215,7 @@
id = "mech_laser"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser
- materials = list(MAT_METAL=10000)
+ materials = list(/datum/material/iron=10000)
construction_time = 100
category = list("Exosuit Equipment")
@@ -203,7 +225,7 @@
id = "mech_laser_heavy"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy
- materials = list(MAT_METAL=10000)
+ materials = list(/datum/material/iron=10000)
construction_time = 100
category = list("Exosuit Equipment")
@@ -213,37 +235,70 @@
id = "mech_grenade_launcher"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang
- materials = list(MAT_METAL=22000,MAT_GOLD=6000,MAT_SILVER=8000)
+ materials = list(/datum/material/iron=22000,/datum/material/gold=6000,/datum/material/silver=8000)
construction_time = 100
category = list("Exosuit Equipment")
+/datum/design/mech_grenade_launcher_ammo
+ name = "SGL-6 Grenade Launcher Ammunition"
+ desc = "Ammunition for the SGL-6 Grenade Launcher."
+ id = "mech_grenade_launcher_ammo"
+ build_type = PROTOLATHE | MECHFAB
+ build_path = /obj/item/mecha_ammo/flashbang
+ materials = list(/datum/material/iron=4000,/datum/material/gold=500,/datum/material/silver=500)
+ construction_time = 20
+ category = list("Exosuit Ammunition", "Ammo")
+ departmental_flags = DEPARTMENTAL_FLAG_SECURITY
+
/datum/design/mech_missile_rack
- name = "Exosuit Weapon (SRM-8 Missile Rack)"
- desc = "Allows for the construction of an SRM-8 Missile Rack."
+ name = "Exosuit Weapon (BRM-6 Missile Rack)"
+ desc = "Allows for the construction of an BRM-6 Breaching Missile Rack."
id = "mech_missile_rack"
build_type = MECHFAB
- build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack
- materials = list(MAT_METAL=22000,MAT_GOLD=6000,MAT_SILVER=8000)
+ build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/breaching
+ materials = list(/datum/material/iron=22000,/datum/material/gold=6000,/datum/material/silver=8000)
construction_time = 100
category = list("Exosuit Equipment")
+/datum/design/mech_missile_rack_ammo
+ name = "SRM-8 Missile Rack Ammunition"
+ desc = "Ammunition for the SRM-8 Missile Rack."
+ id = "mech_missile_rack_ammo"
+ build_type = PROTOLATHE | MECHFAB
+ build_path = /obj/item/mecha_ammo/missiles_br
+ materials = list(/datum/material/iron=8000,/datum/material/gold=500,/datum/material/silver=500)
+ construction_time = 20
+ category = list("Exosuit Ammunition", "Ammo")
+ departmental_flags = DEPARTMENTAL_FLAG_SECURITY
+
/datum/design/clusterbang_launcher
name = "Exosuit Module (SOB-3 Clusterbang Launcher)"
desc = "A weapon that violates the Geneva Convention at 3 rounds per minute"
id = "clusterbang_launcher"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang/clusterbang
- materials = list(MAT_METAL=20000,MAT_GOLD=10000,MAT_URANIUM=10000)
+ materials = list(/datum/material/iron=20000,/datum/material/gold=10000,/datum/material/uranium=10000)
construction_time = 100
category = list("Exosuit Equipment")
+/datum/design/clusterbang_launcher_ammo
+ name = "SOB-3 Clusterbang Launcher Ammunition"
+ desc = "Ammunition for the SOB-3 Clusterbang Launcher"
+ id = "clusterbang_launcher_ammo"
+ build_type = PROTOLATHE | MECHFAB
+ build_path = /obj/item/mecha_ammo/clusterbang
+ materials = list(/datum/material/iron=6000,/datum/material/gold=1500,/datum/material/uranium=1500)
+ construction_time = 20
+ category = list("Exosuit Ammunition", "Ammo")
+ departmental_flags = DEPARTMENTAL_FLAG_SECURITY
+
/datum/design/mech_wormhole_gen
name = "Exosuit Module (Localized Wormhole Generator)"
desc = "An exosuit module that allows generating of small quasi-stable wormholes."
id = "mech_wormhole_gen"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/wormhole_generator
- materials = list(MAT_METAL=10000)
+ materials = list(/datum/material/iron=10000)
construction_time = 100
category = list("Exosuit Equipment")
@@ -253,7 +308,7 @@
id = "mech_teleporter"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/teleporter
- materials = list(MAT_METAL=10000,MAT_DIAMOND=10000)
+ materials = list(/datum/material/iron=10000,/datum/material/diamond=10000)
construction_time = 100
category = list("Exosuit Equipment")
@@ -263,7 +318,7 @@
id = "mech_rcd"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/rcd
- materials = list(MAT_METAL=30000,MAT_GOLD=20000,MAT_PLASMA=25000,MAT_SILVER=20000)
+ materials = list(/datum/material/iron=30000,/datum/material/gold=20000,/datum/material/plasma=25000,/datum/material/silver=20000)
construction_time = 1200
category = list("Exosuit Equipment")
@@ -273,7 +328,7 @@
id = "mech_gravcatapult"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/gravcatapult
- materials = list(MAT_METAL=10000)
+ materials = list(/datum/material/iron=10000)
construction_time = 100
category = list("Exosuit Equipment")
@@ -283,7 +338,7 @@
id = "mech_repair_droid"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/repair_droid
- materials = list(MAT_METAL=10000,MAT_GLASS=5000,MAT_GOLD=1000,MAT_SILVER=2000)
+ materials = list(/datum/material/iron=10000,/datum/material/glass=5000,/datum/material/gold=1000,/datum/material/silver=2000)
construction_time = 100
category = list("Exosuit Equipment")
@@ -293,7 +348,7 @@
id = "mech_energy_relay"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay
- materials = list(MAT_METAL=10000,MAT_GLASS=2000,MAT_GOLD=2000,MAT_SILVER=3000)
+ materials = list(/datum/material/iron=10000,/datum/material/glass=2000,/datum/material/gold=2000,/datum/material/silver=3000)
construction_time = 100
category = list("Exosuit Equipment")
@@ -303,7 +358,7 @@
id = "mech_ccw_armor"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster
- materials = list(MAT_METAL=20000,MAT_SILVER=5000)
+ materials = list(/datum/material/iron=20000,/datum/material/silver=5000)
construction_time = 100
category = list("Exosuit Equipment")
@@ -313,7 +368,7 @@
id = "mech_proj_armor"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster
- materials = list(MAT_METAL=20000,MAT_GOLD=5000)
+ materials = list(/datum/material/iron=20000,/datum/material/gold=5000)
construction_time = 100
category = list("Exosuit Equipment")
@@ -323,7 +378,7 @@
id = "mech_diamond_drill"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/drill/diamonddrill
- materials = list(MAT_METAL=10000,MAT_DIAMOND=6500)
+ materials = list(/datum/material/iron=10000,/datum/material/diamond=6500)
construction_time = 100
category = list("Exosuit Equipment")
@@ -333,7 +388,7 @@
id = "mech_generator_nuclear"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/generator/nuclear
- materials = list(MAT_METAL=10000,MAT_GLASS=1000,MAT_SILVER=500)
+ materials = list(/datum/material/iron=10000,/datum/material/glass=1000,/datum/material/silver=500)
construction_time = 100
category = list("Exosuit Equipment")
@@ -343,7 +398,7 @@
id = "mech_plasma_cutter"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/plasma
- materials = list(MAT_METAL = 8000, MAT_GLASS = 1000, MAT_PLASMA = 2000)
+ materials = list(/datum/material/iron = 8000, /datum/material/glass = 1000, /datum/material/plasma = 2000)
construction_time = 100
category = list("Exosuit Equipment")
@@ -353,7 +408,7 @@
id = "mech_taser"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/taser
- materials = list(MAT_METAL=10000)
+ materials = list(/datum/material/iron=10000)
construction_time = 100
category = list("Exosuit Equipment")
@@ -363,17 +418,28 @@
id = "mech_lmg"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg
- materials = list(MAT_METAL=10000)
+ materials = list(/datum/material/iron=10000)
construction_time = 100
category = list("Exosuit Equipment")
+/datum/design/mech_lmg_ammo
+ name = "Ultra AC 2 Ammunition"
+ desc = "Ammunition for the Ultra AC 2 LMG"
+ id = "mech_lmg_ammo"
+ build_type = PROTOLATHE | MECHFAB
+ build_path = /obj/item/mecha_ammo/lmg
+ materials = list(/datum/material/iron=4000)
+ construction_time = 20
+ category = list("Exosuit Ammunition", "Ammo")
+ departmental_flags = DEPARTMENTAL_FLAG_SECURITY
+
/datum/design/mech_sleeper
name = "Exosuit Medical Equipment (Mounted Sleeper)"
desc = "Equipment for medical exosuits. A mounted sleeper that stabilizes patients and can inject reagents in the exosuit's reserves."
id = "mech_sleeper"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/medical/sleeper
- materials = list(MAT_METAL=5000,MAT_GLASS=10000)
+ materials = list(/datum/material/iron=5000,/datum/material/glass=10000)
construction_time = 100
category = list("Exosuit Equipment")
@@ -383,7 +449,7 @@
id = "mech_syringe_gun"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/medical/syringe_gun
- materials = list(MAT_METAL=3000,MAT_GLASS=2000)
+ materials = list(/datum/material/iron=3000,/datum/material/glass=2000)
construction_time = 200
category = list("Exosuit Equipment")
@@ -392,7 +458,7 @@
desc = "Equipment for medical exosuits. A mounted medical nanite projector which will treat patients with a focused beam."
id = "mech_medi_beam"
build_type = MECHFAB
- materials = list(MAT_METAL = 15000, MAT_GLASS = 8000, MAT_PLASMA = 3000, MAT_GOLD = 8000, MAT_DIAMOND = 2000)
+ materials = list(/datum/material/iron = 15000, /datum/material/glass = 8000, /datum/material/plasma = 3000, /datum/material/gold = 8000, /datum/material/diamond = 2000)
construction_time = 250
build_path = /obj/item/mecha_parts/mecha_equipment/medical/mechmedbeam
category = list("Exosuit Equipment")
diff --git a/code/modules/research/designs/mechfabricator_designs.dm b/code/modules/research/designs/mechfabricator_designs.dm
index 5fab7705a8..a5ad3287fc 100644
--- a/code/modules/research/designs/mechfabricator_designs.dm
+++ b/code/modules/research/designs/mechfabricator_designs.dm
@@ -4,7 +4,7 @@
id = "borg_suit"
build_type = MECHFAB
build_path = /obj/item/robot_suit
- materials = list(MAT_METAL=15000)
+ materials = list(/datum/material/iron=15000)
construction_time = 500
category = list("Cyborg")
@@ -13,7 +13,7 @@
id = "borg_chest"
build_type = MECHFAB
build_path = /obj/item/bodypart/chest/robot
- materials = list(MAT_METAL=40000)
+ materials = list(/datum/material/iron=40000)
construction_time = 350
category = list("Cyborg")
@@ -22,7 +22,7 @@
id = "borg_head"
build_type = MECHFAB
build_path = /obj/item/bodypart/head/robot
- materials = list(MAT_METAL=5000)
+ materials = list(/datum/material/iron=5000)
construction_time = 350
category = list("Cyborg")
@@ -31,7 +31,7 @@
id = "borg_l_arm"
build_type = MECHFAB
build_path = /obj/item/bodypart/l_arm/robot
- materials = list(MAT_METAL=10000)
+ materials = list(/datum/material/iron=10000)
construction_time = 200
category = list("Cyborg")
@@ -40,7 +40,7 @@
id = "borg_r_arm"
build_type = MECHFAB
build_path = /obj/item/bodypart/r_arm/robot
- materials = list(MAT_METAL=10000)
+ materials = list(/datum/material/iron=10000)
construction_time = 200
category = list("Cyborg")
@@ -49,7 +49,7 @@
id = "borg_l_leg"
build_type = MECHFAB
build_path = /obj/item/bodypart/l_leg/robot
- materials = list(MAT_METAL=10000)
+ materials = list(/datum/material/iron=10000)
construction_time = 200
category = list("Cyborg")
@@ -58,7 +58,7 @@
id = "borg_r_leg"
build_type = MECHFAB
build_path = /obj/item/bodypart/r_leg/robot
- materials = list(MAT_METAL=10000)
+ materials = list(/datum/material/iron=10000)
construction_time = 200
category = list("Cyborg")
@@ -68,7 +68,7 @@
id = "ripley_chassis"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/chassis/ripley
- materials = list(MAT_METAL=20000)
+ materials = list(/datum/material/iron=20000)
construction_time = 100
category = list("Ripley")
@@ -78,7 +78,7 @@
id = "firefighter_chassis"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/chassis/firefighter
- materials = list(MAT_METAL=20000)
+ materials = list(/datum/material/iron=20000)
construction_time = 100
category = list("Firefighter")
@@ -87,7 +87,7 @@
id = "ripley_torso"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/ripley_torso
- materials = list(MAT_METAL=20000, MAT_GLASS=7500)
+ materials = list(/datum/material/iron=20000, /datum/material/glass=7500)
construction_time = 200
category = list("Ripley","Firefighter")
@@ -96,7 +96,7 @@
id = "ripley_left_arm"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/ripley_left_arm
- materials = list(MAT_METAL=15000)
+ materials = list(/datum/material/iron=15000)
construction_time = 150
category = list("Ripley","Firefighter")
@@ -105,7 +105,7 @@
id = "ripley_right_arm"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/ripley_right_arm
- materials = list(MAT_METAL=15000)
+ materials = list(/datum/material/iron=15000)
construction_time = 150
category = list("Ripley","Firefighter")
@@ -114,7 +114,7 @@
id = "ripley_left_leg"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/ripley_left_leg
- materials = list(MAT_METAL=15000)
+ materials = list(/datum/material/iron=15000)
construction_time = 150
category = list("Ripley","Firefighter")
@@ -123,7 +123,7 @@
id = "ripley_right_leg"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/ripley_right_leg
- materials = list(MAT_METAL=15000)
+ materials = list(/datum/material/iron=15000)
construction_time = 150
category = list("Ripley","Firefighter")
@@ -133,7 +133,7 @@
id = "odysseus_chassis"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/chassis/odysseus
- materials = list(MAT_METAL=20000)
+ materials = list(/datum/material/iron=20000)
construction_time = 100
category = list("Odysseus")
@@ -142,7 +142,7 @@
id = "odysseus_torso"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/odysseus_torso
- materials = list(MAT_METAL=12000)
+ materials = list(/datum/material/iron=12000)
construction_time = 180
category = list("Odysseus")
@@ -151,7 +151,7 @@
id = "odysseus_head"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/odysseus_head
- materials = list(MAT_METAL=6000,MAT_GLASS=10000)
+ materials = list(/datum/material/iron=6000,/datum/material/glass=10000)
construction_time = 100
category = list("Odysseus")
@@ -160,7 +160,7 @@
id = "odysseus_left_arm"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/odysseus_left_arm
- materials = list(MAT_METAL=6000)
+ materials = list(/datum/material/iron=6000)
construction_time = 120
category = list("Odysseus")
@@ -169,7 +169,7 @@
id = "odysseus_right_arm"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/odysseus_right_arm
- materials = list(MAT_METAL=6000)
+ materials = list(/datum/material/iron=6000)
construction_time = 120
category = list("Odysseus")
@@ -178,7 +178,7 @@
id = "odysseus_left_leg"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/odysseus_left_leg
- materials = list(MAT_METAL=7000)
+ materials = list(/datum/material/iron=7000)
construction_time = 130
category = list("Odysseus")
@@ -187,7 +187,7 @@
id = "odysseus_right_leg"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/odysseus_right_leg
- materials = list(MAT_METAL=7000)
+ materials = list(/datum/material/iron=7000)
construction_time = 130
category = list("Odysseus")
@@ -197,7 +197,7 @@
id = "gygax_chassis"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/chassis/gygax
- materials = list(MAT_METAL=20000)
+ materials = list(/datum/material/iron=20000)
construction_time = 100
category = list("Gygax")
@@ -206,7 +206,7 @@
id = "gygax_torso"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/gygax_torso
- materials = list(MAT_METAL=20000,MAT_GLASS=10000,MAT_DIAMOND=2000)
+ materials = list(/datum/material/iron=20000,/datum/material/glass=10000,/datum/material/diamond=2000)
construction_time = 300
category = list("Gygax")
@@ -215,7 +215,7 @@
id = "gygax_head"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/gygax_head
- materials = list(MAT_METAL=10000,MAT_GLASS=5000, MAT_DIAMOND=2000)
+ materials = list(/datum/material/iron=10000,/datum/material/glass=5000, /datum/material/diamond=2000)
construction_time = 200
category = list("Gygax")
@@ -224,7 +224,7 @@
id = "gygax_left_arm"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/gygax_left_arm
- materials = list(MAT_METAL=15000, MAT_DIAMOND=1000)
+ materials = list(/datum/material/iron=15000, /datum/material/diamond=1000)
construction_time = 200
category = list("Gygax")
@@ -233,7 +233,7 @@
id = "gygax_right_arm"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/gygax_right_arm
- materials = list(MAT_METAL=15000, MAT_DIAMOND=1000)
+ materials = list(/datum/material/iron=15000, /datum/material/diamond=1000)
construction_time = 200
category = list("Gygax")
@@ -242,7 +242,7 @@
id = "gygax_left_leg"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/gygax_left_leg
- materials = list(MAT_METAL=15000, MAT_DIAMOND=2000)
+ materials = list(/datum/material/iron=15000, /datum/material/diamond=2000)
construction_time = 200
category = list("Gygax")
@@ -251,7 +251,7 @@
id = "gygax_right_leg"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/gygax_right_leg
- materials = list(MAT_METAL=15000, MAT_DIAMOND=2000)
+ materials = list(/datum/material/iron=15000, /datum/material/diamond=2000)
construction_time = 200
category = list("Gygax")
@@ -260,7 +260,7 @@
id = "gygax_armor"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/gygax_armor
- materials = list(MAT_METAL=15000,MAT_DIAMOND=10000,MAT_TITANIUM=10000)
+ materials = list(/datum/material/iron=15000,/datum/material/diamond=10000,/datum/material/titanium=10000)
construction_time = 600
category = list("Gygax")
@@ -270,7 +270,7 @@
id = "durand_chassis"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/chassis/durand
- materials = list(MAT_METAL=25000)
+ materials = list(/datum/material/iron=25000)
construction_time = 100
category = list("Durand")
@@ -279,7 +279,7 @@
id = "durand_torso"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/durand_torso
- materials = list(MAT_METAL=25000,MAT_GLASS=10000,MAT_SILVER=10000)
+ materials = list(/datum/material/iron=25000,/datum/material/glass=10000,/datum/material/silver=10000)
construction_time = 300
category = list("Durand")
@@ -288,7 +288,7 @@
id = "durand_head"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/durand_head
- materials = list(MAT_METAL=10000,MAT_GLASS=15000,MAT_SILVER=2000)
+ materials = list(/datum/material/iron=10000,/datum/material/glass=15000,/datum/material/silver=2000)
construction_time = 200
category = list("Durand")
@@ -297,7 +297,7 @@
id = "durand_left_arm"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/durand_left_arm
- materials = list(MAT_METAL=10000,MAT_SILVER=4000)
+ materials = list(/datum/material/iron=10000,/datum/material/silver=4000)
construction_time = 200
category = list("Durand")
@@ -306,7 +306,7 @@
id = "durand_right_arm"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/durand_right_arm
- materials = list(MAT_METAL=10000,MAT_SILVER=4000)
+ materials = list(/datum/material/iron=10000,/datum/material/silver=4000)
construction_time = 200
category = list("Durand")
@@ -315,7 +315,7 @@
id = "durand_left_leg"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/durand_left_leg
- materials = list(MAT_METAL=15000,MAT_SILVER=4000)
+ materials = list(/datum/material/iron=15000,/datum/material/silver=4000)
construction_time = 200
category = list("Durand")
@@ -324,7 +324,7 @@
id = "durand_right_leg"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/durand_right_leg
- materials = list(MAT_METAL=15000,MAT_SILVER=4000)
+ materials = list(/datum/material/iron=15000,/datum/material/silver=4000)
construction_time = 200
category = list("Durand")
@@ -333,7 +333,7 @@
id = "durand_armor"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/durand_armor
- materials = list(MAT_METAL=30000,MAT_URANIUM=25000,MAT_TITANIUM=20000)
+ materials = list(/datum/material/iron=30000,/datum/material/uranium=25000,/datum/material/titanium=20000)
construction_time = 600
category = list("Durand")
@@ -343,7 +343,7 @@
id = "honk_chassis"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/chassis/honker
- materials = list(MAT_METAL=20000)
+ materials = list(/datum/material/iron=20000)
construction_time = 100
category = list("H.O.N.K")
@@ -352,7 +352,7 @@
id = "honk_torso"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/honker_torso
- materials = list(MAT_METAL=20000,MAT_GLASS=10000,MAT_BANANIUM=10000)
+ materials = list(/datum/material/iron=20000,/datum/material/glass=10000,/datum/material/bananium=10000)
construction_time = 300
category = list("H.O.N.K")
@@ -361,7 +361,7 @@
id = "honk_head"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/honker_head
- materials = list(MAT_METAL=10000,MAT_GLASS=5000,MAT_BANANIUM=5000)
+ materials = list(/datum/material/iron=10000,/datum/material/glass=5000,/datum/material/bananium=5000)
construction_time = 200
category = list("H.O.N.K")
@@ -370,7 +370,7 @@
id = "honk_left_arm"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/honker_left_arm
- materials = list(MAT_METAL=15000,MAT_BANANIUM=5000)
+ materials = list(/datum/material/iron=15000,/datum/material/bananium=5000)
construction_time = 200
category = list("H.O.N.K")
@@ -379,7 +379,7 @@
id = "honk_right_arm"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/honker_right_arm
- materials = list(MAT_METAL=15000,MAT_BANANIUM=5000)
+ materials = list(/datum/material/iron=15000,/datum/material/bananium=5000)
construction_time = 200
category = list("H.O.N.K")
@@ -388,7 +388,7 @@
id = "honk_left_leg"
build_type = MECHFAB
build_path =/obj/item/mecha_parts/part/honker_left_leg
- materials = list(MAT_METAL=20000,MAT_BANANIUM=5000)
+ materials = list(/datum/material/iron=20000,/datum/material/bananium=5000)
construction_time = 200
category = list("H.O.N.K")
@@ -397,7 +397,7 @@
id = "honk_right_leg"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/honker_right_leg
- materials = list(MAT_METAL=20000,MAT_BANANIUM=5000)
+ materials = list(/datum/material/iron=20000,/datum/material/bananium=5000)
construction_time = 200
category = list("H.O.N.K")
@@ -408,7 +408,7 @@
id = "phazon_chassis"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/chassis/phazon
- materials = list(MAT_METAL=20000)
+ materials = list(/datum/material/iron=20000)
construction_time = 100
category = list("Phazon")
@@ -417,7 +417,7 @@
id = "phazon_torso"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/phazon_torso
- materials = list(MAT_METAL=35000,MAT_GLASS=10000,MAT_PLASMA=20000)
+ materials = list(/datum/material/iron=35000,/datum/material/glass=10000,/datum/material/plasma=20000)
construction_time = 300
category = list("Phazon")
@@ -426,7 +426,7 @@
id = "phazon_head"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/phazon_head
- materials = list(MAT_METAL=15000,MAT_GLASS=5000,MAT_PLASMA=10000)
+ materials = list(/datum/material/iron=15000,/datum/material/glass=5000,/datum/material/plasma=10000)
construction_time = 200
category = list("Phazon")
@@ -435,7 +435,7 @@
id = "phazon_left_arm"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/phazon_left_arm
- materials = list(MAT_METAL=20000,MAT_PLASMA=10000)
+ materials = list(/datum/material/iron=20000,/datum/material/plasma=10000)
construction_time = 200
category = list("Phazon")
@@ -444,7 +444,7 @@
id = "phazon_right_arm"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/phazon_right_arm
- materials = list(MAT_METAL=20000,MAT_PLASMA=10000)
+ materials = list(/datum/material/iron=20000,/datum/material/plasma=10000)
construction_time = 200
category = list("Phazon")
@@ -453,7 +453,7 @@
id = "phazon_left_leg"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/phazon_left_leg
- materials = list(MAT_METAL=20000,MAT_PLASMA=10000)
+ materials = list(/datum/material/iron=20000,/datum/material/plasma=10000)
construction_time = 200
category = list("Phazon")
@@ -462,7 +462,7 @@
id = "phazon_right_leg"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/phazon_right_leg
- materials = list(MAT_METAL=20000,MAT_PLASMA=10000)
+ materials = list(/datum/material/iron=20000,/datum/material/plasma=10000)
construction_time = 200
category = list("Phazon")
@@ -471,7 +471,7 @@
id = "phazon_armor"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/phazon_armor
- materials = list(MAT_METAL=25000,MAT_PLASMA=20000,MAT_TITANIUM=20000)
+ materials = list(/datum/material/iron=25000,/datum/material/plasma=20000,/datum/material/titanium=20000)
construction_time = 300
category = list("Phazon")
@@ -481,7 +481,7 @@
id = "mech_hydraulic_clamp"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp
- materials = list(MAT_METAL=10000)
+ materials = list(/datum/material/iron=10000)
construction_time = 100
category = list("Exosuit Equipment")
@@ -490,7 +490,7 @@
id = "mech_drill"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/drill
- materials = list(MAT_METAL=10000)
+ materials = list(/datum/material/iron=10000)
construction_time = 100
category = list("Exosuit Equipment")
@@ -499,7 +499,7 @@
id = "mech_mscanner"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/mining_scanner
- materials = list(MAT_METAL=5000,MAT_GLASS=2500)
+ materials = list(/datum/material/iron=5000,/datum/material/glass=2500)
construction_time = 50
category = list("Exosuit Equipment")
@@ -508,7 +508,7 @@
id = "mech_extinguisher"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/extinguisher
- materials = list(MAT_METAL=10000)
+ materials = list(/datum/material/iron=10000)
construction_time = 100
category = list("Exosuit Equipment")
@@ -517,7 +517,7 @@
id = "mech_cable_layer"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/cable_layer
- materials = list(MAT_METAL=10000)
+ materials = list(/datum/material/iron=10000)
construction_time = 100
category = list("Exosuit Equipment")
@@ -526,7 +526,7 @@
id = "mech_generator"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/generator
- materials = list(MAT_METAL=10000,MAT_GLASS=1000,MAT_SILVER=2000,MAT_PLASMA=5000)
+ materials = list(/datum/material/iron=10000,/datum/material/glass=1000,/datum/material/silver=2000,/datum/material/plasma=5000)
construction_time = 100
category = list("Exosuit Equipment")
@@ -535,7 +535,7 @@
id = "mech_mousetrap_mortar"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/mousetrap_mortar
- materials = list(MAT_METAL=20000,MAT_BANANIUM=5000)
+ materials = list(/datum/material/iron=20000,/datum/material/bananium=5000)
construction_time = 300
category = list("Exosuit Equipment")
@@ -544,7 +544,7 @@
id = "mech_banana_mortar"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/banana_mortar
- materials = list(MAT_METAL=20000,MAT_BANANIUM=5000)
+ materials = list(/datum/material/iron=20000,/datum/material/bananium=5000)
construction_time = 300
category = list("Exosuit Equipment")
@@ -553,7 +553,7 @@
id = "mech_honker"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/honker
- materials = list(MAT_METAL=20000,MAT_BANANIUM=10000)
+ materials = list(/datum/material/iron=20000,/datum/material/bananium=10000)
construction_time = 500
category = list("Exosuit Equipment")
@@ -562,7 +562,7 @@
id = "mech_punching_face"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/punching_glove
- materials = list(MAT_METAL=20000,MAT_BANANIUM=7500)
+ materials = list(/datum/material/iron=20000,/datum/material/bananium=7500)
construction_time = 400
category = list("Exosuit Equipment")
@@ -575,7 +575,7 @@
id = "borg_upgrade_rename"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/rename
- materials = list(MAT_METAL=35000)
+ materials = list(/datum/material/iron=35000)
construction_time = 120
category = list("Cyborg Upgrade Modules")
@@ -584,7 +584,7 @@
id = "borg_upgrade_restart"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/restart
- materials = list(MAT_METAL=60000 , MAT_GLASS=5000)
+ materials = list(/datum/material/iron=60000 , /datum/material/glass=5000)
construction_time = 120
category = list("Cyborg Upgrade Modules")
@@ -593,7 +593,7 @@
id = "borg_upgrade_vtec"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/vtec
- materials = list(MAT_METAL=80000 , MAT_GLASS=6000 , MAT_URANIUM= 5000)
+ materials = list(/datum/material/iron=80000 , /datum/material/glass=6000 , /datum/material/uranium= 5000)
construction_time = 120
category = list("Cyborg Upgrade Modules")
@@ -602,7 +602,7 @@
id = "borg_upgrade_thrusters"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/thrusters
- materials = list(MAT_METAL=10000, MAT_PLASMA=5000, MAT_URANIUM = 6000)
+ materials = list(/datum/material/iron=10000, /datum/material/plasma=5000, /datum/material/uranium = 6000)
construction_time = 120
category = list("Cyborg Upgrade Modules")
@@ -611,7 +611,7 @@
id = "borg_upgrade_disablercooler"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/disablercooler
- materials = list(MAT_METAL=80000 , MAT_GLASS=6000 , MAT_GOLD= 2000, MAT_DIAMOND = 500)
+ materials = list(/datum/material/iron=80000 , /datum/material/glass=6000 , /datum/material/gold= 2000, /datum/material/diamond = 500)
construction_time = 120
category = list("Cyborg Upgrade Modules")
@@ -620,7 +620,7 @@
id = "borg_upgrade_diamonddrill"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/ddrill
- materials = list(MAT_METAL=10000, MAT_DIAMOND=2000)
+ materials = list(/datum/material/iron=10000, /datum/material/diamond=2000)
construction_time = 120
category = list("Cyborg Upgrade Modules")
@@ -629,7 +629,7 @@
id = "borg_upgrade_advcutter"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/advcutter
- materials = list(MAT_METAL=8000, MAT_PLASMA=2000, MAT_GOLD= 2000)
+ materials = list(/datum/material/iron = 8000, /datum/material/plasma = 2000, /datum/material/gold = 2000)
construction_time = 120
category = list("Cyborg Upgrade Modules")
@@ -638,7 +638,7 @@
id = "borg_upgrade_premiumka"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/premiumka
- materials = list(MAT_METAL=8000, MAT_GLASS=4000, MAT_TITANIUM=2000)
+ materials = list(/datum/material/iron=8000, /datum/material/glass=4000, /datum/material/titanium=2000)
construction_time = 120
category = list("Cyborg Upgrade Modules")
@@ -647,7 +647,7 @@
id = "borg_upgrade_lavaproof"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/lavaproof
- materials = list(MAT_METAL = 10000, MAT_PLASMA = 4000, MAT_TITANIUM = 5000)
+ materials = list(/datum/material/iron = 10000, /datum/material/plasma = 4000, /datum/material/titanium = 5000)
construction_time = 120
category = list("Cyborg Upgrade Modules")
@@ -656,7 +656,7 @@
id = "borg_syndicate_module"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/syndicate
- materials = list(MAT_METAL=10000,MAT_GLASS=15000,MAT_DIAMOND = 10000)
+ materials = list(/datum/material/iron=10000,/datum/material/glass=15000,/datum/material/diamond = 10000)
construction_time = 120
category = list("Cyborg Upgrade Modules")
@@ -665,7 +665,7 @@
id = "borg_transform_clown"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/transform/clown
- materials = list(MAT_METAL=10000, MAT_GLASS=15000, MAT_BANANIUM = 1000)
+ materials = list(/datum/material/iron=10000, /datum/material/glass=15000, /datum/material/bananium = 1000)
construction_time = 120
category = list("Cyborg Upgrade Modules")
@@ -674,7 +674,7 @@
id = "borg_upgrade_selfrepair"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/selfrepair
- materials = list(MAT_METAL=15000, MAT_GLASS=15000)
+ materials = list(/datum/material/iron=15000, /datum/material/glass=15000)
construction_time = 120
category = list("Cyborg Upgrade Modules")
@@ -683,7 +683,7 @@
id = "borg_upgrade_expandedsynthesiser"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/hypospray/expanded
- materials = list(MAT_METAL=15000, MAT_GLASS=15000, MAT_PLASMA=5000)
+ materials = list(/datum/material/iron=15000, /datum/material/glass=15000, /datum/material/plasma=5000)
construction_time = 120
category = list("Cyborg Upgrade Modules")
@@ -692,7 +692,7 @@
id = "borg_upgrade_highstrengthsynthesiser"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/hypospray/high_strength
- materials = list(MAT_METAL=15000, MAT_GLASS=15000, MAT_PLASMA=10000, MAT_URANIUM=5000)
+ materials = list(/datum/material/iron=15000, /datum/material/glass=15000, /datum/material/plasma=10000, /datum/material/uranium=5000)
construction_time = 120
category = list("Cyborg Upgrade Modules")
@@ -701,7 +701,7 @@
id = "borg_upgrade_piercinghypospray"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/piercing_hypospray
- materials = list(MAT_METAL=15000, MAT_GLASS=15000, MAT_TITANIUM=10000, MAT_DIAMOND=5000)
+ materials = list(/datum/material/iron=15000, /datum/material/glass=15000, /datum/material/titanium=10000, /datum/material/diamond=5000)
construction_time = 120
category = list("Cyborg Upgrade Modules")
@@ -710,7 +710,7 @@
id = "borg_upgrade_surgicalprocessor"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/processor
- materials = list(MAT_METAL=15000, MAT_GLASS=15000, MAT_SILVER=10000)
+ materials = list(/datum/material/iron=15000, /datum/material/glass=15000, /datum/material/silver=10000)
construction_time = 120
category = list("Cyborg Upgrade Modules")
@@ -719,7 +719,7 @@
id = "borg_upgrade_trashofholding"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/tboh
- materials = list(MAT_METAL=10000, MAT_GOLD=1500, MAT_URANIUM=250, MAT_PLASMA=1500)
+ materials = list(/datum/material/iron=10000, /datum/material/gold=1500, /datum/material/uranium=250, /datum/material/plasma=1500)
construction_time = 120
category = list("Cyborg Upgrade Modules")
@@ -728,7 +728,7 @@
id = "borg_upgrade_advancedmop"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/amop
- materials = list(MAT_METAL=10000, MAT_GLASS=200, MAT_TITANIUM=1000)
+ materials = list(/datum/material/iron=10000, /datum/material/glass=200, /datum/material/titanium=1000)
construction_time = 120
category = list("Cyborg Upgrade Modules")
@@ -737,7 +737,7 @@
id = "borg_upgrade_expand"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/expand
- materials = list(MAT_METAL=200000, MAT_TITANIUM=5000)
+ materials = list(/datum/material/iron=200000, /datum/material/titanium=5000)
construction_time = 120
category = list("Cyborg Upgrade Modules")
@@ -746,7 +746,7 @@
id = "borg_ai_control"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/ai
- materials = list(MAT_METAL = 1200, MAT_GLASS = 1500, MAT_GOLD = 200)
+ materials = list(/datum/material/iron = 1200, /datum/material/glass = 1500, /datum/material/gold = 200)
construction_time = 50
category = list("Misc")
@@ -755,7 +755,7 @@
id = "borg_upgrade_rped"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/rped
- materials = list(MAT_METAL = 10000, MAT_GLASS = 5000)
+ materials = list(/datum/material/iron = 10000, /datum/material/glass = 5000)
construction_time = 120
category = list("Cyborg Upgrade Modules")
@@ -764,7 +764,7 @@
id = "borg_upgrade_pinpointer"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/pinpointer
- materials = list(MAT_METAL = 1000, MAT_GLASS = 500)
+ materials = list(/datum/material/iron = 1000, /datum/material/glass = 500)
construction_time = 120
category = list("Cyborg Upgrade Modules")
@@ -773,7 +773,7 @@
id = "borg_upgrade_advhealth"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/advhealth
- materials = list(MAT_METAL=7500, MAT_GLASS=7500, MAT_SILVER=1000, MAT_GOLD=1000, MAT_TITANIUM=2000)
+ materials = list(/datum/material/iron=7500, /datum/material/glass=7500, /datum/material/silver=1000, /datum/material/gold=1000, /datum/material/titanium=2000)
construction_time = 100
category = list("Cyborg Upgrade Modules")
@@ -783,7 +783,7 @@
id = "mecha_tracking"
build_type = MECHFAB
build_path =/obj/item/mecha_parts/mecha_tracking
- materials = list(MAT_METAL=500)
+ materials = list(/datum/material/iron=500)
construction_time = 50
category = list("Misc")
@@ -792,7 +792,7 @@
id = "mecha_tracking_ai_control"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_tracking/ai_control
- materials = list(MAT_METAL = 1000, MAT_GLASS = 500, MAT_SILVER = 200)
+ materials = list(/datum/material/iron = 1000, /datum/material/glass = 500, /datum/material/silver = 200)
construction_time = 50
category = list("Misc")
@@ -801,7 +801,7 @@
desc = "When a problem arises, SCIENCE is the solution."
id = "sflash"
build_type = MECHFAB
- materials = list(MAT_METAL = 750, MAT_GLASS = 750)
+ materials = list(/datum/material/iron = 750, /datum/material/glass = 750)
construction_time = 100
build_path = /obj/item/assembly/flash/handheld
category = list("Misc")
diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm
index bef25456ca..af80aa6671 100644
--- a/code/modules/research/designs/medical_designs.dm
+++ b/code/modules/research/designs/medical_designs.dm
@@ -7,7 +7,7 @@
desc = "The Warrior's bland acronym, MMI, obscures the true horror of this monstrosity."
id = "mmi"
build_type = PROTOLATHE | MECHFAB
- materials = list(MAT_METAL = 1000, MAT_GLASS = 500)
+ materials = list(/datum/material/iron = 1000, /datum/material/glass = 500)
construction_time = 75
build_path = /obj/item/mmi
category = list("Misc","Medical Designs")
@@ -18,7 +18,7 @@
desc = "The latest in Artificial Intelligences."
id = "mmi_posi"
build_type = PROTOLATHE | MECHFAB
- materials = list(MAT_METAL = 1700, MAT_GLASS = 1350, MAT_GOLD = 500) //Gold, because SWAG.
+ materials = list(/datum/material/iron = 1700, /datum/material/glass = 1350, /datum/material/gold = 500) //Gold, because SWAG.
construction_time = 75
build_path = /obj/item/mmi/posibrain
category = list("Misc", "Medical Designs")
@@ -29,7 +29,7 @@
desc = "A bluespace beaker, powered by experimental bluespace technology and Element Cuban combined with the Compound Pete. Can hold up to 300 units."
id = "bluespacebeaker"
build_type = PROTOLATHE
- materials = list(MAT_GLASS = 3000, MAT_PLASMA = 3000, MAT_DIAMOND = 250, MAT_BLUESPACE = 250)
+ materials = list(/datum/material/glass = 3000, /datum/material/plasma = 3000, /datum/material/diamond = 250, /datum/material/bluespace = 250)
build_path = /obj/item/reagent_containers/glass/beaker/bluespace
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
@@ -39,7 +39,7 @@
desc = "A cryostasis beaker that allows for chemical storage without reactions. Can hold up to 50 units."
id = "splitbeaker"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 3000)
+ materials = list(/datum/material/iron = 3000)
build_path = /obj/item/reagent_containers/glass/beaker/noreact
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -49,7 +49,7 @@
id = "xlarge_beaker"
build_type = PROTOLATHE
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
- materials = list(MAT_GLASS = 2500, MAT_PLASTIC = 3000)
+ materials = list(/datum/material/glass = 2500, /datum/material/plastic = 3000)
build_path = /obj/item/reagent_containers/glass/beaker/plastic
category = list("Medical Designs")
@@ -58,7 +58,7 @@
id = "meta_beaker"
build_type = PROTOLATHE
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
- materials = list(MAT_GLASS = 2500, MAT_PLASTIC = 3000, MAT_GOLD = 1000, MAT_TITANIUM = 1000)
+ materials = list(/datum/material/glass = 2500, /datum/material/plastic = 3000, /datum/material/gold = 1000, /datum/material/titanium = 1000)
build_path = /obj/item/reagent_containers/glass/beaker/meta
category = list("Medical Designs")
@@ -67,7 +67,7 @@
desc = "An advanced syringe that can hold 60 units of chemicals"
id = "bluespacesyringe"
build_type = PROTOLATHE
- materials = list(MAT_GLASS = 2000, MAT_PLASMA = 1000, MAT_DIAMOND = 1000, MAT_BLUESPACE = 500)
+ materials = list(/datum/material/glass = 2000, /datum/material/plasma = 1000, /datum/material/diamond = 1000, /datum/material/bluespace = 500)
build_path = /obj/item/reagent_containers/syringe/bluespace
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
@@ -77,7 +77,7 @@
desc = "An advanced syringe that stops reagents inside from reacting. It can hold up to 20 units."
id = "noreactsyringe"
build_type = PROTOLATHE
- materials = list(MAT_GLASS = 2000, MAT_GOLD = 1000)
+ materials = list(/datum/material/glass = 2000, /datum/material/gold = 1000)
build_path = /obj/item/reagent_containers/syringe/noreact
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -87,7 +87,7 @@
desc = "A diamond-tipped syringe that pierces armor when launched at high velocity. It can hold up to 10 units."
id = "piercesyringe"
build_type = PROTOLATHE
- materials = list(MAT_GLASS = 2000, MAT_DIAMOND = 1000)
+ materials = list(/datum/material/glass = 2000, /datum/material/diamond = 1000)
build_path = /obj/item/reagent_containers/syringe/piercing
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -97,7 +97,7 @@
desc = "A non-harmful dart that can administer medication from a range. Once it hits a patient using it's smart nanofilter technology only medicines contained within the dart are administered to the patient. Additonally, due to capillary action, injection of chemicals past the overdose limit is prevented."
id = "medicinalsmartdart"
build_type = PROTOLATHE
- materials = list(MAT_GLASS = 100, MAT_PLASTIC = 100, MAT_METAL = 100)
+ materials = list(/datum/material/glass = 100, /datum/material/plastic = 100, /datum/material/iron = 100)
build_path = /obj/item/reagent_containers/syringe/dart
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -107,7 +107,7 @@
desc = "A non-harmful dart that can administer medication from a range. Once it hits a patient using it's smart nanofilter technology only medicines contained within the dart are administered to the patient. Additonally, due to capillary action, injection of chemicals past the overdose limit is prevented. Has an extended volume capacity thanks to bluespace foam."
id = "bluespacesmartdart"
build_type = PROTOLATHE
- materials = list(MAT_GLASS = 250, MAT_PLASTIC = 250, MAT_METAL = 250, MAT_BLUESPACE = 250)
+ materials = list(/datum/material/glass = 250, /datum/material/plastic = 250, /datum/material/iron = 250, /datum/material/bluespace = 250)
build_path = /obj/item/reagent_containers/syringe/dart/bluespace
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -117,7 +117,7 @@
desc = "A compressed air gun, designed to fit medicinal darts for application of medicine for those patients just out of reach."
id = "smartdartgun"
build_type = PROTOLATHE
- materials = list(MAT_GLASS = 500, MAT_PLASTIC = 1000, MAT_METAL = 500)
+ materials = list(/datum/material/glass = 500, /datum/material/plastic = 1000, /datum/material/iron = 500)
build_path = /obj/item/gun/syringe/dart
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -127,7 +127,7 @@
desc = "A bluespace body bag, powered by experimental bluespace technology. It can hold loads of bodies and the largest of creatures."
id = "bluespacebodybag"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 3000, MAT_PLASMA = 2000, MAT_DIAMOND = 500, MAT_BLUESPACE = 500)
+ materials = list(/datum/material/iron = 3000, /datum/material/plasma = 2000, /datum/material/diamond = 500, /datum/material/bluespace = 500)
build_path = /obj/item/bodybag/bluespace
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
@@ -137,7 +137,7 @@
desc = "A refill pack for the auto-extinguisher on Plasma-man suits."
id = "plasmarefiller" //Why did this have no plasmatech
build_type = PROTOLATHE
- materials = list(MAT_METAL = 4000, MAT_PLASMA = 1000)
+ materials = list(/datum/material/iron = 4000, /datum/material/plasma = 1000)
build_path = /obj/item/extinguisher_refill
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_ALL
@@ -147,7 +147,7 @@
desc = "Allows tracking of someone's location if their suit sensors are turned to tracking beacon."
id = "crewpinpointer"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 3000, MAT_GLASS = 1500, MAT_GOLD = 200)
+ materials = list(/datum/material/iron = 3000, /datum/material/glass = 1500, /datum/material/gold = 200)
build_path = /obj/item/pinpointer/crew
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -157,7 +157,7 @@
desc = "An IV drip with an advanced infusion pump that can both drain blood into and inject liquids from attached containers. Blood packs are processed at an accelerated rate. This one is telescopic, and can be picked up and put down."
id = "telescopiciv"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 5000, MAT_GLASS = 3500, MAT_SILVER = 1000)
+ materials = list(/datum/material/iron = 5000, /datum/material/glass = 3500, /datum/material/silver = 1000)
build_path = /obj/item/tele_iv
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -168,7 +168,7 @@
id = "healthanalyzer_advanced"
build_path = /obj/item/healthanalyzer/advanced
build_type = PROTOLATHE
- materials = list(MAT_METAL = 5000, MAT_GLASS = 2500, MAT_SILVER = 2000, MAT_GOLD = 1500)
+ materials = list(/datum/material/iron = 5000, /datum/material/glass = 2500, /datum/material/silver = 2000, /datum/material/gold = 1500)
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -178,7 +178,7 @@
id = "medspray"
build_path = /obj/item/reagent_containers/medspray
build_type = PROTOLATHE
- materials = list(MAT_METAL = 2500, MAT_GLASS = 500)
+ materials = list(/datum/material/iron = 2500, /datum/material/glass = 500)
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -187,7 +187,7 @@
desc = "A plastic medical kit for storging medical items."
id = "medicalkit"
build_type = PROTOLATHE
- materials = list(MAT_PLASTIC = 5000)
+ materials = list(/datum/material/plastic = 5000)
build_path = /obj/item/storage/firstaid //So we dont spawn medical items in it
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
@@ -198,7 +198,7 @@
id = "blood_bag"
build_path = /obj/item/reagent_containers/blood
build_type = PROTOLATHE
- materials = list(MAT_GLASS = 1500, MAT_PLASTIC = 3500)
+ materials = list(/datum/material/glass = 1500, /datum/material/plastic = 3500)
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -208,7 +208,7 @@
id = "bsblood_bag"
build_path = /obj/item/reagent_containers/blood/bluespace
build_type = PROTOLATHE
- materials = list(MAT_GLASS = 2500, MAT_PLASTIC = 4500, MAT_BLUESPACE = 250)
+ materials = list(/datum/material/glass = 2500, /datum/material/plastic = 4500, /datum/material/bluespace = 250)
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -217,7 +217,7 @@
desc = "Produce additional disks for storing genetic data."
id = "cloning_disk"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 300, MAT_GLASS = 100, MAT_SILVER = 50)
+ materials = list(/datum/material/iron = 300, /datum/material/glass = 100, /datum/material/silver=50)
build_path = /obj/item/disk/data
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
@@ -227,7 +227,7 @@
desc = "A large cool box that can hold large amouts of medical tools or organs."
id = "organbox"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 3000, MAT_GLASS = 1000, MAT_SILVER= 3500, MAT_GOLD = 3500, MAT_PLASTIC = 5000)
+ materials = list(/datum/material/iron = 3000, /datum/material/glass = 1000, /datum/material/silver= 3500, /datum/material/gold = 3500, /datum/material/plastic = 5000)
build_path = /obj/item/storage/belt/organbox
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
@@ -242,7 +242,7 @@
id = "defibrillator"
build_type = PROTOLATHE
build_path = /obj/item/defibrillator
- materials = list(MAT_METAL = 8000, MAT_GLASS = 4000, MAT_SILVER = 3000, MAT_GOLD = 1500)
+ materials = list(/datum/material/iron = 8000, /datum/material/glass = 4000, /datum/material/silver = 3000, /datum/material/gold = 1500)
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -251,7 +251,7 @@
desc = "An all-in-one mounted frame for holding defibrillators, complete with ID-locked clamps and recharging cables."
id = "defibmount"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 2000, MAT_GLASS = 1000)
+ materials = list(/datum/material/iron = 2000, /datum/material/glass = 1000)
build_path = /obj/item/wallframe/defib_mount
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -261,7 +261,7 @@
desc = "An upgrade which increases the healing power of the defibrillator."
id = "defib_heal"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 16000, MAT_GLASS = 18000, MAT_GOLD = 6000, MAT_SILVER = 6000)
+ materials = list(/datum/material/iron = 16000, /datum/material/glass = 18000, /datum/material/gold = 6000, /datum/material/silver = 6000)
build_path = /obj/item/disk/medical/defib_heal
construction_time = 10
category = list("Misc")
@@ -272,7 +272,7 @@
desc = "A safety upgrade that guarantees only the patient will get shocked."
id = "defib_shock"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 16000, MAT_GLASS = 18000, MAT_GOLD = 6000, MAT_SILVER = 6000)
+ materials = list(/datum/material/iron = 16000, /datum/material/glass = 18000, /datum/material/gold = 6000, /datum/material/silver = 6000)
build_path = /obj/item/disk/medical/defib_shock
construction_time = 10
category = list("Misc")
@@ -283,7 +283,7 @@
desc = "An upgrade allowing the defibrillator to work on more decayed bodies."
id = "defib_decay"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 16000, MAT_GLASS = 18000, MAT_GOLD = 16000, MAT_SILVER = 6000, MAT_TITANIUM = 2000)
+ materials = list(/datum/material/iron = 16000, /datum/material/glass = 18000, /datum/material/gold = 16000, /datum/material/silver = 6000, /datum/material/titanium = 2000)
build_path = /obj/item/disk/medical/defib_decay
construction_time = 10
category = list("Misc")
@@ -295,7 +295,7 @@
id = "defib_speed"
build_type = PROTOLATHE
build_path = /obj/item/disk/medical/defib_speed
- materials = list(MAT_METAL = 16000, MAT_GLASS = 8000, MAT_GOLD = 26000, MAT_SILVER = 26000)
+ materials = list(/datum/material/iron = 16000, /datum/material/glass = 8000, /datum/material/gold = 26000, /datum/material/silver = 26000)
construction_time = 10
category = list("Misc")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -306,7 +306,7 @@
id = "defibrillator_compact"
build_type = PROTOLATHE
build_path = /obj/item/defibrillator/compact
- materials = list(MAT_METAL = 16000, MAT_GLASS = 8000, MAT_SILVER = 6000, MAT_GOLD = 3000)
+ materials = list(/datum/material/iron = 16000, /datum/material/glass = 8000, /datum/material/silver = 6000, /datum/material/gold = 3000)
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -320,7 +320,7 @@
id = "ci-welding"
build_type = PROTOLATHE | MECHFAB
construction_time = 40
- materials = list(MAT_METAL = 600, MAT_GLASS = 400)
+ materials = list(/datum/material/iron = 600, /datum/material/glass = 400)
build_path = /obj/item/organ/eyes/robotic/shield
category = list("Misc", "Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -331,7 +331,7 @@
id = "ci-gloweyes"
build_type = PROTOLATHE | MECHFAB
construction_time = 40
- materials = list(MAT_METAL = 600, MAT_GLASS = 1000)
+ materials = list(/datum/material/iron = 600, /datum/material/glass = 1000)
build_path = /obj/item/organ/eyes/robotic/glow
category = list("Misc", "Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -342,7 +342,7 @@
id = "ci-breather"
build_type = PROTOLATHE | MECHFAB
construction_time = 35
- materials = list(MAT_METAL = 600, MAT_GLASS = 250)
+ materials = list(/datum/material/iron = 600, /datum/material/glass = 250)
build_path = /obj/item/organ/cyberimp/mouth/breathing_tube
category = list("Misc", "Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -352,7 +352,7 @@
desc = "A set of surgical tools hidden behind a concealed panel on the user's arm."
id = "ci-surgery"
build_type = PROTOLATHE | MECHFAB
- materials = list (MAT_METAL = 2500, MAT_GLASS = 1500, MAT_SILVER = 1500)
+ materials = list (/datum/material/iron = 2500, /datum/material/glass = 1500, /datum/material/silver = 1500)
construction_time = 200
build_path = /obj/item/organ/cyberimp/arm/surgery
category = list("Misc", "Medical Designs")
@@ -363,7 +363,7 @@
desc = "A stripped-down version of engineering cyborg toolset, designed to be installed on subject's arm."
id = "ci-toolset"
build_type = PROTOLATHE | MECHFAB
- materials = list (MAT_METAL = 2500, MAT_GLASS = 1500, MAT_SILVER = 1500)
+ materials = list (/datum/material/iron = 2500, /datum/material/glass = 1500, /datum/material/silver = 1500)
construction_time = 200
build_path = /obj/item/organ/cyberimp/arm/toolset
category = list("Misc", "Medical Designs")
@@ -375,7 +375,7 @@
id = "ci-medhud"
build_type = PROTOLATHE | MECHFAB
construction_time = 50
- materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_SILVER = 500, MAT_GOLD = 500)
+ materials = list(/datum/material/iron = 600, /datum/material/glass = 600, /datum/material/silver = 500, /datum/material/gold = 500)
build_path = /obj/item/organ/cyberimp/eyes/hud/medical
category = list("Misc", "Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -386,7 +386,7 @@
id = "ci-sechud"
build_type = PROTOLATHE | MECHFAB
construction_time = 50
- materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_SILVER = 750, MAT_GOLD = 750)
+ materials = list(/datum/material/iron = 600, /datum/material/glass = 600, /datum/material/silver = 750, /datum/material/gold = 750)
build_path = /obj/item/organ/cyberimp/eyes/hud/security
category = list("Misc", "Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -397,7 +397,7 @@
id = "ci-xray"
build_type = PROTOLATHE | MECHFAB
construction_time = 60
- materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_SILVER = 600, MAT_GOLD = 600, MAT_PLASMA = 1000, MAT_URANIUM = 1000, MAT_DIAMOND = 1000, MAT_BLUESPACE = 1000)
+ materials = list(/datum/material/iron = 600, /datum/material/glass = 600, /datum/material/silver = 600, /datum/material/gold = 600, /datum/material/plasma = 1000, /datum/material/uranium = 1000, /datum/material/diamond = 1000, /datum/material/bluespace = 1000)
build_path = /obj/item/organ/eyes/robotic/xray
category = list("Misc", "Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -408,7 +408,7 @@
id = "ci-thermals"
build_type = PROTOLATHE | MECHFAB
construction_time = 60
- materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_SILVER = 600, MAT_GOLD = 600, MAT_PLASMA = 1000, MAT_DIAMOND = 2000)
+ materials = list(/datum/material/iron = 600, /datum/material/glass = 600, /datum/material/silver = 600, /datum/material/gold = 600, /datum/material/plasma = 1000, /datum/material/diamond = 2000)
build_path = /obj/item/organ/eyes/robotic/thermals
category = list("Misc", "Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -419,7 +419,7 @@
id = "ci-antidrop"
build_type = PROTOLATHE | MECHFAB
construction_time = 60
- materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_SILVER = 400, MAT_GOLD = 400)
+ materials = list(/datum/material/iron = 600, /datum/material/glass = 600, /datum/material/silver = 400, /datum/material/gold = 400)
build_path = /obj/item/organ/cyberimp/brain/anti_drop
category = list("Misc", "Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -430,7 +430,7 @@
id = "ci-antistun"
build_type = PROTOLATHE | MECHFAB
construction_time = 60
- materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_SILVER = 500, MAT_GOLD = 1000)
+ materials = list(/datum/material/iron = 600, /datum/material/glass = 600, /datum/material/silver = 500, /datum/material/gold = 1000)
build_path = /obj/item/organ/cyberimp/brain/anti_stun
category = list("Misc", "Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -441,7 +441,7 @@
id = "ci-nutriment"
build_type = PROTOLATHE | MECHFAB
construction_time = 40
- materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_GOLD = 500)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 500, /datum/material/gold = 500)
build_path = /obj/item/organ/cyberimp/chest/nutriment
category = list("Misc", "Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -452,7 +452,7 @@
id = "ci-nutrimentplus"
build_type = PROTOLATHE | MECHFAB
construction_time = 50
- materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_GOLD = 500, MAT_URANIUM = 750)
+ materials = list(/datum/material/iron = 600, /datum/material/glass = 600, /datum/material/gold = 500, /datum/material/uranium = 750)
build_path = /obj/item/organ/cyberimp/chest/nutriment/plus
category = list("Misc", "Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -463,7 +463,7 @@
id = "ci-reviver"
build_type = PROTOLATHE | MECHFAB
construction_time = 60
- materials = list(MAT_METAL = 800, MAT_GLASS = 800, MAT_GOLD = 300, MAT_URANIUM = 500)
+ materials = list(/datum/material/iron = 800, /datum/material/glass = 800, /datum/material/gold = 300, /datum/material/uranium = 500)
build_path = /obj/item/organ/cyberimp/chest/reviver
category = list("Misc", "Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -474,7 +474,7 @@
id = "ci-thrusters"
build_type = PROTOLATHE | MECHFAB
construction_time = 80
- materials = list(MAT_METAL = 4000, MAT_GLASS = 2000, MAT_SILVER = 1000, MAT_DIAMOND = 1000)
+ materials = list(/datum/material/iron = 4000, /datum/material/glass = 2000, /datum/material/silver = 1000, /datum/material/diamond = 1000)
build_path = /obj/item/organ/cyberimp/chest/thrusters
category = list("Misc", "Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -488,7 +488,7 @@
desc = "A sterile automatic implant injector."
id = "implanter"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 600, MAT_GLASS = 200)
+ materials = list(/datum/material/iron = 600, /datum/material/glass = 200)
build_path = /obj/item/implanter
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_SECURITY | DEPARTMENTAL_FLAG_MEDICAL
@@ -498,7 +498,7 @@
desc = "A glass case for containing an implant."
id = "implantcase"
build_type = PROTOLATHE
- materials = list(MAT_GLASS = 500)
+ materials = list(/datum/material/glass = 500)
build_path = /obj/item/implantcase
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_SECURITY | DEPARTMENTAL_FLAG_MEDICAL
@@ -508,7 +508,7 @@
desc = "Makes death amusing."
id = "implant_trombone"
build_type = PROTOLATHE
- materials = list(MAT_GLASS = 500, MAT_BANANIUM = 500)
+ materials = list(/datum/material/glass = 500, /datum/material/bananium = 500)
build_path = /obj/item/implantcase/sad_trombone
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_ALL //if you get bananium you get the sad trombones.
@@ -518,7 +518,7 @@
desc = "A glass case containing an implant."
id = "implant_chem"
build_type = PROTOLATHE
- materials = list(MAT_GLASS = 700)
+ materials = list(/datum/material/glass = 700)
build_path = /obj/item/implantcase/chem
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY | DEPARTMENTAL_FLAG_MEDICAL
@@ -528,7 +528,7 @@
desc = "A glass case containing an implant."
id = "implant_tracking"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 500, MAT_GLASS = 500)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 500)
build_path = /obj/item/implantcase/track
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY | DEPARTMENTAL_FLAG_MEDICAL
@@ -540,7 +540,7 @@
desc = "A cybernetic liver"
id = "cybernetic_liver"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 500, MAT_GLASS = 500)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 500)
build_path = /obj/item/organ/liver/cybernetic
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -550,7 +550,7 @@
desc = "A cybernetic heart"
id = "cybernetic_heart"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 500, MAT_GLASS = 500)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 500)
build_path = /obj/item/organ/heart/cybernetic
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -561,7 +561,7 @@
id = "cybernetic_heart_u"
build_type = PROTOLATHE | MECHFAB
construction_time = 50
- materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_SILVER = 500)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 500, /datum/material/silver = 500)
build_path = /obj/item/organ/heart/cybernetic/upgraded
category = list("Misc", "Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -571,7 +571,7 @@
desc = "An upgraded cybernetic liver"
id = "cybernetic_liver_u"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 500, MAT_GLASS = 500)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 500)
build_path = /obj/item/organ/liver/cybernetic/upgraded
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -581,7 +581,7 @@
desc = "A pair of cybernetic lungs."
id = "cybernetic_lungs"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 500, MAT_GLASS = 500)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 500)
build_path = /obj/item/organ/lungs/cybernetic
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -591,7 +591,7 @@
desc = "A pair of upgraded cybernetic lungs."
id = "cybernetic_lungs_u"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_SILVER = 500)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 500, /datum/material/silver = 500)
build_path = /obj/item/organ/lungs/cybernetic/upgraded
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -601,7 +601,7 @@
desc = "A fancy cybernetic tongue."
id = "cybernetic_tongue"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 500, MAT_GLASS = 500)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 500)
build_path = /obj/item/organ/tongue/cybernetic
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -612,7 +612,7 @@
id = "cybernetic_ears"
build_type = PROTOLATHE | MECHFAB
construction_time = 30
- materials = list(MAT_METAL = 250, MAT_GLASS = 400)
+ materials = list(/datum/material/iron = 250, /datum/material/glass = 400)
build_path = /obj/item/organ/ears/cybernetic
category = list("Misc", "Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -623,7 +623,7 @@
id = "cybernetic_ears_u"
build_type = PROTOLATHE | MECHFAB
construction_time = 40
- materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_SILVER = 500)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 500, /datum/material/silver = 500)
build_path = /obj/item/organ/ears/cybernetic/upgraded
category = list("Misc", "Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -802,7 +802,7 @@
desc = "Basic outdated and fragile prosthetic left arm."
id = "basic_l_arm"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 5000, MAT_GLASS = 2500)
+ materials = list(/datum/material/iron = 5000, /datum/material/glass = 2500)
construction_time = 20
build_path = /obj/item/bodypart/l_arm/robot/surplus
category = list("Medical Designs")
@@ -813,7 +813,7 @@
desc = "Basic outdated and fragile prosthetic left arm."
id = "basic_r_arm"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 5000, MAT_GLASS = 2500)
+ materials = list(/datum/material/iron = 5000, /datum/material/glass = 2500)
construction_time = 20
build_path = /obj/item/bodypart/r_arm/robot/surplus
category = list("Medical Designs")
@@ -824,7 +824,7 @@
desc = "Basic outdated and fragile prosthetic left leg."
id = "basic_l_leg"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 5000, MAT_GLASS = 2500)
+ materials = list(/datum/material/iron = 5000, /datum/material/glass = 2500)
construction_time = 20
build_path = /obj/item/bodypart/l_leg/robot/surplus
category = list("Medical Designs")
@@ -835,7 +835,7 @@
desc = "Basic outdated and fragile prosthetic right leg."
id = "basic_r_leg"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 5000, MAT_GLASS = 2500)
+ materials = list(/datum/material/iron = 5000, /datum/material/glass = 2500)
construction_time = 20
build_path = /obj/item/bodypart/r_leg/robot/surplus
category = list("Medical Designs")
@@ -846,7 +846,7 @@
desc = "A renforced prosthetic right leg."
id = "adv_r_leg"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 6000, MAT_GLASS = 3500, MAT_GOLD = 500, MAT_TITANIUM = 800)
+ materials = list(/datum/material/iron = 6000, /datum/material/glass = 3500, /datum/material/gold = 500, /datum/material/titanium = 800)
construction_time = 40
build_path = /obj/item/bodypart/r_leg/robot/surplus_upgraded
category = list("Medical Designs")
@@ -857,7 +857,7 @@
desc = "A renforced prosthetic left leg."
id = "adv_l_leg"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 6000, MAT_GLASS = 3500, MAT_GOLD = 500, MAT_TITANIUM = 800)
+ materials = list(/datum/material/iron = 6000, /datum/material/glass = 3500, /datum/material/gold = 500, /datum/material/titanium = 800)
construction_time = 40
build_path = /obj/item/bodypart/l_leg/robot/surplus_upgraded
category = list("Medical Designs")
@@ -868,7 +868,7 @@
desc = "A renforced prosthetic left arm."
id = "adv_l_arm"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 6000, MAT_GLASS = 3500, MAT_GOLD = 500, MAT_TITANIUM = 800)
+ materials = list(/datum/material/iron = 6000, /datum/material/glass = 3500, /datum/material/gold = 500, /datum/material/titanium = 800)
construction_time = 40
build_path = /obj/item/bodypart/l_arm/robot/surplus_upgraded
category = list("Medical Designs")
@@ -879,7 +879,7 @@
desc = "A renforced prosthetic right arm."
id = "adv_r_arm"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 6000, MAT_GLASS = 3500, MAT_GOLD = 500, MAT_TITANIUM = 800)
+ materials = list(/datum/material/iron = 6000, /datum/material/glass = 3500, /datum/material/gold = 500, /datum/material/titanium = 800)
construction_time = 40
build_path = /obj/item/bodypart/r_arm/robot/surplus_upgraded
category = list("Medical Designs")
diff --git a/code/modules/research/designs/mining_designs.dm b/code/modules/research/designs/mining_designs.dm
index 69e695afac..53fa5b21ea 100644
--- a/code/modules/research/designs/mining_designs.dm
+++ b/code/modules/research/designs/mining_designs.dm
@@ -7,7 +7,7 @@
desc = "Allows for the construction of circuit boards used to build an Express Supply Console."//who?
id = "cargoexpress"//the coder reading this
build_type = IMPRINTER
- materials = list(MAT_GLASS = 1000)
+ materials = list(/datum/material/glass = 1000)
build_path = /obj/item/circuitboard/computer/cargo/express
category = list("Mining Designs")
departmental_flags = DEPARTMENTAL_FLAG_CARGO
@@ -17,7 +17,7 @@
desc = "Allows the Cargo Express Console to call down the Bluespace Drop Pod, greatly increasing user safety."//who?
id = "bluespace_pod"//the coder reading this
build_type = PROTOLATHE
- materials = list(MAT_GLASS = 1000)
+ materials = list(/datum/material/glass = 1000)
build_path = /obj/item/disk/cargo/bluespace_pod
category = list("Mining Designs")
departmental_flags = DEPARTMENTAL_FLAG_CARGO
@@ -27,7 +27,7 @@
desc = "Yours is the drill that will pierce through the rock walls."
id = "drill"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 6000, MAT_GLASS = 1000) //expensive, but no need for miners.
+ materials = list(/datum/material/iron = 6000, /datum/material/glass = 1000) //expensive, but no need for miners.
build_path = /obj/item/pickaxe/drill
category = list("Mining Designs")
departmental_flags = DEPARTMENTAL_FLAG_CARGO
@@ -37,7 +37,7 @@
desc = "Yours is the drill that will pierce the heavens!"
id = "drill_diamond"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 6000, MAT_GLASS = 1000, MAT_DIAMOND = 2000) //Yes, a whole diamond is needed.
+ materials = list(/datum/material/iron = 6000, /datum/material/glass = 1000, /datum/material/diamond = 2000) //Yes, a whole diamond is needed.
build_path = /obj/item/pickaxe/drill/diamonddrill
category = list("Mining Designs")
departmental_flags = DEPARTMENTAL_FLAG_CARGO
@@ -47,7 +47,7 @@
desc = "You could use it to cut limbs off of xenos! Or, you know, mine stuff."
id = "plasmacutter"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 1500, MAT_GLASS = 500, MAT_PLASMA = 400)
+ materials = list(/datum/material/iron = 1500, /datum/material/glass = 500, /datum/material/plasma = 400)
build_path = /obj/item/gun/energy/plasmacutter
category = list("Mining Designs")
departmental_flags = DEPARTMENTAL_FLAG_CARGO
@@ -57,7 +57,7 @@
desc = "It's an advanced plasma cutter, oh my god."
id = "plasmacutter_adv"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 3000, MAT_GLASS = 1000, MAT_PLASMA = 2000, MAT_GOLD = 500)
+ materials = list(/datum/material/iron = 3000, /datum/material/glass = 1000, /datum/material/plasma = 2000, /datum/material/gold = 500)
build_path = /obj/item/gun/energy/plasmacutter/adv
category = list("Mining Designs")
departmental_flags = DEPARTMENTAL_FLAG_CARGO
@@ -67,7 +67,7 @@
desc = "A pickaxe with a plasteel pick head. Less robust at cracking rock walls and digging up dirt than the titanium pickaxe, but better at cracking open skulls."
id = "plasteel_pick"
build_type = PROTOLATHE
- materials = list(MAT_METAL=2000, MAT_PLASMA=2000)
+ materials = list(/datum/material/iron=2000, /datum/material/plasma=2000)
build_path = /obj/item/pickaxe/plasteel
category = list("Mining Designs")
departmental_flags = DEPARTMENTAL_FLAG_CARGO
@@ -77,7 +77,7 @@
desc = "A pickaxe with a titanium pick head. Extremely robust at cracking rock walls and digging up dirt, but less than the plasteel pickaxe at cracking open skulls."
id = "titanium_pick"
build_type = PROTOLATHE
- materials = list(MAT_TITANIUM = 4000)
+ materials = list(/datum/material/titanium = 4000)
build_path = /obj/item/pickaxe/titanium
category = list("Mining Designs")
departmental_flags = DEPARTMENTAL_FLAG_CARGO
@@ -87,7 +87,7 @@
desc = "Essentially a handheld planet-cracker. Can drill through walls with ease as well."
id = "jackhammer"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 6000, MAT_GLASS = 2000, MAT_SILVER = 2000, MAT_DIAMOND = 6000)
+ materials = list(/datum/material/iron = 6000, /datum/material/glass = 2000, /datum/material/silver = 2000, /datum/material/diamond = 6000)
build_path = /obj/item/pickaxe/drill/jackhammer
category = list("Mining Designs")
departmental_flags = DEPARTMENTAL_FLAG_CARGO
@@ -97,7 +97,7 @@
desc = "An upgraded version of the resonator that allows more fields to be active at once."
id = "superresonator"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 4000, MAT_GLASS = 1500, MAT_SILVER = 1000, MAT_URANIUM = 1000)
+ materials = list(/datum/material/iron = 4000, /datum/material/glass = 1500, /datum/material/silver = 1000, /datum/material/uranium = 1000)
build_path = /obj/item/resonator/upgraded
category = list("Mining Designs")
departmental_flags = DEPARTMENTAL_FLAG_CARGO
@@ -107,7 +107,7 @@
desc = "A device which allows kinetic accelerators to be wielded by any organism."
id = "triggermod"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 2000, MAT_GLASS = 1500, MAT_GOLD = 1500, MAT_URANIUM = 1000)
+ materials = list(/datum/material/iron = 2000, /datum/material/glass = 1500, /datum/material/gold = 1500, /datum/material/uranium = 1000)
build_path = /obj/item/borg/upgrade/modkit/trigger_guard
category = list("Mining Designs")
departmental_flags = DEPARTMENTAL_FLAG_CARGO
@@ -117,7 +117,7 @@
desc = "A device which allows kinetic accelerators to deal more damage."
id = "damagemod"
build_type = PROTOLATHE | MECHFAB
- materials = list(MAT_METAL = 2000, MAT_GLASS = 1500, MAT_GOLD = 1500, MAT_URANIUM = 1000)
+ materials = list(/datum/material/iron = 2000, /datum/material/glass = 1500, /datum/material/gold = 1500, /datum/material/uranium = 1000)
build_path = /obj/item/borg/upgrade/modkit/damage
category = list("Mining Designs", "Cyborg Upgrade Modules")
departmental_flags = DEPARTMENTAL_FLAG_CARGO
@@ -127,7 +127,7 @@
desc = "A device which decreases the cooldown of a Kinetic Accelerator."
id = "cooldownmod"
build_type = PROTOLATHE | MECHFAB
- materials = list(MAT_METAL = 2000, MAT_GLASS = 1500, MAT_GOLD = 1500, MAT_URANIUM = 1000)
+ materials = list(/datum/material/iron = 2000, /datum/material/glass = 1500, /datum/material/gold = 1500, /datum/material/uranium = 1000)
build_path = /obj/item/borg/upgrade/modkit/cooldown
category = list("Mining Designs", "Cyborg Upgrade Modules")
departmental_flags = DEPARTMENTAL_FLAG_CARGO
@@ -137,7 +137,7 @@
desc = "A device which allows kinetic accelerators to fire at a further range."
id = "rangemod"
build_type = PROTOLATHE | MECHFAB
- materials = list(MAT_METAL = 2000, MAT_GLASS = 1500, MAT_GOLD = 1500, MAT_URANIUM = 1000)
+ materials = list(/datum/material/iron = 2000, /datum/material/glass = 1500, /datum/material/gold = 1500, /datum/material/uranium = 1000)
build_path = /obj/item/borg/upgrade/modkit/range
category = list("Mining Designs", "Cyborg Upgrade Modules")
departmental_flags = DEPARTMENTAL_FLAG_CARGO
@@ -147,7 +147,7 @@
desc = "A modification kit for Kinetic Accelerators which causes it to fire AoE blasts that destroy rock."
id = "hypermod"
build_type = PROTOLATHE | MECHFAB
- materials = list(MAT_METAL = 8000, MAT_GLASS = 1500, MAT_SILVER = 2000, MAT_GOLD = 2000, MAT_DIAMOND = 2000)
+ materials = list(/datum/material/iron = 8000, /datum/material/glass = 1500, /datum/material/silver = 2000, /datum/material/gold = 2000, /datum/material/diamond = 2000)
build_path = /obj/item/borg/upgrade/modkit/aoe/turfs
category = list("Mining Designs", "Cyborg Upgrade Modules")
departmental_flags = DEPARTMENTAL_FLAG_CARGO
diff --git a/code/modules/research/designs/misc_designs.dm b/code/modules/research/designs/misc_designs.dm
index 72b2c91e4c..c18c33b04b 100644
--- a/code/modules/research/designs/misc_designs.dm
+++ b/code/modules/research/designs/misc_designs.dm
@@ -7,7 +7,7 @@
desc = "A heads-up display that scans the humans in view and provides accurate data about their health status."
id = "health_hud"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 500, MAT_GLASS = 500)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 500)
build_path = /obj/item/clothing/glasses/hud/health
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -17,7 +17,7 @@
desc = "A heads-up display that scans the humans in view and provides accurate data about their health status. This one has a prescription lens."
id = "health_hud_prescription"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_SILVER = 350)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 500, /datum/material/silver = 350)
build_path = /obj/item/clothing/glasses/hud/health/prescription
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -27,7 +27,7 @@
desc = "An advanced medical head-up display that allows doctors to find patients in complete darkness."
id = "health_hud_night"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_URANIUM = 1000, MAT_SILVER = 350)
+ materials = list(/datum/material/iron = 600, /datum/material/glass = 600, /datum/material/uranium = 1000, /datum/material/silver = 350)
build_path = /obj/item/clothing/glasses/hud/health/night
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -37,7 +37,7 @@
desc = "A heads-up display that scans the humans in view and provides accurate data about their ID status."
id = "security_hud"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 500, MAT_GLASS = 500)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 500)
build_path = /obj/item/clothing/glasses/hud/security
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -47,7 +47,7 @@
desc = "A heads-up display that scans the humans in view and provides accurate data about their ID status. This one has a prescription lens."
id = "security_hud_prescription"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_SILVER = 350)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 500, /datum/material/silver = 350)
build_path = /obj/item/clothing/glasses/hud/security/prescription
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -57,7 +57,7 @@
desc = "A heads-up display which provides id data and vision in complete darkness."
id = "security_hud_night"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_URANIUM = 1000, MAT_GOLD = 350)
+ materials = list(/datum/material/iron = 600, /datum/material/glass = 600, /datum/material/uranium = 1000, /datum/material/gold = 350)
build_path = /obj/item/clothing/glasses/hud/security/night
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -67,7 +67,7 @@
desc = "A HUD used to analyze and determine faults within robotic machinery."
id = "diagnostic_hud"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 500, MAT_GLASS = 500)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 500)
build_path = /obj/item/clothing/glasses/hud/diagnostic
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -77,7 +77,7 @@
desc = "A HUD used to analyze and determine faults within robotic machinery. This one has a prescription lens."
id = "diagnostic_hud_prescription"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_GOLD = 350)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 500, /datum/material/gold = 350)
build_path = /obj/item/clothing/glasses/hud/diagnostic/prescription
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -87,7 +87,7 @@
desc = "Upgraded version of the diagnostic HUD designed to function during a power failure."
id = "diagnostic_hud_night"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_URANIUM = 1000, MAT_PLASMA = 300)
+ materials = list(/datum/material/iron = 600, /datum/material/glass = 600, /datum/material/uranium = 1000, /datum/material/plasma = 300)
build_path = /obj/item/clothing/glasses/hud/diagnostic/night
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -97,7 +97,7 @@
desc = "Goggles fitted with a portable analyzer capable of determining the research worth of an item or components of a machine."
id = "scigoggles"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 500, MAT_GLASS = 500)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 500)
build_path = /obj/item/clothing/glasses/science
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -107,7 +107,7 @@
desc = "Used by engineering and mining staff to see basic structural and terrain layouts through walls, regardless of lighting condition."
id = "mesons"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 500, MAT_GLASS = 500)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 500)
build_path = /obj/item/clothing/glasses/meson
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_ENGINEERING
@@ -117,7 +117,7 @@
desc = "Used by engineering and mining staff to see basic structural and terrain layouts through walls, regardless of lighting condition. Prescription lens has been added into this design."
id = "mesons_prescription"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_SILVER = 350)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 500, /datum/material/silver = 350)
build_path = /obj/item/clothing/glasses/meson/prescription
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_ENGINEERING
@@ -127,7 +127,7 @@
desc = "Goggles used by engineers. The Meson Scanner mode lets you see basic structural and terrain layouts through walls, regardless of lighting condition. The T-ray Scanner mode lets you see underfloor objects such as cables and pipes."
id = "engine_goggles"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_PLASMA = 100)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 500, /datum/material/plasma = 100)
build_path = /obj/item/clothing/glasses/meson/engine
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -137,7 +137,7 @@
desc = "Goggles used by engineers. The Meson Scanner mode lets you see basic structural and terrain layouts through walls, regardless of lighting condition. The T-ray Scanner mode lets you see underfloor objects such as cables and pipes. Prescription lens has been added into this design."
id = "engine_goggles_prescription"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_PLASMA = 100, MAT_SILVER = 350)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 500, /datum/material/plasma = 100, /datum/material/silver = 350)
build_path = /obj/item/clothing/glasses/meson/engine/prescription
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -147,7 +147,7 @@
desc = "Used by engineering staff to see underfloor objects such as cables and pipes."
id = "tray_goggles"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 500, MAT_GLASS = 500)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 500)
build_path = /obj/item/clothing/glasses/meson/engine/tray
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -157,7 +157,7 @@
desc = "Used by engineering staff to see underfloor objects such as cables and pipes. Prescription lens has been added into this design."
id = "tray_goggles_prescription"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_SILVER = 150)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 500, /datum/material/silver = 150)
build_path = /obj/item/clothing/glasses/meson/engine/tray/prescription
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -167,7 +167,7 @@
desc = "Prototype meson scanners fitted with an extra sensor which amplifies the visible light spectrum and overlays it to the UHD display."
id = "nvgmesons"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_PLASMA = 350, MAT_URANIUM = 1000)
+ materials = list(/datum/material/iron = 600, /datum/material/glass = 600, /datum/material/plasma = 350, /datum/material/uranium = 1000)
build_path = /obj/item/clothing/glasses/meson/night
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_CARGO
@@ -177,7 +177,7 @@
desc = "Goggles that let you see through darkness unhindered."
id = "night_visision_goggles"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_PLASMA = 350, MAT_URANIUM = 1000)
+ materials = list(/datum/material/iron = 600, /datum/material/glass = 600, /datum/material/plasma = 350, /datum/material/uranium = 1000)
build_path = /obj/item/clothing/glasses/night
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_SECURITY
@@ -187,7 +187,7 @@
desc = "Goggles that let you see through darkness unhindered. Corrects vision."
id = "night_visision_goggles_glasses"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_PLASMA = 350, MAT_URANIUM = 1000)
+ materials = list(/datum/material/iron = 600, /datum/material/glass = 600, /datum/material/plasma = 350, /datum/material/uranium = 1000)
build_path = /obj/item/clothing/glasses/night/prescription
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_SECURITY | DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_ENGINEERING
@@ -201,7 +201,7 @@
desc = "A gas mask with built in welding goggles and face shield. Looks like a skull, clearly designed by a nerd."
id = "weldingmask"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 3000, MAT_GLASS = 1000)
+ materials = list(/datum/material/iron = 3000, /datum/material/glass = 1000)
build_path = /obj/item/clothing/mask/gas/welding
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -211,7 +211,7 @@
desc = "For the enterprising botanist on the go. Less efficient than the stationary model, it creates one seed per plant."
id = "portaseeder"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 1000, MAT_GLASS = 400)
+ materials = list(/datum/material/iron = 1000, /datum/material/glass = 400)
build_path = /obj/item/storage/bag/plants/portaseeder
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SERVICE
@@ -221,7 +221,7 @@
desc = "Damn son, where'd you find this?"
id = "air_horn"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 4000, MAT_BANANIUM = 1000)
+ materials = list(/datum/material/iron = 4000, /datum/material/bananium = 1000)
build_path = /obj/item/bikehorn/airhorn
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_ALL //HONK!
@@ -231,7 +231,7 @@
desc = "Magnetic boots, often used during extravehicular activity to ensure the user remains safely attached to the vehicle."
id = "magboots"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 4500, MAT_SILVER = 1500, MAT_GOLD = 2500)
+ materials = list(/datum/material/iron = 4500, /datum/material/silver = 1500, /datum/material/gold = 2500)
build_path = /obj/item/clothing/shoes/magboots
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -241,7 +241,7 @@
desc = "Goggles fitted with a portable analyzer capable of determining the research worth of an item or components of a machine."
id = "scigoggles"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 500, MAT_GLASS = 500)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 500)
build_path = /obj/item/clothing/glasses/science
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -251,7 +251,7 @@
desc = "A disk for storing plant genetic data."
id = "diskplantgene"
build_type = PROTOLATHE | AUTOLATHE
- materials = list(MAT_METAL=200, MAT_GLASS=100)
+ materials = list(/datum/material/iron=200, /datum/material/glass=100)
build_path = /obj/item/disk/plantgene
category = list("Electronics","Imported")
departmental_flags = DEPARTMENTAL_FLAG_SERVICE
@@ -261,7 +261,7 @@
desc = "A roasting stick for cooking sausages in exotic ovens."
id = "roastingstick"
build_type = PROTOLATHE
- materials = list(MAT_METAL=1000, MAT_GLASS=500, MAT_BLUESPACE = 250)
+ materials = list(/datum/material/iron=1000, /datum/material/glass=500, /datum/material/bluespace = 250)
build_path = /obj/item/melee/roastingstick
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SERVICE
@@ -271,7 +271,7 @@
desc = "Used to track portable teleportation beacons and targets with embedded tracking implants."
id = "locator"
build_type = PROTOLATHE
- materials = list(MAT_METAL=1000, MAT_GLASS=500, MAT_SILVER = 500)
+ materials = list(/datum/material/iron=1000, /datum/material/glass=500, /datum/material/silver = 500)
build_path = /obj/item/locator
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -281,7 +281,7 @@
desc = "A refill canister for Donksoft Toy Vendors."
id = "donksoft_refill"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 25000, MAT_GLASS = 15000, MAT_PLASMA = 20000, MAT_GOLD = 10000, MAT_SILVER = 10000)
+ materials = list(/datum/material/iron = 25000, /datum/material/glass = 15000, /datum/material/plasma = 20000, /datum/material/gold = 10000, /datum/material/silver = 10000)
build_path = /obj/item/vending_refill/donksoft
category = list("Equipment")
@@ -289,12 +289,22 @@
////////////Janitor Designs//////////////
/////////////////////////////////////////
+/datum/design/broom
+ name = "Broom"
+ desc = "Just your everyday standard broom."
+ id = "broom"
+ build_type = PROTOLATHE
+ materials = list(/datum/material/iron = 1000, /datum/material/glass = 600)
+ build_path = /obj/item/twohanded/broom
+ category = list("Equipment")
+ departmental_flags = DEPARTMENTAL_FLAG_SERVICE
+
/datum/design/mop
name = "Mop"
desc = "Just your everyday standard mop."
id = "mop"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 1200, MAT_GLASS = 100)
+ materials = list(/datum/material/iron = 1200, /datum/material/glass = 100)
build_path = /obj/item/mop
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SERVICE
@@ -304,7 +314,7 @@
desc = "An upgraded mop with a large internal capacity for holding water or other cleaning chemicals."
id = "advmop"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 2500, MAT_GLASS = 200)
+ materials = list(/datum/material/iron = 2500, /datum/material/glass = 200)
build_path = /obj/item/mop/advanced
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SERVICE
@@ -314,7 +324,7 @@
desc = "A device to automatically replace lights. Refill with working light bulbs."
id = "light_replacer"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 1500, MAT_SILVER = 150, MAT_GLASS = 3000)
+ materials = list(/datum/material/iron = 1500, /datum/material/silver = 150, /datum/material/glass = 3000)
build_path = /obj/item/lightreplacer
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SERVICE
@@ -324,7 +334,7 @@
desc = "An advanced trash bag with bluespace properties; capable of holding a plethora of garbage."
id = "blutrash"
build_type = PROTOLATHE
- materials = list(MAT_GOLD = 1500, MAT_URANIUM = 250, MAT_PLASMA = 1500)
+ materials = list(/datum/material/gold = 1500, /datum/material/uranium = 250, /datum/material/plasma = 1500)
build_path = /obj/item/storage/bag/trash/bluespace
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SERVICE
@@ -334,7 +344,7 @@
desc = "A floor buffer that can be attached to vehicular janicarts."
id = "buffer"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 3000, MAT_GLASS = 200)
+ materials = list(/datum/material/iron = 3000, /datum/material/glass = 200)
build_path = /obj/item/janiupgrade
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SERVICE
@@ -344,7 +354,7 @@
desc = "A spray bottle, with an unscrewable top."
id = "spraybottle"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 3000, MAT_GLASS = 200)
+ materials = list(/datum/material/iron = 3000, /datum/material/glass = 200)
build_path = /obj/item/reagent_containers/spray
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SERVICE
@@ -354,7 +364,7 @@
desc = "A trap used to catch space bears and other legged creatures."
id = "beartrap"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 5000, MAT_TITANIUM = 1000)
+ materials = list(/datum/material/iron = 5000, /datum/material/titanium = 1000)
build_path = /obj/item/restraints/legcuffs/beartrap
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SERVICE
@@ -368,7 +378,7 @@
desc = "A holograpic projector used to project various warning signs."
id = "holosign"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 2000, MAT_GLASS = 1000)
+ materials = list(/datum/material/iron = 2000, /datum/material/glass = 1000)
build_path = /obj/item/holosign_creator
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SERVICE
@@ -378,7 +388,7 @@
desc = "A holographic projector that creates holographic security barriers."
id = "holosignsec"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 5000, MAT_GLASS = 1000, MAT_GOLD = 1000, MAT_SILVER = 1000)
+ materials = list(/datum/material/iron = 5000, /datum/material/glass = 1000, /datum/material/gold = 1000, /datum/material/silver = 1000)
build_path = /obj/item/holosign_creator/security
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -388,7 +398,7 @@
desc = "A holographic projector that creates holographic engineering barriers."
id = "holosignengi"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 5000, MAT_GLASS = 1000, MAT_GOLD = 1000, MAT_SILVER = 1000)
+ materials = list(/datum/material/iron = 5000, /datum/material/glass = 1000, /datum/material/gold = 1000, /datum/material/silver = 1000)
build_path = /obj/item/holosign_creator/engineering
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -398,7 +408,7 @@
desc = "A holographic projector that creates holographic barriers that prevent changes in atmospheric conditions."
id = "holosignatmos"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 5000, MAT_GLASS = 1000, MAT_GOLD = 1000, MAT_SILVER = 1000)
+ materials = list(/datum/material/iron = 5000, /datum/material/glass = 1000, /datum/material/gold = 1000, /datum/material/silver = 1000)
build_path = /obj/item/holosign_creator/atmos
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -408,7 +418,7 @@
desc = "A holographic projector that creates holographic barriers that prevent changes in temperature conditions."
id = "holosignfirelock"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 5000, MAT_GLASS = 1000, MAT_GOLD = 1000, MAT_SILVER = 1000)
+ materials = list(/datum/material/iron = 5000, /datum/material/glass = 1000, /datum/material/gold = 1000, /datum/material/silver = 1000)
build_path = /obj/item/holosign_creator/firelock
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -418,7 +428,7 @@
desc = "A holographic projector that creates holographic barriers that prevent changes in atmospheric and temperature conditions."
id = "holosigncombifan"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 7500, MAT_GLASS = 2500, MAT_SILVER = 2500, MAT_GOLD = 2500, MAT_TITANIUM = 1750)
+ materials = list(/datum/material/iron = 7500, /datum/material/glass = 2500, /datum/material/silver = 2500, /datum/material/gold = 2500, /datum/material/titanium = 1750)
build_path = /obj/item/holosign_creator/combifan
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -428,7 +438,7 @@
desc = "A device which can project temporary forcefields to seal off an area."
id = "forcefield_projector"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 2500, MAT_GLASS = 1000)
+ materials = list(/datum/material/iron = 2500, /datum/material/glass = 1000)
build_path = /obj/item/forcefield_projector
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -438,7 +448,7 @@
desc = "PENLITE holobarriers, a device that halts individuals with malicious diseases."
build_type = PROTOLATHE
build_path = /obj/item/holosign_creator/medical
- materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_SILVER = 100) //a hint of silver since it can troll 2 antags (bad viros and sentient disease)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 500, /datum/material/silver = 100) //a hint of silver since it can troll 2 antags (bad viros and sentient disease)
id = "holobarrier_med"
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -452,7 +462,7 @@
desc = "Allows for the construction of a quantum keycard."
id = "quantum_keycard"
build_type = PROTOLATHE
- materials = list(MAT_GLASS = 500, MAT_METAL = 500, MAT_SILVER = 500, MAT_BLUESPACE = 1000)
+ materials = list(/datum/material/glass = 500, /datum/material/iron = 500, /datum/material/silver = 500, /datum/material/bluespace = 1000)
build_path = /obj/item/quantum_keycard
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -462,7 +472,7 @@
desc = "An advanced tool capable of instantly neutralizing anomalies, designed to capture the fleeting aberrations created by the engine."
id = "anomaly_neutralizer"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 2000, MAT_GOLD = 2000, MAT_PLASMA = 5000, MAT_URANIUM = 2000)
+ materials = list(/datum/material/iron = 2000, /datum/material/gold = 2000, /datum/material/plasma = 5000, /datum/material/uranium = 2000)
build_path = /obj/item/anomaly_neutralizer
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -472,7 +482,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(/datum/material/iron = 1000, /datum/material/silver = 100, /datum/material/plastic = 100)
build_path = /obj/item/fermichem/pHmeter
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
@@ -486,11 +496,29 @@
desc = "An experimental suit of armour capable of utilizing an implanted anomaly core to protect the user."
id = "reactive_armour"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 10000, MAT_DIAMOND = 5000, MAT_URANIUM = 8000, MAT_SILVER = 4500, MAT_GOLD = 5000)
+ materials = list(/datum/material/iron = 10000, /datum/material/diamond = 5000, /datum/material/uranium = 8000, /datum/material/silver = 4500, /datum/material/gold = 5000)
build_path = /obj/item/reactive_armour_shell
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
+/datum/design/knight_armour
+ name = "Knight Armour"
+ desc = "A royal knight's favorite garments. Can be trimmed by any friendly person."
+ id = "knight_armour"
+ build_type = AUTOLATHE
+ materials = list(MAT_CATEGORY_RIGID = 10000)
+ build_path = /obj/item/clothing/suit/armor/riot/knight/greyscale
+ category = list("Imported")
+
+/datum/design/knight_helmet
+ name = "Knight Helmet"
+ desc = "A royal knight's favorite hat. If you hold it upside down it's actually a bucket."
+ id = "knight_helmet"
+ build_type = AUTOLATHE
+ materials = list(MAT_CATEGORY_RIGID = 5000)
+ build_path = /obj/item/clothing/head/helmet/knight/greyscale
+ category = list("Imported")
+
/////////////////////////////////////////
/////////////Security////////////////////
/////////////////////////////////////////
@@ -500,57 +528,57 @@
desc = "A robust flashlight used by security."
id = "seclite"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 2500)
+ materials = list(/datum/material/iron = 2500)
build_path = /obj/item/flashlight/seclite
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
-
+
/datum/design/detective_scanner
name = "Forensic Scanner"
desc = "Used to remotely scan objects and biomass for DNA and fingerprints. Can print a report of the findings."
id = "detective_scanner"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 5000, MAT_GLASS = 1000, MAT_GOLD = 2500, MAT_SILVER = 2000)
+ materials = list(/datum/material/iron = 5000, /datum/material/glass = 1000, /datum/material/gold = 2500, /datum/material/silver = 2000)
build_path = /obj/item/detective_scanner
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
-
+
/datum/design/pepperspray
name = "Pepper Spray"
desc = "Manufactured by UhangInc, used to blind and down an opponent quickly. Printed pepper sprays do not contain reagents."
id = "pepperspray"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 5000, MAT_GLASS = 1000)
+ materials = list(/datum/material/iron = 5000, /datum/material/glass = 1000)
build_path = /obj/item/reagent_containers/spray/pepper/empty
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
-
+
/datum/design/bola_energy
name = "Energy Bola"
desc = "A specialized hard-light bola designed to ensnare fleeing criminals and aid in arrests."
id = "bola_energy"
build_type = PROTOLATHE
- materials = list(MAT_SILVER = 500, MAT_PLASMA = 500, MAT_TITANIUM = 500)
+ materials = list(/datum/material/silver = 500, /datum/material/plasma = 500, /datum/material/titanium = 500)
build_path = /obj/item/restraints/legcuffs/bola/energy
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
-
+
/datum/design/zipties
name = "Zipties"
desc = "Plastic, disposable zipties that can be used to restrain temporarily but are destroyed after use."
id = "zipties"
build_type = PROTOLATHE
- materials = list(MAT_PLASTIC = 250)
+ materials = list(/datum/material/plastic = 250)
build_path = /obj/item/restraints/handcuffs/cable/zipties
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
-
+
/datum/design/evidencebag
name = "Evidence Bag"
desc = "An empty evidence bag."
id = "evidencebag"
build_type = PROTOLATHE
- materials = list(MAT_PLASTIC = 100)
+ materials = list(/datum/material/plastic = 100)
build_path = /obj/item/evidencebag
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -564,7 +592,7 @@
desc = "A blue print of a early model of the Meteor defence turret."
id = "meteor_defence"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 50000, MAT_GLASS = 50000, MAT_SILVER = 8500, MAT_GOLD = 8500, MAT_TITANIUM = 7500, MAT_URANIUM = 7500)
+ materials = list(/datum/material/iron = 50000, /datum/material/glass = 50000, /datum/material/silver = 8500, /datum/material/gold = 8500, /datum/material/titanium = 7500, /datum/material/uranium = 7500)
build_path = /obj/machinery/satellite/meteor_shield/sci
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -574,7 +602,7 @@
desc = "A disk containing debugging programming to solve and monitor meteors more effectively."
id = "meteor_disk"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 1500, MAT_GLASS = 1500, MAT_SILVER = 2500, MAT_GOLD = 1000)
+ materials = list(/datum/material/iron = 1500, /datum/material/glass = 1500, /datum/material/silver = 2500, /datum/material/gold = 1000)
build_path = /obj/item/disk/meteor
category = list("Electronics")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
diff --git a/code/modules/research/designs/nanite_designs.dm b/code/modules/research/designs/nanite_designs.dm
index 13668ba570..c72ee4fb8c 100644
--- a/code/modules/research/designs/nanite_designs.dm
+++ b/code/modules/research/designs/nanite_designs.dm
@@ -50,7 +50,7 @@
name = "Host Scan"
desc = "The nanites display a detailed readout of a body scan to the host."
id = "selfscan_nanites"
- program_type = /datum/nanite_program/triggered/self_scan
+ program_type = /datum/nanite_program/self_scan
category = list("Utility Nanites")
/datum/design/nanites/dermal_button
@@ -67,7 +67,6 @@
program_type = /datum/nanite_program/stealth
category = list("Utility Nanites")
-
/datum/design/nanites/reduced_diagnostics
name = "Reduced Diagnostics"
desc = "Disables some high-cost diagnostics in the nanites, making them unable to communicate their program list to portable scanners. \
@@ -80,7 +79,7 @@
name = "Subdermal ID"
desc = "The nanites store the host's ID access rights in a subdermal magnetic strip. Updates when triggered, copying the host's current access."
id = "access_nanites"
- program_type = /datum/nanite_program/triggered/access
+ program_type = /datum/nanite_program/access
category = list("Utility Nanites")
/datum/design/nanites/relay
@@ -106,9 +105,9 @@
/datum/design/nanites/emp
name = "Electromagnetic Resonance"
- desc = "The nanites cause an elctromagnetic pulse around the host when triggered. Will corrupt other nanite programs!"
+ desc = "The nanites cause an electromagnetic pulse around the host when triggered. Will corrupt other nanite programs!"
id = "emp_nanites"
- program_type = /datum/nanite_program/triggered/emp
+ program_type = /datum/nanite_program/emp
category = list("Utility Nanites")
/datum/design/nanites/spreading
@@ -119,6 +118,13 @@
program_type = /datum/nanite_program/spreading
category = list("Utility Nanites")
+/datum/design/nanites/nanite_sting
+ name = "Nanite Sting"
+ desc = "When triggered, projects a nearly invisible spike of nanites that attempts to infect a nearby non-host with a copy of the host's nanites cluster."
+ id = "nanite_sting_nanites"
+ program_type = /datum/nanite_program/nanite_sting
+ category = list("Utility Nanites")
+
/datum/design/nanites/mitosis
name = "Mitosis"
desc = "The nanites gain the ability to self-replicate, using bluespace to power the process, instead of drawing from a template. This rapidly speeds up the replication rate,\
@@ -197,7 +203,7 @@
name = "Defibrillation"
desc = "The nanites, when triggered, send a defibrillating shock to the host's heart."
id = "defib_nanites"
- program_type = /datum/nanite_program/triggered/defib
+ program_type = /datum/nanite_program/defib
category = list("Medical Nanites")
@@ -242,7 +248,7 @@
name = "Adrenaline Burst"
desc = "The nanites cause a burst of adrenaline when triggered, waking the host from stuns and temporarily increasing their speed."
id = "adrenaline_nanites"
- program_type = /datum/nanite_program/triggered/adrenaline
+ program_type = /datum/nanite_program/adrenaline
category = list("Augmentation Nanites")
/datum/design/nanites/mindshield
@@ -366,21 +372,21 @@
name = "Heart-Stopper"
desc = "Stops the host's heart when triggered; restarts it if triggered again."
id = "heartstop_nanites"
- program_type = /datum/nanite_program/triggered/heart_stop
+ program_type = /datum/nanite_program/heart_stop
category = list("Weaponized Nanites")
/datum/design/nanites/explosive
name = "Chain Detonation"
desc = "Blows up all the nanites inside the host in a chain reaction when triggered."
id = "explosive_nanites"
- program_type = /datum/nanite_program/triggered/explosive
+ program_type = /datum/nanite_program/explosive
category = list("Weaponized Nanites")
/datum/design/nanites/mind_control
name = "Mind Control"
desc = "The nanites imprint an absolute directive onto the host's brain while they're active."
id = "mindcontrol_nanites"
- program_type = /datum/nanite_program/triggered/comm/mind_control
+ program_type = /datum/nanite_program/comm/mind_control
category = list("Weaponized Nanites")
////////////////////SUPPRESSION NANITES//////////////////////////////////////
@@ -389,21 +395,21 @@
name = "Electric Shock"
desc = "The nanites shock the host when triggered. Destroys a large amount of nanites!"
id = "shock_nanites"
- program_type = /datum/nanite_program/triggered/shocking
+ program_type = /datum/nanite_program/shocking
category = list("Suppression Nanites")
/datum/design/nanites/stun
name = "Neural Shock"
desc = "The nanites pulse the host's nerves when triggered, inapacitating them for a short period."
id = "stun_nanites"
- program_type = /datum/nanite_program/triggered/stun
+ program_type = /datum/nanite_program/stun
category = list("Suppression Nanites")
/datum/design/nanites/sleepy
name = "Sleep Induction"
desc = "The nanites cause rapid narcolepsy when triggered."
id = "sleep_nanites"
- program_type = /datum/nanite_program/triggered/sleepy
+ program_type = /datum/nanite_program/sleepy
category = list("Suppression Nanites")
/datum/design/nanites/paralyzing
@@ -445,21 +451,21 @@
name = "Skull Echo"
desc = "The nanites echo a synthesized message inside the host's skull."
id = "voice_nanites"
- program_type = /datum/nanite_program/triggered/comm/voice
+ program_type = /datum/nanite_program/comm/voice
category = list("Suppression Nanites")
/datum/design/nanites/speech
name = "Forced Speech"
desc = "The nanites force the host to say a pre-programmed sentence when triggered."
id = "speech_nanites"
- program_type = /datum/nanite_program/triggered/comm/speech
+ program_type = /datum/nanite_program/comm/speech
category = list("Suppression Nanites")
/datum/design/nanites/hallucination
name = "Hallucination"
desc = "The nanites make the host see and hear things that aren't real."
id = "hallucination_nanites"
- program_type = /datum/nanite_program/triggered/comm/hallucination
+ program_type = /datum/nanite_program/comm/hallucination
category = list("Suppression Nanites")
/datum/design/nanites/good_mood
@@ -513,9 +519,42 @@
program_type = /datum/nanite_program/sensor/voice
category = list("Sensor Nanites")
-/datum/design/nanites/sensor__nanite_volume
+/datum/design/nanites/sensor_nanite_volume
name = "Nanite Volume Sensor"
desc = "The nanites receive a signal when the nanite supply is above/below a certain percentage."
id = "sensor_nanite_volume"
program_type = /datum/nanite_program/sensor/nanite_volume
- category = list("Sensor Nanites")
\ No newline at end of file
+ category = list("Sensor Nanites")
+
+////////////////////NANITE PROTOCOLS//////////////////////////////////////
+//Note about the category name: The UI cuts the last 8 characters from the category name to remove the " Nanites" in the other categories
+//Because of this, Protocols was getting cut down to "P", so i had to add some padding
+/*
+/datum/design/nanites/kickstart
+ name = "Kickstart Protocol"
+ desc = "Replication Protocol: the nanites focus on early growth, heavily boosting replication rate for a few minutes after the initial implantation."
+ id = "kickstart_nanites"
+ program_type = /datum/nanite_program/protocol/kickstart
+ category = list("Protocols_Nanites")
+
+/datum/design/nanites/factory
+ name = "Factory Protocol"
+ desc = "Replication Protocol: the nanites build a factory matrix within the host, gradually increasing replication speed over time. The factory decays if the protocol is not active."
+ id = "factory_nanites"
+ program_type = /datum/nanite_program/protocol/factory
+ category = list("Protocols_Nanites")
+
+/datum/design/nanites/tinker
+ name = "Tinker Protocol"
+ desc = "Replication Protocol: the nanites learn to use metallic material in the host's bloodstream to speed up the replication process."
+ id = "tinker_nanites"
+ program_type = /datum/nanite_program/protocol/tinker
+ category = list("Protocols_Nanites")
+
+/datum/design/nanites/offline
+ name = "Offline Production Protocol"
+ desc = "Replication Protocol: while the host is asleep or otherwise unconcious, the nanites exploit the reduced interference to replicate more quickly."
+ id = "offline_nanites"
+ program_type = /datum/nanite_program/protocol/offline
+ category = list("Protocols_Nanites")
+*/
diff --git a/code/modules/research/designs/power_designs.dm b/code/modules/research/designs/power_designs.dm
index 1dbd111785..3403d96049 100644
--- a/code/modules/research/designs/power_designs.dm
+++ b/code/modules/research/designs/power_designs.dm
@@ -7,7 +7,7 @@
desc = "A basic power cell that holds 1 MJ of energy."
id = "basic_cell"
build_type = PROTOLATHE | AUTOLATHE |MECHFAB
- materials = list(MAT_METAL = 700, MAT_GLASS = 50)
+ materials = list(/datum/material/iron = 700, /datum/material/glass = 50)
construction_time=100
build_path = /obj/item/stock_parts/cell/empty
category = list("Misc","Power Designs","Machinery","initial")
@@ -18,7 +18,7 @@
desc = "A power cell that holds 10 MJ of energy."
id = "high_cell"
build_type = PROTOLATHE | AUTOLATHE | MECHFAB
- materials = list(MAT_METAL = 700, MAT_GLASS = 60)
+ materials = list(/datum/material/iron = 700, /datum/material/glass = 60)
construction_time=100
build_path = /obj/item/stock_parts/cell/high/empty
category = list("Misc","Power Designs")
@@ -29,7 +29,7 @@
desc = "A power cell that holds 20 MJ of energy."
id = "super_cell"
build_type = PROTOLATHE | MECHFAB
- materials = list(MAT_METAL = 700, MAT_GLASS = 70)
+ materials = list(/datum/material/iron = 700, /datum/material/glass = 70)
construction_time=100
build_path = /obj/item/stock_parts/cell/super/empty
category = list("Misc","Power Designs")
@@ -40,7 +40,7 @@
desc = "A power cell that holds 30 MJ of energy."
id = "hyper_cell"
build_type = PROTOLATHE | MECHFAB
- materials = list(MAT_METAL = 700, MAT_GOLD = 150, MAT_SILVER = 150, MAT_GLASS = 80)
+ materials = list(/datum/material/iron = 700, /datum/material/gold = 150, /datum/material/silver = 150, /datum/material/glass = 80)
construction_time=100
build_path = /obj/item/stock_parts/cell/hyper/empty
category = list("Misc","Power Designs")
@@ -51,7 +51,7 @@
desc = "A power cell that holds 40 MJ of energy."
id = "bluespace_cell"
build_type = PROTOLATHE | MECHFAB
- materials = list(MAT_METAL = 800, MAT_GOLD = 120, MAT_GLASS = 160, MAT_DIAMOND = 160, MAT_TITANIUM = 300, MAT_BLUESPACE = 100)
+ materials = list(/datum/material/iron = 800, /datum/material/gold = 120, /datum/material/glass = 160, /datum/material/diamond = 160, /datum/material/titanium = 300, /datum/material/bluespace = 100)
construction_time=100
build_path = /obj/item/stock_parts/cell/bluespace/empty
category = list("Misc","Power Designs")
@@ -62,7 +62,7 @@
desc = "The NT-75 Electromagnetic Power Inducer can wirelessly induce electric charge in an object, allowing you to recharge power cells without having to remove them."
id = "inducer"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 3000, MAT_GLASS = 1000)
+ materials = list(/datum/material/iron = 3000, /datum/material/glass = 1000)
build_path = /obj/item/inducer/sci
category = list("Power Designs")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -72,7 +72,7 @@
desc = "The improved NT-8475 Electromagnetic Power Inducer can this one has been SCIENCED to allow for combat. It still comes printed with SCIENCED colors!"
id = "combatinducer"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 13000, MAT_GLASS = 10000, MAT_SILVER = 1500, MAT_GOLD = 1250, MAT_DIAMOND = 500, MAT_TITANIUM = 1200)
+ materials = list(/datum/material/iron = 13000, /datum/material/glass = 10000, /datum/material/silver = 1500, /datum/material/gold = 1250, /datum/material/diamond = 500, /datum/material/titanium = 1200)
build_path = /obj/item/inducer/sci/combat/dry
category = list("Power Designs")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
diff --git a/code/modules/research/designs/smelting_designs.dm b/code/modules/research/designs/smelting_designs.dm
index 64dcb5f754..3c83698fd1 100644
--- a/code/modules/research/designs/smelting_designs.dm
+++ b/code/modules/research/designs/smelting_designs.dm
@@ -4,7 +4,7 @@
name = "Plasma + Iron alloy"
id = "plasteel"
build_type = SMELTER | PROTOLATHE
- materials = list(MAT_METAL = MINERAL_MATERIAL_AMOUNT, MAT_PLASMA = MINERAL_MATERIAL_AMOUNT)
+ materials = list(/datum/material/iron = MINERAL_MATERIAL_AMOUNT, /datum/material/plasma = MINERAL_MATERIAL_AMOUNT)
build_path = /obj/item/stack/sheet/plasteel
category = list("initial", "Stock Parts")
departmental_flags = DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SECURITY
@@ -14,7 +14,7 @@
name = "Plasma + Titanium alloy"
id = "plastitanium"
build_type = SMELTER | PROTOLATHE
- materials = list(MAT_TITANIUM = MINERAL_MATERIAL_AMOUNT, MAT_PLASMA = MINERAL_MATERIAL_AMOUNT)
+ materials = list(/datum/material/titanium = MINERAL_MATERIAL_AMOUNT, /datum/material/plasma = MINERAL_MATERIAL_AMOUNT)
build_path = /obj/item/stack/sheet/mineral/plastitanium
category = list("initial", "Stock Parts")
departmental_flags = DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -24,7 +24,7 @@
name = "Plasma + Glass alloy"
id = "plasmaglass"
build_type = SMELTER | PROTOLATHE
- materials = list(MAT_PLASMA = MINERAL_MATERIAL_AMOUNT * 0.5, MAT_GLASS = MINERAL_MATERIAL_AMOUNT)
+ materials = list(/datum/material/plasma = MINERAL_MATERIAL_AMOUNT * 0.5, /datum/material/glass = MINERAL_MATERIAL_AMOUNT)
build_path = /obj/item/stack/sheet/plasmaglass
category = list("initial", "Stock Parts")
departmental_flags = DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -34,7 +34,7 @@
name = "Plasma + Metal + Glass alloy"
id = "plasmareinforcedglass"
build_type = SMELTER | PROTOLATHE
- materials = list(MAT_PLASMA = MINERAL_MATERIAL_AMOUNT * 0.5, MAT_METAL = MINERAL_MATERIAL_AMOUNT * 0.5, MAT_GLASS = MINERAL_MATERIAL_AMOUNT)
+ materials = list(/datum/material/plasma = MINERAL_MATERIAL_AMOUNT * 0.5, /datum/material/iron = MINERAL_MATERIAL_AMOUNT * 0.5, /datum/material/glass = MINERAL_MATERIAL_AMOUNT)
build_path = /obj/item/stack/sheet/plasmarglass
category = list("initial", "Stock Parts")
departmental_flags = DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -44,7 +44,7 @@
name = "Titanium + Glass alloy"
id = "titaniumglass"
build_type = SMELTER | PROTOLATHE
- materials = list(MAT_TITANIUM = MINERAL_MATERIAL_AMOUNT * 0.5, MAT_GLASS = MINERAL_MATERIAL_AMOUNT)
+ materials = list(/datum/material/titanium = MINERAL_MATERIAL_AMOUNT * 0.5, /datum/material/glass = MINERAL_MATERIAL_AMOUNT)
build_path = /obj/item/stack/sheet/titaniumglass
category = list("initial", "Stock Parts")
departmental_flags = DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -54,7 +54,7 @@
name = "Plasma + Titanium + Glass alloy"
id = "plastitaniumglass"
build_type = SMELTER | PROTOLATHE
- materials = list(MAT_PLASMA = MINERAL_MATERIAL_AMOUNT * 0.5, MAT_TITANIUM = MINERAL_MATERIAL_AMOUNT * 0.5, MAT_GLASS = MINERAL_MATERIAL_AMOUNT)
+ materials = list(/datum/material/plasma = MINERAL_MATERIAL_AMOUNT * 0.5, /datum/material/titanium = MINERAL_MATERIAL_AMOUNT * 0.5, /datum/material/glass = MINERAL_MATERIAL_AMOUNT)
build_path = /obj/item/stack/sheet/plastitaniumglass
category = list("initial", "Stock Parts")
departmental_flags = DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -65,7 +65,7 @@
desc = "A sheet of reverse-engineered alien alloy."
id = "alienalloy"
build_type = PROTOLATHE | SMELTER
- materials = list(MAT_METAL = 4000, MAT_PLASMA = 4000)
+ materials = list(/datum/material/iron = 4000, /datum/material/plasma = 4000)
build_path = /obj/item/stack/sheet/mineral/abductor
category = list("Stock Parts")
departmental_flags = DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
diff --git a/code/modules/research/designs/stock_parts_designs.dm b/code/modules/research/designs/stock_parts_designs.dm
index 6526599179..7392f83975 100644
--- a/code/modules/research/designs/stock_parts_designs.dm
+++ b/code/modules/research/designs/stock_parts_designs.dm
@@ -7,7 +7,7 @@
desc = "Special mechanical module made to store, sort, and apply standard machine parts."
id = "rped"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 10000, MAT_GLASS = 5000) //hardcore
+ materials = list(/datum/material/iron = 10000, /datum/material/glass = 5000) //hardcore
build_path = /obj/item/storage/part_replacer
category = list("Stock Parts")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_SCIENCE
@@ -17,7 +17,7 @@
desc = "Powered by bluespace technology, this RPED variant can upgrade buildings from a distance, without needing to remove the panel first."
id = "bs_rped"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 15000, MAT_GLASS = 5000, MAT_SILVER = 2500) //hardcore
+ materials = list(/datum/material/iron = 15000, /datum/material/glass = 5000, /datum/material/silver = 2500) //hardcore
build_path = /obj/item/storage/part_replacer/bluespace
category = list("Stock Parts")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_SCIENCE
@@ -28,7 +28,7 @@
desc = "A stock part used in the construction of various devices."
id = "basic_capacitor"
build_type = PROTOLATHE | AUTOLATHE
- materials = list(MAT_METAL = 100, MAT_GLASS = 100)
+ materials = list(/datum/material/iron = 100, /datum/material/glass = 100)
build_path = /obj/item/stock_parts/capacitor
category = list("Stock Parts","Machinery","initial")
lathe_time_factor = 0.2
@@ -39,7 +39,7 @@
desc = "A stock part used in the construction of various devices."
id = "adv_capacitor"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 150, MAT_GLASS = 150)
+ materials = list(/datum/material/iron = 150, /datum/material/glass = 150)
build_path = /obj/item/stock_parts/capacitor/adv
category = list("Stock Parts")
lathe_time_factor = 0.2
@@ -50,7 +50,7 @@
desc = "A stock part used in the construction of various devices."
id = "super_capacitor"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 200, MAT_GLASS = 200, MAT_GOLD = 100)
+ materials = list(/datum/material/iron = 200, /datum/material/glass = 200, /datum/material/gold = 100)
build_path = /obj/item/stock_parts/capacitor/super
category = list("Stock Parts")
lathe_time_factor = 0.2
@@ -61,7 +61,7 @@
desc = "A stock part used in the construction of various devices."
id = "quadratic_capacitor"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 200, MAT_GLASS = 200, MAT_GOLD = 100, MAT_DIAMOND = 100)
+ materials = list(/datum/material/iron = 200, /datum/material/glass = 200, /datum/material/gold = 100, /datum/material/diamond = 100)
build_path = /obj/item/stock_parts/capacitor/quadratic
category = list("Stock Parts")
lathe_time_factor = 0.2
@@ -73,7 +73,7 @@
desc = "A stock part used in the construction of various devices."
id = "basic_scanning"
build_type = PROTOLATHE | AUTOLATHE
- materials = list(MAT_METAL = 100, MAT_GLASS = 50)
+ materials = list(/datum/material/iron = 100, /datum/material/glass = 50)
build_path = /obj/item/stock_parts/scanning_module
category = list("Stock Parts","Machinery","initial")
lathe_time_factor = 0.2
@@ -84,7 +84,7 @@
desc = "A stock part used in the construction of various devices."
id = "adv_scanning"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 150, MAT_GLASS = 100)
+ materials = list(/datum/material/iron = 150, /datum/material/glass = 100)
build_path = /obj/item/stock_parts/scanning_module/adv
category = list("Stock Parts")
lathe_time_factor = 0.2
@@ -95,7 +95,7 @@
desc = "A stock part used in the construction of various devices."
id = "phasic_scanning"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 200, MAT_GLASS = 150, MAT_SILVER = 60)
+ materials = list(/datum/material/iron = 200, /datum/material/glass = 150, /datum/material/silver = 60)
build_path = /obj/item/stock_parts/scanning_module/phasic
category = list("Stock Parts")
lathe_time_factor = 0.2
@@ -106,7 +106,7 @@
desc = "A stock part used in the construction of various devices."
id = "triphasic_scanning"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 200, MAT_GLASS = 200, MAT_DIAMOND = 30, MAT_BLUESPACE = 30)
+ materials = list(/datum/material/iron = 200, /datum/material/glass = 200, /datum/material/diamond = 30, /datum/material/bluespace = 30)
build_path = /obj/item/stock_parts/scanning_module/triphasic
category = list("Stock Parts")
lathe_time_factor = 0.2
@@ -118,7 +118,7 @@
desc = "A stock part used in the construction of various devices."
id = "micro_mani"
build_type = PROTOLATHE | AUTOLATHE
- materials = list(MAT_METAL = 100)
+ materials = list(/datum/material/iron = 100)
build_path = /obj/item/stock_parts/manipulator
category = list("Stock Parts","Machinery","initial")
lathe_time_factor = 0.2
@@ -129,7 +129,7 @@
desc = "A stock part used in the construction of various devices."
id = "nano_mani"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 150)
+ materials = list(/datum/material/iron = 150)
build_path = /obj/item/stock_parts/manipulator/nano
category = list("Stock Parts")
lathe_time_factor = 0.2
@@ -140,7 +140,7 @@
desc = "A stock part used in the construction of various devices."
id = "pico_mani"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 200)
+ materials = list(/datum/material/iron = 200)
build_path = /obj/item/stock_parts/manipulator/pico
category = list("Stock Parts")
lathe_time_factor = 0.2
@@ -151,7 +151,7 @@
desc = "A stock part used in the construction of various devices."
id = "femto_mani"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 200, MAT_DIAMOND = 30, MAT_TITANIUM = 30)
+ materials = list(/datum/material/iron = 200, /datum/material/diamond = 30, /datum/material/titanium = 30)
build_path = /obj/item/stock_parts/manipulator/femto
category = list("Stock Parts")
lathe_time_factor = 0.2
@@ -163,7 +163,7 @@
desc = "A stock part used in the construction of various devices."
id = "basic_micro_laser"
build_type = PROTOLATHE | AUTOLATHE
- materials = list(MAT_METAL = 100, MAT_GLASS = 50)
+ materials = list(/datum/material/iron = 100, /datum/material/glass = 50)
build_path = /obj/item/stock_parts/micro_laser
category = list("Stock Parts","Machinery","initial")
lathe_time_factor = 0.2
@@ -174,7 +174,7 @@
desc = "A stock part used in the construction of various devices."
id = "high_micro_laser"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 150, MAT_GLASS = 100)
+ materials = list(/datum/material/iron = 150, /datum/material/glass = 100)
build_path = /obj/item/stock_parts/micro_laser/high
category = list("Stock Parts")
lathe_time_factor = 0.2
@@ -185,7 +185,7 @@
desc = "A stock part used in the construction of various devices."
id = "ultra_micro_laser"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 200, MAT_GLASS = 150, MAT_URANIUM = 60)
+ materials = list(/datum/material/iron = 200, /datum/material/glass = 150, /datum/material/uranium = 60)
build_path = /obj/item/stock_parts/micro_laser/ultra
category = list("Stock Parts")
lathe_time_factor = 0.2
@@ -196,7 +196,7 @@
desc = "A stock part used in the construction of various devices."
id = "quadultra_micro_laser"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 200, MAT_GLASS = 200, MAT_URANIUM = 100, MAT_DIAMOND = 60)
+ materials = list(/datum/material/iron = 200, /datum/material/glass = 200, /datum/material/uranium = 100, /datum/material/diamond = 60)
build_path = /obj/item/stock_parts/micro_laser/quadultra
category = list("Stock Parts")
lathe_time_factor = 0.2
@@ -207,7 +207,7 @@
desc = "A stock part used in the construction of various devices."
id = "basic_matter_bin"
build_type = PROTOLATHE | AUTOLATHE
- materials = list(MAT_METAL = 100)
+ materials = list(/datum/material/iron = 100)
build_path = /obj/item/stock_parts/matter_bin
category = list("Stock Parts","Machinery","initial")
lathe_time_factor = 0.2
@@ -218,7 +218,7 @@
desc = "A stock part used in the construction of various devices."
id = "adv_matter_bin"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 150)
+ materials = list(/datum/material/iron = 150)
build_path = /obj/item/stock_parts/matter_bin/adv
category = list("Stock Parts")
lathe_time_factor = 0.2
@@ -229,7 +229,7 @@
desc = "A stock part used in the construction of various devices."
id = "super_matter_bin"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 200)
+ materials = list(/datum/material/iron = 200)
build_path = /obj/item/stock_parts/matter_bin/super
category = list("Stock Parts")
lathe_time_factor = 0.2
@@ -240,7 +240,7 @@
desc = "A stock part used in the construction of various devices."
id = "bluespace_matter_bin"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 250, MAT_DIAMOND = 100, MAT_BLUESPACE = 100)
+ materials = list(/datum/material/iron = 250, /datum/material/diamond = 100, /datum/material/bluespace = 100)
build_path = /obj/item/stock_parts/matter_bin/bluespace
category = list("Stock Parts")
lathe_time_factor = 0.2
@@ -252,7 +252,7 @@
desc = "A compact module capable of sensing extradimensional activity."
id = "s-ansible"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 100, MAT_SILVER = 100)
+ materials = list(/datum/material/iron = 100, /datum/material/silver = 100)
build_path = /obj/item/stock_parts/subspace/ansible
category = list("Stock Parts")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_SCIENCE
@@ -262,7 +262,7 @@
desc = "A tiny device capable of filtering and converting super-intense radiowaves."
id = "s-filter"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 100, MAT_SILVER = 100)
+ materials = list(/datum/material/iron = 100, /datum/material/silver = 100)
build_path = /obj/item/stock_parts/subspace/filter
category = list("Stock Parts")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_SCIENCE
@@ -272,7 +272,7 @@
desc = "A compact micro-machine capable of amplifying weak subspace transmissions."
id = "s-amplifier"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 100, MAT_GOLD = 100, MAT_URANIUM = 100)
+ materials = list(/datum/material/iron = 100, /datum/material/gold = 100, /datum/material/uranium = 100)
build_path = /obj/item/stock_parts/subspace/amplifier
category = list("Stock Parts")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_SCIENCE
@@ -282,7 +282,7 @@
desc = "A compact micro-machine capable of stretching out hyper-compressed radio waves."
id = "s-treatment"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 100, MAT_SILVER = 200)
+ materials = list(/datum/material/iron = 100, /datum/material/silver = 200)
build_path = /obj/item/stock_parts/subspace/treatment
category = list("Stock Parts")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_SCIENCE
@@ -292,7 +292,7 @@
desc = "A sophisticated analyzer capable of analyzing cryptic subspace wavelengths."
id = "s-analyzer"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 100, MAT_GOLD = 100)
+ materials = list(/datum/material/iron = 100, /datum/material/gold = 100)
build_path = /obj/item/stock_parts/subspace/analyzer
category = list("Stock Parts")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_SCIENCE
@@ -302,7 +302,7 @@
desc = "A sophisticated analyzer capable of analyzing cryptic subspace wavelengths."
id = "s-crystal"
build_type = PROTOLATHE
- materials = list(MAT_GLASS = 800, MAT_SILVER = 100, MAT_GOLD = 100)
+ materials = list(/datum/material/glass = 800, /datum/material/silver = 100, /datum/material/gold = 100)
build_path = /obj/item/stock_parts/subspace/crystal
category = list("Stock Parts")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_SCIENCE
@@ -312,7 +312,7 @@
desc = "A large piece of equipment used to open a window into the subspace dimension."
id = "s-transmitter"
build_type = PROTOLATHE
- materials = list(MAT_GLASS = 100, MAT_SILVER = 100, MAT_URANIUM = 100)
+ materials = list(/datum/material/glass = 100, /datum/material/silver = 100, /datum/material/uranium = 100)
build_path = /obj/item/stock_parts/subspace/transmitter
category = list("Stock Parts")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_SCIENCE
diff --git a/code/modules/research/designs/tool_designs.dm b/code/modules/research/designs/tool_designs.dm
index cf1c0563d5..2d938bc38c 100644
--- a/code/modules/research/designs/tool_designs.dm
+++ b/code/modules/research/designs/tool_designs.dm
@@ -7,7 +7,7 @@
desc = "Adds the computer frame and machine frame to the RCD."
id = "rcd_upgrade_frames"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 5000, MAT_GLASS = 2500, MAT_SILVER = 1500, MAT_TITANIUM = 2000)
+ materials = list(/datum/material/iron = 5000, /datum/material/glass = 2500, /datum/material/silver = 1500, /datum/material/titanium = 2000)
build_path = /obj/item/rcd_upgrade/frames
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -17,7 +17,7 @@
desc = "Adds the simple circuits to the RCD."
id = "rcd_upgrade_simple_circuits"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 5000, MAT_GLASS = 2500, MAT_SILVER = 1500, MAT_TITANIUM = 2000)
+ materials = list(/datum/material/iron = 5000, /datum/material/glass = 2500, /datum/material/silver = 1500, /datum/material/titanium = 2000)
build_path = /obj/item/rcd_upgrade/simple_circuits
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -27,7 +27,7 @@
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 = 36000) // costs more than what it did in the autolathe, this one comes loaded.
+ materials = list(/datum/material/iron = 36000) // costs more than what it did in the autolathe, this one comes loaded.
build_path = /obj/item/construction/rcd/loaded
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -37,7 +37,7 @@
desc = "A tool that can construct and deconstruct pipes on the fly."
id = "rpd"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 75000, MAT_GLASS = 37500)
+ materials = list(/datum/material/iron = 75000, /datum/material/glass = 37500)
build_path = /obj/item/pipe_dispenser
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -47,7 +47,7 @@
desc = "A small electric hand drill with an interchangeable screwdriver and bolt bit"
id = "handdrill"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 3500, MAT_SILVER = 1500, MAT_TITANIUM = 2500)
+ materials = list(/datum/material/iron = 3500, /datum/material/silver = 1500, /datum/material/titanium = 2500)
build_path = /obj/item/screwdriver/power
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -58,7 +58,7 @@
id = "jawsoflife" // added one more requirment since the Jaws of Life are a bit OP
build_path = /obj/item/crowbar/power
build_type = PROTOLATHE
- materials = list(MAT_METAL = 4500, MAT_SILVER = 2500, MAT_TITANIUM = 3500)
+ materials = list(/datum/material/iron = 4500, /datum/material/silver = 2500, /datum/material/titanium = 3500)
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -67,7 +67,7 @@
desc = "An experimental welder capable of self-fuel generation."
id = "exwelder"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 1000, MAT_GLASS = 500, MAT_PLASMA = 1500, MAT_URANIUM = 200)
+ materials = list(/datum/material/iron = 1000, /datum/material/glass = 500, /datum/material/plasma = 1500, /datum/material/uranium = 200)
build_path = /obj/item/weldingtool/experimental
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -82,7 +82,7 @@
id = "alien_wrench"
build_path = /obj/item/wrench/abductor
build_type = PROTOLATHE
- materials = list(MAT_METAL = 5000, MAT_SILVER = 2500, MAT_PLASMA = 1000, MAT_TITANIUM = 2000, MAT_DIAMOND = 2000)
+ materials = list(/datum/material/iron = 5000, /datum/material/silver = 2500, /datum/material/plasma = 1000, /datum/material/titanium = 2000, /datum/material/diamond = 2000)
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -92,7 +92,7 @@
id = "alien_wirecutters"
build_path = /obj/item/wirecutters/abductor
build_type = PROTOLATHE
- materials = list(MAT_METAL = 5000, MAT_SILVER = 2500, MAT_PLASMA = 1000, MAT_TITANIUM = 2000, MAT_DIAMOND = 2000)
+ materials = list(/datum/material/iron = 5000, /datum/material/silver = 2500, /datum/material/plasma = 1000, /datum/material/titanium = 2000, /datum/material/diamond = 2000)
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -102,7 +102,7 @@
id = "alien_screwdriver"
build_path = /obj/item/screwdriver/abductor
build_type = PROTOLATHE
- materials = list(MAT_METAL = 5000, MAT_SILVER = 2500, MAT_PLASMA = 1000, MAT_TITANIUM = 2000, MAT_DIAMOND = 2000)
+ materials = list(/datum/material/iron = 5000, /datum/material/silver = 2500, /datum/material/plasma = 1000, /datum/material/titanium = 2000, /datum/material/diamond = 2000)
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -112,7 +112,7 @@
id = "alien_crowbar"
build_path = /obj/item/crowbar/abductor
build_type = PROTOLATHE
- materials = list(MAT_METAL = 5000, MAT_SILVER = 2500, MAT_PLASMA = 1000, MAT_TITANIUM = 2000, MAT_DIAMOND = 2000)
+ materials = list(/datum/material/iron = 5000, /datum/material/silver = 2500, /datum/material/plasma = 1000, /datum/material/titanium = 2000, /datum/material/diamond = 2000)
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -122,7 +122,7 @@
id = "alien_welder"
build_path = /obj/item/weldingtool/abductor
build_type = PROTOLATHE
- materials = list(MAT_METAL = 5000, MAT_SILVER = 2500, MAT_PLASMA = 5000, MAT_TITANIUM = 2000, MAT_DIAMOND = 2000)
+ materials = list(/datum/material/iron = 5000, /datum/material/silver = 2500, /datum/material/plasma = 5000, /datum/material/titanium = 2000, /datum/material/diamond = 2000)
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -132,7 +132,7 @@
id = "alien_multitool"
build_path = /obj/item/multitool/abductor
build_type = PROTOLATHE
- materials = list(MAT_METAL = 5000, MAT_SILVER = 2500, MAT_PLASMA = 5000, MAT_TITANIUM = 2000, MAT_DIAMOND = 2000)
+ materials = list(/datum/material/iron = 5000, /datum/material/silver = 2500, /datum/material/plasma = 5000, /datum/material/titanium = 2000, /datum/material/diamond = 2000)
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
@@ -146,7 +146,7 @@
id = "alien_scalpel"
build_path = /obj/item/scalpel/alien
build_type = PROTOLATHE
- materials = list(MAT_METAL = 2000, MAT_SILVER = 1500, MAT_PLASMA = 500, MAT_TITANIUM = 1500)
+ materials = list(/datum/material/iron = 2000, /datum/material/silver = 1500, /datum/material/plasma = 500, /datum/material/titanium = 1500)
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -156,7 +156,7 @@
id = "alien_hemostat"
build_path = /obj/item/hemostat/alien
build_type = PROTOLATHE
- materials = list(MAT_METAL = 2000, MAT_SILVER = 1500, MAT_PLASMA = 500, MAT_TITANIUM = 1500)
+ materials = list(/datum/material/iron = 2000, /datum/material/silver = 1500, /datum/material/plasma = 500, /datum/material/titanium = 1500)
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -166,7 +166,7 @@
id = "alien_retractor"
build_path = /obj/item/retractor/alien
build_type = PROTOLATHE
- materials = list(MAT_METAL = 2000, MAT_SILVER = 1500, MAT_PLASMA = 500, MAT_TITANIUM = 1500)
+ materials = list(/datum/material/iron = 2000, /datum/material/silver = 1500, /datum/material/plasma = 500, /datum/material/titanium = 1500)
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -176,7 +176,7 @@
id = "alien_saw"
build_path = /obj/item/circular_saw/alien
build_type = PROTOLATHE
- materials = list(MAT_METAL = 10000, MAT_SILVER = 2500, MAT_PLASMA = 1000, MAT_TITANIUM = 1500)
+ materials = list(/datum/material/iron = 10000, /datum/material/silver = 2500, /datum/material/plasma = 1000, /datum/material/titanium = 1500)
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -186,7 +186,7 @@
id = "alien_drill"
build_path = /obj/item/surgicaldrill/alien
build_type = PROTOLATHE
- materials = list(MAT_METAL = 10000, MAT_SILVER = 2500, MAT_PLASMA = 1000, MAT_TITANIUM = 1500)
+ materials = list(/datum/material/iron = 10000, /datum/material/silver = 2500, /datum/material/plasma = 1000, /datum/material/titanium = 1500)
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -196,7 +196,7 @@
id = "alien_cautery"
build_path = /obj/item/cautery/alien
build_type = PROTOLATHE
- materials = list(MAT_METAL = 2000, MAT_SILVER = 1500, MAT_PLASMA = 500, MAT_TITANIUM = 1500)
+ materials = list(/datum/material/iron = 2000, /datum/material/silver = 1500, /datum/material/plasma = 500, /datum/material/titanium = 1500)
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -210,7 +210,7 @@
desc = "A large surgery drape made of plastic."
id = "drapes"
build_type = PROTOLATHE
- materials = list(MAT_PLASTIC = 2500)
+ materials = list(/datum/material/plastic = 2500)
build_path = /obj/item/surgical_drapes
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
@@ -220,7 +220,7 @@
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)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 500, /datum/material/silver = 1500, /datum/material/gold = 1000)
build_path = /obj/item/retractor/advanced
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
@@ -230,7 +230,7 @@
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)
+ materials = list(/datum/material/iron = 2500, /datum/material/glass = 2500, /datum/material/silver = 6000, /datum/material/gold = 5500, /datum/material/diamond = 3500)
build_path = /obj/item/surgicaldrill/advanced
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
@@ -240,7 +240,7 @@
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)
+ materials = list(/datum/material/iron = 1500, /datum/material/glass = 1500, /datum/material/silver = 4000, /datum/material/gold = 2500)
build_path = /obj/item/scalpel/advanced
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
diff --git a/code/modules/research/designs/weapon_designs.dm b/code/modules/research/designs/weapon_designs.dm
index 467679fea6..658e108288 100644
--- a/code/modules/research/designs/weapon_designs.dm
+++ b/code/modules/research/designs/weapon_designs.dm
@@ -22,7 +22,7 @@
desc = "Designed to quickly reload revolvers. TRAC bullets embed a tracking implant within the target's body."
id = "c38_trac"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 20000, MAT_SILVER = 5000, MAT_GOLD = 1000)
+ materials = list(/datum/material/iron = 20000, /datum/material/silver = 5000, /datum/material/gold = 1000)
build_path = /obj/item/ammo_box/c38/trac
category = list("Ammo")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -32,7 +32,7 @@
desc = "Designed to quickly reload revolvers. Hot Shot bullets contain an incendiary payload."
id = "c38_hotshot"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 20000, MAT_PLASMA = 5000)
+ materials = list(/datum/material/iron = 20000, /datum/material/plasma = 5000)
build_path = /obj/item/ammo_box/c38/hotshot
category = list("Ammo")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -42,7 +42,7 @@
desc = "Designed to quickly reload revolvers. Iceblox bullets contain a cryogenic payload."
id = "c38_iceblox"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 20000, MAT_PLASMA = 5000)
+ materials = list(/datum/material/iron = 20000, /datum/material/plasma = 5000)
build_path = /obj/item/ammo_box/c38/iceblox
category = list("Ammo")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -56,7 +56,7 @@
desc = "A 24-round magazine for the Magrifle."
id = "mag_magrifle"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 8000, MAT_SILVER = 1000)
+ materials = list(/datum/material/iron = 8000, /datum/material/silver = 1000)
build_path = /obj/item/ammo_box/magazine/mmag/lethal
category = list("Ammo")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -65,7 +65,7 @@
name = "Magrifle Magazine (Non-Lethal)"
desc = "A 24- round non-lethal magazine for the Magrifle."
id = "mag_magrifle_nl"
- materials = list(MAT_METAL = 6000, MAT_SILVER = 500, MAT_TITANIUM = 500)
+ materials = list(/datum/material/iron = 6000, /datum/material/silver = 500, /datum/material/titanium = 500)
build_path = /obj/item/ammo_box/magazine/mmag
/datum/design/mag_magpistol
@@ -73,7 +73,7 @@
desc = "A 14 round magazine for the Magpistol."
id = "mag_magpistol"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 4000, MAT_SILVER = 500)
+ materials = list(/datum/material/iron = 4000, /datum/material/silver = 500)
build_path = /obj/item/ammo_box/magazine/mmag/small/lethal
category = list("Ammo")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -82,7 +82,7 @@
name = "Magpistol Magazine (Non-Lethal)"
desc = "A 14 round non-lethal magazine for the Magpistol."
id = "mag_magpistol_nl"
- materials = list(MAT_METAL = 3000, MAT_SILVER = 250, MAT_TITANIUM = 250)
+ materials = list(/datum/material/iron = 3000, /datum/material/silver = 250, /datum/material/titanium = 250)
build_path = /obj/item/ammo_box/magazine/mmag/small
//////////////
@@ -94,7 +94,7 @@
desc = "A 20 round magazine for the out of date security WT-550 Semi-Auto SMG."
id = "mag_oldsmg"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 4000)
+ materials = list(/datum/material/iron = 4000)
build_path = /obj/item/ammo_box/magazine/wt550m9
category = list("Ammo")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -103,7 +103,7 @@
name = "WT-550 Semi-Auto SMG Armour Piercing Magazine (4.6x30mm AP)"
desc = "A 20 round armour piercing magazine for the out of date security WT-550 Semi-Auto SMG."
id = "mag_oldsmg_ap"
- materials = list(MAT_METAL = 6000, MAT_SILVER = 600)
+ materials = list(/datum/material/iron = 6000, /datum/material/silver = 600)
build_path = /obj/item/ammo_box/magazine/wt550m9/wtap
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -111,7 +111,7 @@
name = "WT-550 Semi-Auto SMG Incendiary Magazine (4.6x30mm IC)"
desc = "A 20 round armour piercing magazine for the out of date security WT-550 Semi-Auto SMG."
id = "mag_oldsmg_ic"
- materials = list(MAT_METAL = 6000, MAT_SILVER = 600, MAT_GLASS = 1000)
+ materials = list(/datum/material/iron = 6000, /datum/material/silver = 600, /datum/material/glass = 1000)
build_path = /obj/item/ammo_box/magazine/wt550m9/wtic
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -119,7 +119,7 @@
name = "WT-550 Semi-Auto SMG Uranium Magazine (4.6x30mm TX)"
desc = "A 20 round uranium tipped magazine for the out of date security WT-550 Semi-Auto SMG."
id = "mag_oldsmg_tx"
- materials = list(MAT_METAL = 6000, MAT_SILVER = 600, MAT_URANIUM = 2000)
+ materials = list(/datum/material/iron = 6000, /datum/material/silver = 600, /datum/material/uranium = 2000)
build_path = /obj/item/ammo_box/magazine/wt550m9/wttx
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -127,7 +127,7 @@
name = "WT-550 Semi-Auto SMG rubberbullets Magazine (4.6x30mm rubber)"
desc = "A 20 round rubber shots magazine for the out of date security WT-550 Semi-Auto SMG"
id = "mag_oldsmg_rubber"
- materials = list(MAT_METAL = 6000)
+ materials = list(/datum/material/iron = 6000)
build_path = /obj/item/ammo_box/magazine/wt550m9/wtrubber
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -176,7 +176,7 @@
desc = "A stunning shell for a shotgun."
id = "stunshell"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 200)
+ materials = list(/datum/material/iron = 200)
build_path = /obj/item/ammo_casing/shotgun/stunslug
category = list("Ammo")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY | DEPARTMENTAL_FLAG_SCIENCE
@@ -186,7 +186,7 @@
desc = "A high-tech shotgun shell which can be loaded with materials to produce unique effects."
id = "techshotshell"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 1000, MAT_GLASS = 200)
+ materials = list(/datum/material/iron = 1000, /datum/material/glass = 200)
build_path = /obj/item/ammo_casing/shotgun/techshell
category = list("Ammo")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY | DEPARTMENTAL_FLAG_SCIENCE
@@ -196,7 +196,7 @@
desc = "A shotgun dart designed with similar internals to that of a cryostatis beaker, allowing reagents to not react when inside."
id = "shotgundartcryostatis"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 3500)
+ materials = list(/datum/material/iron = 3500)
build_path = /obj/item/ammo_casing/shotgun/dart/noreact
category = list("Ammo")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -210,7 +210,7 @@
desc = "This safety firing pin allows firearms to be operated within proximity to a firing range."
id = "pin_testing"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 500, MAT_GLASS = 300)
+ materials = list(/datum/material/iron = 500, /datum/material/glass = 300)
build_path = /obj/item/firing_pin/test_range
category = list("Firing Pins")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY | DEPARTMENTAL_FLAG_SCIENCE
@@ -220,7 +220,7 @@
desc = "This is a security firing pin which only authorizes users who are mindshield-implanted."
id = "pin_loyalty"
build_type = PROTOLATHE
- materials = list(MAT_SILVER = 600, MAT_DIAMOND = 600, MAT_URANIUM = 200)
+ materials = list(/datum/material/silver = 600, /datum/material/diamond = 600, /datum/material/uranium = 200)
build_path = /obj/item/firing_pin/implant/mindshield
category = list("Firing Pins")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -230,7 +230,7 @@
desc = "This is a security firing pin which only authorizes users who are off station."
id = "pin_away"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 1500, MAT_GLASS = 2000)
+ materials = list(/datum/material/iron = 1500, /datum/material/glass = 2000)
build_path = /obj/item/firing_pin/away
category = list("Firing Pins")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -244,7 +244,7 @@
desc = "Beefed up version of a standard laser gun."
id = "lasercarbine"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 15000, MAT_GLASS = 10000, MAT_GOLD = 2500, MAT_SILVER = 2500)
+ materials = list(/datum/material/iron = 15000, /datum/material/glass = 10000, /datum/material/gold = 2500, /datum/material/silver = 2500)
build_path = /obj/item/gun/energy/laser/carbine/nopin
category = list("Weapons")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -254,7 +254,7 @@
desc = "A high-tech revolver that fires internal, reusable shock cartridges in a revolving cylinder. The cartridges can be recharged using conventional rechargers."
id = "stunrevolver"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 10000, MAT_GLASS = 10000, MAT_SILVER = 10000)
+ materials = list(/datum/material/iron = 10000, /datum/material/glass = 10000, /datum/material/silver = 10000)
build_path = /obj/item/gun/energy/tesla_revolver
category = list("Weapons")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -264,7 +264,7 @@
desc = "An energy gun with an experimental miniaturized reactor."
id = "nuclear_gun"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 10000, MAT_GLASS = 2000, MAT_URANIUM = 3000, MAT_TITANIUM = 1000)
+ materials = list(/datum/material/iron = 10000, /datum/material/glass = 2000, /datum/material/uranium = 3000, /datum/material/titanium = 1000)
build_path = /obj/item/gun/energy/e_gun/nuclear
category = list("Weapons")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -274,7 +274,7 @@
desc = "A powerful long ranged anti-material rifle that fires charged particle beams to obliterate targets."
id = "beamrifle"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 10000, MAT_GLASS = 5000, MAT_DIAMOND = 5000, MAT_URANIUM = 8000, MAT_SILVER = 4500, MAT_GOLD = 5000)
+ materials = list(/datum/material/iron = 10000, /datum/material/glass = 5000, /datum/material/diamond = 5000, /datum/material/uranium = 8000, /datum/material/silver = 4500, /datum/material/gold = 5000)
build_path = /obj/item/gun/energy/beam_rifle
category = list("Weapons")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -284,7 +284,7 @@
desc = "Your opponent will bubble into a messy pile of goop."
id = "decloner"
build_type = PROTOLATHE
- materials = list(MAT_GOLD = 5000,MAT_URANIUM = 10000)
+ materials = list(/datum/material/gold = 5000,/datum/material/uranium = 10000)
reagents_list = list(/datum/reagent/toxin/mutagen = 40)
build_path = /obj/item/gun/energy/decloner
category = list("Weapons")
@@ -295,7 +295,7 @@
desc = "A gun that fires many syringes."
id = "rapidsyringe"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 5000, MAT_GLASS = 1000)
+ materials = list(/datum/material/iron = 5000, /datum/material/glass = 1000)
build_path = /obj/item/gun/syringe/rapidsyringe
category = list("Weapons")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
@@ -305,7 +305,7 @@
desc = "A gun that shoots temperature beam like projectiles to change temperature."
id = "temp_gun"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 5000, MAT_GLASS = 500, MAT_SILVER = 3000)
+ materials = list(/datum/material/iron = 5000, /datum/material/glass = 500, /datum/material/silver = 3000)
build_path = /obj/item/gun/energy/temperature
category = list("Weapons")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -315,7 +315,7 @@
desc = "A tool that discharges controlled radiation which induces mutation in plant cells. Harmless to other organic life."
id = "flora_gun"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 2000, MAT_GLASS = 500)
+ materials = list(/datum/material/iron = 2000, /datum/material/glass = 500)
reagents_list = list(/datum/reagent/radium = 20)
build_path = /obj/item/gun/energy/floragun
category = list("Weapons")
@@ -326,7 +326,7 @@
desc = "Not quite as menacing as it sounds"
id = "xray_laser"
build_type = PROTOLATHE
- materials = list(MAT_GOLD = 5000, MAT_URANIUM = 4000, MAT_METAL = 5000, MAT_TITANIUM = 2000, MAT_BLUESPACE = 2000)
+ materials = list(/datum/material/gold = 5000, /datum/material/uranium = 4000, /datum/material/iron = 5000, /datum/material/titanium = 2000, /datum/material/bluespace = 2000)
build_path = /obj/item/gun/energy/xray
category = list("Weapons")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -336,7 +336,7 @@
desc = "How to dismantle a cyborg : The gun."
id = "ioncarbine"
build_type = PROTOLATHE
- materials = list(MAT_SILVER = 6000, MAT_METAL = 8000, MAT_URANIUM = 2000)
+ materials = list(/datum/material/silver = 6000, /datum/material/iron = 8000, /datum/material/uranium = 2000)
build_path = /obj/item/gun/energy/ionrifle/carbine
category = list("Weapons")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -346,7 +346,7 @@
desc = "A projector that emits high density quantum-coupled bluespace beams."
id = "wormholeprojector"
build_type = PROTOLATHE
- materials = list(MAT_SILVER = 2000, MAT_METAL = 5000, MAT_DIAMOND = 2000, MAT_BLUESPACE = 3000)
+ materials = list(/datum/material/silver = 2000, /datum/material/iron = 5000, /datum/material/diamond = 2000, /datum/material/bluespace = 3000)
build_path = /obj/item/gun/energy/wormhole_projector
category = list("Weapons")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -356,7 +356,7 @@
desc = "A multi-mode device that blasts one-point bluespace-gravitational bolts that locally distort gravity."
id = "gravitygun"
build_type = PROTOLATHE
- materials = list(MAT_SILVER = 8000, MAT_URANIUM = 8000, MAT_GLASS = 12000, MAT_METAL = 12000, MAT_DIAMOND = 3000, MAT_BLUESPACE = 3000)
+ materials = list(/datum/material/silver = 8000, /datum/material/uranium = 8000, /datum/material/glass = 12000, /datum/material/iron = 12000, /datum/material/diamond = 3000, /datum/material/bluespace = 3000)
build_path = /obj/item/gun/energy/gravity_gun
category = list("Weapons")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -366,7 +366,7 @@
desc = "A reverse-engineered energy crossbow favored by syndicate infiltration teams and carp hunters."
id = "largecrossbow"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 5000, MAT_GLASS = 1500, MAT_URANIUM = 1500, MAT_SILVER = 1500)
+ materials = list(/datum/material/iron = 5000, /datum/material/glass = 1500, /datum/material/uranium = 1500, /datum/material/silver = 1500)
build_path = /obj/item/gun/energy/kinetic_accelerator/crossbow/large
category = list("Weapons")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -376,7 +376,7 @@
desc = "A weapon which fires ferromagnetic slugs."
id = "magpistol"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 7500, MAT_GLASS = 1000, MAT_URANIUM = 1000, MAT_TITANIUM = 5000, MAT_SILVER = 2000)
+ materials = list(/datum/material/iron = 7500, /datum/material/glass = 1000, /datum/material/uranium = 1000, /datum/material/titanium = 5000, /datum/material/silver = 2000)
build_path = /obj/item/gun/ballistic/automatic/magrifle/pistol/nopin
category = list("Weapons")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -386,7 +386,7 @@
desc = "An upscaled Magpistol in rifle form."
id = "magrifle"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 10000, MAT_GLASS = 2000, MAT_URANIUM = 2000, MAT_TITANIUM = 10000, MAT_SILVER = 4000, MAT_GOLD = 2000)
+ materials = list(/datum/material/iron = 10000, /datum/material/glass = 2000, /datum/material/uranium = 2000, /datum/material/titanium = 10000, /datum/material/silver = 4000, /datum/material/gold = 2000)
build_path = /obj/item/gun/ballistic/automatic/magrifle/nopin
category = list("Weapons")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -400,7 +400,7 @@
desc = "A grenade that affects a larger area and use larger containers."
id = "large_Grenade"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 3000)
+ materials = list(/datum/material/iron = 3000)
build_path = /obj/item/grenade/chem_grenade/large
category = list("Weapons")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY | DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
@@ -410,7 +410,7 @@
desc = "An advanced grenade that is able to self ignite its mixture."
id = "pyro_Grenade"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 2000, MAT_PLASMA = 500)
+ materials = list(/datum/material/iron = 2000, /datum/material/plasma = 500)
build_path = /obj/item/grenade/chem_grenade/pyro
category = list("Weapons")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY | DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
@@ -420,7 +420,7 @@
desc = "An advanced grenade that rapidly cools its contents upon detonation."
id = "cryo_Grenade"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 2000, MAT_SILVER = 500)
+ materials = list(/datum/material/iron = 2000, /datum/material/silver = 500)
build_path = /obj/item/grenade/chem_grenade/cryo
category = list("Weapons")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY | DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
@@ -430,7 +430,7 @@
desc = "An advanced grenade that can be detonated several times, best used with a repeating igniter."
id = "adv_Grenade"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 3000, MAT_GLASS = 500)
+ materials = list(/datum/material/iron = 3000, /datum/material/glass = 500)
build_path = /obj/item/grenade/chem_grenade/adv_release
category = list("Weapons")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY | DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
@@ -444,7 +444,7 @@
desc = "An advanced riot shield made of lightweight materials that collapses for easy storage."
id = "tele_shield"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 4000, MAT_GLASS = 4000, MAT_SILVER = 300, MAT_TITANIUM = 200)
+ materials = list(/datum/material/iron = 4000, /datum/material/glass = 4000, /datum/material/silver = 300, /datum/material/titanium = 200)
build_path = /obj/item/shield/riot/tele
category = list("Weapons")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
@@ -454,7 +454,16 @@
desc = "A reverse-engineered suppressor that fits on most small arms with threaded barrels."
id = "suppressor"
build_type = PROTOLATHE
- materials = list(MAT_METAL = 2000, MAT_SILVER = 500)
+ materials = list(/datum/material/iron = 2000, /datum/material/silver = 500)
build_path = /obj/item/suppressor
category = list("Weapons")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
+
+/datum/design/cleric_mace
+ name = "Cleric Mace"
+ desc = "A mace fit for a cleric. Useful for bypassing plate armor, but too bulky for much else."
+ id = "cleric_mace"
+ build_type = AUTOLATHE
+ materials = list(MAT_CATEGORY_RIGID = 12000)
+ build_path = /obj/item/melee/cleric_mace
+ category = list("Imported")
diff --git a/code/modules/research/destructive_analyzer.dm b/code/modules/research/destructive_analyzer.dm
index 7dd7b76007..10566b7de2 100644
--- a/code/modules/research/destructive_analyzer.dm
+++ b/code/modules/research/destructive_analyzer.dm
@@ -61,12 +61,12 @@ Note: Must be placed within 3 tiles of the R&D Console
. = 0
var/datum/component/material_container/storage = linked_console?.linked_lathe?.materials.mat_container
if(storage) //Also sends salvaged materials to a linked protolathe, if any.
- for(var/material in thing.materials)
- var/can_insert = min((storage.max_amount - storage.total_amount), (max(thing.materials[material]*(decon_mod/10), thing.materials[material])))
- storage.insert_amount(can_insert, material)
+ for(var/material in thing.custom_materials)
+ var/can_insert = min((storage.max_amount - storage.total_amount), (min(thing.custom_materials[material]*(decon_mod/10), thing.custom_materials[material])))
+ storage.insert_amount_mat(can_insert, material)
. += can_insert
if (.)
- linked_console.linked_lathe.materials.silo_log(src, "reclaimed", 1, "[thing.name]", thing.materials)
+ linked_console.linked_lathe.materials.silo_log(src, "reclaimed", 1, "[thing.name]", thing.custom_materials)
/obj/machinery/rnd/destructive_analyzer/proc/destroy_item(obj/item/thing, innermode = FALSE)
if(QDELETED(thing) || QDELETED(src) || QDELETED(linked_console))
@@ -132,7 +132,7 @@ Note: Must be placed within 3 tiles of the R&D Console
var/user_mode_string = ""
if(length(point_value))
user_mode_string = " for [json_encode(point_value)] points"
- else if(loaded_item.materials.len)
+ else if(loaded_item.custom_materials?.len)
user_mode_string = " for material reclamation"
var/choice = input("Are you sure you want to destroy [loaded_item][user_mode_string]?") in list("Proceed", "Cancel")
if(choice == "Cancel")
diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm
index fd68a393f9..b43abf97b2 100644
--- a/code/modules/research/experimentor.dm
+++ b/code/modules/research/experimentor.dm
@@ -430,8 +430,8 @@
visible_message("
[exp_on] activates the crushing mechanism, [exp_on] is destroyed!")
if(linked_console.linked_lathe)
var/datum/component/material_container/linked_materials = linked_console.linked_lathe.GetComponent(/datum/component/material_container)
- for(var/material in exp_on.materials)
- linked_materials.insert_amount( min((linked_materials.max_amount - linked_materials.total_amount), (exp_on.materials[material])), material)
+ for(var/material in exp_on.custom_materials)
+ linked_materials.insert_amount_mat( min((linked_materials.max_amount - linked_materials.total_amount), (exp_on.custom_materials[material])), material)
if(prob(EFFECT_PROB_LOW) && criticalReaction)
visible_message("
[src]'s crushing mechanism slowly and smoothly descends, flattening the [exp_on]!")
new /obj/item/stack/sheet/plasteel(get_turf(pick(oview(1,src))))
diff --git a/code/modules/research/machinery/_production.dm b/code/modules/research/machinery/_production.dm
index 25e8b82cc4..41ed6a556e 100644
--- a/code/modules/research/machinery/_production.dm
+++ b/code/modules/research/machinery/_production.dm
@@ -29,6 +29,14 @@
materials = AddComponent(/datum/component/remote_materials, "lathe", mapload)
RefreshParts()
+/obj/machinery/rnd/production/Destroy()
+ materials = null
+ cached_designs = null
+ matching_designs = null
+ QDEL_NULL(stored_research)
+ host_research = null
+ return ..()
+
/obj/machinery/rnd/production/proc/update_research()
host_research.copy_research_to(stored_research, TRUE)
update_designs()
@@ -51,10 +59,6 @@
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.
@@ -92,23 +96,24 @@
var/obj/O = new path(get_turf(src))
if(efficient_with(O.type) && isitem(O))
var/obj/item/I = O
- I.materials = matlist.Copy()
+ I.material_flags |= MATERIAL_NO_EFFECTS //Find a better way to do this.
+ I.set_custom_materials(matlist.Copy())
SSblackbox.record_feedback("nested tally", "item_printed", amount, list("[type]", "[path]"))
investigate_log("[key_name(user)] built [amount] of [path] at [src]([type]).", INVESTIGATE_RESEARCH)
-/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
+/obj/machinery/rnd/production/proc/check_mat(datum/design/being_built, var/mat) // 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)
+ var/A = materials.mat_container.get_material_amount(mat)
if(!A)
- A = reagents.get_reagent_amount(M)
+ A = reagents.get_reagent_amount(mat)
// 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))
+ return round(A / max(1, all_materials[mat] / ef))
/obj/machinery/rnd/production/proc/efficient_with(path)
return !ispath(path, /obj/item/stack/sheet) && !ispath(path, /obj/item/stack/ore/bluespace_crystal)
@@ -152,7 +157,7 @@
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.mat_container.use_materials(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)
@@ -213,11 +218,13 @@
var/list/l = list()
l += "
Material Storage:
"
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 += "
Eject [RDSCREEN_NOBREAK]"
- if(M.amount >= MINERAL_MATERIAL_AMOUNT*5) l += "
5x [RDSCREEN_NOBREAK]"
- if(M.amount >= MINERAL_MATERIAL_AMOUNT) l += "
All[RDSCREEN_NOBREAK]"
+ var/datum/material/M = mat_id
+ var/amount = materials.mat_container.materials[mat_id]
+ var/ref = REF(M)
+ l += "* [amount] of [M.name]: "
+ if(amount >= MINERAL_MATERIAL_AMOUNT) l += "
Eject [RDSCREEN_NOBREAK]"
+ if(amount >= MINERAL_MATERIAL_AMOUNT*5) l += "
5x [RDSCREEN_NOBREAK]"
+ if(amount >= MINERAL_MATERIAL_AMOUNT) l += "
All[RDSCREEN_NOBREAK]"
l += ""
l += "
[RDSCREEN_NOBREAK]"
return l
@@ -305,7 +312,8 @@
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"])
+ var/datum/material/M = locate(ls["ejectsheet"])
+ eject_sheets(M, ls["eject_amt"])
updateUsrDialog()
/obj/machinery/rnd/production/proc/eject_sheets(eject_sheet, eject_amt)
diff --git a/code/modules/research/nanites/extra_settings/_extra_setting.dm b/code/modules/research/nanites/extra_settings/_extra_setting.dm
new file mode 100644
index 0000000000..b3bef77eb4
--- /dev/null
+++ b/code/modules/research/nanites/extra_settings/_extra_setting.dm
@@ -0,0 +1,20 @@
+/datum/nanite_extra_setting
+ var/setting_type
+ var/value
+
+/datum/nanite_extra_setting/proc/get_value()
+ return value
+
+/datum/nanite_extra_setting/proc/set_value(value)
+ src.value = value
+
+/datum/nanite_extra_setting/proc/get_copy()
+ return
+
+//I made the choice to send the name as part of the parameter instead of storing it directly on
+//this datum as a way of avoiding duplication of data between the containing assoc list
+//and this datum.
+//Also make sure to double wrap the list when implementing this as
+//+= is interpreted as a combine on lists, so the outer list gets unwrapped
+/datum/nanite_extra_setting/proc/get_frontend_list(name)
+ return
diff --git a/code/modules/research/nanites/extra_settings/boolean.dm b/code/modules/research/nanites/extra_settings/boolean.dm
new file mode 100644
index 0000000000..7d66eb988e
--- /dev/null
+++ b/code/modules/research/nanites/extra_settings/boolean.dm
@@ -0,0 +1,27 @@
+/datum/nanite_extra_setting/boolean
+ setting_type = NESTYPE_BOOLEAN
+ var/true_text
+ var/false_text
+
+/datum/nanite_extra_setting/boolean/New(initial, true_text, false_text)
+ value = initial
+ src.true_text = true_text
+ src.false_text = false_text
+
+/datum/nanite_extra_setting/boolean/set_value(value)
+ if(isnull(value))
+ src.value = !src.value
+ return
+ . = ..()
+
+/datum/nanite_extra_setting/boolean/get_copy()
+ return new /datum/nanite_extra_setting/boolean(value, true_text, false_text)
+
+/datum/nanite_extra_setting/boolean/get_frontend_list(name)
+ return list(list(
+ "name" = name,
+ "type" = setting_type,
+ "value" = value,
+ "true_text" = true_text,
+ "false_text" = false_text
+ ))
diff --git a/code/modules/research/nanites/extra_settings/number.dm b/code/modules/research/nanites/extra_settings/number.dm
new file mode 100644
index 0000000000..6e63ae067e
--- /dev/null
+++ b/code/modules/research/nanites/extra_settings/number.dm
@@ -0,0 +1,32 @@
+/datum/nanite_extra_setting/number
+ setting_type = NESTYPE_NUMBER
+ var/min
+ var/max
+ var/unit = ""
+
+/datum/nanite_extra_setting/number/New(initial, min, max, unit)
+ value = initial
+ src.min = min
+ src.max = max
+ if(unit)
+ src.unit = unit
+
+/datum/nanite_extra_setting/number/set_value(value)
+ if(istext(value))
+ value = text2num(value)
+ if(!value || !isnum(value))
+ return
+ src.value = CLAMP(value, min, max)
+
+/datum/nanite_extra_setting/number/get_copy()
+ return new /datum/nanite_extra_setting/number(value, min, max, unit)
+
+/datum/nanite_extra_setting/number/get_frontend_list(name)
+ return list(list(
+ "name" = name,
+ "type" = setting_type,
+ "value" = value,
+ "min" = min,
+ "max" = max,
+ "unit" = unit
+ ))
diff --git a/code/modules/research/nanites/extra_settings/text.dm b/code/modules/research/nanites/extra_settings/text.dm
new file mode 100644
index 0000000000..56aa3dd07f
--- /dev/null
+++ b/code/modules/research/nanites/extra_settings/text.dm
@@ -0,0 +1,18 @@
+/datum/nanite_extra_setting/text
+ setting_type = NESTYPE_TEXT
+
+/datum/nanite_extra_setting/text/New(initial)
+ value = initial
+
+/datum/nanite_extra_setting/text/set_value(value)
+ src.value = trim(value)
+
+/datum/nanite_extra_setting/text/get_copy()
+ return new /datum/nanite_extra_setting/text(value)
+
+/datum/nanite_extra_setting/text/get_frontend_list(name)
+ return list(list(
+ "name" = name,
+ "type" = setting_type,
+ "value" = value
+ ))
diff --git a/code/modules/research/nanites/extra_settings/type.dm b/code/modules/research/nanites/extra_settings/type.dm
new file mode 100644
index 0000000000..2085ba510c
--- /dev/null
+++ b/code/modules/research/nanites/extra_settings/type.dm
@@ -0,0 +1,18 @@
+/datum/nanite_extra_setting/type
+ setting_type = NESTYPE_TYPE
+ var/list/types
+
+/datum/nanite_extra_setting/type/New(initial, types)
+ value = initial
+ src.types = types
+
+/datum/nanite_extra_setting/type/get_copy()
+ return new /datum/nanite_extra_setting/type(value, types)
+
+/datum/nanite_extra_setting/type/get_frontend_list(name)
+ return list(list(
+ "name" = name,
+ "type" = setting_type,
+ "value" = value,
+ "types" = types
+ ))
diff --git a/code/modules/research/nanites/nanite_chamber.dm b/code/modules/research/nanites/nanite_chamber.dm
index 515231c24c..4a980a0436 100644
--- a/code/modules/research/nanites/nanite_chamber.dm
+++ b/code/modules/research/nanites/nanite_chamber.dm
@@ -77,7 +77,7 @@
return
occupant.AddComponent(/datum/component/nanites, 100)
-/obj/machinery/nanite_chamber/proc/install_program(datum/nanite_program/NP)
+/obj/machinery/nanite_chamber/proc/remove_nanites(datum/nanite_program/NP)
if(stat & (NOPOWER|BROKEN))
return
if((stat & MAINT) || panel_open)
@@ -88,74 +88,46 @@
var/locked_state = locked
locked = TRUE
- //TODO COMPUTERY MACHINE SOUNDS
- set_busy(TRUE, "Initializing installation protocol...", "[initial(icon_state)]_raising")
- addtimer(CALLBACK(src, .proc/set_busy, TRUE, "Connecting to nanite framework...", "[initial(icon_state)]_active"),20)
- addtimer(CALLBACK(src, .proc/set_busy, TRUE, "Installing program...", "[initial(icon_state)]_falling"),35)
- addtimer(CALLBACK(src, .proc/complete_installation, locked_state, NP),55)
+ //TODO OMINOUS MACHINE SOUNDS
+ set_busy(TRUE, "Initializing cleanup protocol...", "[initial(icon_state)]_raising")
+ addtimer(CALLBACK(src, .proc/set_busy, TRUE, "Analyzing host bio-structure...", "[initial(icon_state)]_active"),20)
+ addtimer(CALLBACK(src, .proc/set_busy, TRUE, "Pinging nanites...", "[initial(icon_state)]_active"),40)
+ addtimer(CALLBACK(src, .proc/set_busy, TRUE, "Initiating graceful self-destruct sequence...", "[initial(icon_state)]_active"),70)
+ addtimer(CALLBACK(src, .proc/set_busy, TRUE, "Removing debris...", "[initial(icon_state)]_falling"),110)
+ addtimer(CALLBACK(src, .proc/complete_removal, locked_state),130)
-/obj/machinery/nanite_chamber/proc/complete_installation(locked_state, datum/nanite_program/NP)
+/obj/machinery/nanite_chamber/proc/complete_removal(locked_state)
//TODO MACHINE DING
locked = locked_state
set_busy(FALSE)
if(!occupant)
return
+ SEND_SIGNAL(occupant, COMSIG_NANITE_DELETE)
- SEND_SIGNAL(occupant, COMSIG_NANITE_ADD_PROGRAM, NP.copy())
-
-/obj/machinery/nanite_chamber/proc/uninstall_program(datum/nanite_program/NP)
- if(stat & (NOPOWER|BROKEN))
- return
- if((stat & MAINT) || panel_open)
- return
- if(!occupant || busy)
- return
-
- var/locked_state = locked
- locked = TRUE
-
- //TODO COMPUTERY MACHINE SOUNDS
- set_busy(TRUE, "Initializing uninstallation protocol...", "[initial(icon_state)]_raising")
- addtimer(CALLBACK(src, .proc/set_busy, TRUE, "Connecting to nanite framework...", "[initial(icon_state)]_active"),20)
- addtimer(CALLBACK(src, .proc/set_busy, TRUE, "Uninstalling program...", "[initial(icon_state)]_falling"),35)
- addtimer(CALLBACK(src, .proc/complete_uninstallation, locked_state, NP),55)
-
-/obj/machinery/nanite_chamber/proc/complete_uninstallation(locked_state, datum/nanite_program/NP)
- //TODO MACHINE DING
- locked = locked_state
- set_busy(FALSE)
- if(!occupant)
- return
- qdel(NP)
-
-/obj/machinery/nanite_chamber/update_icon()
- cut_overlays()
-
- if((stat & MAINT) || panel_open)
- add_overlay("maint")
-
- else if(!(stat & (NOPOWER|BROKEN)))
- if(busy || locked)
- add_overlay("red")
- if(locked)
- add_overlay("bolted")
- else
- add_overlay("green")
-
+/obj/machinery/nanite_chamber/update_icon_state()
//running and someone in there
if(occupant)
if(busy)
icon_state = busy_icon_state
else
- icon_state = initial(icon_state)+ "_occupied"
- return
+ icon_state = initial(icon_state) + "_occupied"
+ else
+ //running
+ icon_state = initial(icon_state) + (state_open ? "_open" : "")
- //running
- icon_state = initial(icon_state)+ (state_open ? "_open" : "")
+/obj/machinery/nanite_chamber/update_overlays()
+ . = ..()
-/obj/machinery/nanite_chamber/power_change()
- ..()
- update_icon()
+ if((stat & MAINT) || panel_open)
+ . += "maint"
+
+ else if(!(stat & (NOPOWER|BROKEN)))
+ if(busy || locked)
+ . += "red"
+ if(locked)
+ . += "bolted"
+ else
+ . += "green"
/obj/machinery/nanite_chamber/proc/toggle_open(mob/user)
if(panel_open)
@@ -182,7 +154,7 @@
user.last_special = world.time + CLICK_CD_BREAKOUT
user.visible_message("
You see [user] kicking against the door of [src]!", \
"
You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)", \
- "
You hear a metallic creaking from [src].")
+ "
You hear a metallic creaking from [src].")
if(do_after(user,(breakout_time), target = src))
if(!user || user.stat != CONSCIOUS || user.loc != src || state_open || !locked || busy)
return
@@ -231,6 +203,8 @@
toggle_open(user)
/obj/machinery/nanite_chamber/MouseDrop_T(mob/target, mob/user)
- if(user.stat || user.lying || !Adjacent(user) || !user.Adjacent(target) || !iscarbon(target) || !user.IsAdvancedToolUser())
+ if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK) || !Adjacent(target) || !user.Adjacent(target) || !iscarbon(target))
return
- close_machine(target)
+ if(close_machine(target))
+ log_combat(user, target, "inserted", null, "into [src].")
+ add_fingerprint(user)
diff --git a/code/modules/research/nanites/nanite_chamber_computer.dm b/code/modules/research/nanites/nanite_chamber_computer.dm
index dec263368b..0750d3d268 100644
--- a/code/modules/research/nanites/nanite_chamber_computer.dm
+++ b/code/modules/research/nanites/nanite_chamber_computer.dm
@@ -5,30 +5,13 @@
var/obj/item/disk/nanite_program/disk
circuit = /obj/item/circuitboard/computer/nanite_chamber_control
icon_screen = "nanite_chamber_control"
+ ui_x = 380
+ ui_y = 570
/obj/machinery/computer/nanite_chamber_control/Initialize()
. = ..()
find_chamber()
-/obj/machinery/computer/nanite_chamber_control/attackby(obj/item/I, mob/user)
- if(istype(I, /obj/item/disk/nanite_program))
- var/obj/item/disk/nanite_program/N = I
- if(disk)
- eject(user)
- if(user.transferItemToLoc(N, src))
- to_chat(user, "
You insert [N] into [src]")
- playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
- disk = N
- else
- ..()
-
-/obj/machinery/computer/nanite_chamber_control/proc/eject(mob/living/user)
- if(!disk)
- return
- if(!istype(user) || !Adjacent(user) || !user.put_in_active_hand(disk))
- disk.forceMove(drop_location())
- disk = null
-
/obj/machinery/computer/nanite_chamber_control/proc/find_chamber()
for(var/direction in GLOB.cardinals)
var/C = locate(/obj/machinery/nanite_chamber, get_step(src, direction))
@@ -43,41 +26,13 @@
..()
/obj/machinery/computer/nanite_chamber_control/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
- SStgui.try_update_ui(user, src, ui_key, ui, force_open)
+ ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
- ui = new(user, src, ui_key, "nanite_chamber_control", name, 550, 800, master_ui, state)
+ ui = new(user, src, ui_key, "nanite_chamber_control", name, ui_x, ui_y, master_ui, state)
ui.open()
/obj/machinery/computer/nanite_chamber_control/ui_data()
var/list/data = list()
- if(disk)
- data["has_disk"] = TRUE
- var/list/disk_data = list()
- var/datum/nanite_program/P = disk.program
- if(P)
- data["has_program"] = TRUE
- disk_data["name"] = P.name
- disk_data["desc"] = P.desc
-
- disk_data["activated"] = P.activated
- disk_data["activation_delay"] = P.activation_delay
- disk_data["timer"] = P.timer
- disk_data["activation_code"] = P.activation_code
- disk_data["deactivation_code"] = P.deactivation_code
- disk_data["kill_code"] = P.kill_code
- disk_data["trigger_code"] = P.trigger_code
- disk_data["timer_type"] = P.get_timer_type_text()
-
- var/list/extra_settings = list()
- for(var/X in P.extra_settings)
- var/list/setting = list()
- setting["name"] = X
- setting["value"] = P.get_extra_setting(X)
- extra_settings += list(setting)
- disk_data["extra_settings"] = extra_settings
- if(LAZYLEN(extra_settings))
- disk_data["has_extra_settings"] = TRUE
- data["disk"] = disk_data
if(!chamber)
data["status_msg"] = "No chamber detected."
@@ -97,6 +52,7 @@
data["status_msg"] = chamber.busy_message
return data
+ data["status_msg"] = null
data["scan_level"] = chamber.scan_level
data["locked"] = chamber.locked
data["occupant_name"] = chamber.occupant.name
@@ -113,46 +69,32 @@
chamber.locked = !chamber.locked
chamber.update_icon()
. = TRUE
- if("eject")
- eject(usr)
- . = TRUE
if("set_safety")
- var/threshold = input("Set safety threshold (0-500):", name, null) as null|num
+ var/threshold = text2num(params["value"])
if(!isnull(threshold))
chamber.set_safety(CLAMP(round(threshold, 1),0,500))
- playsound(src, "terminal_type", 25, 0)
- investigate_log("[key_name(chamber.occupant)]'s nanites' safety threshold was set to [threshold] by [key_name(usr)].", INVESTIGATE_NANITES)
+ playsound(src, "terminal_type", 25, FALSE)
+ chamber.occupant.investigate_log("'s nanites' safety threshold was set to [threshold] by [key_name(usr)] via [src] at [AREACOORD(src)].", INVESTIGATE_NANITES)
. = TRUE
if("set_cloud")
- var/cloud_id = input("Set cloud ID (1-100, 0 to disable):", name, null) as null|num
+ var/cloud_id = text2num(params["value"])
if(!isnull(cloud_id))
chamber.set_cloud(CLAMP(round(cloud_id, 1),0,100))
- playsound(src, "terminal_type", 25, 0)
- investigate_log("[key_name(chamber.occupant)]'s nanites' cloud id was set to [cloud_id] by [key_name(usr)].", INVESTIGATE_NANITES)
+ playsound(src, "terminal_type", 25, FALSE)
+ chamber.occupant.investigate_log("'s nanites' cloud id was set to [cloud_id] by [key_name(usr)] via [src] at [AREACOORD(src)].", INVESTIGATE_NANITES)
. = TRUE
if("connect_chamber")
find_chamber()
. = TRUE
+ if("remove_nanites")
+ playsound(src, 'sound/machines/terminal_prompt.ogg', 25, FALSE)
+ chamber.remove_nanites()
+ log_combat(usr, chamber.occupant, "cleared nanites from", null, "via [src]")
+ chamber.occupant.investigate_log("'s nanites were cleared by [key_name(usr)] via [src] at [AREACOORD(src)].", INVESTIGATE_NANITES)
+ . = TRUE
if("nanite_injection")
- playsound(src, 'sound/machines/terminal_prompt.ogg', 25, 0)
+ playsound(src, 'sound/machines/terminal_prompt.ogg', 25, FALSE)
chamber.inject_nanites()
- investigate_log("[key_name(chamber.occupant)] was injected with nanites by [key_name(usr)] using a nanite chamber.", INVESTIGATE_NANITES)
+ log_combat(usr, chamber.occupant, "injected", null, "with nanites via [src]")
+ chamber.occupant.investigate_log("was injected with nanites by [key_name(usr)] via [src] at [AREACOORD(src)].", INVESTIGATE_NANITES)
. = TRUE
- if("add_program")
- if(!disk || !chamber || !chamber.occupant)
- return
- playsound(src, 'sound/machines/terminal_prompt.ogg', 25, 0)
- chamber.install_program(disk.program)
- investigate_log("Program of type [disk.program.type] was installed into [key_name(chamber.occupant)]'s nanites with a nanite chamber by [key_name(usr)].", INVESTIGATE_NANITES)
- . = TRUE
- if("remove_program")
- if(!chamber || !chamber.occupant)
- return
- playsound(src, 'sound/machines/terminal_prompt.ogg', 25, 0)
- var/list/nanite_programs = list()
- SEND_SIGNAL(chamber.occupant, COMSIG_NANITE_GET_PROGRAMS, nanite_programs)
- if(LAZYLEN(nanite_programs))
- var/datum/nanite_program/P = nanite_programs[text2num(params["program_id"])]
- chamber.uninstall_program(P)
- investigate_log("Program of type [P.type] was uninstalled from [key_name(chamber.occupant)]'s nanites with a nanite chamber by [key_name(usr)].", INVESTIGATE_NANITES)
- . = TRUE
\ No newline at end of file
diff --git a/code/modules/research/nanites/nanite_cloud_controller.dm b/code/modules/research/nanites/nanite_cloud_controller.dm
index 081b1a7a4c..0731d3067c 100644
--- a/code/modules/research/nanites/nanite_cloud_controller.dm
+++ b/code/modules/research/nanites/nanite_cloud_controller.dm
@@ -4,9 +4,13 @@
circuit = /obj/item/circuitboard/computer/nanite_cloud_controller
icon = 'icons/obj/machines/research.dmi'
icon_state = "nanite_cloud_controller"
+ ui_x = 375
+ ui_y = 700
+
var/obj/item/disk/nanite_program/disk
var/list/datum/nanite_cloud_backup/cloud_backups = list()
var/current_view = 0 //0 is the main menu, any other number is the page of the backup with that ID
+ var/new_backup_id = 1
/obj/machinery/computer/nanite_cloud_controller/Destroy()
QDEL_LIST(cloud_backups) //rip backups
@@ -19,8 +23,8 @@
if(disk)
eject(user)
if(user.transferItemToLoc(N, src))
- to_chat(user, "
You insert [N] into [src]")
- playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
+ to_chat(user, "
You insert [N] into [src].")
+ playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
disk = N
else
..()
@@ -50,13 +54,14 @@
investigate_log("[key_name(user)] created a new nanite cloud backup with id #[cloud_id]", INVESTIGATE_NANITES)
/obj/machinery/computer/nanite_cloud_controller/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
- SStgui.try_update_ui(user, src, ui_key, ui, force_open)
+ ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
- ui = new(user, src, ui_key, "nanite_cloud_control", name, 600, 800, master_ui, state)
+ ui = new(user, src, ui_key, "nanite_cloud_control", name, ui_x, ui_y, master_ui, state)
ui.open()
/obj/machinery/computer/nanite_cloud_controller/ui_data()
var/list/data = list()
+
if(disk)
data["has_disk"] = TRUE
var/list/disk_data = list()
@@ -71,24 +76,28 @@
disk_data["trigger_cooldown"] = P.trigger_cooldown / 10
disk_data["activated"] = P.activated
- disk_data["activation_delay"] = P.activation_delay
- disk_data["timer"] = P.timer
disk_data["activation_code"] = P.activation_code
disk_data["deactivation_code"] = P.deactivation_code
disk_data["kill_code"] = P.kill_code
disk_data["trigger_code"] = P.trigger_code
- disk_data["timer_type"] = P.get_timer_type_text()
+ disk_data["timer_restart"] = P.timer_restart / 10
+ disk_data["timer_shutdown"] = P.timer_shutdown / 10
+ disk_data["timer_trigger"] = P.timer_trigger / 10
+ disk_data["timer_trigger_delay"] = P.timer_trigger_delay / 10
- var/list/extra_settings = list()
- for(var/X in P.extra_settings)
- var/list/setting = list()
- setting["name"] = X
- setting["value"] = P.get_extra_setting(X)
- extra_settings += list(setting)
+ var/list/extra_settings = P.get_extra_settings_frontend()
disk_data["extra_settings"] = extra_settings
if(LAZYLEN(extra_settings))
disk_data["has_extra_settings"] = TRUE
+ if(istype(P, /datum/nanite_program/sensor))
+ var/datum/nanite_program/sensor/sensor = P
+ if(sensor.can_rule)
+ disk_data["can_rule"] = TRUE
data["disk"] = disk_data
+ else
+ data["has_disk"] = FALSE
+
+ data["new_backup_id"] = new_backup_id
data["current_view"] = current_view
if(current_view)
@@ -108,19 +117,30 @@
cloud_program["trigger_cost"] = P.trigger_cost
cloud_program["trigger_cooldown"] = P.trigger_cooldown / 10
cloud_program["activated"] = P.activated
- cloud_program["activation_delay"] = P.activation_delay
- cloud_program["timer"] = P.timer
- cloud_program["timer_type"] = P.get_timer_type_text()
+ cloud_program["timer_restart"] = P.timer_restart / 10
+ cloud_program["timer_shutdown"] = P.timer_shutdown / 10
+ cloud_program["timer_trigger"] = P.timer_trigger / 10
+ cloud_program["timer_trigger_delay"] = P.timer_trigger_delay / 10
+
cloud_program["activation_code"] = P.activation_code
cloud_program["deactivation_code"] = P.deactivation_code
cloud_program["kill_code"] = P.kill_code
cloud_program["trigger_code"] = P.trigger_code
- var/list/extra_settings = list()
- for(var/X in P.extra_settings)
- var/list/setting = list()
- setting["name"] = X
- setting["value"] = P.get_extra_setting(X)
- extra_settings += list(setting)
+ var/list/rules = list()
+ var/rule_id = 1
+ for(var/X in P.rules)
+ var/datum/nanite_rule/nanite_rule = X
+ var/list/rule = list()
+ rule["display"] = nanite_rule.display()
+ rule["program_id"] = id
+ rule["id"] = rule_id
+ rules += list(rule)
+ rule_id++
+ cloud_program["rules"] = rules
+ if(LAZYLEN(rules))
+ cloud_program["has_rules"] = TRUE
+
+ var/list/extra_settings = P.get_extra_settings_frontend()
cloud_program["extra_settings"] = extra_settings
if(LAZYLEN(extra_settings))
cloud_program["has_extra_settings"] = TRUE
@@ -147,17 +167,20 @@
if("set_view")
current_view = text2num(params["view"])
. = TRUE
+ if("update_new_backup_value")
+ var/backup_value = text2num(params["value"])
+ new_backup_id = backup_value
if("create_backup")
- var/cloud_id = input("Choose a cloud ID (1-100):", name, null) as null|num
+ var/cloud_id = new_backup_id
if(!isnull(cloud_id))
- playsound(src, 'sound/machines/terminal_prompt.ogg', 50, 0)
+ playsound(src, 'sound/machines/terminal_prompt.ogg', 50, FALSE)
cloud_id = CLAMP(round(cloud_id, 1),1,100)
generate_backup(cloud_id, usr)
. = TRUE
if("delete_backup")
var/datum/nanite_cloud_backup/backup = get_backup(current_view)
if(backup)
- playsound(src, 'sound/machines/terminal_prompt.ogg', 50, 0)
+ playsound(src, 'sound/machines/terminal_prompt.ogg', 50, FALSE)
qdel(backup)
investigate_log("[key_name(usr)] deleted the nanite cloud backup #[current_view]", INVESTIGATE_NANITES)
. = TRUE
@@ -165,7 +188,7 @@
if(disk && disk.program)
var/datum/nanite_cloud_backup/backup = get_backup(current_view)
if(backup)
- playsound(src, 'sound/machines/terminal_prompt.ogg', 50, 0)
+ playsound(src, 'sound/machines/terminal_prompt.ogg', 50, FALSE)
var/datum/component/nanites/nanites = backup.nanites
nanites.add_program(null, disk.program.copy())
investigate_log("[key_name(usr)] uploaded program [disk.program.name] to cloud #[current_view]", INVESTIGATE_NANITES)
@@ -173,12 +196,37 @@
if("remove_program")
var/datum/nanite_cloud_backup/backup = get_backup(current_view)
if(backup)
- playsound(src, 'sound/machines/terminal_prompt.ogg', 50, 0)
+ playsound(src, 'sound/machines/terminal_prompt.ogg', 50, FALSE)
var/datum/component/nanites/nanites = backup.nanites
var/datum/nanite_program/P = nanites.programs[text2num(params["program_id"])]
investigate_log("[key_name(usr)] deleted program [P.name] from cloud #[current_view]", INVESTIGATE_NANITES)
qdel(P)
. = TRUE
+ if("add_rule")
+ if(disk && disk.program && istype(disk.program, /datum/nanite_program/sensor))
+ var/datum/nanite_program/sensor/rule_template = disk.program
+ if(!rule_template.can_rule)
+ return
+ var/datum/nanite_cloud_backup/backup = get_backup(current_view)
+ if(backup)
+ playsound(src, 'sound/machines/terminal_prompt.ogg', 50, 0)
+ var/datum/component/nanites/nanites = backup.nanites
+ var/datum/nanite_program/P = nanites.programs[text2num(params["program_id"])]
+ var/datum/nanite_rule/rule = rule_template.make_rule(P)
+
+ investigate_log("[key_name(usr)] added rule [rule.display()] to program [P.name] in cloud #[current_view]", INVESTIGATE_NANITES)
+ . = TRUE
+ if("remove_rule")
+ var/datum/nanite_cloud_backup/backup = get_backup(current_view)
+ if(backup)
+ playsound(src, 'sound/machines/terminal_prompt.ogg', 50, 0)
+ var/datum/component/nanites/nanites = backup.nanites
+ var/datum/nanite_program/P = nanites.programs[text2num(params["program_id"])]
+ var/datum/nanite_rule/rule = P.rules[text2num(params["rule_id"])]
+ rule.remove()
+
+ investigate_log("[key_name(usr)] removed rule [rule.display()] from program [P.name] in cloud #[current_view]", INVESTIGATE_NANITES)
+ . = TRUE
/datum/nanite_cloud_backup
var/cloud_id = 0
@@ -193,4 +241,4 @@
/datum/nanite_cloud_backup/Destroy()
storage.cloud_backups -= src
SSnanites.cloud_backups -= src
- return ..()
\ No newline at end of file
+ return ..()
diff --git a/code/modules/research/nanites/nanite_hijacker.dm b/code/modules/research/nanites/nanite_hijacker.dm
deleted file mode 100644
index 920c42b411..0000000000
--- a/code/modules/research/nanites/nanite_hijacker.dm
+++ /dev/null
@@ -1,157 +0,0 @@
-/obj/item/nanite_hijacker
- name = "nanite remote control" //fake name
- desc = "A device that can load nanite programming disks, edit them at will, and imprint them to nanites remotely."
- w_class = WEIGHT_CLASS_SMALL
- icon = 'icons/obj/device.dmi'
- icon_state = "nanite_remote"
- item_flags = NOBLUDGEON
- var/obj/item/disk/nanite_program/disk
- var/datum/nanite_program/program
-
-/obj/item/nanite_hijacker/AltClick(mob/user)
- . = ..()
- if(!user.canUseTopic(src, BE_CLOSE))
- return
- if(disk)
- eject()
- return TRUE
-
-/obj/item/nanite_hijacker/examine(mob/user)
- . = ..()
- if(disk)
- . += "
Alt-click [src] to eject the disk."
-
-/obj/item/nanite_hijacker/attackby(obj/item/I, mob/user)
- if(istype(I, /obj/item/disk/nanite_program))
- var/obj/item/disk/nanite_program/N = I
- if(disk)
- eject()
- if(user.transferItemToLoc(N, src))
- to_chat(user, "
You insert [N] into [src]")
- disk = N
- program = N.program
- else
- ..()
-
-/obj/item/nanite_hijacker/proc/eject(mob/living/user)
- if(!disk)
- return
- if(!istype(user) || !Adjacent(user) || !user.put_in_hand(disk))
- disk.forceMove(drop_location())
- disk = null
- program = null
-
-/obj/item/nanite_hijacker/afterattack(atom/target, mob/user, etc)
- if(!disk || !disk.program)
- return
- if(isliving(target))
- var/success = SEND_SIGNAL(target, COMSIG_NANITE_ADD_PROGRAM, program.copy())
- switch(success)
- if(NONE)
- to_chat(user, "
You don't detect any nanites in [target].")
- if(COMPONENT_PROGRAM_INSTALLED)
- to_chat(user, "
You insert the currently loaded program into [target]'s nanites.")
- if(COMPONENT_PROGRAM_NOT_INSTALLED)
- to_chat(user, "
You try to insert the currently loaded program into [target]'s nanites, but the installation fails.")
-
-//Same UI as the nanite programmer, as it pretty much does the same
-/obj/item/nanite_hijacker/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.hands_state)
- SStgui.try_update_ui(user, src, ui_key, ui, force_open)
- if(!ui)
- ui = new(user, src, ui_key, "nanite_programmer", "Internal Nanite Programmer", 420, 800, master_ui, state)
- ui.open()
-
-/obj/item/nanite_hijacker/ui_data()
- var/list/data = list()
- data["has_disk"] = istype(disk)
- data["has_program"] = istype(program)
- if(program)
- data["name"] = program.name
- data["desc"] = program.desc
- data["use_rate"] = program.use_rate
- data["can_trigger"] = program.can_trigger
- data["trigger_cost"] = program.trigger_cost
- data["trigger_cooldown"] = program.trigger_cooldown / 10
-
- data["activated"] = program.activated
- data["activation_delay"] = program.activation_delay
- data["timer"] = program.timer
- data["activation_code"] = program.activation_code
- data["deactivation_code"] = program.deactivation_code
- data["kill_code"] = program.kill_code
- data["trigger_code"] = program.trigger_code
- data["timer_type"] = program.get_timer_type_text()
-
- var/list/extra_settings = list()
- for(var/X in program.extra_settings)
- var/list/setting = list()
- setting["name"] = X
- setting["value"] = program.get_extra_setting(X)
- extra_settings += list(setting)
- data["extra_settings"] = extra_settings
- if(LAZYLEN(extra_settings))
- data["has_extra_settings"] = TRUE
-
- return data
-
-/obj/item/nanite_hijacker/ui_act(action, params)
- if(..())
- return
- switch(action)
- if("eject")
- eject(usr)
- . = TRUE
- if("toggle_active")
- program.activated = !program.activated //we don't use the activation procs since we aren't in a mob
- if(program.activated)
- program.activation_delay = 0
- . = TRUE
- if("set_code")
- var/new_code = input("Set code (0000-9999):", name, null) as null|num
- if(!isnull(new_code))
- new_code = CLAMP(round(new_code, 1),0,9999)
- else
- return
-
- var/target_code = params["target_code"]
- switch(target_code)
- if("activation")
- program.activation_code = CLAMP(round(new_code, 1),0,9999)
- if("deactivation")
- program.deactivation_code = CLAMP(round(new_code, 1),0,9999)
- if("kill")
- program.kill_code = CLAMP(round(new_code, 1),0,9999)
- if("trigger")
- program.trigger_code = CLAMP(round(new_code, 1),0,9999)
- . = TRUE
- if("set_extra_setting")
- program.set_extra_setting(usr, params["target_setting"])
- . = TRUE
- if("set_activation_delay")
- var/delay = input("Set activation delay in seconds (0-1800):", name, program.activation_delay) as null|num
- if(!isnull(delay))
- delay = CLAMP(round(delay, 1),0,1800)
- program.activation_delay = delay
- if(delay)
- program.activated = FALSE
- . = TRUE
- if("set_timer")
- var/timer = input("Set timer in seconds (10-3600):", name, program.timer) as null|num
- if(!isnull(timer))
- if(!timer == 0)
- timer = CLAMP(round(timer, 1),10,3600)
- program.timer = timer
- . = TRUE
- if("set_timer_type")
- var/new_type = input("Choose the timer effect","Timer Effect") as null|anything in list("Deactivate","Self-Delete","Trigger","Reset Activation Timer")
- if(new_type)
- switch(new_type)
- if("Deactivate")
- program.timer_type = NANITE_TIMER_DEACTIVATE
- if("Self-Delete")
- program.timer_type = NANITE_TIMER_SELFDELETE
- if("Trigger")
- program.timer_type = NANITE_TIMER_TRIGGER
- if("Reset Activation Timer")
- program.timer_type = NANITE_TIMER_RESET
- . = TRUE
\ No newline at end of file
diff --git a/code/modules/research/nanites/nanite_misc_items.dm b/code/modules/research/nanites/nanite_misc_items.dm
index cbcdfb0f9f..6837543d11 100644
--- a/code/modules/research/nanites/nanite_misc_items.dm
+++ b/code/modules/research/nanites/nanite_misc_items.dm
@@ -6,4 +6,4 @@
icon_state = "nanite_remote"
/obj/item/nanite_injector/attack_self(mob/user)
- user.AddComponent(/datum/component/nanites, 150)
\ No newline at end of file
+ user.AddComponent(/datum/component/nanites, 150)
diff --git a/code/modules/research/nanites/nanite_program_hub.dm b/code/modules/research/nanites/nanite_program_hub.dm
index d6e0bbdabb..ea4392f236 100644
--- a/code/modules/research/nanites/nanite_program_hub.dm
+++ b/code/modules/research/nanites/nanite_program_hub.dm
@@ -7,18 +7,21 @@
use_power = IDLE_POWER_USE
anchored = TRUE
density = TRUE
+ ui_x = 500
+ ui_y = 700
var/obj/item/disk/nanite_program/disk
var/datum/techweb/linked_techweb
var/current_category = "Main"
- var/detail_view = FALSE
+ var/detail_view = TRUE
var/categories = list(
list(name = "Utility Nanites"),
list(name = "Medical Nanites"),
list(name = "Sensor Nanites"),
list(name = "Augmentation Nanites"),
list(name = "Suppression Nanites"),
- list(name = "Weaponized Nanites")
+ list(name = "Weaponized Nanites"),
+ //list(name = "Protocols") B.E.P.I.S Content, which we dont have
)
/obj/machinery/nanite_program_hub/Initialize()
@@ -31,8 +34,8 @@
if(disk)
eject(user)
if(user.transferItemToLoc(N, src))
- to_chat(user, "
You insert [N] into [src]")
- playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
+ to_chat(user, "
You insert [N] into [src].")
+ playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
disk = N
else
..()
@@ -45,10 +48,9 @@
disk = null
/obj/machinery/nanite_program_hub/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
- SStgui.try_update_ui(user, src, ui_key, ui, force_open)
+ ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
- ui = new(user, src, ui_key, "nanite_program_hub", name, 500, 700, master_ui, state)
- ui.set_autoupdate(FALSE) //to avoid making the whole program list every second
+ ui = new(user, src, ui_key, "nanite_program_hub", name, ui_x, ui_y, master_ui, state)
ui.open()
/obj/machinery/nanite_program_hub/ui_data()
@@ -62,25 +64,31 @@
disk_data["name"] = P.name
disk_data["desc"] = P.desc
data["disk"] = disk_data
+ else
+ data["has_disk"] = FALSE
data["detail_view"] = detail_view
- data["category"] = current_category
- 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)
- if(!istype(D))
- continue
- if(current_category in D.category)
- var/list/program_design = list()
- program_design["id"] = D.id
- program_design["name"] = D.name
- program_design["desc"] = D.desc
- program_list += list(program_design)
- data["program_list"] = program_list
- else
- data["categories"] = categories
+ return data
+
+/obj/machinery/nanite_program_hub/ui_static_data(mob/user)
+ var/list/data = list()
+ data["programs"] = list()
+ for(var/i in linked_techweb.researched_designs)
+ var/datum/design/nanites/D = SSresearch.techweb_design_by_id(i)
+ if(!istype(D))
+ continue
+ var/cat_name = D.category[1] //just put them in the first category fuck it
+ if(isnull(data["programs"][cat_name]))
+ data["programs"][cat_name] = list()
+ var/list/program_design = list()
+ program_design["id"] = D.id
+ program_design["name"] = D.name
+ program_design["desc"] = D.desc
+ data["programs"][cat_name] += list(program_design)
+
+ if(!length(data["programs"]))
+ data["programs"] = null
return data
@@ -101,11 +109,10 @@
qdel(disk.program)
disk.program = new downloaded.program_type
disk.name = "[initial(disk.name)] \[[disk.program.name]\]"
- playsound(src, 'sound/machines/terminal_prompt.ogg', 25, 0)
+ playsound(src, 'sound/machines/terminal_prompt.ogg', 25, FALSE)
. = TRUE
- if("set_category")
- var/new_category = params["category"]
- current_category = new_category
+ if("refresh")
+ update_static_data(usr)
. = TRUE
if("toggle_details")
detail_view = !detail_view
diff --git a/code/modules/research/nanites/nanite_programmer.dm b/code/modules/research/nanites/nanite_programmer.dm
index fd22fbf4b1..d81880c6d9 100644
--- a/code/modules/research/nanites/nanite_programmer.dm
+++ b/code/modules/research/nanites/nanite_programmer.dm
@@ -9,6 +9,9 @@
use_power = IDLE_POWER_USE
anchored = TRUE
density = TRUE
+ flags_1 = HEAR_1
+ ui_x = 420
+ ui_y = 550
/obj/machinery/nanite_programmer/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/disk/nanite_program))
@@ -17,7 +20,7 @@
eject(user)
if(user.transferItemToLoc(N, src))
to_chat(user, "
You insert [N] into [src]")
- playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
+ playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
disk = N
program = N.program
else
@@ -32,9 +35,9 @@
program = null
/obj/machinery/nanite_programmer/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
- SStgui.try_update_ui(user, src, ui_key, ui, force_open)
+ ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
- ui = new(user, src, ui_key, "nanite_programmer", name, 600, 800, master_ui, state)
+ ui = new(user, src, ui_key, "nanite_programmer", name, ui_x, ui_y, master_ui, state)
ui.open()
/obj/machinery/nanite_programmer/ui_data()
@@ -50,20 +53,16 @@
data["trigger_cooldown"] = program.trigger_cooldown / 10
data["activated"] = program.activated
- data["activation_delay"] = program.activation_delay
- data["timer"] = program.timer
data["activation_code"] = program.activation_code
data["deactivation_code"] = program.deactivation_code
data["kill_code"] = program.kill_code
data["trigger_code"] = program.trigger_code
- data["timer_type"] = program.get_timer_type_text()
+ data["timer_restart"] = program.timer_restart / 10
+ data["timer_shutdown"] = program.timer_shutdown / 10
+ data["timer_trigger"] = program.timer_trigger / 10
+ data["timer_trigger_delay"] = program.timer_trigger_delay / 10
- var/list/extra_settings = list()
- for(var/X in program.extra_settings)
- var/list/setting = list()
- setting["name"] = X
- setting["value"] = program.get_extra_setting(X)
- extra_settings += list(setting)
+ var/list/extra_settings = program.get_extra_settings_frontend()
data["extra_settings"] = extra_settings
if(LAZYLEN(extra_settings))
data["has_extra_settings"] = TRUE
@@ -78,20 +77,12 @@
eject(usr)
. = TRUE
if("toggle_active")
- playsound(src, "terminal_type", 25, 0)
+ playsound(src, "terminal_type", 25, FALSE)
program.activated = !program.activated //we don't use the activation procs since we aren't in a mob
- if(program.activated)
- program.activation_delay = 0
. = TRUE
if("set_code")
- var/new_code = input("Set code (0000-9999):", name, null) as null|num
- if(!isnull(new_code))
- playsound(src, "terminal_type", 25, 0)
- new_code = CLAMP(round(new_code, 1),0,9999)
- else
- return
-
- playsound(src, "terminal_type", 25, 0)
+ var/new_code = text2num(params["code"])
+ playsound(src, "terminal_type", 25, FALSE)
var/target_code = params["target_code"]
switch(target_code)
if("activation")
@@ -104,37 +95,44 @@
program.trigger_code = CLAMP(round(new_code, 1),0,9999)
. = TRUE
if("set_extra_setting")
- program.set_extra_setting(usr, params["target_setting"])
- playsound(src, "terminal_type", 25, 0)
+ program.set_extra_setting(params["target_setting"], params["value"])
+ playsound(src, "terminal_type", 25, FALSE)
. = TRUE
- if("set_activation_delay")
- var/delay = input("Set activation delay in seconds (0-1800):", name, program.activation_delay) as null|num
- if(!isnull(delay))
- playsound(src, "terminal_type", 25, 0)
- delay = CLAMP(round(delay, 1),0,1800)
- program.activation_delay = delay
- if(delay)
- program.activated = FALSE
- . = TRUE
- if("set_timer")
- var/timer = input("Set timer in seconds (10-3600):", name, program.timer) as null|num
+ if("set_restart_timer")
+ var/timer = text2num(params["delay"])
if(!isnull(timer))
- playsound(src, "terminal_type", 25, 0)
- if(!timer == 0)
- timer = CLAMP(round(timer, 1),10,3600)
- program.timer = timer
+ playsound(src, "terminal_type", 25, FALSE)
+ timer = CLAMP(round(timer, 1), 0, 3600)
+ timer *= 10 //convert to deciseconds
+ program.timer_restart = timer
. = TRUE
- if("set_timer_type")
- var/new_type = input("Choose the timer effect","Timer Effect") as null|anything in list("Deactivate","Self-Delete","Trigger","Reset Activation Timer")
- if(new_type)
- playsound(src, "terminal_type", 25, 0)
- switch(new_type)
- if("Deactivate")
- program.timer_type = NANITE_TIMER_DEACTIVATE
- if("Self-Delete")
- program.timer_type = NANITE_TIMER_SELFDELETE
- if("Trigger")
- program.timer_type = NANITE_TIMER_TRIGGER
- if("Reset Activation Timer")
- program.timer_type = NANITE_TIMER_RESET
- . = TRUE
\ No newline at end of file
+ if("set_shutdown_timer")
+ var/timer = text2num(params["delay"])
+ if(!isnull(timer))
+ playsound(src, "terminal_type", 25, FALSE)
+ timer = CLAMP(round(timer, 1), 0, 3600)
+ timer *= 10 //convert to deciseconds
+ program.timer_shutdown = timer
+ . = TRUE
+ if("set_trigger_timer")
+ var/timer = text2num(params["delay"])
+ if(!isnull(timer))
+ playsound(src, "terminal_type", 25, FALSE)
+ timer = CLAMP(round(timer, 1), 0, 3600)
+ timer *= 10 //convert to deciseconds
+ program.timer_trigger = timer
+ . = TRUE
+ if("set_timer_trigger_delay")
+ var/timer = text2num(params["delay"])
+ if(!isnull(timer))
+ playsound(src, "terminal_type", 25, FALSE)
+ timer = CLAMP(round(timer, 1), 0, 3600)
+ timer *= 10 //convert to deciseconds
+ program.timer_trigger_delay = timer
+ . = TRUE
+
+/obj/machinery/nanite_programmer/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode, atom/movable/source)
+ . = ..()
+ var/static/regex/when = regex("(?:^\\W*when|when\\W*$)", "i") //starts or ends with when
+ if(findtext(raw_message, when) && !istype(speaker, /obj/machinery/nanite_programmer))
+ say("When you code it!!")
diff --git a/code/modules/research/nanites/nanite_programs.dm b/code/modules/research/nanites/nanite_programs.dm
index 0d27d7ba0d..72f969a77e 100644
--- a/code/modules/research/nanites/nanite_programs.dm
+++ b/code/modules/research/nanites/nanite_programs.dm
@@ -11,7 +11,7 @@
var/trigger_cost = 0 //Amount of nanites required to trigger
var/trigger_cooldown = 50 //Deciseconds required between each trigger activation
var/next_trigger = 0 //World time required for the next trigger activation
- var/timer_counter = 0 //Counts up while active. Used for the timer and the activation delay.
+
var/program_flags = NONE
var/passive_enabled = FALSE //If the nanites have an on/off-style effect, it's tracked by this var
@@ -28,9 +28,17 @@
//The following vars are customizable
var/activated = TRUE //If FALSE, the program won't process, disables passive effects, can't trigger and doesn't consume nanites
- var/activation_delay = 0 //Seconds before the program self-activates.
- var/timer = 0 //Seconds before the timer effect activates. Starts counting AFTER the activation delay
- var/timer_type = NANITE_TIMER_DEACTIVATE //What happens when the timer runs out
+
+ var/timer_restart = 0 //When deactivated, the program will wait X deciseconds before self-reactivating. Also works if the program begins deactivated.
+ var/timer_shutdown = 0 //When activated, the program will wait X deciseconds before self-deactivating. Also works if the program begins activated.
+ var/timer_trigger = 0 //[Trigger only] While active, the program will attempt to trigger once every x deciseconds.
+ var/timer_trigger_delay = 0 //[Trigger only] While active, the program will delay trigger signals by X deciseconds.
+
+ //Indicates the next world.time tick where these timers will act
+ var/timer_restart_next = 0
+ var/timer_shutdown_next = 0
+ var/timer_trigger_next = 0
+ var/timer_trigger_delay_next = 0
//Signal codes, these handle remote input to the nanites. If set to 0 they'll ignore signals.
var/activation_code = 0 //Code that activates the program [1-9999]
@@ -39,19 +47,19 @@
var/trigger_code = 0 //Code that triggers the program (if available) [1-9999]
//Extra settings
- //Must be listed in text form, with the same title they'll be displayed in the programmer UI
- //Changing these values is handled by set_extra_setting()
- //Viewing these values is handled by get_extra_setting()
- //Copying these values is handled by copy_extra_settings_to()
+ ///Don't ever override this or I will come to your house and stand menacingly behind a bush
var/list/extra_settings = list()
-/datum/nanite_program/triggered
- use_rate = 0
- trigger_cost = 5
- trigger_cooldown = 50
- can_trigger = TRUE
+ //Rules
+ //Rules that automatically manage if the program's active without requiring separate sensor programs
+ var/list/datum/nanite_rule/rules = list()
+
+/datum/nanite_program/New()
+ . = ..()
+ register_extra_settings()
/datum/nanite_program/Destroy()
+ extra_settings = null
if(host_mob)
if(activated)
deactivate()
@@ -64,39 +72,60 @@
/datum/nanite_program/proc/copy()
var/datum/nanite_program/new_program = new type()
-
- new_program.activated = activated
- new_program.activation_delay = activation_delay
- new_program.timer = timer
- new_program.timer_type = timer_type
- new_program.activation_code = activation_code
- new_program.deactivation_code = deactivation_code
- new_program.kill_code = kill_code
- new_program.trigger_code = trigger_code
- copy_extra_settings_to(new_program)
+ copy_programming(new_program, TRUE)
return new_program
/datum/nanite_program/proc/copy_programming(datum/nanite_program/target, copy_activated = TRUE)
if(copy_activated)
target.activated = activated
- target.activation_delay = activation_delay
- target.timer = timer
- target.timer_type = timer_type
+ target.timer_restart = timer_restart
+ target.timer_shutdown = timer_shutdown
+ target.timer_trigger = timer_trigger
+ target.timer_trigger_delay = timer_trigger_delay
target.activation_code = activation_code
target.deactivation_code = deactivation_code
target.kill_code = kill_code
target.trigger_code = trigger_code
- copy_extra_settings_to(target)
-/datum/nanite_program/proc/set_extra_setting(user, setting)
+ target.rules = list()
+ for(var/R in rules)
+ var/datum/nanite_rule/rule = R
+ rule.copy_to(target)
+
+ if(istype(target,src))
+ copy_extra_settings_to(target)
+
+///Register extra settings by overriding this.
+///extra_settings[name] = new typepath() for each extra setting
+/datum/nanite_program/proc/register_extra_settings()
return
-/datum/nanite_program/proc/get_extra_setting(setting)
- return
+///You can override this if you need to have special behavior after setting certain settings.
+/datum/nanite_program/proc/set_extra_setting(setting, value)
+ var/datum/nanite_extra_setting/ES = extra_settings[setting]
+ return ES.set_value(value)
+///You probably shouldn't be overriding this one, but I'm not a cop.
+/datum/nanite_program/proc/get_extra_setting_value(setting)
+ var/datum/nanite_extra_setting/ES = extra_settings[setting]
+ return ES.get_value()
+
+///Used for getting information about the extra settings to the frontend
+/datum/nanite_program/proc/get_extra_settings_frontend()
+ var/list/out = list()
+ for(var/name in extra_settings)
+ var/datum/nanite_extra_setting/ES = extra_settings[name]
+ out += ES.get_frontend_list(name)
+ return out
+
+///Copy of the list instead of direct reference for obvious reasons
/datum/nanite_program/proc/copy_extra_settings_to(datum/nanite_program/target)
- return
+ var/list/copy_list = list()
+ for(var/ns_name in extra_settings)
+ var/datum/nanite_extra_setting/extra_setting = extra_settings[ns_name]
+ copy_list[ns_name] = extra_setting.get_copy()
+ target.extra_settings = copy_list
/datum/nanite_program/proc/on_add(datum/component/nanites/_nanites)
nanites = _nanites
@@ -105,10 +134,12 @@
/datum/nanite_program/proc/on_mob_add()
host_mob = nanites.host_mob
- if(activated) //apply activation effects if it starts active
+ if(activated) //apply activation effects depending on initial status; starts the restart and shutdown timers
activate()
+ else
+ deactivate()
-datum/nanite_program/proc/on_mob_remove()
+/datum/nanite_program/proc/on_mob_remove()
return
/datum/nanite_program/proc/toggle()
@@ -119,36 +150,35 @@ datum/nanite_program/proc/on_mob_remove()
/datum/nanite_program/proc/activate()
activated = TRUE
- timer_counter = activation_delay
+ if(timer_shutdown)
+ timer_shutdown_next = world.time + timer_shutdown
/datum/nanite_program/proc/deactivate()
if(passive_enabled)
disable_passive_effect()
activated = FALSE
+ if(timer_restart)
+ timer_restart_next = world.time + timer_restart
/datum/nanite_program/proc/on_process()
- timer_counter++
-
- if(activation_delay)
- if(activated && timer_counter < activation_delay)
- deactivate()
- else if(!activated && timer_counter >= activation_delay)
- activate()
if(!activated)
+ if(timer_restart_next && world.time > timer_restart_next)
+ activate()
+ timer_restart_next = 0
return
- if(timer && timer_counter > timer)
- if(timer_type == NANITE_TIMER_DEACTIVATE)
- deactivate()
- return
- else if(timer_type == NANITE_TIMER_SELFDELETE)
- qdel(src)
- return
- else if(can_trigger && timer_type == NANITE_TIMER_TRIGGER)
- trigger()
- timer_counter = activation_delay
- else if(timer_type == NANITE_TIMER_RESET)
- timer_counter = 0
+ if(timer_shutdown_next && world.time > timer_shutdown_next)
+ deactivate()
+ timer_shutdown_next = 0
+
+ if(timer_trigger && world.time > timer_trigger_next)
+ trigger()
+ timer_trigger_next = world.time + timer_trigger
+
+ if(timer_trigger_delay_next && world.time > timer_trigger_delay_next)
+ trigger(delayed = TRUE)
+ timer_trigger_delay_next = 0
+
if(check_conditions() && consume_nanites(use_rate))
if(!passive_enabled)
enable_passive_effect()
@@ -160,6 +190,10 @@ datum/nanite_program/proc/on_mob_remove()
//If false, disables active and passive effects, but doesn't consume nanites
//Can be used to avoid consuming nanites for nothing
/datum/nanite_program/proc/check_conditions()
+ for(var/R in rules)
+ var/datum/nanite_rule/rule = R
+ if(!rule.check_rule())
+ return FALSE
return TRUE
//Constantly procs as long as the program is active
@@ -174,15 +208,25 @@ datum/nanite_program/proc/on_mob_remove()
/datum/nanite_program/proc/disable_passive_effect()
passive_enabled = FALSE
-/datum/nanite_program/proc/trigger()
+//Checks conditions then fires the nanite trigger effect
+/datum/nanite_program/proc/trigger(delayed = FALSE, comm_message)
+ if(!can_trigger)
+ return
if(!activated)
- return FALSE
+ return
+ if(timer_trigger_delay && !delayed)
+ timer_trigger_delay_next = world.time + timer_trigger_delay
+ return
if(world.time < next_trigger)
- return FALSE
+ return
if(!consume_nanites(trigger_cost))
- return FALSE
+ return
next_trigger = world.time + trigger_cooldown
- return TRUE
+ on_trigger(comm_message)
+
+//Nanite trigger effect, requires can_trigger to be used
+/datum/nanite_program/proc/on_trigger(comm_message)
+ return
/datum/nanite_program/proc/consume_nanites(amount, force = FALSE)
return nanites.consume_nanites(amount, force)
@@ -234,24 +278,36 @@ datum/nanite_program/proc/on_mob_remove()
/datum/nanite_program/proc/receive_signal(code, source)
if(activation_code && code == activation_code && !activated)
activate()
- host_mob.investigate_log("[host_mob]'s [name] nanite program was activated by [source] with code [code].", INVESTIGATE_NANITES)
+ host_mob.investigate_log("'s [name] nanite program was activated by [source] with code [code].", INVESTIGATE_NANITES)
else if(deactivation_code && code == deactivation_code && activated)
deactivate()
- host_mob.investigate_log("[host_mob]'s [name] nanite program was deactivated by [source] with code [code].", INVESTIGATE_NANITES)
- if(kill_code && code == kill_code)
- host_mob.investigate_log("[host_mob]'s [name] nanite program was deleted by [source] with code [code].", INVESTIGATE_NANITES)
- qdel(src)
- else if(can_trigger && trigger_code && code == trigger_code)
+ host_mob.investigate_log("'s [name] nanite program was deactivated by [source] with code [code].", INVESTIGATE_NANITES)
+ if(can_trigger && trigger_code && code == trigger_code)
trigger()
- host_mob.investigate_log("[host_mob]'s [name] nanite program was triggered by [source] with code [code].", INVESTIGATE_NANITES)
+ host_mob.investigate_log("'s [name] nanite program was triggered by [source] with code [code].", INVESTIGATE_NANITES)
+ if(kill_code && code == kill_code)
+ host_mob.investigate_log("'s [name] nanite program was deleted by [source] with code [code].", INVESTIGATE_NANITES)
+ qdel(src)
+
+///A nanite program containing a behaviour protocol. Only one protocol of each class can be active at once.
+//Currently unused due to us lacking the B.E.P.I.S
+/datum/nanite_program/protocol
+ name = "Nanite Protocol"
+ var/protocol_class = NONE
+
+/datum/nanite_program/protocol/check_conditions()
+ . = ..()
+ for(var/protocol in nanites.protocols)
+ var/datum/nanite_program/protocol/P = protocol
+ if(P != src && P.activated && P.protocol_class == protocol_class)
+ return FALSE
+
+/datum/nanite_program/protocol/on_add(datum/component/nanites/_nanites)
+ ..()
+ nanites.protocols += src
+
+/datum/nanite_program/protocol/Destroy()
+ if(nanites)
+ nanites.protocols -= src
+ return ..()
-/datum/nanite_program/proc/get_timer_type_text()
- switch(timer_type)
- if(NANITE_TIMER_DEACTIVATE)
- return "Deactivate"
- if(NANITE_TIMER_SELFDELETE)
- return "Self-Delete"
- if(NANITE_TIMER_TRIGGER)
- return "Trigger"
- if(NANITE_TIMER_RESET)
- return "Reset Activation Timer"
diff --git a/code/modules/research/nanites/nanite_programs/buffing.dm b/code/modules/research/nanites/nanite_programs/buffing.dm
index dde61ec378..f52ae4843a 100644
--- a/code/modules/research/nanites/nanite_programs/buffing.dm
+++ b/code/modules/research/nanites/nanite_programs/buffing.dm
@@ -18,24 +18,16 @@
var/mob/living/carbon/human/H = host_mob
H.physiology.stun_mod *= 2
-/datum/nanite_program/triggered/adrenaline
+/datum/nanite_program/adrenaline
name = "Adrenaline Burst"
desc = "The nanites cause a burst of adrenaline when triggered, waking the host from stuns and temporarily increasing their speed."
+ can_trigger = TRUE
trigger_cost = 25
trigger_cooldown = 1200
rogue_types = list(/datum/nanite_program/toxic, /datum/nanite_program/nerve_decay)
-/datum/nanite_program/triggered/adrenaline/trigger()
- if(!..())
- return
- to_chat(host_mob, "
You feel a sudden surge of energy!")
- host_mob.SetStun(0)
- host_mob.SetKnockdown(0)
- host_mob.SetUnconscious(0)
- 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)
+/datum/nanite_program/adrenaline/on_trigger()
+ host_mob.do_adrenaline(-10, TRUE, TRUE, FALSE, TRUE, list(/datum/reagent/medicine/stimulants = 1.5), "
You feel a sudden surge of energy!", FALSE, FALSE, FALSE)
/datum/nanite_program/hardening
name = "Dermal Hardening"
@@ -120,7 +112,7 @@
/datum/nanite_program/mindshield/enable_passive_effect()
. = ..()
- if(!host_mob.mind.has_antag_datum(/datum/antagonist/rev)) //won't work if on a rev, to avoid having implanted revs
+ if(!host_mob.mind.has_antag_datum(/datum/antagonist/rev, TRUE)) //won't work if on a rev, to avoid having implanted revs.
ADD_TRAIT(host_mob, TRAIT_MINDSHIELD, "nanites")
host_mob.sec_hud_set_implants()
diff --git a/code/modules/research/nanites/nanite_programs/healing.dm b/code/modules/research/nanites/nanite_programs/healing.dm
index 6dd1b3ee82..70a1412b11 100644
--- a/code/modules/research/nanites/nanite_programs/healing.dm
+++ b/code/modules/research/nanites/nanite_programs/healing.dm
@@ -23,7 +23,7 @@
if(!parts.len)
return
for(var/obj/item/bodypart/L in parts)
- if(L.heal_damage(0.5/parts.len, 0.5/parts.len, null, BODYPART_ORGANIC))
+ if(L.heal_damage(0.5/parts.len, 0.5/parts.len))
host_mob.update_damage_overlays()
else
host_mob.adjustBruteLoss(-0.5, TRUE)
@@ -48,12 +48,12 @@
/datum/nanite_program/purging
name = "Blood Purification"
- desc = "The nanites purge toxins and chemicals from the host's bloodstream, however it is dangerous to slimepeople biology due to inaccuracy."
+ desc = "The nanites purge toxins and chemicals from the host's bloodstream, however it is dangerous to slime biology due to inaccuracy."
use_rate = 1
rogue_types = list(/datum/nanite_program/suffocating, /datum/nanite_program/necrotic)
/datum/nanite_program/purging/check_conditions()
- var/foreign_reagent = LAZYLEN(host_mob.reagents.reagent_list)
+ var/foreign_reagent = length(host_mob.reagents?.reagent_list)
if(!host_mob.getToxLoss() && !foreign_reagent)
return FALSE
return ..()
@@ -73,18 +73,17 @@
rogue_types = list(/datum/nanite_program/brain_decay)
/datum/nanite_program/brain_heal/check_conditions()
+ var/problems = FALSE
if(iscarbon(host_mob))
var/mob/living/carbon/C = host_mob
- for(var/X in C.get_traumas())
- var/datum/brain_trauma/BT = X
- if(BT.resilience <= TRAUMA_RESILIENCE_BASIC)
- return ..()
- if(host_mob.getOrganLoss(ORGAN_SLOT_BRAIN))
- return ..()
- return FALSE
+ if(length(C.get_traumas()))
+ problems = TRUE
+ if(host_mob.getOrganLoss(ORGAN_SLOT_BRAIN) > 0)
+ problems = TRUE
+ return problems ? ..() : FALSE
/datum/nanite_program/brain_heal/active_effect()
- host_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, -1, TRUE)
+ host_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, -1)
if(iscarbon(host_mob) && prob(10))
var/mob/living/carbon/C = host_mob
C.cure_trauma_type(resilience = TRAUMA_RESILIENCE_BASIC)
@@ -137,7 +136,7 @@
return
var/update = FALSE
for(var/obj/item/bodypart/L in parts)
- if(L.heal_damage(1.5/parts.len, 1.5/parts.len, null, BODYPART_ROBOTIC)) //much faster than organic healing
+ if(L.heal_damage(1.5/parts.len, 1.5/parts.len, null, TRUE, FALSE)) //much faster than organic healing
update = TRUE
if(update)
host_mob.update_damage_overlays()
@@ -148,7 +147,7 @@
/datum/nanite_program/purging_advanced
name = "Selective Blood Purification"
desc = "The nanites purge toxins and dangerous chemicals from the host's bloodstream, while ignoring beneficial chemicals. \
- The added processing power required to analyze the chemicals severely increases the nanite consumption rate. Due to added complexity, it is safe with slimepeople biology."
+ The added processing power required to analyze the chemicals severely increases the nanite consumption rate. This program is safe with slime biology due to the increased precision."
use_rate = 2
rogue_types = list(/datum/nanite_program/suffocating, /datum/nanite_program/necrotic)
@@ -181,7 +180,7 @@
return
var/update = FALSE
for(var/obj/item/bodypart/L in parts)
- if(L.heal_damage(3/parts.len, 3/parts.len))
+ if(L.heal_damage(3/parts.len, 3/parts.len, FALSE))
update = TRUE
if(update)
host_mob.update_damage_overlays()
@@ -196,70 +195,54 @@
rogue_types = list(/datum/nanite_program/brain_decay, /datum/nanite_program/brain_misfire)
/datum/nanite_program/brain_heal_advanced/check_conditions()
+ var/problems = FALSE
if(iscarbon(host_mob))
var/mob/living/carbon/C = host_mob
- for(var/X in C.get_traumas())
- var/datum/brain_trauma/BT = X
- if(BT.resilience <= TRAUMA_RESILIENCE_LOBOTOMY)
- return ..()
- if(host_mob.getOrganLoss(ORGAN_SLOT_BRAIN))
- return ..()
- return FALSE
+ if(length(C.get_traumas()))
+ problems = TRUE
+ if(host_mob.getOrganLoss(ORGAN_SLOT_BRAIN) > 0)
+ problems = TRUE
+ return problems ? ..() : FALSE
/datum/nanite_program/brain_heal_advanced/active_effect()
- host_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, -2, TRUE)
+ host_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, -2)
if(iscarbon(host_mob) && prob(10))
var/mob/living/carbon/C = host_mob
C.cure_trauma_type(resilience = TRAUMA_RESILIENCE_LOBOTOMY)
-/datum/nanite_program/triggered/defib
+/datum/nanite_program/defib
name = "Defibrillation"
desc = "The nanites shock the host's heart when triggered, bringing them back to life if the body can sustain it."
+ can_trigger = TRUE
trigger_cost = 25
trigger_cooldown = 120
- rogue_types = list(/datum/nanite_program/triggered/shocking)
-
-/datum/nanite_program/triggered/defib/trigger()
- if(!..())
- return
+ rogue_types = list(/datum/nanite_program/shocking)
+/datum/nanite_program/defib/on_trigger(comm_message)
host_mob.notify_ghost_cloning("Your heart is being defibrillated by nanites. Re-enter your corpse if you want to be revived!")
addtimer(CALLBACK(src, .proc/zap), 50)
-/datum/nanite_program/triggered/defib/proc/check_revivable()
+/datum/nanite_program/defib/proc/check_revivable()
if(!iscarbon(host_mob)) //nonstandard biology
return FALSE
var/mob/living/carbon/C = host_mob
- if(C.suiciding || HAS_TRAIT(C, TRAIT_NOCLONE) || C.hellbound) //can't revive
- return FALSE
- if((world.time - C.timeofdeath) > 1800) //too late
- return FALSE
- if((C.getBruteLoss() > 180) || (C.getFireLoss() > 180) || !C.can_be_revived()) //too damaged
- return FALSE
- if(!C.getorgan(/obj/item/organ/heart)) //what are we even shocking
- return FALSE
- var/obj/item/organ/brain/BR = C.getorgan(/obj/item/organ/brain)
- if(QDELETED(BR) || BR.brain_death || (BR.organ_flags & ORGAN_FAILING) || C.suiciding)
- return FALSE
if(C.get_ghost())
return FALSE
- return TRUE
+ return C.can_defib()
-/datum/nanite_program/triggered/defib/proc/zap()
+/datum/nanite_program/defib/proc/zap()
var/mob/living/carbon/C = host_mob
- playsound(C, 'sound/machines/defib_charge.ogg', 50, 0)
+ playsound(C, 'sound/machines/defib_charge.ogg', 50, FALSE)
sleep(30)
- playsound(C, 'sound/machines/defib_zap.ogg', 50, 0)
+ playsound(C, 'sound/machines/defib_zap.ogg', 50, FALSE)
if(check_revivable())
- playsound(C, 'sound/machines/defib_success.ogg', 50, 0)
+ playsound(C, 'sound/machines/defib_success.ogg', 50, FALSE)
C.set_heartattack(FALSE)
- C.revive()
+ C.revive(full_heal = FALSE, admin_revive = FALSE)
C.emote("gasp")
C.Jitter(100)
SEND_SIGNAL(C, COMSIG_LIVING_MINOR_SHOCK)
- var/tplus = world.time - C.timeofdeath
- if(tplus > 600)
- C.adjustOrganLoss(ORGAN_SLOT_BRAIN, max(0, ((1800 - tplus) / 1800 * 150)), 150)
log_game("[C] has been successfully defibrillated by nanites.")
else
- playsound(C, 'sound/machines/defib_failed.ogg', 50, 0)
+ playsound(C, 'sound/machines/defib_failed.ogg', 50, FALSE)
+
diff --git a/code/modules/research/nanites/nanite_programs/protocols.dm b/code/modules/research/nanites/nanite_programs/protocols.dm
new file mode 100644
index 0000000000..73976abe09
--- /dev/null
+++ b/code/modules/research/nanites/nanite_programs/protocols.dm
@@ -0,0 +1,107 @@
+//Replication Protocols
+/datum/nanite_program/protocol/kickstart
+ name = "Kickstart Protocol"
+ desc = "Replication Protocol: the nanites focus on early growth, heavily boosting replication rate for a few minutes after the initial implantation."
+ use_rate = 0
+ rogue_types = list(/datum/nanite_program/necrotic)
+ protocol_class = NANITE_PROTOCOL_REPLICATION
+ var/boost_duration = 1200
+
+/datum/nanite_program/protocol/kickstart/check_conditions()
+ if(!(world.time < nanites.start_time + boost_duration))
+ return FALSE
+ return ..()
+
+/datum/nanite_program/protocol/kickstart/active_effect()
+ nanites.adjust_nanites(null, 3.5)
+
+/datum/nanite_program/protocol/factory
+ name = "Factory Protocol"
+ desc = "Replication Protocol: the nanites build a factory matrix within the host, gradually increasing replication speed over time. \
+ The factory decays if the protocol is not active, or if the nanites are disrupted by shocks or EMPs."
+ use_rate = 0
+ rogue_types = list(/datum/nanite_program/necrotic)
+ protocol_class = NANITE_PROTOCOL_REPLICATION
+ var/factory_efficiency = 0
+ var/max_efficiency = 1000 //Goes up to 2 bonus regen per tick after 16 minutes and 40 seconds
+
+/datum/nanite_program/protocol/factory/on_process()
+ if(!activated || !check_conditions())
+ factory_efficiency = max(0, factory_efficiency - 5)
+ ..()
+
+/datum/nanite_program/protocol/factory/on_emp(severity)
+ ..()
+ factory_efficiency = max(0, factory_efficiency - 300)
+
+/datum/nanite_program/protocol/factory/on_shock(shock_damage)
+ ..()
+ factory_efficiency = max(0, factory_efficiency - 200)
+
+/datum/nanite_program/protocol/factory/on_minor_shock()
+ ..()
+ factory_efficiency = max(0, factory_efficiency - 100)
+
+/datum/nanite_program/protocol/factory/active_effect()
+ factory_efficiency = min(factory_efficiency + 1, max_efficiency)
+ nanites.adjust_nanites(null, round(0.002 * factory_efficiency, 0.1))
+
+/datum/nanite_program/protocol/tinker
+ name = "Tinker Protocol"
+ desc = "Replication Protocol: the nanites learn to use metallic material in the host's bloodstream to speed up the replication process."
+ use_rate = 0
+ rogue_types = list(/datum/nanite_program/necrotic)
+ protocol_class = NANITE_PROTOCOL_REPLICATION
+ var/boost = 2
+ var/list/valid_reagents = list(
+ /datum/reagent/iron,
+ /datum/reagent/copper,
+ /datum/reagent/gold,
+ /datum/reagent/silver,
+ /datum/reagent/mercury,
+ /datum/reagent/aluminium,
+ /datum/reagent/silicon)
+
+/datum/nanite_program/protocol/tinker/check_conditions()
+ if(!nanites.host_mob.reagents)
+ return FALSE
+
+ var/found_reagent = FALSE
+
+ var/datum/reagents/R = nanites.host_mob.reagents
+ for(var/VR in valid_reagents)
+ if(R.has_reagent(VR, 0.5))
+ R.remove_reagent(VR, 0.5)
+ found_reagent = TRUE
+ break
+ if(!found_reagent)
+ return FALSE
+ return ..()
+
+/datum/nanite_program/protocol/tinker/active_effect()
+ nanites.adjust_nanites(null, boost)
+
+/datum/nanite_program/protocol/offline
+ name = "Offline Production Protocol"
+ desc = "Replication Protocol: while the host is asleep or otherwise unconcious, the nanites exploit the reduced interference to replicate more quickly."
+ use_rate = 0
+ rogue_types = list(/datum/nanite_program/necrotic)
+ protocol_class = NANITE_PROTOCOL_REPLICATION
+ var/boost = 3
+
+/datum/nanite_program/protocol/offline/check_conditions()
+ var/is_offline = FALSE
+ if(nanites.host_mob.IsSleeping() || nanites.host_mob.IsUnconscious())
+ is_offline = TRUE
+ if(nanites.host_mob.stat == DEAD || HAS_TRAIT(nanites.host_mob, TRAIT_DEATHCOMA))
+ is_offline = TRUE
+ if(nanites.host_mob.InCritical() && !HAS_TRAIT(nanites.host_mob, TRAIT_NOSOFTCRIT))
+ is_offline = TRUE
+ if(nanites.host_mob.InFullCritical() && !HAS_TRAIT(nanites.host_mob, TRAIT_NOHARDCRIT))
+ is_offline = TRUE
+ if(!is_offline)
+ return FALSE
+ return ..()
+
+/datum/nanite_program/protocol/offline/active_effect()
+ nanites.adjust_nanites(null, boost)
diff --git a/code/modules/research/nanites/nanite_programs/sensor.dm b/code/modules/research/nanites/nanite_programs/sensor.dm
index 535b92c6e1..260811445b 100644
--- a/code/modules/research/nanites/nanite_programs/sensor.dm
+++ b/code/modules/research/nanites/nanite_programs/sensor.dm
@@ -2,71 +2,41 @@
name = "Sensor Nanites"
desc = "These nanites send a signal code when a certain condition is met."
unique = FALSE
- extra_settings = list("Sent Code")
+ var/can_rule = FALSE
- var/sent_code = 0
-
-/datum/nanite_program/sensor/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
- if(isnull(new_code))
- return
- sent_code = CLAMP(round(new_code, 1), 1, 9999)
-
-/datum/nanite_program/sensor/get_extra_setting(setting)
- if(setting == "Sent Code")
- return sent_code
-
-/datum/nanite_program/sensor/copy_extra_settings_to(datum/nanite_program/sensor/target)
- target.sent_code = sent_code
+/datum/nanite_program/sensor/register_extra_settings()
+ extra_settings[NES_SENT_CODE] = new /datum/nanite_extra_setting/number(0, 1, 9999)
/datum/nanite_program/sensor/proc/check_event()
return FALSE
/datum/nanite_program/sensor/proc/send_code()
if(activated)
- SEND_SIGNAL(host_mob, COMSIG_NANITE_SIGNAL, sent_code, "a [name] program")
+ var/datum/nanite_extra_setting/ES = extra_settings[NES_SENT_CODE]
+ SEND_SIGNAL(host_mob, COMSIG_NANITE_SIGNAL, ES.value, "a [name] program")
/datum/nanite_program/sensor/active_effect()
- if(sent_code && check_event())
+ if(check_event())
send_code()
+/datum/nanite_program/sensor/proc/make_rule(datum/nanite_program/target)
+ return
+
/datum/nanite_program/sensor/repeat
name = "Signal Repeater"
desc = "When triggered, sends another signal to the nanites, optionally with a delay."
can_trigger = TRUE
trigger_cost = 0
trigger_cooldown = 10
- extra_settings = list("Sent Code","Delay")
var/spent = FALSE
- var/delay = 0
-/datum/nanite_program/sensor/repeat/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
- if(isnull(new_code))
- return
- sent_code = CLAMP(round(new_code, 1), 1, 9999)
- if(setting == "Delay")
- var/new_delay = input(user, "Set the delay in seconds:", name, null) as null|num
- if(isnull(new_delay))
- return
- delay = (CLAMP(round(new_delay, 1), 0, 3600)) * 10 //max 1 hour
+/datum/nanite_program/sensor/repeat/register_extra_settings()
+ . = ..()
+ extra_settings[NES_DELAY] = new /datum/nanite_extra_setting/number(0, 0, 3600, "s")
-/datum/nanite_program/sensor/repeat/get_extra_setting(setting)
- if(setting == "Sent Code")
- return sent_code
- if(setting == "Delay")
- return "[delay/10] seconds"
-
-/datum/nanite_program/sensor/repeat/copy_extra_settings_to(datum/nanite_program/sensor/repeat/target)
- target.sent_code = sent_code
- target.delay = delay
-
-/datum/nanite_program/sensor/repeat/trigger()
- if(!..())
- return
- addtimer(CALLBACK(src, .proc/send_code), delay)
+/datum/nanite_program/sensor/repeat/on_trigger(comm_message)
+ var/datum/nanite_extra_setting/ES = extra_settings[NES_DELAY]
+ addtimer(CALLBACK(src, .proc/send_code), ES.get_value() * 10)
/datum/nanite_program/sensor/relay_repeat
name = "Relay Signal Repeater"
@@ -74,98 +44,46 @@
can_trigger = TRUE
trigger_cost = 0
trigger_cooldown = 10
- extra_settings = list("Sent Code","Relay Channel","Delay")
var/spent = FALSE
- var/delay = 0
- var/relay_channel = 0
-/datum/nanite_program/sensor/relay_repeat/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
- if(isnull(new_code))
- return
- sent_code = CLAMP(round(new_code, 1), 1, 9999)
- if(setting == "Relay Channel")
- var/new_channel = input(user, "Set the relay channel (1-9999):", name, null) as null|num
- if(isnull(new_channel))
- return
- relay_channel = CLAMP(round(new_channel, 1), 1, 9999)
- if(setting == "Delay")
- var/new_delay = input(user, "Set the delay in seconds:", name, null) as null|num
- if(isnull(new_delay))
- return
- delay = (CLAMP(round(new_delay, 1), 0, 3600)) * 10 //max 1 hour
+/datum/nanite_program/sensor/relay_repeat/register_extra_settings()
+ . = ..()
+ extra_settings[NES_RELAY_CHANNEL] = new /datum/nanite_extra_setting/number(1, 1, 9999)
+ extra_settings[NES_DELAY] = new /datum/nanite_extra_setting/number(0, 0, 3600, "s")
-/datum/nanite_program/sensor/relay_repeat/get_extra_setting(setting)
- if(setting == "Sent Code")
- return sent_code
- if(setting == "Relay Channel")
- return relay_channel
- if(setting == "Delay")
- return "[delay/10] seconds"
-
-/datum/nanite_program/sensor/relay_repeat/copy_extra_settings_to(datum/nanite_program/sensor/relay_repeat/target)
- target.sent_code = sent_code
- target.delay = delay
- target.relay_channel = relay_channel
-
-/datum/nanite_program/sensor/relay_repeat/trigger()
- if(!..())
- return
- addtimer(CALLBACK(src, .proc/send_code), delay)
+/datum/nanite_program/sensor/relay_repeat/on_trigger(comm_message)
+ var/datum/nanite_extra_setting/ES = extra_settings[NES_DELAY]
+ addtimer(CALLBACK(src, .proc/send_code), ES.get_value() * 10)
/datum/nanite_program/sensor/relay_repeat/send_code()
- if(activated && relay_channel)
+ var/datum/nanite_extra_setting/relay = extra_settings[NES_RELAY_CHANNEL]
+ if(activated && relay.get_value())
for(var/X in SSnanites.nanite_relays)
var/datum/nanite_program/relay/N = X
- N.relay_signal(sent_code, relay_channel, "a [name] program")
+ var/datum/nanite_extra_setting/code = extra_settings[NES_SENT_CODE]
+ N.relay_signal(code.get_value(), relay.get_value(), "a [name] program")
/datum/nanite_program/sensor/health
name = "Health Sensor"
desc = "The nanites receive a signal when the host's health is above/below a target percentage."
- extra_settings = list("Sent Code","Health Percent","Direction")
+ can_rule = TRUE
var/spent = FALSE
- var/percent = 50
- var/direction = "Above"
-/datum/nanite_program/sensor/health/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
- if(isnull(new_code))
- return
- sent_code = CLAMP(round(new_code, 1), 1, 9999)
- if(setting == "Health Percent")
- var/new_percent = input(user, "Set the health percentage:", name, null) as null|num
- if(isnull(new_percent))
- return
- percent = CLAMP(round(new_percent, 1), -99, 100)
- if(setting == "Direction")
- if(direction == "Above")
- direction = "Below"
- else
- direction = "Above"
-
-/datum/nanite_program/sensor/health/get_extra_setting(setting)
- if(setting == "Sent Code")
- return sent_code
- if(setting == "Health Percent")
- return "[percent]%"
- if(setting == "Direction")
- return direction
-
-/datum/nanite_program/sensor/health/copy_extra_settings_to(datum/nanite_program/sensor/health/target)
- target.sent_code = sent_code
- target.percent = percent
- target.direction = direction
+/datum/nanite_program/sensor/health/register_extra_settings()
+ . = ..()
+ extra_settings[NES_HEALTH_PERCENT] = new /datum/nanite_extra_setting/number(50, -99, 100, "%")
+ extra_settings[NES_DIRECTION] = new /datum/nanite_extra_setting/boolean(TRUE, "Above", "Below")
/datum/nanite_program/sensor/health/check_event()
var/health_percent = host_mob.health / host_mob.maxHealth * 100
+ var/datum/nanite_extra_setting/percent = extra_settings[NES_HEALTH_PERCENT]
+ var/datum/nanite_extra_setting/direction = extra_settings[NES_DIRECTION]
var/detected = FALSE
- if(direction == "Above")
- if(health_percent >= percent)
+ if(direction.get_value())
+ if(health_percent >= percent.get_value())
detected = TRUE
else
- if(health_percent < percent)
+ if(health_percent < percent.get_value())
detected = TRUE
if(detected)
@@ -177,9 +95,18 @@
spent = FALSE
return FALSE
+/datum/nanite_program/sensor/health/make_rule(datum/nanite_program/target)
+ var/datum/nanite_rule/health/rule = new(target)
+ var/datum/nanite_extra_setting/direction = extra_settings[NES_DIRECTION]
+ var/datum/nanite_extra_setting/percent = extra_settings[NES_HEALTH_PERCENT]
+ rule.above = direction.get_value()
+ rule.threshold = percent.get_value()
+ return rule
+
/datum/nanite_program/sensor/crit
name = "Critical Health Sensor"
desc = "The nanites receive a signal when the host first reaches critical health."
+ can_rule = TRUE
var/spent = FALSE
/datum/nanite_program/sensor/crit/check_event()
@@ -192,61 +119,44 @@
spent = FALSE
return FALSE
+/datum/nanite_program/sensor/crit/make_rule(datum/nanite_program/target)
+ var/datum/nanite_rule/crit/rule = new(target)
+ return rule
+
/datum/nanite_program/sensor/death
name = "Death Sensor"
desc = "The nanites receive a signal when they detect the host is dead."
+ can_rule = TRUE
var/spent = FALSE
/datum/nanite_program/sensor/death/on_death()
send_code()
+/datum/nanite_program/sensor/death/make_rule(datum/nanite_program/target)
+ var/datum/nanite_rule/death/rule = new(target)
+ return rule
+
/datum/nanite_program/sensor/nanite_volume
name = "Nanite Volume Sensor"
desc = "The nanites receive a signal when the nanite supply is above/below a certain percentage."
- extra_settings = list("Sent Code","Nanite Percent","Direction")
+ can_rule = TRUE
var/spent = FALSE
- var/percent = 50
- var/direction = "Above"
-/datum/nanite_program/sensor/nanite_volume/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
- if(isnull(new_code))
- return
- sent_code = CLAMP(round(new_code, 1), 1, 9999)
- if(setting == "Nanite Percent")
- var/new_percent = input(user, "Set the nanite percentage:", name, null) as null|num
- if(isnull(new_percent))
- return
- percent = CLAMP(round(new_percent, 1), 1, 100)
- if(setting == "Direction")
- if(direction == "Above")
- direction = "Below"
- else
- direction = "Above"
-
-/datum/nanite_program/sensor/nanite_volume/get_extra_setting(setting)
- if(setting == "Sent Code")
- return sent_code
- if(setting == "Nanite Percent")
- return "[percent]%"
- if(setting == "Direction")
- return direction
-
-/datum/nanite_program/sensor/nanite_volume/copy_extra_settings_to(datum/nanite_program/sensor/nanite_volume/target)
- target.sent_code = sent_code
- target.percent = percent
- target.direction = direction
+/datum/nanite_program/sensor/nanite_volume/register_extra_settings()
+ . = ..()
+ extra_settings[NES_NANITE_PERCENT] = new /datum/nanite_extra_setting/number(50, -99, 100, "%")
+ extra_settings[NES_DIRECTION] = new /datum/nanite_extra_setting/boolean(TRUE, "Above", "Below")
/datum/nanite_program/sensor/nanite_volume/check_event()
var/nanite_percent = (nanites.nanite_volume - nanites.safety_threshold)/(nanites.max_nanites - nanites.safety_threshold)*100
+ var/datum/nanite_extra_setting/percent = extra_settings[NES_NANITE_PERCENT]
+ var/datum/nanite_extra_setting/direction = extra_settings[NES_DIRECTION]
var/detected = FALSE
-
- if(direction == "Above")
- if(nanite_percent >= percent)
+ if(direction.get_value())
+ if(nanite_percent >= percent.get_value())
detected = TRUE
else
- if(nanite_percent < percent)
+ if(nanite_percent < percent.get_value())
detected = TRUE
if(detected)
@@ -258,75 +168,51 @@
spent = FALSE
return FALSE
+/datum/nanite_program/sensor/nanite_volume/make_rule(datum/nanite_program/target)
+ var/datum/nanite_rule/nanites/rule = new(target)
+ var/datum/nanite_extra_setting/direction = extra_settings[NES_DIRECTION]
+ var/datum/nanite_extra_setting/percent = extra_settings[NES_NANITE_PERCENT]
+ rule.above = direction.get_value()
+ rule.threshold = percent.get_value()
+ return rule
+
/datum/nanite_program/sensor/damage
name = "Damage Sensor"
desc = "The nanites receive a signal when a host's specific damage type is above/below a target value."
- extra_settings = list("Sent Code","Damage Type","Damage","Direction")
+ can_rule = TRUE
var/spent = FALSE
- var/damage_type = "Brute"
- var/damage = 50
- var/direction = "Above"
-/datum/nanite_program/sensor/damage/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
- if(isnull(new_code))
- return
- sent_code = CLAMP(round(new_code, 1), 1, 9999)
- if(setting == "Damage")
- var/new_damage = input(user, "Set the damage threshold:", name, null) as null|num
- if(isnull(new_damage))
- return
- damage = CLAMP(round(new_damage, 1), 0, 500)
- if(setting == "Damage Type")
- var/list/damage_types = list("Brute","Burn","Toxin","Oxygen","Cellular")
- var/new_damage_type = input("Choose the damage type", name) as null|anything in damage_types
- if(!new_damage_type)
- return
- damage_type = new_damage_type
- if(setting == "Direction")
- if(direction == "Above")
- direction = "Below"
- else
- direction = "Above"
-
-/datum/nanite_program/sensor/damage/get_extra_setting(setting)
- if(setting == "Sent Code")
- return sent_code
- if(setting == "Damage")
- return damage
- if(setting == "Damage Type")
- return damage_type
- if(setting == "Direction")
- return direction
-
-/datum/nanite_program/sensor/damage/copy_extra_settings_to(datum/nanite_program/sensor/damage/target)
- target.sent_code = sent_code
- target.damage = damage
- target.damage_type = damage_type
- target.direction = direction
+/datum/nanite_program/sensor/damage/register_extra_settings()
+ . = ..()
+ extra_settings[NES_DAMAGE_TYPE] = new /datum/nanite_extra_setting/type(BRUTE, list(BRUTE, BURN, TOX, OXY, CLONE))
+ extra_settings[NES_DAMAGE] = new /datum/nanite_extra_setting/number(50, 0, 500)
+ extra_settings[NES_DIRECTION] = new /datum/nanite_extra_setting/boolean(TRUE, "Above", "Below")
/datum/nanite_program/sensor/damage/check_event()
var/reached_threshold = FALSE
- var/check_above = (direction == "Above")
+ var/datum/nanite_extra_setting/type = extra_settings[NES_DAMAGE_TYPE]
+ var/datum/nanite_extra_setting/damage = extra_settings[NES_DAMAGE]
+ var/datum/nanite_extra_setting/direction = extra_settings[NES_DIRECTION]
+ var/check_above = direction.get_value()
var/damage_amt = 0
- switch(damage_type)
- if("Brute")
+ switch(type.get_value())
+ if(BRUTE)
damage_amt = host_mob.getBruteLoss()
- if("Burn")
+ if(BURN)
damage_amt = host_mob.getFireLoss()
- if("Toxin")
+ if(TOX)
damage_amt = host_mob.getToxLoss()
- if("Oxygen")
+ if(OXY)
damage_amt = host_mob.getOxyLoss()
- if("Cellular")
+ if(CLONE)
damage_amt = host_mob.getCloneLoss()
- if(damage_amt >= damage)
- if(check_above)
+ if(check_above)
+ if(damage_amt >= damage.get_value())
+ reached_threshold = TRUE
+ else
+ if(damage_amt < damage.get_value())
reached_threshold = TRUE
- else if(!check_above)
- reached_threshold = TRUE
if(reached_threshold)
if(!spent)
@@ -337,14 +223,25 @@
spent = FALSE
return FALSE
+/datum/nanite_program/sensor/damage/make_rule(datum/nanite_program/target)
+ var/datum/nanite_rule/damage/rule = new(target)
+ var/datum/nanite_extra_setting/direction = extra_settings[NES_DIRECTION]
+ var/datum/nanite_extra_setting/damage_type = extra_settings[NES_DAMAGE_TYPE]
+ var/datum/nanite_extra_setting/damage = extra_settings[NES_DAMAGE]
+ rule.above = direction.get_value()
+ rule.threshold = damage.get_value()
+ rule.damage_type = damage_type.get_value()
+ return rule
+
/datum/nanite_program/sensor/voice
name = "Voice Sensor"
desc = "Sends a signal when the nanites hear a determined word or sentence."
- extra_settings = list("Sent Code","Sentence","Inclusive Mode")
var/spent = FALSE
- var/sentence = ""
- var/inclusive = TRUE
+/datum/nanite_program/sensor/voice/register_extra_settings()
+ . = ..()
+ extra_settings[NES_SENTENCE] = new /datum/nanite_extra_setting/text("")
+ extra_settings[NES_INCLUSIVE_MODE] = new /datum/nanite_extra_setting/boolean(TRUE, "Inclusive", "Exclusive")
/datum/nanite_program/sensor/voice/on_mob_add()
. = ..()
@@ -353,45 +250,14 @@
/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
- if(isnull(new_code))
- return
- sent_code = CLAMP(round(new_code, 1), 1, 9999)
- if(setting == "Sentence")
- var/new_sentence = stripped_input(user, "Choose the sentence that triggers the sensor.", "Sentence", sentence, MAX_MESSAGE_LEN)
- if(!new_sentence)
- return
- sentence = new_sentence
- if(setting == "Inclusive Mode")
- var/new_inclusive = input("Should the sensor detect the sentence if contained within another sentence?", name) as null|anything in list("Inclusive","Exclusive")
- if(!new_inclusive)
- return
- inclusive = (new_inclusive == "Inclusive")
-
-/datum/nanite_program/sensor/voice/get_extra_setting(setting)
- if(setting == "Sent Code")
- return sent_code
- if(setting == "Sentence")
- return sentence
- if(setting == "Inclusive Mode")
- if(inclusive)
- return "Inclusive"
- else
- return "Exclusive"
-
-/datum/nanite_program/sensor/voice/copy_extra_settings_to(datum/nanite_program/sensor/voice/target)
- target.sent_code = sent_code
- target.sentence = sentence
- target.inclusive = inclusive
-
/datum/nanite_program/sensor/voice/proc/on_hear(datum/source, list/hearing_args)
- if(!sentence)
+ var/datum/nanite_extra_setting/sentence = extra_settings[NES_SENTENCE]
+ var/datum/nanite_extra_setting/inclusive = extra_settings[NES_INCLUSIVE_MODE]
+ if(!sentence.get_value())
return
- if(inclusive)
+ if(inclusive.get_value())
if(findtextEx(hearing_args[HEARING_RAW_MESSAGE], sentence))
send_code()
else
if(hearing_args[HEARING_RAW_MESSAGE] == sentence)
- send_code()
\ No newline at end of file
+ send_code()
diff --git a/code/modules/research/nanites/nanite_programs/suppression.dm b/code/modules/research/nanites/nanite_programs/suppression.dm
index e4b250ad61..56fd7fa044 100644
--- a/code/modules/research/nanites/nanite_programs/suppression.dm
+++ b/code/modules/research/nanites/nanite_programs/suppression.dm
@@ -1,15 +1,14 @@
//Programs that are generally useful for population control and non-harmful suppression.
-/datum/nanite_program/triggered/sleepy
+/datum/nanite_program/sleepy
name = "Sleep Induction"
desc = "The nanites cause rapid narcolepsy when triggered."
+ can_trigger = TRUE
trigger_cost = 15
trigger_cooldown = 1200
rogue_types = list(/datum/nanite_program/brain_misfire, /datum/nanite_program/brain_decay)
-/datum/nanite_program/triggered/sleepy/trigger()
- if(!..())
- return
+/datum/nanite_program/sleepy/on_trigger(comm_message)
to_chat(host_mob, "
You start to feel very sleepy...")
host_mob.drowsyness += 20
addtimer(CALLBACK(host_mob, /mob/living.proc/Sleeping, 200), rand(60,200))
@@ -31,30 +30,28 @@
. = ..()
to_chat(host_mob, "
Your muscles relax, and you can move again.")
-/datum/nanite_program/triggered/shocking
+/datum/nanite_program/shocking
name = "Electric Shock"
desc = "The nanites shock the host when triggered. Destroys a large amount of nanites!"
+ can_trigger = TRUE
trigger_cost = 10
trigger_cooldown = 300
program_flags = NANITE_SHOCK_IMMUNE
rogue_types = list(/datum/nanite_program/toxic)
-/datum/nanite_program/triggered/shocking/trigger()
- if(!..())
- return
+/datum/nanite_program/shocking/on_trigger(comm_message)
host_mob.electrocute_act(rand(5,10), "shock nanites", TRUE, TRUE)
-/datum/nanite_program/triggered/stun
+/datum/nanite_program/stun
name = "Neural Shock"
desc = "The nanites pulse the host's nerves when triggered, inapacitating them for a short period."
+ can_trigger = TRUE
trigger_cost = 4
trigger_cooldown = 300
- rogue_types = list(/datum/nanite_program/triggered/shocking, /datum/nanite_program/nerve_decay)
+ rogue_types = list(/datum/nanite_program/shocking, /datum/nanite_program/nerve_decay)
-/datum/nanite_program/triggered/stun/trigger()
- if(!..())
- return
- playsound(host_mob, "sparks", 75, 1, -1)
+/datum/nanite_program/stun/on_trigger(comm_message)
+ playsound(host_mob, "sparks", 75, TRUE, -1)
host_mob.Knockdown(80)
/datum/nanite_program/pacifying
@@ -115,64 +112,50 @@
host_mob.cure_fakedeath("nanites")
//Can receive transmissions from a nanite communication remote for customized messages
-/datum/nanite_program/triggered/comm
+/datum/nanite_program/comm
+ can_trigger = TRUE
var/comm_code = 0
var/comm_message = ""
-/datum/nanite_program/triggered/comm/proc/receive_comm_signal(signal_comm_code, comm_message, comm_source)
+/datum/nanite_program/comm/register_extra_settings()
+ extra_settings[NES_COMM_CODE] = new /datum/nanite_extra_setting/number(0, 0, 9999)
+
+/datum/nanite_program/comm/proc/receive_comm_signal(signal_comm_code, comm_message, comm_source)
if(!activated || !comm_code)
return
if(signal_comm_code == comm_code)
host_mob.investigate_log("'s [name] nanite program was messaged by [comm_source] with comm code [signal_comm_code] and message '[comm_message]'.", INVESTIGATE_NANITES)
trigger(comm_message)
-/datum/nanite_program/triggered/comm/speech
+/datum/nanite_program/comm/speech
name = "Forced Speech"
desc = "The nanites force the host to say a pre-programmed sentence when triggered."
unique = FALSE
trigger_cost = 3
trigger_cooldown = 20
rogue_types = list(/datum/nanite_program/brain_misfire, /datum/nanite_program/brain_decay)
+ var/static/list/blacklist = list(
+ "*surrender",
+ "*collapse"
+ )
- extra_settings = list("Sentence","Comm Code")
- var/sentence = ""
+/datum/nanite_program/comm/speech/register_extra_settings()
+ . = ..()
+ extra_settings[NES_SENTENCE] = new /datum/nanite_extra_setting/text("")
-/datum/nanite_program/triggered/comm/speech/set_extra_setting(user, setting)
- if(setting == "Sentence")
- 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
- return
- sentence = new_sentence
- if(setting == "Comm Code")
- var/new_code = input(user, "Set the communication code (1-9999) or set to 0 to disable external signals.", name, null) as null|num
- if(isnull(new_code))
- return
- comm_code = CLAMP(round(new_code, 1), 0, 9999)
-
-/datum/nanite_program/triggered/comm/speech/get_extra_setting(setting)
- if(setting == "Sentence")
- return sentence
- if(setting == "Comm Code")
- return comm_code
-
-/datum/nanite_program/triggered/comm/speech/copy_extra_settings_to(datum/nanite_program/triggered/comm/speech/target)
- target.sentence = sentence
- target.comm_code = comm_code
-
-/datum/nanite_program/triggered/comm/speech/trigger(comm_message)
- if(!..())
- return
+/datum/nanite_program/comm/speech/on_trigger(comm_message)
var/sent_message = comm_message
if(!comm_message)
- sent_message = sentence
+ var/datum/nanite_extra_setting/sentence = extra_settings[NES_SENTENCE]
+ sent_message = sentence.get_value()
+ if(sent_message in blacklist)
+ return
if(host_mob.stat == DEAD)
return
to_chat(host_mob, "
You feel compelled to speak...")
host_mob.say(sent_message, forced = "nanite speech")
-/datum/nanite_program/triggered/comm/voice
+/datum/nanite_program/comm/voice
name = "Skull Echo"
desc = "The nanites echo a synthesized message inside the host's skull."
unique = FALSE
@@ -180,56 +163,50 @@
trigger_cooldown = 20
rogue_types = list(/datum/nanite_program/brain_misfire, /datum/nanite_program/brain_decay)
- extra_settings = list("Message","Comm Code")
- var/message = ""
+/datum/nanite_program/comm/voice/register_extra_settings()
+ . = ..()
+ extra_settings[NES_MESSAGE] = new /datum/nanite_extra_setting/text("")
-/datum/nanite_program/triggered/comm/voice/set_extra_setting(user, setting)
- if(setting == "Message")
- var/new_message = stripped_input(user, "Choose the message sent to the host.", "Message", message, MAX_MESSAGE_LEN)
- if(!new_message)
- return
- message = new_message
- if(setting == "Comm Code")
- var/new_code = input(user, "Set the communication code (1-9999) or set to 0 to disable external signals.", name, null) as null|num
- if(isnull(new_code))
- return
- comm_code = CLAMP(round(new_code, 1), 0, 9999)
-
-/datum/nanite_program/triggered/comm/voice/get_extra_setting(setting)
- if(setting == "Message")
- return message
- if(setting == "Comm Code")
- return comm_code
-
-/datum/nanite_program/triggered/comm/voice/copy_extra_settings_to(datum/nanite_program/triggered/comm/voice/target)
- target.message = message
- target.comm_code = comm_code
-
-/datum/nanite_program/triggered/comm/voice/trigger(comm_message)
- if(!..())
- return
+/datum/nanite_program/comm/voice/on_trigger(comm_message)
var/sent_message = comm_message
if(!comm_message)
- sent_message = message
+ var/datum/nanite_extra_setting/message_setting = extra_settings[NES_MESSAGE]
+ sent_message = message_setting.get_value()
if(host_mob.stat == DEAD)
return
to_chat(host_mob, "
You hear a strange, robotic voice in your head... \"
[sent_message]\"")
-/datum/nanite_program/triggered/comm/hallucination
+/datum/nanite_program/comm/hallucination
name = "Hallucination"
desc = "The nanites make the host hallucinate something when triggered."
trigger_cost = 4
trigger_cooldown = 80
unique = FALSE
rogue_types = list(/datum/nanite_program/brain_misfire)
- extra_settings = list("Hallucination Type", "Comm Code")
- var/hal_type
- var/hal_details
-/datum/nanite_program/triggered/comm/hallucination/trigger(comm_message)
- if(!..())
- return
+/datum/nanite_program/comm/hallucination/register_extra_settings()
+ . = ..()
+ var/list/options = list(
+ "Message",
+ "Battle",
+ "Sound",
+ "Weird Sound",
+ "Station Message",
+ "Health",
+ "Alert",
+ "Fire",
+ "Shock",
+ "Plasma Flood",
+ "Random"
+ )
+ extra_settings[NES_HALLUCINATION_TYPE] = new /datum/nanite_extra_setting/type("Message", options)
+ extra_settings[NES_HALLUCINATION_DETAIL] = new /datum/nanite_extra_setting/text("")
+/datum/nanite_program/comm/hallucination/on_trigger(comm_message)
+ var/datum/nanite_extra_setting/hal_setting = extra_settings[NES_HALLUCINATION_TYPE]
+ var/hal_type = hal_setting.get_value()
+ var/datum/nanite_extra_setting/hal_detail_setting = extra_settings[NES_HALLUCINATION_DETAIL]
+ var/hal_details = hal_detail_setting.get_value()
if(comm_message && (hal_type != "Message")) //Triggered via comm remote, but not set to a message hallucination
return
var/sent_message = comm_message //Comm remotes can send custom hallucination messages for the chat hallucination
@@ -239,7 +216,9 @@
if(!iscarbon(host_mob))
return
var/mob/living/carbon/C = host_mob
- if(!hal_type)
+ if(hal_details == "random")
+ hal_details = null
+ if(hal_type == "Random")
C.hallucination += 15
else
switch(hal_type)
@@ -254,6 +233,13 @@
if("Station Message")
new /datum/hallucination/stationmessage(C, TRUE, hal_details)
if("Health")
+ switch(hal_details)
+ if("critical")
+ hal_details = SCREWYHUD_CRIT
+ if("dead")
+ hal_details = SCREWYHUD_DEAD
+ if("healthy")
+ hal_details = SCREWYHUD_HEALTHY
new /datum/hallucination/hudscrew(C, TRUE, hal_details)
if("Alert")
new /datum/hallucination/fake_alert(C, TRUE, hal_details)
@@ -264,127 +250,40 @@
if("Plasma Flood")
new /datum/hallucination/fake_flood(C, TRUE)
-/datum/nanite_program/triggered/comm/hallucination/set_extra_setting(user, setting)
- if(setting == "Comm Code")
- var/new_code = input(user, "(Only for Message) Set the communication code (1-9999) or set to 0 to disable external signals.", name, null) as null|num
- if(isnull(new_code))
- return
- comm_code = CLAMP(round(new_code, 1), 0, 9999)
-
- if(setting == "Hallucination Type")
- var/list/possible_hallucinations = list("Random","Message","Battle","Sound","Weird Sound","Station Message","Health","Alert","Fire","Shock","Plasma Flood")
- var/hal_type_choice = input("Choose the hallucination type", name) as null|anything in possible_hallucinations
- if(!hal_type_choice)
- return
- switch(hal_type_choice)
- if("Random")
- hal_type = null
- hal_details = null
+/datum/nanite_program/comm/hallucination/set_extra_setting(setting, value)
+ . = ..()
+ if(setting == NES_HALLUCINATION_TYPE)
+ switch(value)
if("Message")
- hal_type = "Message"
- var/hal_chat = stripped_input(user, "Choose the message the host will hear, or leave empty for random messages.", "Message", hal_details, MAX_MESSAGE_LEN)
- if(hal_chat)
- hal_details = hal_chat
+ extra_settings[NES_HALLUCINATION_DETAIL] = new /datum/nanite_extra_setting/text("")
if("Battle")
- hal_type = "Battle"
- var/sound_list = list("random","laser","disabler","esword","gun","stunprod","harmbaton","bomb")
- var/hal_choice = input("Choose the hallucination battle type", name) as null|anything in sound_list
- if(!hal_choice || hal_choice == "random")
- hal_details = null
- else
- hal_details = hal_choice
+ extra_settings[NES_HALLUCINATION_DETAIL] = new /datum/nanite_extra_setting/type("random", list("random","laser","disabler","esword","gun","stunprod","harmbaton","bomb"))
if("Sound")
- hal_type = "Sound"
- var/sound_list = list("random","airlock","airlock pry","console","explosion","far explosion","mech","glass","alarm","beepsky","mech","wall decon","door hack")
- var/hal_choice = input("Choose the hallucination sound", name) as null|anything in sound_list
- if(!hal_choice || hal_choice == "random")
- hal_details = null
- else
- hal_details = hal_choice
+ extra_settings[NES_HALLUCINATION_DETAIL] = new /datum/nanite_extra_setting/type("random", list("random","airlock","airlock pry","console","explosion","far explosion","mech","glass","alarm","beepsky","mech","wall decon","door hack"))
if("Weird Sound")
- hal_type = "Weird Sound"
- var/sound_list = list("random","phone","hallelujah","highlander","laughter","hyperspace","game over","creepy","tesla")
- var/hal_choice = input("Choose the hallucination sound", name) as null|anything in sound_list
- if(!hal_choice || hal_choice == "random")
- hal_details = null
- else
- hal_details = hal_choice
+ extra_settings[NES_HALLUCINATION_DETAIL] = new /datum/nanite_extra_setting/type("random", list("random","phone","hallelujah","highlander","laughter","hyperspace","game over","creepy","tesla"))
if("Station Message")
- hal_type = "Station Message"
- var/msg_list = list("random","ratvar","shuttle dock","blob alert","malf ai","meteors","supermatter")
- var/hal_choice = input("Choose the hallucination station message", name) as null|anything in msg_list
- if(!hal_choice || hal_choice == "random")
- hal_details = null
- else
- hal_details = hal_choice
+ extra_settings[NES_HALLUCINATION_DETAIL] = new /datum/nanite_extra_setting/type("random", list("random","ratvar","shuttle dock","blob alert","malf ai","meteors","supermatter"))
if("Health")
- hal_type = "Health"
- var/health_list = list("random","critical","dead","healthy")
- var/hal_choice = input("Choose the health status", name) as null|anything in health_list
- if(!hal_choice || hal_choice == "random")
- hal_details = null
- else
- switch(hal_choice)
- if("critical")
- hal_details = SCREWYHUD_CRIT
- if("dead")
- hal_details = SCREWYHUD_DEAD
- if("healthy")
- hal_details = SCREWYHUD_HEALTHY
+ extra_settings[NES_HALLUCINATION_DETAIL] = new /datum/nanite_extra_setting/type("random", list("random","critical","dead","healthy"))
if("Alert")
- hal_type = "Alert"
- var/alert_list = list("random","not_enough_oxy","not_enough_tox","not_enough_co2","too_much_oxy","too_much_co2","too_much_tox","newlaw","nutrition","charge","gravity","fire","locked","hacked","temphot","tempcold","pressure")
- var/hal_choice = input("Choose the alert", name) as null|anything in alert_list
- if(!hal_choice || hal_choice == "random")
- hal_details = null
- else
- hal_details = hal_choice
- if("Fire")
- hal_type = "Fire"
- if("Shock")
- hal_type = "Shock"
- if("Plasma Flood")
- hal_type = "Plasma Flood"
-
-/datum/nanite_program/triggered/comm/hallucination/get_extra_setting(setting)
- if(setting == "Hallucination Type")
- if(!hal_type)
- return "Random"
- else
- return hal_type
- if(setting == "Comm Code")
- return comm_code
-
-/datum/nanite_program/triggered/comm/hallucination/copy_extra_settings_to(datum/nanite_program/triggered/comm/hallucination/target)
- target.hal_type = hal_type
- target.hal_details = hal_details
- target.comm_code = comm_code
+ extra_settings[NES_HALLUCINATION_DETAIL] = new /datum/nanite_extra_setting/type("random", list("random","not_enough_oxy","not_enough_tox","not_enough_co2","too_much_oxy","too_much_co2","too_much_tox","newlaw","nutrition","charge","gravity","fire","locked","hacked","temphot","tempcold","pressure"))
+ else
+ extra_settings.Remove(NES_HALLUCINATION_DETAIL)
/datum/nanite_program/good_mood
name = "Happiness Enhancer"
desc = "The nanites synthesize serotonin inside the host's brain, creating an artificial sense of happiness."
use_rate = 0.1
rogue_types = list(/datum/nanite_program/brain_decay)
- extra_settings = list("Mood Message")
- var/message = "HAPPINESS ENHANCEMENT"
-/datum/nanite_program/good_mood/set_extra_setting(user, setting)
- if(setting == "Mood Message")
- var/new_message = stripped_input(user, "Choose the message visible on the mood effect.", "Message", message, MAX_NAME_LEN)
- if(!new_message)
- return
- message = new_message
-
-/datum/nanite_program/good_mood/get_extra_setting(setting)
- if(setting == "Mood Message")
- return message
-
-/datum/nanite_program/good_mood/copy_extra_settings_to(datum/nanite_program/good_mood/target)
- target.message = message
+/datum/nanite_program/good_mood/register_extra_settings()
+ . = ..()
+ extra_settings[NES_MOOD_MESSAGE] = new /datum/nanite_extra_setting/text("HAPPINESS ENHANCEMENT")
/datum/nanite_program/good_mood/enable_passive_effect()
. = ..()
- SEND_SIGNAL(host_mob, COMSIG_ADD_MOOD_EVENT, "nanite_happy", /datum/mood_event/nanite_happiness, message)
+ SEND_SIGNAL(host_mob, COMSIG_ADD_MOOD_EVENT, "nanite_happy", /datum/mood_event/nanite_happiness, get_extra_setting_value(NES_MOOD_MESSAGE))
/datum/nanite_program/good_mood/disable_passive_effect()
. = ..()
@@ -395,26 +294,14 @@
desc = "The nanites suppress the production of serotonin inside the host's brain, creating an artificial state of depression."
use_rate = 0.1
rogue_types = list(/datum/nanite_program/brain_decay)
- extra_settings = list("Mood Message")
- var/message = "HAPPINESS SUPPRESSION"
-/datum/nanite_program/bad_mood/set_extra_setting(user, setting)
- if(setting == "Mood Message")
- var/new_message = stripped_input(user, "Choose the message visible on the mood effect.", "Message", message, MAX_NAME_LEN)
- if(!new_message)
- return
- message = new_message
-
-/datum/nanite_program/bad_mood/get_extra_setting(setting)
- if(setting == "Mood Message")
- return message
-
-/datum/nanite_program/bad_mood/copy_extra_settings_to(datum/nanite_program/bad_mood/target)
- target.message = message
+/datum/nanite_program/bad_mood/register_extra_settings()
+ . = ..()
+ extra_settings[NES_MOOD_MESSAGE] = new /datum/nanite_extra_setting/text("HAPPINESS SUPPRESSION")
/datum/nanite_program/bad_mood/enable_passive_effect()
. = ..()
- SEND_SIGNAL(host_mob, COMSIG_ADD_MOOD_EVENT, "nanite_sadness", /datum/mood_event/nanite_sadness, message)
+ SEND_SIGNAL(host_mob, COMSIG_ADD_MOOD_EVENT, "nanite_sadness", /datum/mood_event/nanite_sadness, get_extra_setting_value(NES_MOOD_MESSAGE))
/datum/nanite_program/bad_mood/disable_passive_effect()
. = ..()
diff --git a/code/modules/research/nanites/nanite_programs/utility.dm b/code/modules/research/nanites/nanite_programs/utility.dm
index deafbcd02c..6352f50b8b 100644
--- a/code/modules/research/nanites/nanite_programs/utility.dm
+++ b/code/modules/research/nanites/nanite_programs/utility.dm
@@ -1,82 +1,29 @@
//Programs that interact with other programs or nanites directly, or have other special purposes.
/datum/nanite_program/viral
name = "Viral Replica"
- desc = "The nanites constantly send encrypted signals attempting to forcefully copy their own programming into other nanite clusters."
+ desc = "The nanites constantly send encrypted signals attempting to forcefully copy their own programming into other nanite clusters, also overriding or disabling their cloud sync."
use_rate = 0.5
rogue_types = list(/datum/nanite_program/toxic)
- extra_settings = list("Program Overwrite","Cloud Overwrite")
-
var/pulse_cooldown = 0
- var/sync_programs = TRUE
- var/sync_overwrite = FALSE
- var/overwrite_cloud = FALSE
- var/set_cloud = 0
-/datum/nanite_program/viral/set_extra_setting(user, setting)
- if(setting == "Program Overwrite")
- var/overwrite_type = input("Choose what to do with the target's programs", name) as null|anything in list("Overwrite","Add To","Ignore")
- if(!overwrite_type)
- return
- switch(overwrite_type)
- if("Ignore") //Do not affect programs (if you only want to set the cloud ID)
- sync_programs = FALSE
- sync_overwrite = FALSE
- if("Add To") //Add to existing programs (so the target does not notice theirs are missing)
- sync_programs = TRUE
- sync_overwrite = FALSE
- if("Overwrite") //Replace target's programs with the source
- sync_programs = TRUE
- sync_overwrite = TRUE
- if(setting == "Cloud Overwrite")
- var/overwrite_type = input("Choose what to do with the target's Cloud ID", name) as null|anything in list("Overwrite","Disable","Keep")
- if(!overwrite_type)
- return
- switch(overwrite_type)
- if("Keep") //Don't change the cloud ID
- overwrite_cloud = FALSE
- set_cloud = 0
- if("Disable") //Set the cloud ID to disabled
- overwrite_cloud = TRUE
- set_cloud = 0
- if("Overwrite") //Set the cloud ID to what we choose
- var/new_cloud = input(user, "Choose the Cloud ID to set on infected nanites (1-100)", name, null) as null|num
- if(isnull(new_cloud))
- return
- overwrite_cloud = TRUE
- set_cloud = CLAMP(round(new_cloud, 1), 1, 100)
-
-/datum/nanite_program/viral/get_extra_setting(setting)
- if(setting == "Program Overwrite")
- if(!sync_programs)
- return "Ignore"
- else if(sync_overwrite)
- return "Overwrite"
- else
- return "Add To"
- if(setting == "Cloud Overwrite")
- if(!overwrite_cloud)
- return "None"
- else if(set_cloud == 0)
- return "Disable"
- else
- return set_cloud
-
-/datum/nanite_program/viral/copy_extra_settings_to(datum/nanite_program/viral/target)
- target.overwrite_cloud = overwrite_cloud
- target.set_cloud = set_cloud
- target.sync_programs = sync_programs
- target.sync_overwrite = sync_overwrite
+/datum/nanite_program/viral/register_extra_settings()
+ extra_settings[NES_PROGRAM_OVERWRITE] = new /datum/nanite_extra_setting/type("Add To", list("Overwrite", "Add To", "Ignore"))
+ extra_settings[NES_CLOUD_OVERWRITE] = new /datum/nanite_extra_setting/number(0, 0, 100)
/datum/nanite_program/viral/active_effect()
if(world.time < pulse_cooldown)
return
+ var/datum/nanite_extra_setting/program = extra_settings[NES_PROGRAM_OVERWRITE]
+ var/datum/nanite_extra_setting/cloud = extra_settings[NES_CLOUD_OVERWRITE]
for(var/mob/M in orange(host_mob, 5))
if(SEND_SIGNAL(M, COMSIG_NANITE_IS_STEALTHY))
continue
- if(sync_programs)
- SEND_SIGNAL(M, COMSIG_NANITE_SYNC, nanites, sync_overwrite)
- if(overwrite_cloud)
- SEND_SIGNAL(M, COMSIG_NANITE_SET_CLOUD, set_cloud)
+ switch(program.get_value())
+ if("Overwrite")
+ SEND_SIGNAL(M, COMSIG_NANITE_SYNC, nanites, TRUE)
+ if("Add To")
+ SEND_SIGNAL(M, COMSIG_NANITE_SYNC, nanites, FALSE)
+ SEND_SIGNAL(M, COMSIG_NANITE_SET_CLOUD, cloud.get_value())
pulse_cooldown = world.time + 75
/datum/nanite_program/monitoring
@@ -94,38 +41,23 @@
SSnanites.nanite_monitored_mobs -= host_mob
host_mob.hud_set_nanite_indicator()
-/datum/nanite_program/triggered/self_scan
+/datum/nanite_program/self_scan
name = "Host Scan"
desc = "The nanites display a detailed readout of a body scan to the host."
unique = FALSE
+ can_trigger = TRUE
trigger_cost = 3
trigger_cooldown = 50
rogue_types = list(/datum/nanite_program/toxic)
- extra_settings = list("Scan Type")
- var/scan_type = "Medical"
+/datum/nanite_program/self_scan/register_extra_settings()
+ extra_settings[NES_SCAN_TYPE] = new /datum/nanite_extra_setting/type("Medical", list("Medical", "Chemical", "Nanite"))
-/datum/nanite_program/triggered/self_scan/set_extra_setting(user, setting)
- if(setting == "Scan Type")
- var/list/scan_types = list("Medical","Chemical","Nanite")
- var/new_scan_type = input("Choose the scan type", name) as null|anything in scan_types
- if(!new_scan_type)
- return
- scan_type = new_scan_type
-
-/datum/nanite_program/triggered/self_scan/get_extra_setting(setting)
- if(setting == "Scan Type")
- return scan_type
-
-/datum/nanite_program/triggered/self_scan/copy_extra_settings_to(datum/nanite_program/triggered/self_scan/target)
- target.scan_type = scan_type
-
-/datum/nanite_program/triggered/self_scan/trigger()
- if(!..())
- return
+/datum/nanite_program/self_scan/on_trigger(comm_message)
if(host_mob.stat == DEAD)
return
- switch(scan_type)
+ var/datum/nanite_extra_setting/NS = extra_settings[NES_SCAN_TYPE]
+ switch(NS.get_value())
if("Medical")
healthscan(host_mob, host_mob)
if("Chemical")
@@ -162,28 +94,13 @@
. = ..()
nanites.diagnostics = TRUE
-
/datum/nanite_program/relay
name = "Relay"
desc = "The nanites receive and relay long-range nanite signals."
rogue_types = list(/datum/nanite_program/toxic)
- extra_settings = list("Relay Channel")
- var/relay_channel = 1
-
-/datum/nanite_program/relay/set_extra_setting(user, setting)
- if(setting == "Relay Channel")
- var/new_channel = input(user, "Set the relay channel (1-9999):", name, null) as null|num
- if(isnull(new_channel))
- return
- relay_channel = CLAMP(round(new_channel, 1), 1, 9999)
-
-/datum/nanite_program/relay/get_extra_setting(setting)
- if(setting == "Relay Channel")
- return relay_channel
-
-/datum/nanite_program/relay/copy_extra_settings_to(datum/nanite_program/relay/target)
- target.relay_channel = relay_channel
+/datum/nanite_program/relay/register_extra_settings()
+ extra_settings[NES_RELAY_CHANNEL] = new /datum/nanite_extra_setting/number(1, 1, 9999)
/datum/nanite_program/relay/enable_passive_effect()
. = ..()
@@ -198,7 +115,8 @@
return
if(!host_mob)
return
- if(relay_code != relay_channel)
+ var/datum/nanite_extra_setting/NS = extra_settings[NES_RELAY_CHANNEL]
+ if(relay_code != NS.get_value())
return
SEND_SIGNAL(host_mob, COMSIG_NANITE_SIGNAL, code, source)
@@ -207,7 +125,8 @@
return
if(!host_mob)
return
- if(relay_code != relay_channel)
+ var/datum/nanite_extra_setting/NS = extra_settings[NES_RELAY_CHANNEL]
+ if(relay_code != NS.get_value())
return
SEND_SIGNAL(host_mob, COMSIG_NANITE_COMM_SIGNAL, comm_code, comm_message)
@@ -228,14 +147,64 @@
host_mob.nutrition -= 0.5
nanites.adjust_nanites(src, 0.5)
-/datum/nanite_program/triggered/access
+/datum/nanite_program/research
+ name = "Distributed Computing"
+ desc = "The nanites aid the research servers by performing a portion of its calculations, increasing research point generation."
+ use_rate = 0.2
+ rogue_types = list(/datum/nanite_program/toxic)
+
+/datum/nanite_program/research/active_effect()
+ if(!iscarbon(host_mob))
+ return
+ var/points = 1
+ if(!host_mob.client) //less brainpower
+ points *= 0.25
+ SSresearch.science_tech.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = points))
+
+/datum/nanite_program/researchplus
+ name = "Neural Network"
+ desc = "The nanites link the host's brains together forming a neural research network, that becomes more efficient with the amount of total hosts."
+ use_rate = 0.3
+ rogue_types = list(/datum/nanite_program/brain_decay)
+
+/datum/nanite_program/researchplus/enable_passive_effect()
+ . = ..()
+ if(!iscarbon(host_mob))
+ return
+ if(host_mob.client)
+ SSnanites.neural_network_count++
+ else
+ SSnanites.neural_network_count += 0.25
+
+/datum/nanite_program/researchplus/disable_passive_effect()
+ . = ..()
+ if(!iscarbon(host_mob))
+ return
+ if(host_mob.client)
+ SSnanites.neural_network_count--
+ else
+ SSnanites.neural_network_count -= 0.25
+
+/datum/nanite_program/researchplus/active_effect()
+ if(!iscarbon(host_mob))
+ return
+ var/mob/living/carbon/C = host_mob
+ var/points = round(SSnanites.neural_network_count / 12, 0.1)
+ if(!C.client) //less brainpower
+ points *= 0.25
+ SSresearch.science_tech.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = points))
+
+/datum/nanite_program/access
name = "Subdermal ID"
desc = "The nanites store the host's ID access rights in a subdermal magnetic strip. Updates when triggered, copying the host's current access."
+ can_trigger = TRUE
+ trigger_cost = 3
+ trigger_cooldown = 30
rogue_types = list(/datum/nanite_program/skin_decay)
var/access = list()
//Syncs the nanites with the cumulative current mob's access level. Can potentially wipe existing access.
-/datum/nanite_program/triggered/access/trigger()
+/datum/nanite_program/access/on_trigger(comm_message)
var/list/new_access = list()
var/obj/item/current_item
current_item = host_mob.get_active_held_item()
@@ -284,19 +253,42 @@
SEND_SIGNAL(infectee, COMSIG_NANITE_SYNC, nanites)
infectee.investigate_log("was infected by spreading nanites by [key_name(host_mob)] at [AREACOORD(infectee)].", INVESTIGATE_NANITES)
+/datum/nanite_program/nanite_sting
+ name = "Nanite Sting"
+ desc = "When triggered, projects a nearly invisible spike of nanites that attempts to infect a nearby non-host with a copy of the host's nanites cluster."
+ can_trigger = TRUE
+ trigger_cost = 5
+ trigger_cooldown = 100
+ rogue_types = list(/datum/nanite_program/glitch, /datum/nanite_program/toxic)
+
+/datum/nanite_program/nanite_sting/on_trigger(comm_message)
+ var/list/mob/living/target_hosts = list()
+ for(var/mob/living/L in oview(1, host_mob))
+ if(!(L.mob_biotypes & (MOB_ORGANIC|MOB_UNDEAD)) || SEND_SIGNAL(L, COMSIG_HAS_NANITES) || !L.Adjacent(host_mob))
+ continue
+ target_hosts += L
+ if(!target_hosts.len)
+ consume_nanites(-5)
+ return
+ var/mob/living/infectee = pick(target_hosts)
+ if(prob(100 - (infectee.get_permeability_protection() * 100)))
+ //unlike with Infective Exo-Locomotion, this can't take over existing nanites, because Nanite Sting only targets non-hosts.
+ infectee.AddComponent(/datum/component/nanites, 5)
+ SEND_SIGNAL(infectee, COMSIG_NANITE_SYNC, nanites)
+ infectee.investigate_log("was infected by a nanite cluster by [key_name(host_mob)] at [AREACOORD(infectee)].", INVESTIGATE_NANITES)
+ to_chat(infectee, "
You feel a tiny prick.")
+
/datum/nanite_program/mitosis
name = "Mitosis"
- desc = "The nanites gain the ability to self-replicate, using bluespace to power the process, instead of drawing from a template. This rapidly speeds up the replication rate,\
- but it causes occasional software errors due to faulty copies. Not compatible with cloud sync."
+ desc = "The nanites gain the ability to self-replicate, using bluespace to power the process. Becomes more effective the more nanites are already in the host.\
+ The replication has also a chance to corrupt the nanite programming due to copy faults - cloud sync is highly recommended."
use_rate = 0
rogue_types = list(/datum/nanite_program/toxic)
/datum/nanite_program/mitosis/active_effect()
- if(nanites.cloud_id)
- return
var/rep_rate = round(nanites.nanite_volume / 50, 1) //0.5 per 50 nanite volume
rep_rate *= 0.5
- nanites.adjust_nanites(rep_rate)
+ nanites.adjust_nanites(null, rep_rate)
if(prob(rep_rate))
var/datum/nanite_program/fault = pick(nanites.programs)
if(fault == src)
@@ -306,56 +298,22 @@
/datum/nanite_program/dermal_button
name = "Dermal Button"
desc = "Displays a button on the host's skin, which can be used to send a signal to the nanites."
- extra_settings = list("Sent Code","Button Name","Icon","Color")
unique = FALSE
var/datum/action/innate/nanite_button/button
- var/button_name = "Button"
- var/icon = "power"
- var/color = "green"
- var/sent_code = 0
-/datum/nanite_program/dermal_button/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
- if(isnull(new_code))
- return
- sent_code = CLAMP(round(new_code, 1), 1, 9999)
- if(setting == "Button Name")
- var/new_button_name = stripped_input(user, "Choose the name for the button.", "Button Name", button_name, MAX_NAME_LEN)
- if(!new_button_name)
- return
- button_name = new_button_name
- if(setting == "Icon")
- var/new_icon = input("Select the icon to display on the button:", name) as null|anything in list("one","two","three","four","five","plus","minus","power")
- if(!new_icon)
- return
- icon = new_icon
- if(setting == "Color")
- var/new_color = input("Select the color of the button's icon:", name) as null|anything in list("green","red","yellow","blue")
- if(!new_color)
- return
- color = new_color
-
-/datum/nanite_program/dermal_button/get_extra_setting(setting)
- if(setting == "Sent Code")
- return sent_code
- if(setting == "Button Name")
- return button_name
- if(setting == "Icon")
- return capitalize(icon)
- if(setting == "Color")
- return capitalize(color)
-
-/datum/nanite_program/dermal_button/copy_extra_settings_to(datum/nanite_program/dermal_button/target)
- target.sent_code = sent_code
- target.button_name = button_name
- target.icon = icon
- target.color = color
+/datum/nanite_program/dermal_button/register_extra_settings()
+ extra_settings[NES_SENT_CODE] = new /datum/nanite_extra_setting/number(1, 1, 9999)
+ extra_settings[NES_BUTTON_NAME] = new /datum/nanite_extra_setting/text("Button")
+ extra_settings[NES_ICON] = new /datum/nanite_extra_setting/type("power", list("one","two","three","four","five","plus","minus","power"))
+ extra_settings[NES_COLOR] = new /datum/nanite_extra_setting/type("green", list("green","red","yellow","blue"))
/datum/nanite_program/dermal_button/enable_passive_effect()
. = ..()
+ var/datum/nanite_extra_setting/bn_name = extra_settings[NES_BUTTON_NAME]
+ var/datum/nanite_extra_setting/bn_icon = extra_settings[NES_ICON]
+ var/datum/nanite_extra_setting/bn_color = extra_settings[NES_COLOR]
if(!button)
- button = new(src, button_name, icon, color)
+ button = new(src, bn_name.get_value(), bn_icon.get_value(), bn_color.get_value())
button.target = host_mob
button.Grant(host_mob)
@@ -372,7 +330,8 @@
if(activated)
host_mob.visible_message("
[host_mob] presses a button on [host_mob.p_their()] forearm.",
"
You press the nanite button on your forearm.", null, 2)
- SEND_SIGNAL(host_mob, COMSIG_NANITE_SIGNAL, sent_code, "a [name] program")
+ var/datum/nanite_extra_setting/sent_code = extra_settings[NES_SENT_CODE]
+ SEND_SIGNAL(host_mob, COMSIG_NANITE_SIGNAL, sent_code.get_value(), "a [name] program")
/datum/action/innate/nanite_button
name = "Button"
@@ -389,51 +348,3 @@
/datum/action/innate/nanite_button/Activate()
program.press()
-
-/datum/nanite_program/research
- name = "Distributed Computing"
- desc = "The nanites aid the research servers by performing a portion of its calculations, increasing research point generation."
- use_rate = 0.2
- rogue_types = list(/datum/nanite_program/toxic)
-
-/datum/nanite_program/research/active_effect()
- if(!iscarbon(host_mob))
- return
- var/points = 1
- if(!host_mob.client) //less brainpower
- points *= 0.25
- SSresearch.science_tech.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = points))
-
-/datum/nanite_program/researchplus
- name = "Neural Network"
- desc = "The nanites link the host's brains together forming a neural research network, that becomes more efficient with the amount of total hosts."
- use_rate = 0.3
- rogue_types = list(/datum/nanite_program/brain_decay)
-
-/datum/nanite_program/researchplus/enable_passive_effect()
- . = ..()
- if(!iscarbon(host_mob))
- return
- if(host_mob.client)
- SSnanites.neural_network_count++
- else
- SSnanites.neural_network_count += 0.25
-
-/datum/nanite_program/researchplus/disable_passive_effect()
- . = ..()
- if(!iscarbon(host_mob))
- return
- if(host_mob.client)
- SSnanites.neural_network_count--
- else
- SSnanites.neural_network_count -= 0.25
-
-/datum/nanite_program/researchplus/active_effect()
- if(!iscarbon(host_mob))
- return
- var/mob/living/carbon/C = host_mob
- var/points = round(SSnanites.neural_network_count / 12, 0.1)
- if(!C.client) //less brainpower
- points *= 0.25
- SSresearch.science_tech.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = points))
-
diff --git a/code/modules/research/nanites/nanite_programs/weapon.dm b/code/modules/research/nanites/nanite_programs/weapon.dm
index f634b2088c..bd2b9618de 100644
--- a/code/modules/research/nanites/nanite_programs/weapon.dm
+++ b/code/modules/research/nanites/nanite_programs/weapon.dm
@@ -73,21 +73,20 @@
. = ..()
to_chat(host_mob, "
Your blood cools down, and the pain gradually fades.")
-/datum/nanite_program/triggered/explosive
+/datum/nanite_program/explosive
name = "Chain Detonation"
desc = "Detonates all the nanites inside the host in a chain reaction when triggered."
+ can_trigger = TRUE
trigger_cost = 25 //plus every idle nanite left afterwards
trigger_cooldown = 100 //Just to avoid double-triggering
rogue_types = list(/datum/nanite_program/toxic)
-/datum/nanite_program/triggered/explosive/trigger()
- if(!..())
- return
+/datum/nanite_program/explosive/on_trigger(comm_message)
host_mob.visible_message("
[host_mob] starts emitting a high-pitched buzzing, and [host_mob.p_their()] skin begins to glow...",\
"
You start emitting a high-pitched buzzing, and your skin begins to glow...")
addtimer(CALLBACK(src, .proc/boom), CLAMP((nanites.nanite_volume * 0.35), 25, 150))
-/datum/nanite_program/triggered/explosive/proc/boom()
+/datum/nanite_program/explosive/proc/boom()
var/nanite_amount = nanites.nanite_volume
var/heavy_range = FLOOR(nanite_amount/100, 1) - 1
var/light_range = FLOOR(nanite_amount/50, 1) - 1
@@ -96,16 +95,15 @@
//TODO make it defuse if triggered again
-/datum/nanite_program/triggered/heart_stop
+/datum/nanite_program/heart_stop
name = "Heart-Stopper"
desc = "Stops the host's heart when triggered; restarts it if triggered again."
+ can_trigger = TRUE
trigger_cost = 12
trigger_cooldown = 10
rogue_types = list(/datum/nanite_program/nerve_decay)
-/datum/nanite_program/triggered/heart_stop/trigger()
- if(!..())
- return
+/datum/nanite_program/heart_stop/on_trigger(comm_message)
if(iscarbon(host_mob))
var/mob/living/carbon/C = host_mob
var/obj/item/organ/heart/heart = C.getorganslot(ORGAN_SLOT_HEART)
@@ -115,16 +113,16 @@
else
heart.Restart()
-/datum/nanite_program/triggered/emp
+/datum/nanite_program/emp
name = "Electromagnetic Resonance"
- desc = "The nanites cause an elctromagnetic pulse around the host when triggered. Will corrupt other nanite programs!"
+ desc = "The nanites cause an electromagnetic pulse around the host when triggered. Will corrupt other nanite programs!"
+ can_trigger = TRUE
trigger_cost = 10
+ trigger_cooldown = 50
program_flags = NANITE_EMP_IMMUNE
rogue_types = list(/datum/nanite_program/toxic)
-/datum/nanite_program/triggered/emp/trigger()
- if(!..())
- return
+/datum/nanite_program/emp/on_trigger(comm_message)
empulse(host_mob, 1, 2)
/datum/nanite_program/pyro/active_effect()
@@ -148,7 +146,7 @@
/datum/nanite_program/cryo
name = "Cryogenic Treatment"
- desc = "The nanites rapidly skin heat through the host's skin, lowering their temperature."
+ desc = "The nanites rapidly sink heat through the host's skin, lowering their temperature."
use_rate = 1
rogue_types = list(/datum/nanite_program/skin_decay, /datum/nanite_program/pyro)
@@ -160,55 +158,33 @@
/datum/nanite_program/cryo/active_effect()
host_mob.adjust_bodytemperature(-rand(15,25), 50)
-/datum/nanite_program/triggered/comm/mind_control
+/datum/nanite_program/comm/mind_control
name = "Mind Control"
desc = "The nanites imprint an absolute directive onto the host's brain for one minute when triggered."
trigger_cost = 30
trigger_cooldown = 1800
rogue_types = list(/datum/nanite_program/brain_decay, /datum/nanite_program/brain_misfire)
- extra_settings = list("Directive","Comm Code")
- var/directive = "..."
+/datum/nanite_program/comm/mind_control/register_extra_settings()
+ . = ..()
+ extra_settings[NES_DIRECTIVE] = new /datum/nanite_extra_setting/text("...")
-/datum/nanite_program/triggered/comm/mind_control/set_extra_setting(user, setting)
- if(setting == "Directive")
- var/new_directive = stripped_input(user, "Choose the directive to imprint with mind control.", "Directive", directive, MAX_MESSAGE_LEN)
- if(!new_directive)
- return
- directive = new_directive
- if(setting == "Comm Code")
- var/new_code = input(user, "Set the communication code (1-9999) or set to 0 to disable external signals.", name, null) as null|num
- if(isnull(new_code))
- return
- comm_code = CLAMP(round(new_code, 1), 0, 9999)
-
-/datum/nanite_program/triggered/comm/mind_control/get_extra_setting(setting)
- if(setting == "Directive")
- return directive
- if(setting == "Comm Code")
- return comm_code
-
-/datum/nanite_program/triggered/comm/mind_control/copy_extra_settings_to(datum/nanite_program/triggered/comm/mind_control/target)
- target.directive = directive
- target.comm_code = comm_code
-
-/datum/nanite_program/triggered/comm/mind_control/trigger(comm_message)
- if(!..())
- return
+/datum/nanite_program/comm/mind_control/on_trigger(comm_message)
if(host_mob.stat == DEAD)
return
var/sent_directive = comm_message
if(!comm_message)
- sent_directive = directive
+ var/datum/nanite_extra_setting/ES = extra_settings[NES_DIRECTIVE]
+ sent_directive = ES.get_value()
brainwash(host_mob, sent_directive)
- log_game("A mind control nanite program brainwashed [key_name(host_mob)] with the objective '[directive]'.")
+ log_game("A mind control nanite program brainwashed [key_name(host_mob)] with the objective '[sent_directive]'.")
addtimer(CALLBACK(src, .proc/end_brainwashing), 600)
-/datum/nanite_program/triggered/comm/mind_control/proc/end_brainwashing()
+/datum/nanite_program/comm/mind_control/proc/end_brainwashing()
if(host_mob.mind && host_mob.mind.has_antag_datum(/datum/antagonist/brainwashed))
host_mob.mind.remove_antag_datum(/datum/antagonist/brainwashed)
log_game("[key_name(host_mob)] is no longer brainwashed by nanites.")
-
-/datum/nanite_program/triggered/comm/mind_control/disable_passive_effect()
+
+/datum/nanite_program/comm/mind_control/disable_passive_effect()
. = ..()
end_brainwashing()
diff --git a/code/modules/research/nanites/nanite_remote.dm b/code/modules/research/nanites/nanite_remote.dm
index e10d8f8c4b..71aecc8f2c 100644
--- a/code/modules/research/nanites/nanite_remote.dm
+++ b/code/modules/research/nanites/nanite_remote.dm
@@ -18,6 +18,7 @@
var/last_id = 0
var/code = 0
var/relay_code = 0
+ var/current_program_name = "Program"
/obj/item/nanite_remote/examine(mob/user)
. = ..()
@@ -35,10 +36,8 @@
update_icon()
else
to_chat(user, "
Access denied.")
- return TRUE
/obj/item/nanite_remote/emag_act(mob/user)
- . = ..()
if(obj_flags & EMAGGED)
return
to_chat(user, "
You override [src]'s ID lock.")
@@ -46,33 +45,31 @@
if(locked)
locked = FALSE
update_icon()
- return TRUE
-/obj/item/nanite_remote/update_icon()
+/obj/item/nanite_remote/update_overlays()
. = ..()
- cut_overlays()
if(obj_flags & EMAGGED)
- add_overlay("nanite_remote_emagged")
+ . += "nanite_remote_emagged"
if(locked)
- add_overlay("nanite_remote_locked")
+ . += "nanite_remote_locked"
/obj/item/nanite_remote/afterattack(atom/target, mob/user, etc)
switch(mode)
if(REMOTE_MODE_OFF)
return
if(REMOTE_MODE_SELF)
- to_chat(user, "
You activate [src], signaling the nanites in your bloodstream.")
+ to_chat(user, "You activate [src], signaling the nanites in your bloodstream.")
signal_mob(user, code, key_name(user))
if(REMOTE_MODE_TARGET)
if(isliving(target) && (get_dist(target, get_turf(src)) <= 7))
- to_chat(user, "You activate [src], signaling the nanites inside [target].")
+ to_chat(user, "You activate [src], signaling the nanites inside [target].")
signal_mob(target, code, key_name(user))
if(REMOTE_MODE_AOE)
- to_chat(user, "You activate [src], signaling the nanites inside every host around you.")
+ to_chat(user, "You activate [src], signaling the nanites inside every host around you.")
for(var/mob/living/L in view(user, 7))
signal_mob(L, code, key_name(user))
if(REMOTE_MODE_RELAY)
- to_chat(user, "You activate [src], signaling all connected relay nanites.")
+ to_chat(user, "You activate [src], signaling all connected relay nanites.")
signal_relay(code, relay_code, key_name(user))
/obj/item/nanite_remote/proc/signal_mob(mob/living/M, code, source)
@@ -84,9 +81,9 @@
N.relay_signal(code, relay_code, source)
/obj/item/nanite_remote/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.hands_state)
- SStgui.try_update_ui(user, src, ui_key, ui, force_open)
+ ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
- ui = new(user, src, ui_key, "nanite_remote", name, 420, 800, master_ui, state)
+ ui = new(user, src, ui_key, "nanite_remote", name, 420, 500, master_ui, state)
ui.open()
/obj/item/nanite_remote/ui_data()
@@ -96,6 +93,7 @@
data["mode"] = mode
data["locked"] = locked
data["saved_settings"] = saved_settings
+ data["program_name"] = current_program_name
return data
@@ -106,7 +104,7 @@
if("set_code")
if(locked)
return
- var/new_code = input("Set code (0000-9999):", name, code) as null|num
+ var/new_code = text2num(params["code"])
if(!isnull(new_code))
new_code = CLAMP(round(new_code, 1),0,9999)
code = new_code
@@ -114,21 +112,21 @@
if("set_relay_code")
if(locked)
return
- var/new_code = input("Set relay code (0000-9999):", name, code) as null|num
+ var/new_code = text2num(params["code"])
if(!isnull(new_code))
new_code = CLAMP(round(new_code, 1),0,9999)
relay_code = new_code
. = TRUE
+ if("update_name")
+ current_program_name = params["name"]
+ . = TRUE
if("save")
if(locked)
return
- var/code_name = stripped_input(usr, "Set the setting name", "Set Name", null , 15)
- if(!code_name)
- return
var/new_save = list()
new_save["id"] = last_id + 1
last_id++
- new_save["name"] = code_name
+ new_save["name"] = current_program_name
new_save["code"] = code
new_save["mode"] = mode
new_save["relay_code"] = relay_code
@@ -172,7 +170,6 @@
name = "nanite communication remote"
desc = "A device that can send text messages to specific programs."
icon_state = "nanite_comm_remote"
- var/comm_code = 0
var/comm_message = ""
/obj/item/nanite_remote/comm/afterattack(atom/target, mob/user, etc)
@@ -180,42 +177,38 @@
if(REMOTE_MODE_OFF)
return
if(REMOTE_MODE_SELF)
- to_chat(user, "You activate [src], signaling the nanites in your bloodstream.")
- signal_mob(user, comm_code, comm_message)
+ to_chat(user, "You activate [src], signaling the nanites in your bloodstream.")
+ signal_mob(user, code, comm_message)
if(REMOTE_MODE_TARGET)
if(isliving(target) && (get_dist(target, get_turf(src)) <= 7))
- to_chat(user, "You activate [src], signaling the nanites inside [target].")
+ to_chat(user, "You activate [src], signaling the nanites inside [target].")
signal_mob(target, code, comm_message, key_name(user))
if(REMOTE_MODE_AOE)
- to_chat(user, "You activate [src], signaling the nanites inside every host around you.")
+ to_chat(user, "You activate [src], signaling the nanites inside every host around you.")
for(var/mob/living/L in view(user, 7))
signal_mob(L, code, comm_message, key_name(user))
if(REMOTE_MODE_RELAY)
- to_chat(user, "You activate [src], signaling all connected relay nanites.")
+ to_chat(user, "You activate [src], signaling all connected relay nanites.")
signal_relay(code, relay_code, comm_message, key_name(user))
/obj/item/nanite_remote/comm/signal_mob(mob/living/M, code, source)
- SEND_SIGNAL(M, COMSIG_NANITE_COMM_SIGNAL, comm_code, comm_message)
+ SEND_SIGNAL(M, COMSIG_NANITE_COMM_SIGNAL, code, comm_message)
/obj/item/nanite_remote/comm/signal_relay(code, relay_code, source)
for(var/X in SSnanites.nanite_relays)
var/datum/nanite_program/relay/N = X
- N.relay_comm_signal(comm_code, relay_code, comm_message)
-
-/obj/item/nanite_remote/comm/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.hands_state)
- SStgui.try_update_ui(user, src, ui_key, ui, force_open)
- if(!ui)
- ui = new(user, src, ui_key, "nanite_comm_remote", name, 420, 800, master_ui, state)
- ui.open()
+ N.relay_comm_signal(code, relay_code, comm_message)
/obj/item/nanite_remote/comm/ui_data()
var/list/data = list()
- data["comm_code"] = comm_code
+ data["comms"] = TRUE
+ data["code"] = code
data["relay_code"] = relay_code
- data["comm_message"] = comm_message
+ data["message"] = comm_message
data["mode"] = mode
data["locked"] = locked
data["saved_settings"] = saved_settings
+ data["program_name"] = current_program_name
return data
@@ -223,56 +216,17 @@
if(..())
return
switch(action)
- if("set_comm_code")
- if(locked)
- return
- var/new_code = input("Set comm code (0000-9999):", name, code) as null|num
- if(!isnull(new_code))
- new_code = CLAMP(round(new_code, 1),0,9999)
- comm_code = new_code
- . = TRUE
if("set_message")
if(locked)
return
- var/new_message = stripped_input(usr, "Set the message (Max 300 characters):", "Set Message", null , 300)
+ var/new_message = html_encode(params["value"])
if(!new_message)
return
comm_message = new_message
. = TRUE
- if("comm_save")
- if(locked)
- return
- var/code_name = stripped_input(usr, "Set the setting name", "Set Name", null , 15)
- if(!code_name)
- return
- var/new_save = list()
- new_save["id"] = last_id + 1
- last_id++
- new_save["name"] = code_name
- new_save["code"] = comm_code
- new_save["mode"] = mode
- new_save["relay_code"] = relay_code
- new_save["message"] = comm_message
-
- saved_settings += list(new_save)
- . = TRUE
- if("comm_load")
- var/code_id = params["save_id"]
- var/list/setting
- for(var/list/X in saved_settings)
- if(X["id"] == text2num(code_id))
- setting = X
- break
- if(setting)
- comm_code = setting["code"]
- mode = setting["mode"]
- relay_code = setting["relay_code"]
- comm_message = setting["message"]
- . = TRUE
-
#undef REMOTE_MODE_OFF
#undef REMOTE_MODE_SELF
#undef REMOTE_MODE_TARGET
#undef REMOTE_MODE_AOE
-#undef REMOTE_MODE_RELAY
\ No newline at end of file
+#undef REMOTE_MODE_RELAY
diff --git a/code/modules/research/nanites/program_disks.dm b/code/modules/research/nanites/program_disks.dm
index 6444ebc025..667618173c 100644
--- a/code/modules/research/nanites/program_disks.dm
+++ b/code/modules/research/nanites/program_disks.dm
@@ -31,7 +31,7 @@
program_type = /datum/nanite_program/relay
/obj/item/disk/nanite_program/emp
- program_type = /datum/nanite_program/triggered/emp
+ program_type = /datum/nanite_program/emp
/obj/item/disk/nanite_program/spreading
program_type = /datum/nanite_program/spreading
@@ -91,16 +91,16 @@
program_type = /datum/nanite_program/suffocating
/obj/item/disk/nanite_program/heart_stop
- program_type = /datum/nanite_program/triggered/heart_stop
+ program_type = /datum/nanite_program/heart_stop
/obj/item/disk/nanite_program/explosive
- program_type = /datum/nanite_program/triggered/explosive
+ program_type = /datum/nanite_program/explosive
/obj/item/disk/nanite_program/shock
- program_type = /datum/nanite_program/triggered/shocking
+ program_type = /datum/nanite_program/shocking
/obj/item/disk/nanite_program/sleepy
- program_type = /datum/nanite_program/triggered/sleepy
+ program_type = /datum/nanite_program/sleepy
/obj/item/disk/nanite_program/paralyzing
program_type = /datum/nanite_program/paralyzing
@@ -130,7 +130,7 @@
program_type = /datum/nanite_program/pacifying
/obj/item/disk/nanite_program/stun
- program_type = /datum/nanite_program/triggered/stun
+ program_type = /datum/nanite_program/stun
/obj/item/disk/nanite_program/dermal_button
program_type = /datum/nanite_program/dermal_button
@@ -149,3 +149,4 @@
/obj/item/disk/nanite_program/bad_mood
program_type = /datum/nanite_program/bad_mood
+
diff --git a/code/modules/research/nanites/public_chamber.dm b/code/modules/research/nanites/public_chamber.dm
index f1cd19b2a2..76392c66e9 100644
--- a/code/modules/research/nanites/public_chamber.dm
+++ b/code/modules/research/nanites/public_chamber.dm
@@ -32,7 +32,7 @@
busy_icon_state = working_icon
update_icon()
-/obj/machinery/public_nanite_chamber/proc/inject_nanites()
+/obj/machinery/public_nanite_chamber/proc/inject_nanites(mob/living/attacker)
if(stat & (NOPOWER|BROKEN))
return
if((stat & MAINT) || panel_open)
@@ -47,46 +47,67 @@
set_busy(TRUE, "[initial(icon_state)]_raising")
addtimer(CALLBACK(src, .proc/set_busy, TRUE, "[initial(icon_state)]_active"),20)
addtimer(CALLBACK(src, .proc/set_busy, TRUE, "[initial(icon_state)]_falling"),60)
- addtimer(CALLBACK(src, .proc/complete_injection, locked_state),80)
+ addtimer(CALLBACK(src, .proc/complete_injection, locked_state, attacker),80)
-/obj/machinery/public_nanite_chamber/proc/complete_injection(locked_state)
+/obj/machinery/public_nanite_chamber/proc/complete_injection(locked_state, mob/living/attacker)
//TODO MACHINE DING
locked = locked_state
set_busy(FALSE)
if(!occupant)
return
+ if(attacker)
+ occupant.investigate_log("was injected with nanites by [key_name(attacker)] using [src] at [AREACOORD(src)].", INVESTIGATE_NANITES)
+ log_combat(attacker, occupant, "injected", null, "with nanites via [src]")
occupant.AddComponent(/datum/component/nanites, 75, cloud_id)
-/obj/machinery/public_nanite_chamber/update_icon()
- cut_overlays()
-
+/obj/machinery/public_nanite_chamber/proc/change_cloud(mob/living/attacker)
+ if(stat & (NOPOWER|BROKEN))
+ return
if((stat & MAINT) || panel_open)
- add_overlay("maint")
+ return
+ if(!occupant || busy)
+ return
- else if(!(stat & (NOPOWER|BROKEN)))
- if(busy || locked)
- add_overlay("red")
- if(locked)
- add_overlay("bolted")
- else
- add_overlay("green")
+ var/locked_state = locked
+ locked = TRUE
+ set_busy(TRUE, "[initial(icon_state)]_raising")
+ addtimer(CALLBACK(src, .proc/set_busy, TRUE, "[initial(icon_state)]_active"),20)
+ addtimer(CALLBACK(src, .proc/set_busy, TRUE, "[initial(icon_state)]_falling"),40)
+ addtimer(CALLBACK(src, .proc/complete_cloud_change, locked_state, attacker),60)
+/obj/machinery/public_nanite_chamber/proc/complete_cloud_change(locked_state, mob/living/attacker)
+ locked = locked_state
+ set_busy(FALSE)
+ if(!occupant)
+ return
+ if(attacker)
+ occupant.investigate_log("had their nanite cloud ID changed into [cloud_id] by [key_name(attacker)] using [src] at [AREACOORD(src)].", INVESTIGATE_NANITES)
+ SEND_SIGNAL(occupant, COMSIG_NANITE_SET_CLOUD, cloud_id)
+/obj/machinery/public_nanite_chamber/update_icon_state()
//running and someone in there
if(occupant)
if(busy)
icon_state = busy_icon_state
else
icon_state = initial(icon_state)+ "_occupied"
- return
+ else
+ //running
+ icon_state = initial(icon_state)+ (state_open ? "_open" : "")
- //running
- icon_state = initial(icon_state)+ (state_open ? "_open" : "")
-
-/obj/machinery/public_nanite_chamber/power_change()
+/obj/machinery/public_nanite_chamber/update_overlays()
. = ..()
- update_icon()
+ if((stat & MAINT) || panel_open)
+ . += "maint"
+
+ else if(!(stat & (NOPOWER|BROKEN)))
+ if(busy || locked)
+ . += "red"
+ if(locked)
+ . += "bolted"
+ else
+ . += "green"
/obj/machinery/public_nanite_chamber/proc/toggle_open(mob/user)
if(panel_open)
@@ -94,7 +115,7 @@
return
if(state_open)
- close_machine()
+ close_machine(null, user)
return
else if(locked)
@@ -113,7 +134,7 @@
user.last_special = world.time + CLICK_CD_BREAKOUT
user.visible_message("You see [user] kicking against the door of [src]!", \
"You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)", \
- "You hear a metallic creaking from [src].")
+ "You hear a metallic creaking from [src].")
if(do_after(user,(breakout_time), target = src))
if(!user || user.stat != CONSCIOUS || user.loc != src || state_open || !locked || busy)
return
@@ -122,7 +143,7 @@
"You successfully break out of [src]!")
open_machine()
-/obj/machinery/public_nanite_chamber/close_machine(mob/living/carbon/user)
+/obj/machinery/public_nanite_chamber/close_machine(mob/living/carbon/user, mob/living/attacker)
if(!state_open)
return FALSE
@@ -130,15 +151,18 @@
. = TRUE
- addtimer(CALLBACK(src, .proc/try_inject_nanites), 30) //If someone is shoved in give them a chance to get out before the injection starts
+ addtimer(CALLBACK(src, .proc/try_inject_nanites, attacker), 30) //If someone is shoved in give them a chance to get out before the injection starts
-/obj/machinery/public_nanite_chamber/proc/try_inject_nanites()
+/obj/machinery/public_nanite_chamber/proc/try_inject_nanites(mob/living/attacker)
if(occupant)
var/mob/living/L = occupant
if(SEND_SIGNAL(L, COMSIG_HAS_NANITES))
+ var/datum/component/nanites/nanites = L.GetComponent(/datum/component/nanites)
+ if(nanites && nanites.cloud_id != cloud_id)
+ change_cloud(attacker)
return
if(L.mob_biotypes & (MOB_ORGANIC | MOB_UNDEAD))
- inject_nanites()
+ inject_nanites(attacker)
/obj/machinery/public_nanite_chamber/open_machine()
if(state_open)
@@ -173,6 +197,8 @@
toggle_open(user)
/obj/machinery/public_nanite_chamber/MouseDrop_T(mob/target, mob/user)
- if(user.stat || user.lying || !Adjacent(user) || !user.Adjacent(target) || !iscarbon(target) || !user.IsAdvancedToolUser())
+ if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK) || !Adjacent(target) || !user.Adjacent(target) || !iscarbon(target))
return
- close_machine(target)
+ if(close_machine(target, user))
+ log_combat(user, target, "inserted", null, "into [src].")
+ add_fingerprint(user)
diff --git a/code/modules/research/nanites/rules.dm b/code/modules/research/nanites/rules.dm
new file mode 100644
index 0000000000..f496abe6e1
--- /dev/null
+++ b/code/modules/research/nanites/rules.dm
@@ -0,0 +1,151 @@
+/datum/nanite_rule
+ var/name = "Generic Condition"
+ var/desc = "When triggered, the program is active"
+ var/datum/nanite_program/program
+
+/datum/nanite_rule/New(datum/nanite_program/new_program)
+ program = new_program
+ if(LAZYLEN(new_program.rules) <= 5) //Avoid infinite stacking rules
+ new_program.rules += src
+ else
+ qdel(src)
+
+/datum/nanite_rule/proc/remove()
+ program.rules -= src
+ program = null
+ qdel(src)
+
+/datum/nanite_rule/proc/check_rule()
+ return TRUE
+
+/datum/nanite_rule/proc/display()
+ return name
+
+/datum/nanite_rule/proc/copy_to(datum/nanite_program/new_program)
+ new type(new_program)
+
+/datum/nanite_rule/health
+ name = "Health"
+ desc = "Checks the host's health status."
+
+ var/threshold = 50
+ var/above = TRUE
+
+/datum/nanite_rule/health/check_rule()
+ var/health_percent = program.host_mob.health / program.host_mob.maxHealth * 100
+ if(above)
+ if(health_percent >= threshold)
+ return TRUE
+ else
+ if(health_percent < threshold)
+ return TRUE
+ return FALSE
+
+/datum/nanite_rule/health/display()
+ return "[name] [above ? ">" : "<"] [threshold]%"
+
+/datum/nanite_rule/health/copy_to(datum/nanite_program/new_program)
+ var/datum/nanite_rule/health/rule = new(new_program)
+ rule.above = above
+ rule.threshold = threshold
+
+//TODO allow inversion
+/datum/nanite_rule/crit
+ name = "Crit"
+ desc = "Checks if the host is in critical condition."
+
+/datum/nanite_rule/crit/check_rule()
+ if(program.host_mob.InCritical())
+ return TRUE
+ return FALSE
+
+/datum/nanite_rule/death
+ name = "Death"
+ desc = "Checks if the host is dead."
+
+/datum/nanite_rule/death/check_rule()
+ if(program.host_mob.stat == DEAD || HAS_TRAIT(program.host_mob, TRAIT_FAKEDEATH))
+ return TRUE
+ return FALSE
+
+/datum/nanite_rule/cloud_sync
+ name = "Cloud Sync"
+ desc = "Checks if the nanites have cloud sync enabled or disabled."
+ var/check_type = "Enabled"
+
+/datum/nanite_rule/cloud_sync/check_rule()
+ if(check_type == "Enabled")
+ return program.nanites.cloud_active
+ else
+ return !program.nanites.cloud_active
+
+/datum/nanite_rule/cloud_sync/copy_to(datum/nanite_program/new_program)
+ var/datum/nanite_rule/cloud_sync/rule = new(new_program)
+ rule.check_type = check_type
+
+/datum/nanite_rule/cloud_sync/display()
+ return "[name]:[check_type]"
+
+/datum/nanite_rule/nanites
+ name = "Nanite Volume"
+ desc = "Checks the host's nanite volume."
+
+ var/threshold = 50
+ var/above = TRUE
+
+/datum/nanite_rule/nanites/check_rule()
+ var/nanite_percent = (program.nanites.nanite_volume - program.nanites.safety_threshold)/(program.nanites.max_nanites - program.nanites.safety_threshold)*100
+ if(above)
+ if(nanite_percent >= threshold)
+ return TRUE
+ else
+ if(nanite_percent < threshold)
+ return TRUE
+ return FALSE
+
+/datum/nanite_rule/nanites/copy_to(datum/nanite_program/new_program)
+ var/datum/nanite_rule/nanites/rule = new(new_program)
+ rule.above = above
+ rule.threshold = threshold
+
+/datum/nanite_rule/nanites/display()
+ return "[name] [above ? ">" : "<"] [threshold]%"
+
+/datum/nanite_rule/damage
+ name = "Damage"
+ desc = "Checks the host's damage."
+
+ var/threshold = 50
+ var/above = TRUE
+ var/damage_type = BRUTE
+
+/datum/nanite_rule/damage/check_rule()
+ var/damage_amt = 0
+ switch(damage_type)
+ if(BRUTE)
+ damage_amt = program.host_mob.getBruteLoss()
+ if(BURN)
+ damage_amt = program.host_mob.getFireLoss()
+ if(TOX)
+ damage_amt = program.host_mob.getToxLoss()
+ if(OXY)
+ damage_amt = program.host_mob.getOxyLoss()
+ if(CLONE)
+ damage_amt = program.host_mob.getCloneLoss()
+
+ if(above)
+ if(damage_amt >= threshold)
+ return TRUE
+ else
+ if(damage_amt < threshold)
+ return TRUE
+ return FALSE
+
+/datum/nanite_rule/damage/copy_to(datum/nanite_program/new_program)
+ var/datum/nanite_rule/damage/rule = new(new_program)
+ rule.above = above
+ rule.threshold = threshold
+ rule.damage_type = damage_type
+
+/datum/nanite_rule/damage/display()
+ return "[damage_type] [above ? ">" : "<"] [threshold]"
diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm
index 71cfe7c0f5..0104bfba7b 100644
--- a/code/modules/research/rdconsole.dm
+++ b/code/modules/research/rdconsole.dm
@@ -52,13 +52,10 @@ 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])
- var/datum/material/material = GLOB.materials_list[ID]
+ if (istype(ID, /datum/material))
+ var/datum/material/material = ID
return material.name
- return "ERROR: Report This"
+ return ID
/obj/machinery/computer/rdconsole/proc/SyncRDevices() //Makes sure it is properly sync'ed up with the devices attached to it (if any).
for(var/obj/machinery/rnd/D in oview(3,src))
@@ -376,11 +373,13 @@ Nothing else in the console has ID requirements.
l += ui_protolathe_header()
l += "Material Storage:
"
for(var/mat_id in mat_container.materials)
- var/datum/material/M = mat_container.materials[mat_id]
- l += "* [M.amount] of [M.name]: "
- if(M.amount >= MINERAL_MATERIAL_AMOUNT) l += "
Eject [RDSCREEN_NOBREAK]"
- if(M.amount >= MINERAL_MATERIAL_AMOUNT*5) l += "
5x [RDSCREEN_NOBREAK]"
- if(M.amount >= MINERAL_MATERIAL_AMOUNT) l += "
All[RDSCREEN_NOBREAK]"
+ var/datum/material/M = mat_id
+ var/amount = mat_container.materials[mat_id]
+ var/ref = REF(M)
+ l += "* [amount] of [M.name]: "
+ if(amount >= MINERAL_MATERIAL_AMOUNT) l += "
Eject [RDSCREEN_NOBREAK]"
+ if(amount >= MINERAL_MATERIAL_AMOUNT*5) l += "
5x [RDSCREEN_NOBREAK]"
+ if(amount >= MINERAL_MATERIAL_AMOUNT) l += "
All[RDSCREEN_NOBREAK]"
l += ""
l += "
[RDSCREEN_NOBREAK]"
return l
@@ -509,11 +508,13 @@ Nothing else in the console has ID requirements.
l += ui_circuit_header()
l += "Material Storage:"
for(var/mat_id in mat_container.materials)
- var/datum/material/M = mat_container.materials[mat_id]
- l += "* [M.amount] of [M.name]: "
- if(M.amount >= MINERAL_MATERIAL_AMOUNT) l += "
Eject [RDSCREEN_NOBREAK]"
- if(M.amount >= MINERAL_MATERIAL_AMOUNT*5) l += "
5x [RDSCREEN_NOBREAK]"
- if(M.amount >= MINERAL_MATERIAL_AMOUNT) l += "
All[RDSCREEN_NOBREAK]
"
+ var/datum/material/M = mat_id
+ var/amount = mat_container.materials[mat_id]
+ var/ref = REF(M)
+ l += "* [amount] of [M.name]: "
+ if(amount >= MINERAL_MATERIAL_AMOUNT) l += "Eject [RDSCREEN_NOBREAK]"
+ if(amount >= MINERAL_MATERIAL_AMOUNT*5) l += "5x [RDSCREEN_NOBREAK]"
+ if(amount >= MINERAL_MATERIAL_AMOUNT) l += "All[RDSCREEN_NOBREAK]
"
return l
/obj/machinery/computer/rdconsole/proc/ui_techdisk() //Legacy code
@@ -615,8 +616,8 @@ Nothing else in the console has ID requirements.
l += "