mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 08:29:57 +01:00
Converts Reagents to Typepaths and Centralises Reagent Spawning (#9140)
Converts reagents to use typepaths instead of IDs.
Centralises reagent spawning in a lot of places to use reagents_to_add instead of a variety of custom methods or initialise overrides.
This commit is contained in:
@@ -178,13 +178,9 @@ Pen exclusive commands
|
||||
flags = OPENCONTAINER
|
||||
slot_flags = SLOT_BELT
|
||||
origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5)
|
||||
var/list/pen_reagents = list()
|
||||
|
||||
/obj/item/pen/reagent/New()
|
||||
..()
|
||||
/obj/item/pen/reagent/Initialize()
|
||||
. = ..()
|
||||
create_reagents(30)
|
||||
for (var/i in pen_reagents)
|
||||
reagents.add_reagent(i, pen_reagents[i])
|
||||
|
||||
/obj/item/pen/reagent/attack(mob/living/M as mob, mob/user as mob)
|
||||
|
||||
@@ -206,7 +202,7 @@ Pen exclusive commands
|
||||
/obj/item/pen/reagent/sleepy
|
||||
desc = "It's a black ink pen with a sharp point and a carefully engraved \"Waffle Co.\""
|
||||
origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5)
|
||||
pen_reagents = list("chloralhydrate" = 22)
|
||||
reagents_to_add = list(/datum/reagent/chloralhydrate = 22)
|
||||
|
||||
|
||||
/*
|
||||
@@ -214,29 +210,29 @@ Pen exclusive commands
|
||||
*/
|
||||
/obj/item/pen/reagent/paralysis
|
||||
origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5)
|
||||
pen_reagents = list("dextrotoxin" = 10)
|
||||
reagents_to_add = list(/datum/reagent/toxin/dextrotoxin = 10)
|
||||
|
||||
/obj/item/pen/reagent/healing
|
||||
origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5)
|
||||
pen_reagents = list("tricordrazine" = 10, "dermaline" = 5, "bicaridine" = 5)
|
||||
reagents_to_add = list(/datum/reagent/tricordrazine = 10, /datum/reagent/dermaline = 5, /datum/reagent/bicaridine = 5)
|
||||
icon_state = "pen_green"
|
||||
colour = "green"
|
||||
|
||||
/obj/item/pen/reagent/pacifier
|
||||
origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5)
|
||||
pen_reagents = list("wulumunusha" = 2, "paxazide" = 15, "cryptobiolin" = 10)
|
||||
reagents_to_add = list(/datum/reagent/wulumunusha = 2, /datum/reagent/pacifier = 15, /datum/reagent/cryptobiolin = 10)
|
||||
icon_state = "pen_blue"
|
||||
colour = "blue"
|
||||
|
||||
/obj/item/pen/reagent/hyperzine
|
||||
origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5)
|
||||
pen_reagents = list("hyperzine" = 10)
|
||||
reagents_to_add = list(/datum/reagent/hyperzine = 10)
|
||||
icon_state = "pen_yellow"
|
||||
colour = "yellow"
|
||||
|
||||
/obj/item/pen/reagent/poison
|
||||
origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5)
|
||||
pen_reagents = list("cyanide" = 1, "lexorin" = 20)
|
||||
reagents_to_add = list(/datum/reagent/toxin/cyanide = 1, /datum/reagent/lexorin = 20)
|
||||
icon_state = "pen_red"
|
||||
colour = "red"
|
||||
|
||||
@@ -308,14 +304,8 @@ Pen exclusive commands
|
||||
var/shadeColour = "#220000" //RGB
|
||||
var/instant = 0
|
||||
var/colourName = "red" //for updateIcon purposes
|
||||
var/chem_volume = 10 //crayon dust
|
||||
var/dust = "crayon_dust"
|
||||
|
||||
/obj/item/pen/crayon/New()
|
||||
name = "[colourName] crayon"
|
||||
..()
|
||||
reagents_to_add = list(/datum/reagent/crayon_dust = 10)
|
||||
|
||||
/obj/item/pen/crayon/Initialize()
|
||||
. = ..()
|
||||
create_reagents(chem_volume)
|
||||
reagents.add_reagent(dust,chem_volume)
|
||||
name = "[colourName] crayon"
|
||||
|
||||
Reference in New Issue
Block a user