Revert "Singletons + refactor of /datum/observ (#15487)" (#15515)

This commit is contained in:
Matt Atlas
2023-01-05 19:21:22 +01:00
committed by GitHub
parent 34b1bcd055
commit b1869884c1
506 changed files with 7214 additions and 7561 deletions

View File

@@ -67,7 +67,6 @@
#include "code\__defines\rust_g.dm" #include "code\__defines\rust_g.dm"
#include "code\__defines\ship_weapons.dm" #include "code\__defines\ship_weapons.dm"
#include "code\__defines\shuttle.dm" #include "code\__defines\shuttle.dm"
#include "code\__defines\singletons.dm"
#include "code\__defines\space_sectors.dm" #include "code\__defines\space_sectors.dm"
#include "code\__defines\spaceman_dmm.dm" #include "code\__defines\spaceman_dmm.dm"
#include "code\__defines\spatial_gridmap.dm" #include "code\__defines\spatial_gridmap.dm"
@@ -255,7 +254,6 @@
#include "code\controllers\subsystems\processing\psi.dm" #include "code\controllers\subsystems\processing\psi.dm"
#include "code\controllers\subsystems\processing\shuttle.dm" #include "code\controllers\subsystems\processing\shuttle.dm"
#include "code\controllers\subsystems\processing\vueui.dm" #include "code\controllers\subsystems\processing\vueui.dm"
#include "code\core\datum\IsAbstract.dm"
#include "code\datums\ai_law_sets.dm" #include "code\datums\ai_law_sets.dm"
#include "code\datums\ai_laws.dm" #include "code\datums\ai_laws.dm"
#include "code\datums\beam.dm" #include "code\datums\beam.dm"
@@ -338,8 +336,8 @@
#include "code\datums\radio\signal.dm" #include "code\datums\radio\signal.dm"
#include "code\datums\repositories\cameras.dm" #include "code\datums\repositories\cameras.dm"
#include "code\datums\repositories\crew.dm" #include "code\datums\repositories\crew.dm"
#include "code\datums\repositories\decls.dm"
#include "code\datums\repositories\repository.dm" #include "code\datums\repositories\repository.dm"
#include "code\datums\repositories\singletons.dm"
#include "code\datums\repositories\unique.dm" #include "code\datums\repositories\unique.dm"
#include "code\datums\trading\_trading_defines.dm" #include "code\datums\trading\_trading_defines.dm"
#include "code\datums\trading\ai.dm" #include "code\datums\trading\ai.dm"

View File

@@ -111,7 +111,7 @@ Contains helper procs for airflow, handled in /connection_group.
/mob/living/carbon/human/airflow_hit(atom/A) /mob/living/carbon/human/airflow_hit(atom/A)
// for(var/mob/M in hearers(src)) // for(var/mob/M in hearers(src))
// M.show_message("<span class='danger'>[src] slams into [A]!</span>",1,"<span class='danger'>You hear a loud slam!</span>",2) // M.show_message("<span class='danger'>[src] slams into [A]!</span>",1,"<span class='danger'>You hear a loud slam!</span>",2)
playsound(src.loc, /singleton/sound_category/punch_sound, 25, 1, -1) playsound(src.loc, /decl/sound_category/punch_sound, 25, 1, -1)
if (prob(33)) if (prob(33))
loc:add_blood(src) loc:add_blood(src)
bloody_body(src) bloody_body(src)

View File

@@ -1,23 +0,0 @@
/*
* Performance behaviors for avoiding calling procs unecessarily on the Singletons global.
*/
/// Get a singleton instance according to path P. Creates it if necessary. Null if abstract or not a singleton.
#define GET_SINGLETON(P)\
(ispath(P, /singleton) ? (Singletons.resolved_instances[P] ? Singletons.instances[P] : Singletons.GetInstanceOf(P)) : Singletons.GetInstance(P))
/// Get a (path = instance) map of valid singletons according to typesof(P).
#define GET_SINGLETON_TYPE_MAP(P)\
(ispath(P, /singleton) ? (Singletons.resolved_type_maps[P] ? Singletons.type_maps[P] : Singletons.GetTypeMap(P)) : list())
/// Get a (path = instance) map of valid singletons according to subtypesof(P).
#define GET_SINGLETON_SUBTYPE_MAP(P)\
(ispath(P, /singleton) ? (Singletons.resolved_subtype_maps[P] ? Singletons.subtype_maps[P] : Singletons.GetSubtypeMap(P)) : list())
/// Get a list of valid singletons according to typesof(path).
#define GET_SINGLETON_TYPE_LIST(P)\
(ispath(P, /singleton) ? (Singletons.resolved_type_lists[P] ? Singletons.type_lists[P] : Singletons.GetTypeList(P)) : list())
/// Get a list of valid singletons according to subtypesof(path).
#define GET_SINGLETON_SUBTYPE_LIST(P)\
(ispath(P, /singleton) ? (Singletons.resolved_subtype_lists[P] ? Singletons.subtype_lists[P] : Singletons.GetSubtypeListOf(P)) : Singletons.GetSubtypeList(P))

View File

@@ -1,59 +1,59 @@
/singleton/proteinbar_flavor /decl/proteinbar_flavor
var/name = "flavorless" var/name = "flavorless"
var/list/reagents var/list/reagents
/singleton/proteinbar_flavor/applenpear /decl/proteinbar_flavor/applenpear
name = "apple 'n pear" name = "apple 'n pear"
reagents = list(/singleton/reagent/drink/applejuice, /singleton/reagent/drink/pearjuice) reagents = list(/decl/reagent/drink/applejuice, /decl/reagent/drink/pearjuice)
/singleton/proteinbar_flavor/banananut /decl/proteinbar_flavor/banananut
name = "banana nut" name = "banana nut"
reagents = list(/singleton/reagent/drink/banana) reagents = list(/decl/reagent/drink/banana)
/singleton/proteinbar_flavor/cappuccino /decl/proteinbar_flavor/cappuccino
name = "cappuccino" name = "cappuccino"
reagents = list(/singleton/reagent/drink/coffee, /singleton/reagent/drink/milk) reagents = list(/decl/reagent/drink/coffee, /decl/reagent/drink/milk)
/singleton/proteinbar_flavor/casualcupcake /decl/proteinbar_flavor/casualcupcake
name = "casual cupcake" name = "casual cupcake"
reagents = list(/singleton/reagent/nutriment/sprinkles, /singleton/reagent/nutriment/coating/batter) reagents = list(/decl/reagent/nutriment/sprinkles, /decl/reagent/nutriment/coating/batter)
/singleton/proteinbar_flavor/chippercherry /decl/proteinbar_flavor/chippercherry
name = "chipper cherry" name = "chipper cherry"
reagents = list(/singleton/reagent/nutriment/cherryjelly) reagents = list(/decl/reagent/nutriment/cherryjelly)
/singleton/proteinbar_flavor/chocolite /decl/proteinbar_flavor/chocolite
name = "choco-lite" name = "choco-lite"
reagents = list(/singleton/reagent/nutriment/coco) reagents = list(/decl/reagent/nutriment/coco)
/singleton/proteinbar_flavor/citrusblast /decl/proteinbar_flavor/citrusblast
name = "citrus blast" name = "citrus blast"
reagents = list(/singleton/reagent/drink/lemonjuice, /singleton/reagent/drink/limejuice, /singleton/reagent/drink/orangejuice) reagents = list(/decl/reagent/drink/lemonjuice, /decl/reagent/drink/limejuice, /decl/reagent/drink/orangejuice)
/singleton/proteinbar_flavor/classiccaramel /decl/proteinbar_flavor/classiccaramel
name = "classic caramel" name = "classic caramel"
reagents = list(/singleton/reagent/nutriment/caramel) reagents = list(/decl/reagent/nutriment/caramel)
/singleton/proteinbar_flavor/delicatedenton /decl/proteinbar_flavor/delicatedenton
name = "delicate denton" name = "delicate denton"
reagents = list(/singleton/reagent/drink/milk/soymilk) reagents = list(/decl/reagent/drink/milk/soymilk)
/singleton/proteinbar_flavor/heartyherbal /decl/proteinbar_flavor/heartyherbal
name = "hearty herbal" name = "hearty herbal"
reagents = list(/singleton/reagent/drink/garlicjuice, /singleton/reagent/drink/onionjuice) reagents = list(/decl/reagent/drink/garlicjuice, /decl/reagent/drink/onionjuice)
/singleton/proteinbar_flavor/honeybuns /decl/proteinbar_flavor/honeybuns
name = "honey buns" name = "honey buns"
reagents = list(/singleton/reagent/nutriment/honey, /singleton/reagent/drink/grapejuice) reagents = list(/decl/reagent/nutriment/honey, /decl/reagent/drink/grapejuice)
/singleton/proteinbar_flavor/powerfulpeppermint /decl/proteinbar_flavor/powerfulpeppermint
name = "powerful peppermint" name = "powerful peppermint"
reagents = list(/singleton/reagent/nutriment/mint) reagents = list(/decl/reagent/nutriment/mint)
/singleton/proteinbar_flavor/magicalmelons /decl/proteinbar_flavor/magicalmelons
name = "magical melons" name = "magical melons"
reagents = list(/singleton/reagent/drink/watermelonjuice) reagents = list(/decl/reagent/drink/watermelonjuice)
/singleton/proteinbar_flavor/mixedberry /decl/proteinbar_flavor/mixedberry
name = "mixed berry" name = "mixed berry"
reagents = list(/singleton/reagent/drink/berryjuice) reagents = list(/decl/reagent/drink/berryjuice)

View File

@@ -75,7 +75,7 @@
/proc/cmp_rcon_bbox(obj/machinery/power/breakerbox/BR1, obj/machinery/power/breakerbox/BR2) /proc/cmp_rcon_bbox(obj/machinery/power/breakerbox/BR1, obj/machinery/power/breakerbox/BR2)
return sorttext(BR2.RCon_tag, BR1.RCon_tag) return sorttext(BR2.RCon_tag, BR1.RCon_tag)
/proc/cmp_recipe_complexity_dsc(singleton/recipe/A, singleton/recipe/B) /proc/cmp_recipe_complexity_dsc(decl/recipe/A, decl/recipe/B)
var/a_score = LAZYLEN(A.items) + LAZYLEN(A.reagents) + LAZYLEN(A.fruit) var/a_score = LAZYLEN(A.items) + LAZYLEN(A.reagents) + LAZYLEN(A.fruit)
var/b_score = LAZYLEN(B.items) + LAZYLEN(B.reagents) + LAZYLEN(B.fruit) var/b_score = LAZYLEN(B.items) + LAZYLEN(B.reagents) + LAZYLEN(B.fruit)
return b_score - a_score return b_score - a_score

View File

@@ -983,8 +983,8 @@ var/global/known_proc = new /proc/get_type_ref_bytes
return details && show_useless_subtypes ? "regex([D.type])" : "regex" return details && show_useless_subtypes ? "regex([D.type])" : "regex"
if(istype(D, /sound)) if(istype(D, /sound))
return details ? "sound([D.type])" : "sound" return details ? "sound([D.type])" : "sound"
if(istype(D, /singleton)) if(istype(D, /decl))
return details ? "singleton([D.type])" : "singleton" return details ? "decl([D.type])" : "decl"
if(isdatum(D)) if(isdatum(D))
return details ? "datum([D.type])" : "datum" return details ? "datum([D.type])" : "datum"
if(istype(D)) // let's future proof ourselves if(istype(D)) // let's future proof ourselves

View File

@@ -12,10 +12,10 @@ var/datum/controller/subsystem/chemistry/SSchemistry
var/tmp/list/processing_holders = list() var/tmp/list/processing_holders = list()
var/list/codex_data = list() var/list/codex_data = list()
var/list/codex_ignored_reaction_path = list(/datum/chemical_reaction/slime) var/list/codex_ignored_reaction_path = list(/datum/chemical_reaction/slime)
var/list/codex_ignored_result_path = list(/singleton/reagent/drink, /singleton/reagent/alcohol) var/list/codex_ignored_result_path = list(/decl/reagent/drink, /decl/reagent/alcohol)
/datum/controller/subsystem/chemistry/proc/has_valid_specific_heat(var/_R) //Used for unit tests. Same as check_specific_heat but returns a boolean instead. /datum/controller/subsystem/chemistry/proc/has_valid_specific_heat(var/_R) //Used for unit tests. Same as check_specific_heat but returns a boolean instead.
var/singleton/reagent/R = GET_SINGLETON(_R) var/decl/reagent/R = decls_repository.get_decl(_R)
if(R.specific_heat > 0) if(R.specific_heat > 0)
return TRUE return TRUE
@@ -35,7 +35,7 @@ var/datum/controller/subsystem/chemistry/SSchemistry
return FALSE return FALSE
/datum/controller/subsystem/chemistry/proc/check_specific_heat(var/_R) /datum/controller/subsystem/chemistry/proc/check_specific_heat(var/_R)
var/singleton/reagent/R = GET_SINGLETON(_R) var/decl/reagent/R = decls_repository.get_decl(_R)
if(R.specific_heat > 0) if(R.specific_heat > 0)
return R.specific_heat return R.specific_heat
@@ -73,7 +73,7 @@ var/datum/controller/subsystem/chemistry/SSchemistry
return CR return CR
/datum/controller/subsystem/chemistry/proc/initialize_specific_heats() /datum/controller/subsystem/chemistry/proc/initialize_specific_heats()
for(var/_R in subtypesof(/singleton/reagent/)) for(var/_R in subtypesof(/decl/reagent/))
check_specific_heat(_R) check_specific_heat(_R)
/datum/controller/subsystem/chemistry/stat_entry() /datum/controller/subsystem/chemistry/stat_entry()
@@ -140,7 +140,7 @@ var/datum/controller/subsystem/chemistry/SSchemistry
cc.id = chemconfig[chemical]["id"] cc.id = chemconfig[chemical]["id"]
cc.result = text2path(chemconfig[chemical]["result"]) cc.result = text2path(chemconfig[chemical]["result"])
cc.result_amount = chemconfig[chemical]["resultamount"] cc.result_amount = chemconfig[chemical]["resultamount"]
if(!ispath(cc.result, /singleton/reagent)) if(!ispath(cc.result, /decl/reagent))
log_debug("SSchemistry: Warning: Invalid result [cc.result] in [cc.name] reactions list.") log_debug("SSchemistry: Warning: Invalid result [cc.result] in [cc.name] reactions list.")
qdel(cc) qdel(cc)
break break
@@ -148,7 +148,7 @@ var/datum/controller/subsystem/chemistry/SSchemistry
for(var/key in chemconfig[chemical]["required_reagents"]) for(var/key in chemconfig[chemical]["required_reagents"])
var/result_chem = text2path(key) var/result_chem = text2path(key)
LAZYSET(cc.required_reagents, result_chem, chemconfig[chemical]["required_reagents"][key]) LAZYSET(cc.required_reagents, result_chem, chemconfig[chemical]["required_reagents"][key])
if(!ispath(result_chem, /singleton/reagent)) if(!ispath(result_chem, /decl/reagent))
log_debug("SSchemistry: Warning: Invalid chemical [key] in [cc.name] required reagents list.") log_debug("SSchemistry: Warning: Invalid chemical [key] in [cc.name] required reagents list.")
qdel(cc) qdel(cc)
break break
@@ -162,7 +162,7 @@ var/datum/controller/subsystem/chemistry/SSchemistry
//Chemical Reactions - Initialises all /datum/chemical_reaction into a list //Chemical Reactions - Initialises all /datum/chemical_reaction into a list
// It is filtered into multiple lists within a list. // It is filtered into multiple lists within a list.
// For example: // For example:
// chemical_reaction_list[/singleton/reagent/toxin/phoron] is a list of all reactions relating to phoron // chemical_reaction_list[/decl/reagent/toxin/phoron] is a list of all reactions relating to phoron
// Note that entries in the list are NOT duplicated. So if a reaction pertains to // Note that entries in the list are NOT duplicated. So if a reaction pertains to
// more than one chemical it will still only appear in only one of the sublists. // more than one chemical it will still only appear in only one of the sublists.
/datum/controller/subsystem/chemistry/proc/initialize_chemical_reactions() /datum/controller/subsystem/chemistry/proc/initialize_chemical_reactions()
@@ -190,7 +190,7 @@ var/datum/controller/subsystem/chemistry/SSchemistry
continue continue
if(codex_ignored_result_path && is_path_in_list(CR.result, codex_ignored_result_path)) if(codex_ignored_result_path && is_path_in_list(CR.result, codex_ignored_result_path))
continue continue
var/singleton/reagent/R = GET_SINGLETON(CR.result) var/decl/reagent/R = decls_repository.get_decl(CR.result)
var/reactionData = list(id = CR.id) var/reactionData = list(id = CR.id)
reactionData["result"] = list( reactionData["result"] = list(
name = R.name, name = R.name,
@@ -200,7 +200,7 @@ var/datum/controller/subsystem/chemistry/SSchemistry
reactionData["reagents"] = list() reactionData["reagents"] = list()
for(var/reagent in CR.required_reagents) for(var/reagent in CR.required_reagents)
var/singleton/reagent/required_reagent = reagent var/decl/reagent/required_reagent = reagent
reactionData["reagents"] += list(list( reactionData["reagents"] += list(list(
name = initial(required_reagent.name), name = initial(required_reagent.name),
amount = CR.required_reagents[reagent] amount = CR.required_reagents[reagent]
@@ -208,7 +208,7 @@ var/datum/controller/subsystem/chemistry/SSchemistry
reactionData["catalysts"] = list() reactionData["catalysts"] = list()
for(var/reagent_path in CR.catalysts) for(var/reagent_path in CR.catalysts)
var/singleton/reagent/required_reagent = reagent_path var/decl/reagent/required_reagent = reagent_path
reactionData["catalysts"] += list(list( reactionData["catalysts"] += list(list(
name = initial(required_reagent.name), name = initial(required_reagent.name),
amount = CR.catalysts[reagent_path] amount = CR.catalysts[reagent_path]
@@ -216,7 +216,7 @@ var/datum/controller/subsystem/chemistry/SSchemistry
reactionData["inhibitors"] = list() reactionData["inhibitors"] = list()
for(var/reagent_path in CR.inhibitors) for(var/reagent_path in CR.inhibitors)
var/singleton/reagent/required_reagent = reagent_path var/decl/reagent/required_reagent = reagent_path
var/inhibitor_amount = CR.inhibitors[reagent_path] ? CR.inhibitors[reagent_path] : "Any" var/inhibitor_amount = CR.inhibitors[reagent_path] ? CR.inhibitors[reagent_path] : "Any"
reactionData["inhibitors"] += list(list( reactionData["inhibitors"] += list(list(
name = initial(required_reagent.name), name = initial(required_reagent.name),

View File

@@ -166,10 +166,10 @@ var/datum/controller/subsystem/explosives/SSexplosives
// If inside the blast radius + world.view - 2 // If inside the blast radius + world.view - 2
if (dist <= closedist) if (dist <= closedist)
to_chat(M, FONT_LARGE(SPAN_WARNING("You hear the sound of a nearby explosion coming from \the [explosion_dir]."))) to_chat(M, FONT_LARGE(SPAN_WARNING("You hear the sound of a nearby explosion coming from \the [explosion_dir].")))
M.playsound_simple(epicenter, get_sfx(/singleton/sound_category/explosion_sound), min(100, volume), use_random_freq = TRUE, falloff = 5) M.playsound_simple(epicenter, get_sfx(/decl/sound_category/explosion_sound), min(100, volume), use_random_freq = TRUE, falloff = 5)
else if (dist > closedist && dist <= extendeddist) // People with sensitive hearing get a better idea of how far it is else if (dist > closedist && dist <= extendeddist) // People with sensitive hearing get a better idea of how far it is
to_chat(M, FONT_LARGE(SPAN_WARNING("You hear the sound of a semi-close explosion coming from \the [explosion_dir]."))) to_chat(M, FONT_LARGE(SPAN_WARNING("You hear the sound of a semi-close explosion coming from \the [explosion_dir].")))
M.playsound_simple(epicenter, get_sfx(/singleton/sound_category/explosion_sound), min(100, volume), use_random_freq = TRUE, falloff = 5) M.playsound_simple(epicenter, get_sfx(/decl/sound_category/explosion_sound), min(100, volume), use_random_freq = TRUE, falloff = 5)
else //You hear a far explosion if you're outside the blast radius. Small bombs shouldn't be heard all over the station. else //You hear a far explosion if you're outside the blast radius. Small bombs shouldn't be heard all over the station.
volume = M.playsound_simple(epicenter, 'sound/effects/explosionfar.ogg', volume, use_random_freq = TRUE, falloff = 1000, use_pressure = TRUE) volume = M.playsound_simple(epicenter, 'sound/effects/explosionfar.ogg', volume, use_random_freq = TRUE, falloff = 1000, use_pressure = TRUE)
if(volume) if(volume)
@@ -333,7 +333,7 @@ var/datum/controller/subsystem/explosives/SSexplosives
var/close_dist = round(power + world.view - 2, 1) var/close_dist = round(power + world.view - 2, 1)
var/sound/explosion_sound = sound(get_sfx(/singleton/sound_category/explosion_sound)) var/sound/explosion_sound = sound(get_sfx(/decl/sound_category/explosion_sound))
for (var/thing in player_list) for (var/thing in player_list)
var/mob/M = thing var/mob/M = thing

View File

@@ -832,9 +832,9 @@
var/permitted = !G.allowed_roles || (rank.title in G.allowed_roles) var/permitted = !G.allowed_roles || (rank.title in G.allowed_roles)
permitted = permitted && G.check_species_whitelist(H) permitted = permitted && G.check_species_whitelist(H)
permitted = permitted && (!G.faction || (G.faction == H.employer_faction || H.employer_faction == "Stellar Corporate Conglomerate")) permitted = permitted && (!G.faction || (G.faction == H.employer_faction || H.employer_faction == "Stellar Corporate Conglomerate"))
var/singleton/origin_item/culture/our_culture = GET_SINGLETON(text2path(prefs.culture)) var/decl/origin_item/culture/our_culture = decls_repository.get_decl(text2path(prefs.culture))
permitted = permitted && (!G.culture_restriction || (our_culture in G.culture_restriction)) permitted = permitted && (!G.culture_restriction || (our_culture in G.culture_restriction))
var/singleton/origin_item/origin/our_origin = GET_SINGLETON(text2path(prefs.origin)) var/decl/origin_item/origin/our_origin = decls_repository.get_decl(text2path(prefs.origin))
permitted = permitted && (!G.origin_restriction || (our_origin in G.origin_restriction)) permitted = permitted && (!G.origin_restriction || (our_origin in G.origin_restriction))
if(!permitted) if(!permitted)

View File

@@ -18,7 +18,7 @@ var/datum/controller/subsystem/mapping/SSmapping
/datum/controller/subsystem/mapping/Initialize(timeofday) /datum/controller/subsystem/mapping/Initialize(timeofday)
// Load templates and build away sites. // Load templates and build away sites.
preloadTemplates() preloadTemplates()
for(var/atype in subtypesof(/singleton/submap_archetype)) for(var/atype in subtypesof(/decl/submap_archetype))
submap_archetypes[atype] = new atype submap_archetypes[atype] = new atype
current_map.build_away_sites() current_map.build_away_sites()

View File

@@ -67,10 +67,10 @@
while(gene_mask in used_masks) while(gene_mask in used_masks)
gene_mask = "[uppertext(num2hex(rand(0,255), 0))]" gene_mask = "[uppertext(num2hex(rand(0,255), 0))]"
var/singleton/plantgene/G var/decl/plantgene/G
for(var/D in gene_datums) for(var/D in gene_datums)
var/singleton/plantgene/P = gene_datums[D] var/decl/plantgene/P = gene_datums[D]
if(gene_tag == P.gene_tag) if(gene_tag == P.gene_tag)
G = P G = P
gene_datums -=D gene_datums -=D
@@ -129,8 +129,8 @@
if(seed.consume_gasses) if(seed.consume_gasses)
seed.consume_gasses[GAS_PHORON] = null seed.consume_gasses[GAS_PHORON] = null
seed.consume_gasses[GAS_CO2] = null seed.consume_gasses[GAS_CO2] = null
if(seed.chems && !isnull(seed.chems[/singleton/reagent/acid/polyacid])) if(seed.chems && !isnull(seed.chems[/decl/reagent/acid/polyacid]))
seed.chems[/singleton/reagent/acid/polyacid] = null // Eating through the hull will make these plants completely inviable, albeit very dangerous. seed.chems[/decl/reagent/acid/polyacid] = null // Eating through the hull will make these plants completely inviable, albeit very dangerous.
seed.chems -= null // Setting to null does not actually remove the entry, which is weird. seed.chems -= null // Setting to null does not actually remove the entry, which is weird.
seed.set_trait(TRAIT_IDEAL_HEAT,293) seed.set_trait(TRAIT_IDEAL_HEAT,293)
seed.set_trait(TRAIT_HEAT_TOLERANCE,20) seed.set_trait(TRAIT_HEAT_TOLERANCE,20)

View File

@@ -1,23 +0,0 @@
/**
* Abstract-ness is a meta-property of a class that is used to indicate
* that the class is intended to be used as a base class for others, and
* should not (or cannot) be instantiated.
* We have no such language concept in DM, and so we provide a datum member
* that can be used to hint at abstractness for circumstances where we would
* like that to be the case, such as base behavior providers.
*/
/// If set, a path at/above this one that expects not to be instantiated.
/datum/var/abstract_type
/// If true, this datum is an instance of an abstract type. Oops.
/datum/proc/IsAbstract()
SHOULD_NOT_OVERRIDE(TRUE)
return type == abstract_type
/// Passed a path or instance, returns whether it is abstract. Otherwise null.
/proc/is_abstract(datum/thing)
if (ispath(thing))
return thing == initial(thing.abstract_type)
if (istype(thing))
return thing.IsAbstract()

View File

@@ -1,4 +1,11 @@
/**************** /****************
* Debug Support * * Debug Support *
****************/ ****************/
var/list/all_observable_events = list() var/datum/all_observable_events/all_observable_events = new()
/datum/all_observable_events
var/list/events
/datum/all_observable_events/New()
events = list()
..()

View File

@@ -6,9 +6,9 @@
// Arguments that the called proc should expect: // Arguments that the called proc should expect:
// /mob/dead: The mob that was added to the dead_mob_list // /mob/dead: The mob that was added to the dead_mob_list
var/singleton/observ/death/death_event = new() var/datum/observ/death/death_event = new()
/singleton/observ/death /datum/observ/death
name = "Death" name = "Death"
expected_type = /mob expected_type = /mob

View File

@@ -1,4 +1,4 @@
var/singleton/observ/destroyed/destroyed_event = new() var/datum/observ/destroyed/destroyed_event = new()
/singleton/observ/destroyed /datum/observ/destroyed
name = "Destroyed" name = "Destroyed"

View File

@@ -8,13 +8,13 @@
// /old_dir: The dir before the change. // /old_dir: The dir before the change.
// /new_dir: The dir after the change. // /new_dir: The dir after the change.
var/singleton/observ/dir_set/dir_set_event = new() var/datum/observ/dir_set/dir_set_event = new()
/singleton/observ/dir_set /datum/observ/dir_set
name = "Direction Set" name = "Direction Set"
expected_type = /atom expected_type = /atom
/singleton/observ/dir_set/register(var/atom/dir_changer, var/datum/listener, var/proc_call) /datum/observ/dir_set/register(var/atom/dir_changer, var/datum/listener, var/proc_call)
. = ..() . = ..()
// Listen to the parent if possible. // Listen to the parent if possible.

View File

@@ -9,9 +9,9 @@
// /atom/old_loc: The atom the enterer came from // /atom/old_loc: The atom the enterer came from
// //
var/singleton/observ/entered/entered_event = new() var/datum/observ/entered/entered_event = new()
/singleton/observ/entered /datum/observ/entered
name = "Entered" name = "Entered"
expected_type = /atom expected_type = /atom

View File

@@ -8,9 +8,9 @@
// /obj/item/item: The equipped item. // /obj/item/item: The equipped item.
// slot: The slot equipped to. // slot: The slot equipped to.
var/singleton/observ/mob_equipped/mob_equipped_event = new() var/datum/observ/mob_equipped/mob_equipped_event = new()
/singleton/observ/mob_equipped /datum/observ/mob_equipped
name = "Mob Equipped" name = "Mob Equipped"
expected_type = /mob expected_type = /mob
@@ -24,9 +24,9 @@ var/singleton/observ/mob_equipped/mob_equipped_event = new()
// /mob/equipper: The mob that equipped the item. // /mob/equipper: The mob that equipped the item.
// slot: The slot equipped to. // slot: The slot equipped to.
var/singleton/observ/item_equipped/item_equipped_event = new() var/datum/observ/item_equipped/item_equipped_event = new()
/singleton/observ/item_equipped /datum/observ/item_equipped
name = "Item Equipped" name = "Item Equipped"
expected_type = /obj/item expected_type = /obj/item

View File

@@ -9,9 +9,9 @@
// /atom/new_loc: The atom the exitee is now residing in // /atom/new_loc: The atom the exitee is now residing in
// //
var/singleton/observ/exited/exited_event = new() var/datum/observ/exited/exited_event = new()
/singleton/observ/exited /datum/observ/exited
name = "Exited" name = "Exited"
expected_type = /atom expected_type = /atom

View File

@@ -1,10 +1,10 @@
var/singleton/observ/moved/moved_event = new() var/datum/observ/moved/moved_event = new()
/singleton/observ/moved /datum/observ/moved
name = "Moved" name = "Moved"
expected_type = /atom/movable expected_type = /atom/movable
/singleton/observ/moved/register(var/eventSource, var/datum/procOwner, var/proc_call) /datum/observ/moved/register(var/eventSource, var/datum/procOwner, var/proc_call)
. = ..() . = ..()
var/atom/movable/child = eventSource var/atom/movable/child = eventSource
if(.) if(.)

View File

@@ -1,239 +1,60 @@
// /datum/observ
// Observer Pattern Implementation var/name = "Unnamed Event"
// var/expected_type = /datum
// Implements a basic observer pattern with the following main procs: var/list/listeners_assoc
//
// /singleton/observ/proc/is_listening(var/event_source, var/datum/listener, var/proc_call)
// event_source: The instance which is generating events.
// listener: The instance which may be listening to events by event_source
// proc_call: Optional. The specific proc to call when the event is raised.
//
// Returns true if listener is listening for events by event_source, and proc_call supplied is either null or one of the proc that will be called when an event is raised.
//
// /singleton/observ/proc/has_listeners(var/event_source)
// event_source: The instance which is generating events.
//
// Returns true if the given event_source has any listeners at all, globally or to specific event sources.
//
// /singleton/observ/proc/register(var/event_source, var/datum/listener, var/proc_call)
// event_source: The instance you wish to receive events from.
// listener: The instance/owner of the proc to call when an event is raised by the event_source.
// proc_call: The proc to call when an event is raised.
//
// It is possible to register the same listener to the same event_source multiple times as long as it is using different proc_calls.
// Registering again using the same event_source, listener, and proc_call that has been registered previously will have no additional effect.
// I.e.: The proc_call will still only be called once per raised event. That particular proc_call will only have to be unregistered once.
//
// When proc_call is called the first argument is always the source of the event (event_source).
// Additional arguments may or may not be supplied, see individual event definition files (destroyed.dm, moved.dm, etc.) for details.
//
// The instance making the register() call is also responsible for calling unregister(), see below for additonal details, including when event_source is destroyed.
// This can be handled by listening to the event_source's destroyed event, unregistering in the listener's Destroy() proc, etc.
//
// /singleton/observ/proc/unregister(var/event_source, var/datum/listener, var/proc_call)
// event_source: The instance you wish to stop receiving events from.
// listener: The instance which will no longer receive the events.
// proc_call: Optional: The proc_call to unregister.
//
// Unregisters the listener from the event_source.
// If a proc_call has been supplied only that particular proc_call will be unregistered. If the proc_call isn't currently registered there will be no effect.
// If no proc_call has been supplied, the listener will have all registrations made to the given event_source undone.
//
// /singleton/observ/proc/register_global(var/datum/listener, var/proc_call)
// listener: The instance/owner of the proc to call when an event is raised by any and all sources.
// proc_call: The proc to call when an event is raised.
//
// Works very much the same as register(), only the listener/proc_call will receive all relevant events from all event sources.
// Global registrations can overlap with registrations made to specific event sources and these will not affect each other.
//
// /singleton/observ/proc/unregister_global(var/datum/listener, var/proc_call)
// listener: The instance/owner of the proc which will no longer receive the events.
// proc_call: Optional: The proc_call to unregister.
//
// Works very much the same as unregister(), only it undoes global registrations instead.
//
// /singleton/observ/proc/raise_event(src, ...)
// Should never be called unless implementing a new event type.
// The first argument shall always be the event_source belonging to the event. Beyond that there are no restrictions.
/singleton/observ /datum/observ/New()
var/name = "Unnamed Event" // The name of this event, used mainly for debug/VV purposes. The list of event managers can be reached through the "Debug Controller" verb, selecting the "Observation" entry. all_observable_events.events += src
var/expected_type = /datum // The expected event source for this event. register() will CRASH() if it receives an unexpected type. listeners_assoc = list()
var/list/event_sources = list() // Associative list of event sources, each with their own associative list. This associative list contains an instance/list of procs to call when the event is raised.
var/list/global_listeners = list() // Associative list of instances that listen to all events of this type (as opposed to events belonging to a specific source) and the proc to call.
/singleton/observ/New()
all_observable_events += src
..() ..()
/singleton/observ/proc/is_listening(event_source, datum/listener, proc_call) /datum/observ/proc/is_listening(var/eventSource, var/datum/procOwner, var/proc_call)
// Return whether there are global listeners unless the event source is given. var/listeners = listeners_assoc[eventSource]
if (!event_source) if(!listeners)
return !!global_listeners.len
// Return whether anything is listening to a source, if no listener is given.
if (!listener)
return global_listeners.len || event_sources[event_source]
// Return false if nothing is associated with that source.
if (!event_sources[event_source])
return FALSE return FALSE
// Get and check the listeners for the reuqested event. var/stored_proc_call = listeners[procOwner]
var/listeners = event_sources[event_source] return stored_proc_call && (!proc_call || stored_proc_call == proc_call)
if (!listeners[listener])
/datum/observ/proc/has_listeners(var/eventSource)
var/list/listeners = listeners_assoc[eventSource]
return LAZYLEN(listeners)
/datum/observ/proc/register(var/eventSource, var/datum/procOwner, var/proc_call)
if(!(eventSource && procOwner && procOwner))
return FALSE
if(istype(eventSource, /datum/observ))
return FALSE return FALSE
// Return true unless a specific callback needs checked. if(!istype(eventSource, expected_type))
if (!proc_call) CRASH("Unexpected type. Expected [expected_type], was [eventSource]")
return TRUE
// Check if the specific callback exists. LAZYINITLIST(listeners_assoc[eventSource])
var/list/callback = listeners[listener] listeners_assoc[eventSource][procOwner] = proc_call
if (!callback) destroyed_event.register(procOwner, src, /datum/observ/proc/unregister)
return FALSE
return (proc_call in callback)
/singleton/observ/proc/has_listeners(event_source)
return is_listening(event_source)
/singleton/observ/proc/register(datum/event_source, datum/listener, proc_call)
// Sanity checking.
if (!(event_source && listener && proc_call))
return FALSE
if (istype(event_source, /singleton/observ))
return FALSE
// Crash if the event source is the wrong type.
if (!istype(event_source, expected_type))
CRASH("Unexpected type. Expected [expected_type], was [event_source.type]")
// Setup the listeners for this source if needed.
var/list/listeners = event_sources[event_source]
if (!listeners)
listeners = list()
event_sources[event_source] = listeners
// Make sure the callbacks are a list.
var/list/callbacks = listeners[listener]
if (!callbacks)
callbacks = list()
listeners[listener] = callbacks
// If the proc_call is already registered skip
if(proc_call in callbacks)
return FALSE
// Add the callback, and return true.
callbacks += proc_call
return TRUE return TRUE
/singleton/observ/proc/unregister(event_source, datum/listener, proc_call) /datum/observ/proc/unregister(var/eventSource, var/datum/procOwner)
// Sanity. if(!(eventSource && procOwner))
if (!event_source || !listener || !event_sources[event_source]) return FALSE
if(istype(eventSource, /datum/observ))
return FALSE return FALSE
// Return false if nothing is listening for this event. var/list/listeners = listeners_assoc[eventSource]
var/list/listeners = event_sources[event_source] if(!listeners)
if (!listeners)
return FALSE return FALSE
// Remove all callbacks if no specific one is given. listeners -= procOwner
if (!proc_call)
if(listeners.Remove(listener))
// Perform some cleanup and return true.
if (!listeners.len)
event_sources -= event_source
return TRUE
return FALSE
// See if the listener is registered.
var/list/callbacks = listeners[listener]
if (!callbacks)
return FALSE
// See if the callback exists.
if(!callbacks.Remove(proc_call))
return FALSE
if (!callbacks.len)
listeners -= listener
if (!listeners.len) if (!listeners.len)
event_sources -= event_source listeners_assoc -= eventSource
destroyed_event.unregister(procOwner, src)
return TRUE return TRUE
/singleton/observ/proc/register_global(datum/listener, proc_call) /datum/observ/proc/raise_event(...)
// Sanity. if(!args.len)
if (!(listener && proc_call)) return
return FALSE var/listeners = listeners_assoc[args[1]]
if(!listeners)
// Make sure the callbacks are setup. return
var/list/callbacks = global_listeners[listener] for(var/listener in listeners)
if (!callbacks) call(listener, listeners[listener])(arglist(args))
callbacks = list()
global_listeners[listener] = callbacks
// Add the callback and return true.
callbacks |= proc_call
return TRUE
/singleton/observ/proc/unregister_global(datum/listener, proc_call)
// Return false unless the listener is set as a global listener.
if (!(listener && global_listeners[listener]))
return FALSE
// Remove all callbacks if no specific one is given.
if (!proc_call)
global_listeners -= listener
return TRUE
// See if the listener is registered.
var/list/callbacks = global_listeners[listener]
if (!callbacks)
return FALSE
// See if the callback exists.
if(!callbacks.Remove(proc_call))
return FALSE
if (!callbacks.len)
global_listeners -= listener
return TRUE
/singleton/observ/proc/raise_event()
// Sanity
if (!args.len)
return FALSE
if (global_listeners.len)
// Call the global listeners.
for (var/listener in global_listeners)
var/list/callbacks = global_listeners[listener]
for (var/proc_call in callbacks)
// If the callback crashes, record the error and remove it.
try
call(listener, proc_call)(arglist(args))
catch (var/exception/e)
error("[e.name] - [e.file] - [e.line]")
error(e.desc)
unregister_global(listener, proc_call)
// Call the listeners for this specific event source, if they exist.
var/source = args[1]
if (source && event_sources[source])
var/list/listeners = event_sources[source]
for (var/listener in listeners)
var/list/callbacks = listeners[listener]
for (var/proc_call in callbacks)
// If the callback crashes, record the error and remove it.
try
call(listener, proc_call)(arglist(args))
catch (var/exception/e)
error("[e.name] - [e.file] - [e.line]")
error(e.desc)
unregister(source, listener, proc_call)
return TRUE

View File

@@ -8,9 +8,9 @@
// /old_see_in_dark: see_in_dark before the change // /old_see_in_dark: see_in_dark before the change
// /new_see_in_dark: see_in_dark after the change // /new_see_in_dark: see_in_dark after the change
var/singleton/observ/see_in_dark_set/see_in_dark_set_event = new() var/datum/observ/see_in_dark_set/see_in_dark_set_event = new()
/singleton/observ/see_in_dark_set /datum/observ/see_in_dark_set
name = "See In Dark Set" name = "See In Dark Set"
expected_type = /mob expected_type = /mob

View File

@@ -8,9 +8,9 @@
// /old_see_invisible: see_invisible before the change // /old_see_invisible: see_invisible before the change
// /new_see_invisible: see_invisible after the change // /new_see_invisible: see_invisible after the change
var/singleton/observ/see_invisible_set/see_invisible_set_event = new() var/datum/observ/see_invisible_set/see_invisible_set_event = new()
/singleton/observ/see_invisible_set /datum/observ/see_invisible_set
name = "See Invisible Set" name = "See Invisible Set"
expected_type = /mob expected_type = /mob

View File

@@ -18,15 +18,15 @@
// /obj/effect/shuttle_landmark/old_location: the old location's shuttle landmark // /obj/effect/shuttle_landmark/old_location: the old location's shuttle landmark
// /obj/effect/shuttle_landmark/new_location: the new location's shuttle landmark // /obj/effect/shuttle_landmark/new_location: the new location's shuttle landmark
var/singleton/observ/shuttle_moved/shuttle_moved_event = new() var/datum/observ/shuttle_moved/shuttle_moved_event = new()
/singleton/observ/shuttle_moved /datum/observ/shuttle_moved
name = "Shuttle Moved" name = "Shuttle Moved"
expected_type = /datum/shuttle expected_type = /datum/shuttle
var/singleton/observ/shuttle_pre_move/shuttle_pre_move_event = new() var/datum/observ/shuttle_pre_move/shuttle_pre_move_event = new()
/singleton/observ/shuttle_pre_move /datum/observ/shuttle_pre_move
name = "Shuttle Pre Move" name = "Shuttle Pre Move"
expected_type = /datum/shuttle expected_type = /datum/shuttle

View File

@@ -8,9 +8,9 @@
// /old_sight: sight before the change // /old_sight: sight before the change
// /new_sight: sight after the change // /new_sight: sight after the change
var/singleton/observ/sight_set/sight_set_event = new() var/datum/observ/sight_set/sight_set_event = new()
/singleton/observ/sight_set /datum/observ/sight_set
name = "Sight Set" name = "Sight Set"
expected_type = /mob expected_type = /mob

View File

@@ -0,0 +1,51 @@
/var/repository/decls/decls_repository = new()
/repository/decls
var/list/fetched_decls
var/list/fetched_decl_types
var/list/fetched_decl_subtypes
/repository/decls/New()
..()
fetched_decls = list()
fetched_decl_types = list()
fetched_decl_subtypes = list()
/repository/decls/proc/get_decl(var/decl_type)
. = fetched_decls[decl_type]
if(!.)
. = new decl_type()
fetched_decls[decl_type] = .
var/decl/decl = .
if(istype(decl))
decl.Initialize()
/repository/decls/proc/get_decls(var/list/decl_types)
. = list()
for(var/decl_type in decl_types)
.[decl_type] = get_decl(decl_type)
/repository/decls/proc/get_decls_unassociated(var/list/decl_types)
. = list()
for(var/decl_type in decl_types)
. += get_decl(decl_type)
/repository/decls/proc/get_decls_of_type(var/decl_prototype)
. = fetched_decl_types[decl_prototype]
if(!.)
. = get_decls(typesof(decl_prototype))
fetched_decl_types[decl_prototype] = .
/repository/decls/proc/get_decls_of_subtype(var/decl_prototype)
. = fetched_decl_subtypes[decl_prototype]
if(!.)
. = get_decls(subtypesof(decl_prototype))
fetched_decl_subtypes[decl_prototype] = .
/decl/proc/Initialize()
return
/decl/Destroy()
SHOULD_CALL_PARENT(FALSE)
return QDEL_HINT_LETMELIVE // Prevents Decl destruction

View File

@@ -1,178 +0,0 @@
var/global/repository/singletons/Singletons = new
/repository/singletons
/// A cache of individual singletons as (/singleton/path = Instance, ...)
var/static/list/instances = list()
/// A map of (/singleton/path = TRUE, ...). Indicates whether a path has been tried for instances.
var/static/list/resolved_instances = list()
/// A cache of singleton types according to a parent type as (/singleton/path = list(/singleton/path = Instance, /singleton/path/foo = Instance, ...))
var/static/list/type_maps = list()
/// A map of (/singleton/path = TRUE, ...). Indicates whether a path has been tried for type_maps.
var/static/list/resolved_type_maps = list()
/// A cache of singleton subtypes according to a parent type as (/singleton/path = list(/singleton/path/foo = Instance, ...))
var/static/list/subtype_maps = list()
/// A map of (/singleton/path = TRUE, ...). Indicates whether a path has been tried for subtype_maps.
var/static/list/resolved_subtype_maps = list()
/// A cache of singleton types according to a parent type as (/singleton/path = list(Parent Instance, Subtype Instance, ...))
var/static/list/type_lists = list()
/// A map of (/singleton/path = TRUE, ...). Indicates whether a path has been tried for type_lists.
var/static/list/resolved_type_lists = list()
/// A cache of singleton subtypes according to a parent type as (/singleton/path = list(Subtype Instance, Subtype Instance, ...))
var/static/list/subtype_lists = list()
/// A map of (/singleton/path = TRUE, ...). Indicates whether a path has been tried for subtype_lists.
var/static/list/resolved_subtype_lists = list()
/**
* Get a singleton instance according to path. Creates it if necessary. Null if abstract or not a singleton.
* Prefer the GET_SINGLETON macro to minimize proc calls.
*/
/repository/singletons/proc/GetInstanceOf(singleton/path)
if (!ispath(path, /singleton))
return
if (resolved_instances[path])
return instances[path]
resolved_instances[path] = TRUE
if (is_abstract(path))
return
var/singleton/result = new path
instances[path] = result
result.Initialize()
return result
/**
* Get a singleton instance according to object. Creates it if necessary. Null if abstract or not a singleton.
* Prefer the GET_SINGLETON macro to minimize proc calls.
* WARNING: this is NOT the one from Bay, use GetInstanceOf for that!
*/
/repository/singletons/proc/GetInstance(singleton/decl_type)
if (resolved_instances[decl_type.type])
return instances[decl_type.type]
resolved_instances[decl_type.type] = TRUE
var/singleton/result = instances[decl_type.type]
if(!result)
result = new decl_type()
instances[decl_type.type] = result
var/singleton/decl = result
if(istype(decl))
decl.Initialize()
return result
/// Get a (path = instance) map of valid singletons according to paths.
/repository/singletons/proc/GetMap(list/singleton/paths)
var/list/result = list()
for (var/path in paths)
var/singleton/instance = GetInstanceOf(path)
if (!instance)
continue
result[path] = instance
return result
/// Get a list of valid singletons according to paths.
/repository/singletons/proc/GetList(list/singleton/paths)
var/list/result = list()
for (var/path in paths)
var/singleton/instance = GetInstanceOf(path)
if (!instance)
continue
result += instance
return result
/**
* Get a (path = instance) map of valid singletons according to typesof(path).
* Prefer the GET_SINGLETON_TYPE_MAP macro to minimize proc calls.
*/
/repository/singletons/proc/GetTypeMap(singleton/path)
if (resolved_type_maps[path])
return type_maps[path] || list()
resolved_type_maps[path] = TRUE
var/result = GetMap(typesof(path))
type_maps[path] = result
return result
/**
* Get a (path = instance) map of valid singletons according to subtypesof(path).
* Prefer the GET_SINGLETON_TYPE_MAP macro to minimize proc calls.
*/
/repository/singletons/proc/GetSubtypeMap(singleton/path)
if (resolved_subtype_maps[path])
return subtype_maps[path] || list()
resolved_subtype_maps[path] = TRUE
var/result = GetMap(subtypesof(path))
subtype_maps[path] = result
return result
/**
* Get a list of valid singletons according to typesof(path).
* Prefer the GET_SINGLETON_TYPE_LIST macro to minimize proc calls.
*/
/repository/singletons/proc/GetTypeList(singleton/path)
if (resolved_type_lists[path])
return type_lists[path] || list()
resolved_type_lists[path] = TRUE
var/result = GetList(typesof(path))
type_lists[path] = result
return result
/**
* Get a list of valid singletons according to subtypesof(path).
* Prefer the GET_SINGLETON_SUBTYPE_MAP macro to minimize proc calls.
*/
/repository/singletons/proc/GetSubtypeListOf(singleton/path)
if (resolved_subtype_lists[path])
return subtype_lists[path] || list()
resolved_subtype_lists[path] = TRUE
var/result = GetList(subtypesof(path))
subtype_lists[path] = result
return result
/**
* Get a list of valid singletons according to subtypesof(type).
* Prefer the GET_SINGLETON_SUBTYPE_MAP macro to minimize proc calls.
* WARNING: this is NOT the one from Bay, use GetSubtypeListOf for that!
*/
/repository/singletons/proc/GetSubtypeList(singleton/decl_prototype)
if (resolved_subtype_lists[decl_prototype.type])
return subtype_lists[decl_prototype.type] || list()
resolved_subtype_lists[decl_prototype.type] = TRUE
var/singleton/result = subtype_lists[decl_prototype.type]
if(!result)
result = GetList(subtypesof(decl_prototype.type))
subtype_lists[decl_prototype.type] = result
return result
/singleton
abstract_type = /singleton
/singleton/proc/Initialize()
SHOULD_CALL_PARENT(TRUE)
SHOULD_NOT_SLEEP(TRUE)
/singleton/Destroy()
SHOULD_CALL_PARENT(FALSE)
crash_with("Prevented attempt to delete a singleton instance: [log_info_line(src)]")
return QDEL_HINT_LETMELIVE

View File

@@ -1,4 +1,4 @@
/singleton/xgm_gas/oxygen /decl/xgm_gas/oxygen
id = GAS_OXYGEN id = GAS_OXYGEN
name = "Oxygen" name = "Oxygen"
specific_heat = 20 // J/(mol*K) specific_heat = 20 // J/(mol*K)
@@ -6,19 +6,19 @@
flags = XGM_GAS_OXIDIZER flags = XGM_GAS_OXIDIZER
/singleton/xgm_gas/nitrogen /decl/xgm_gas/nitrogen
id = GAS_NITROGEN id = GAS_NITROGEN
name = "Nitrogen" name = "Nitrogen"
specific_heat = 20 // J/(mol*K) specific_heat = 20 // J/(mol*K)
molar_mass = 0.028 // kg/mol molar_mass = 0.028 // kg/mol
/singleton/xgm_gas/carbon_dioxide /decl/xgm_gas/carbon_dioxide
id = GAS_CO2 id = GAS_CO2
name = "Carbon Dioxide" name = "Carbon Dioxide"
specific_heat = 30 // J/(mol*K) specific_heat = 30 // J/(mol*K)
molar_mass = 0.044 // kg/mol molar_mass = 0.044 // kg/mol
/singleton/xgm_gas/phoron /decl/xgm_gas/phoron
id = GAS_PHORON id = GAS_PHORON
name = "Phoron" name = "Phoron"
@@ -35,14 +35,14 @@
overlay_limit = 0.7 overlay_limit = 0.7
flags = XGM_GAS_FUEL | XGM_GAS_CONTAMINANT flags = XGM_GAS_FUEL | XGM_GAS_CONTAMINANT
/singleton/xgm_gas/hydrogen /decl/xgm_gas/hydrogen
id = GAS_HYDROGEN id = GAS_HYDROGEN
name = "Hydrogen" name = "Hydrogen"
specific_heat = 100 specific_heat = 100
molar_mass = 0.002 molar_mass = 0.002
flags = XGM_GAS_FUEL flags = XGM_GAS_FUEL
/singleton/xgm_gas/sleeping_agent /decl/xgm_gas/sleeping_agent
id = GAS_N2O id = GAS_N2O
name = "Nitrous Oxide" name = "Nitrous Oxide"
specific_heat = 40 // J/(mol*K) specific_heat = 40 // J/(mol*K)
@@ -51,11 +51,11 @@
overlay_limit = 1 overlay_limit = 1
flags = XGM_GAS_OXIDIZER flags = XGM_GAS_OXIDIZER
/singleton/xgm_gas/alium /decl/xgm_gas/alium
id = GAS_ALIEN id = GAS_ALIEN
name = "Aliether" name = "Aliether"
/singleton/xgm_gas/alium/New() /decl/xgm_gas/alium/New()
var/num = rand(100,999) var/num = rand(100,999)
name = "Compound #[num]" name = "Compound #[num]"
specific_heat = rand(1, 400) // J/(mol*K) specific_heat = rand(1, 400) // J/(mol*K)
@@ -71,7 +71,7 @@
tile_color = RANDOM_RGB tile_color = RANDOM_RGB
overlay_limit = 0.5 overlay_limit = 0.5
/singleton/xgm_gas/vapor /decl/xgm_gas/vapor
id = GAS_STEAM id = GAS_STEAM
name = "Steam" name = "Steam"
tile_overlay = "generic" tile_overlay = "generic"

View File

@@ -517,14 +517,14 @@
var/obj/effect/decal/cleanable/vomit/this = new /obj/effect/decal/cleanable/vomit(src) var/obj/effect/decal/cleanable/vomit/this = new /obj/effect/decal/cleanable/vomit(src)
if(istype(inject_reagents) && inject_reagents.total_volume) if(istype(inject_reagents) && inject_reagents.total_volume)
inject_reagents.trans_to_obj(this, min(15, inject_reagents.total_volume)) inject_reagents.trans_to_obj(this, min(15, inject_reagents.total_volume))
this.reagents.add_reagent(/singleton/reagent/acid/stomach, 5) this.reagents.add_reagent(/decl/reagent/acid/stomach, 5)
// Make toxins related vomit look different. // Make toxins related vomit look different.
if(toxvomit) if(toxvomit)
this.icon_state = "vomittox_[pick(1,4)]" this.icon_state = "vomittox_[pick(1,4)]"
/mob/living/proc/handle_additional_vomit_reagents(var/obj/effect/decal/cleanable/vomit/vomit) /mob/living/proc/handle_additional_vomit_reagents(var/obj/effect/decal/cleanable/vomit/vomit)
vomit.reagents.add_reagent(/singleton/reagent/acid/stomach, 5) vomit.reagents.add_reagent(/decl/reagent/acid/stomach, 5)
/atom/proc/clean_blood() /atom/proc/clean_blood()
if(!simulated) if(!simulated)

View File

@@ -336,7 +336,7 @@
. = ..() . = ..()
if (.) if (.)
// Events. // Events.
if (moved_event.global_listeners[src]) if (moved_event.listeners_assoc[src])
moved_event.raise_event(src, old_loc, loc) moved_event.raise_event(src, old_loc, loc)
// Lighting. // Lighting.

View File

@@ -262,9 +262,9 @@
C.SetStunned(0) C.SetStunned(0)
C.SetWeakened(0) C.SetWeakened(0)
C.lying = FALSE C.lying = FALSE
C.reagents.add_reagent(/singleton/reagent/hyperzine, 0.10) //Certainly this can't be abused. - Geeves C.reagents.add_reagent(/decl/reagent/hyperzine, 0.10) //Certainly this can't be abused. - Geeves
C.reagents.add_reagent(/singleton/reagent/oxycomorphine, 0.10) C.reagents.add_reagent(/decl/reagent/oxycomorphine, 0.10)
C.reagents.add_reagent(/singleton/reagent/synaptizine, 0.5) //To counter oxycomorphine's side-effects. C.reagents.add_reagent(/decl/reagent/synaptizine, 0.5) //To counter oxycomorphine's side-effects.
C.update_canmove() C.update_canmove()
src.verbs -= /mob/proc/changeling_unstun src.verbs -= /mob/proc/changeling_unstun

View File

@@ -85,7 +85,7 @@
/datum/changeling_sting/hallucinate/do_sting(mob/living/target) /datum/changeling_sting/hallucinate/do_sting(mob/living/target)
..() ..()
if(target.reagents) if(target.reagents)
addtimer(target.reagents.add_reagent(/singleton/reagent/mindbreaker, 3), rand(5 SECONDS, 15 SECONDS)) addtimer(target.reagents.add_reagent(/decl/reagent/mindbreaker, 3), rand(5 SECONDS, 15 SECONDS))
/mob/proc/changeling_silence_sting() /mob/proc/changeling_silence_sting()
set category = "Changeling" set category = "Changeling"
@@ -228,7 +228,7 @@
target.Paralyse(10) target.Paralyse(10)
target.make_jittery(1000) target.make_jittery(1000)
if(target.reagents) if(target.reagents)
target.reagents.add_reagent(/singleton/reagent/toxin/cyanide, 5) target.reagents.add_reagent(/decl/reagent/toxin/cyanide, 5)
/mob/proc/changeling_extract_dna_sting() /mob/proc/changeling_extract_dna_sting()
set category = "Changeling" set category = "Changeling"

View File

@@ -44,7 +44,7 @@
pixel_y = 0 pixel_y = 0
if(istype(src,/turf/simulated/floor)) if(istype(src,/turf/simulated/floor))
var/turf/simulated/floor/F = src var/turf/simulated/floor/F = src
F.set_flooring(GET_SINGLETON(/singleton/flooring/reinforced/cult)) F.set_flooring(decls_repository.get_decl(/decl/flooring/reinforced/cult))
/turf/proc/cultify_wall() /turf/proc/cultify_wall()
ChangeTurf(/turf/unsimulated/wall/cult) ChangeTurf(/turf/unsimulated/wall/cult)

View File

@@ -15,8 +15,8 @@
sharp = TRUE sharp = TRUE
hitsound = 'sound/weapons/bladeslice.ogg' hitsound = 'sound/weapons/bladeslice.ogg'
drop_sound = 'sound/items/drop/sword.ogg' drop_sound = 'sound/items/drop/sword.ogg'
pickup_sound = /singleton/sound_category/sword_pickup_sound pickup_sound = /decl/sound_category/sword_pickup_sound
equip_sound = /singleton/sound_category/sword_equip_sound equip_sound = /decl/sound_category/sword_equip_sound
var/does_cult_check = TRUE var/does_cult_check = TRUE
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")

View File

@@ -33,7 +33,7 @@
if(target && length(lambs) && (get_turf(target) == get_turf(parent))) if(target && length(lambs) && (get_turf(target) == get_turf(parent)))
for(var/mob/living/carbon/human/H in lambs) for(var/mob/living/carbon/human/H in lambs)
if(get_turf(H) == get_turf(parent)) if(get_turf(H) == get_turf(parent))
if(REAGENT_VOLUME(target.vessel, /singleton/reagent/blood) + 10 > H.species.blood_volume) if(REAGENT_VOLUME(target.vessel, /decl/reagent/blood) + 10 > H.species.blood_volume)
to_chat(target, SPAN_CULT("You feel refreshed!")) to_chat(target, SPAN_CULT("You feel refreshed!"))
interrupt() interrupt()
target.whisper("Sa'ii, ble-nii...") target.whisper("Sa'ii, ble-nii...")

View File

@@ -429,7 +429,7 @@
/obj/structure/cult/pylon/proc/shatter() /obj/structure/cult/pylon/proc/shatter()
visible_message(SPAN_DANGER("The pylon shatters into shards of crystal!"), SPAN_WARNING("You hear a tinkle of crystal shards.")) visible_message(SPAN_DANGER("The pylon shatters into shards of crystal!"), SPAN_WARNING("You hear a tinkle of crystal shards."))
playsound(get_turf(src), /singleton/sound_category/glass_break_sound, 75, 1) playsound(get_turf(src), /decl/sound_category/glass_break_sound, 75, 1)
isbroken = TRUE isbroken = TRUE
if(pylonmode == PYLON_TURRET) if(pylonmode == PYLON_TURRET)
//If the pylon had a soul in it then it plays a creepy evil sound as the soul is released //If the pylon had a soul in it then it plays a creepy evil sound as the soul is released

View File

@@ -1081,7 +1081,7 @@ datum
return 0 return 0
drugs drugs
steal_target = /singleton/reagent/space_drugs steal_target = /decl/reagent/space_drugs
explanation_text = "Steal some space drugs." explanation_text = "Steal some space drugs."
weight = 40 weight = 40
@@ -1110,7 +1110,7 @@ datum
pacid pacid
steal_target = /singleton/reagent/acid/polyacid steal_target = /decl/reagent/acid/polyacid
explanation_text = "Steal some polytrinic acid." explanation_text = "Steal some polytrinic acid."
weight = 40 weight = 40
@@ -1149,25 +1149,25 @@ datum
target_name = pick(items) target_name = pick(items)
switch(target_name) switch(target_name)
if("Sulphuric acid") if("Sulphuric acid")
steal_target = /singleton/reagent/acid steal_target = /decl/reagent/acid
if("Polytrinic acid") if("Polytrinic acid")
steal_target = /singleton/reagent/acid/polyacid steal_target = /decl/reagent/acid/polyacid
if("Space Lube") if("Space Lube")
steal_target = /singleton/reagent/lube steal_target = /decl/reagent/lube
if("Unstable mutagen") if("Unstable mutagen")
steal_target = /singleton/reagent/mutagen steal_target = /decl/reagent/mutagen
if("Leporazine") if("Leporazine")
steal_target = /singleton/reagent/leporazine steal_target = /decl/reagent/leporazine
if("Cryptobiolin") if("Cryptobiolin")
steal_target =/singleton/reagent/cryptobiolin steal_target =/decl/reagent/cryptobiolin
if("Lexorin") if("Lexorin")
steal_target = /singleton/reagent/lexorin steal_target = /decl/reagent/lexorin
if("Kelotane") if("Kelotane")
steal_target = /singleton/reagent/kelotane steal_target = /decl/reagent/kelotane
if("Dexalin") if("Dexalin")
steal_target = /singleton/reagent/dexalin steal_target = /decl/reagent/dexalin
if("Tricordrazine") if("Tricordrazine")
steal_target = /singleton/reagent/tricordrazine steal_target = /decl/reagent/tricordrazine
explanation_text = "Steal a container filled with [target_name]." explanation_text = "Steal a container filled with [target_name]."

View File

@@ -27,7 +27,7 @@
if(desired_turf) // This shouldn't fail but... if(desired_turf) // This shouldn't fail but...
var/obj/effect/effect/water/W = new /obj/effect/effect/water(get_turf(T)) var/obj/effect/effect/water/W = new /obj/effect/effect/water(get_turf(T))
W.create_reagents(60) W.create_reagents(60)
W.reagents.add_reagent(/singleton/reagent/water, 60, safety = TRUE) W.reagents.add_reagent(/decl/reagent/water, 60, safety = TRUE)
W.set_color() W.set_color()
W.set_up(desired_turf) W.set_up(desired_turf)
flick(initial(icon_state),W) // Otherwise pooling causes the animation to stay stuck at the end. flick(initial(icon_state),W) // Otherwise pooling causes the animation to stay stuck at the end.
@@ -40,5 +40,5 @@
else else
log_and_message_admins("has wetted the floor with [src] at [T.x],[T.y],[T.z].") log_and_message_admins("has wetted the floor with [src] at [T.x],[T.y],[T.z].")
else if(hit_atom.reagents && !ismob(hit_atom)) //TODO: Something for the scepter else if(hit_atom.reagents && !ismob(hit_atom)) //TODO: Something for the scepter
hit_atom.reagents.add_reagent(/singleton/reagent/water, 60, safety = FALSE) hit_atom.reagents.add_reagent(/decl/reagent/water, 60, safety = FALSE)
adjust_instability(5) adjust_instability(5)

View File

@@ -92,7 +92,7 @@
blood_total = vampire.blood_total blood_total = vampire.blood_total
blood_usable = vampire.blood_usable blood_usable = vampire.blood_usable
if (!REAGENT_VOLUME(T.vessel, /singleton/reagent/blood)) if (!REAGENT_VOLUME(T.vessel, /decl/reagent/blood))
to_chat(src, SPAN_DANGER("[T] has no more blood left to give.")) to_chat(src, SPAN_DANGER("[T] has no more blood left to give."))
break break
@@ -103,7 +103,7 @@
// Alive and not of empty mind. // Alive and not of empty mind.
if (check_drain_target_state(T)) if (check_drain_target_state(T))
blood = min(15, REAGENT_VOLUME(T.vessel, /singleton/reagent/blood)) blood = min(15, REAGENT_VOLUME(T.vessel, /decl/reagent/blood))
vampire.blood_total += blood vampire.blood_total += blood
vampire.blood_usable += blood vampire.blood_usable += blood
@@ -121,7 +121,7 @@
frenzy_lower_chance = 0 frenzy_lower_chance = 0
// SSD/protohuman or dead. // SSD/protohuman or dead.
else else
blood = min(5, REAGENT_VOLUME(T.vessel, /singleton/reagent/blood)) blood = min(5, REAGENT_VOLUME(T.vessel, /decl/reagent/blood))
vampire.blood_usable += blood vampire.blood_usable += blood
frenzy_lower_chance = 40 frenzy_lower_chance = 40
@@ -137,7 +137,7 @@
to_chat(src, SPAN_NOTICE(update_msg)) to_chat(src, SPAN_NOTICE(update_msg))
check_vampire_upgrade() check_vampire_upgrade()
T.vessel.remove_reagent(/singleton/reagent/blood, 5) T.vessel.remove_reagent(/decl/reagent/blood, 5)
vampire.status &= ~VAMP_DRAINING vampire.status &= ~VAMP_DRAINING
@@ -620,10 +620,10 @@
heal_organ_damage(50, 50, FALSE) heal_organ_damage(50, 50, FALSE)
blood_used += 3 blood_used += 3
var/missing_blood = species.blood_volume - REAGENT_VOLUME(vessel, /singleton/reagent/blood) var/missing_blood = species.blood_volume - REAGENT_VOLUME(vessel, /decl/reagent/blood)
if(missing_blood) if(missing_blood)
to_heal = min(20, missing_blood) to_heal = min(20, missing_blood)
vessel.add_reagent(/singleton/reagent/blood, to_heal) vessel.add_reagent(/decl/reagent/blood, to_heal)
blood_used += round(to_heal * 0.1) // gonna need to regen a shitton of blood, since human mobs have around 560 normally blood_used += round(to_heal * 0.1) // gonna need to regen a shitton of blood, since human mobs have around 560 normally
for(var/A in organs) for(var/A in organs)
@@ -837,8 +837,8 @@
to_chat(T, SPAN_NOTICE("You feel pure bliss as [src] touches you.")) to_chat(T, SPAN_NOTICE("You feel pure bliss as [src] touches you."))
vampire.use_blood(50) vampire.use_blood(50)
T.reagents.add_reagent(/singleton/reagent/rezadone, 3) T.reagents.add_reagent(/decl/reagent/rezadone, 3)
T.reagents.add_reagent(/singleton/reagent/oxycomorphine, 0.15) //enough to get back onto their feet T.reagents.add_reagent(/decl/reagent/oxycomorphine, 0.15) //enough to get back onto their feet
// Convert a human into a vampire. // Convert a human into a vampire.
/mob/living/carbon/human/proc/vampire_embrace() /mob/living/carbon/human/proc/vampire_embrace()
@@ -910,12 +910,12 @@
if(!vampire) if(!vampire)
to_chat(src, SPAN_WARNING("Your fangs have disappeared!")) to_chat(src, SPAN_WARNING("Your fangs have disappeared!"))
return return
if (!REAGENT_VOLUME(T.vessel, /singleton/reagent/blood)) if (!REAGENT_VOLUME(T.vessel, /decl/reagent/blood))
to_chat(src, SPAN_NOTICE("[T] is now drained of blood. You begin forcing your own blood into their body, spreading the corruption of the Veil to their body.")) to_chat(src, SPAN_NOTICE("[T] is now drained of blood. You begin forcing your own blood into their body, spreading the corruption of the Veil to their body."))
drained_all_blood = TRUE drained_all_blood = TRUE
break break
T.vessel.remove_reagent(/singleton/reagent/blood, 50) T.vessel.remove_reagent(/decl/reagent/blood, 50)
if(!drained_all_blood) if(!drained_all_blood)
vampire.status &= ~VAMP_DRAINING vampire.status &= ~VAMP_DRAINING

View File

@@ -71,7 +71,7 @@
suppressing = !suppressing suppressing = !suppressing
user.visible_message(SPAN_NOTICE("\The [user] switches [suppressing ? "on" : "off"] \the [src]'s neural suppressor."), intent_message = BUTTON_FLICK) user.visible_message(SPAN_NOTICE("\The [user] switches [suppressing ? "on" : "off"] \the [src]'s neural suppressor."), intent_message = BUTTON_FLICK)
playsound(loc, /singleton/sound_category/switch_sound, 50, 1) playsound(loc, /decl/sound_category/switch_sound, 50, 1)
/obj/machinery/optable/CanPass(atom/movable/mover, turf/target, height = 0, air_group = 0) /obj/machinery/optable/CanPass(atom/movable/mover, turf/target, height = 0, air_group = 0)
if(air_group || (height == 0)) if(air_group || (height == 0))

View File

@@ -20,11 +20,11 @@
var/mob/living/carbon/human/occupant = null var/mob/living/carbon/human/occupant = null
var/list/available_chemicals = list( var/list/available_chemicals = list(
/singleton/reagent/inaprovaline, /decl/reagent/inaprovaline,
/singleton/reagent/soporific, /decl/reagent/soporific,
/singleton/reagent/perconol, /decl/reagent/perconol,
/singleton/reagent/dylovene, /decl/reagent/dylovene,
/singleton/reagent/dexalin /decl/reagent/dexalin
) )
var/obj/item/reagent_containers/glass/beaker = null var/obj/item/reagent_containers/glass/beaker = null
var/filtering = FALSE var/filtering = FALSE
@@ -135,7 +135,7 @@
var/list/list/blood_reagents var/list/list/blood_reagents
for(var/_R in occupant.reagents.reagent_volumes) for(var/_R in occupant.reagents.reagent_volumes)
var/list/blood_reagent = list() var/list/blood_reagent = list()
var/singleton/reagent/R = GET_SINGLETON(_R) var/decl/reagent/R = decls_repository.get_decl(_R)
blood_reagent["name"] = R.name blood_reagent["name"] = R.name
blood_reagent["amount"] = round(REAGENT_VOLUME(occupant.reagents, _R), 0.1) blood_reagent["amount"] = round(REAGENT_VOLUME(occupant.reagents, _R), 0.1)
LAZYADD(blood_reagents, list(blood_reagent)) LAZYADD(blood_reagents, list(blood_reagent))
@@ -149,7 +149,7 @@
var/list/list/stomach_reagents var/list/list/stomach_reagents
for(var/_R in S.ingested.reagent_volumes) for(var/_R in S.ingested.reagent_volumes)
var/list/stomach_reagent = list() var/list/stomach_reagent = list()
var/singleton/reagent/R = GET_SINGLETON(_R) var/decl/reagent/R = decls_repository.get_decl(_R)
stomach_reagent["name"] = R.name stomach_reagent["name"] = R.name
stomach_reagent["amount"] = round(REAGENT_VOLUME(S.ingested, _R), 0.1) stomach_reagent["amount"] = round(REAGENT_VOLUME(S.ingested, _R), 0.1)
LAZYADD(stomach_reagents, list(stomach_reagent)) LAZYADD(stomach_reagents, list(stomach_reagent))
@@ -163,7 +163,7 @@
for(var/T in available_chemicals) for(var/T in available_chemicals)
var/list/reagent = list() var/list/reagent = list()
reagent["type"] = T reagent["type"] = T
var/singleton/reagent/C = T var/decl/reagent/C = T
reagent["name"] = initial(C.name) reagent["name"] = initial(C.name)
reagents += list(reagent) reagents += list(reagent)
data["reagents"] = reagents.Copy() data["reagents"] = reagents.Copy()
@@ -371,12 +371,12 @@
if(occupant?.reagents) if(occupant?.reagents)
var/chemical_amount = REAGENT_VOLUME(occupant.reagents, chemical) var/chemical_amount = REAGENT_VOLUME(occupant.reagents, chemical)
var/is_dylo = ispath(chemical, /singleton/reagent/dylovene) var/is_dylo = ispath(chemical, /decl/reagent/dylovene)
var/is_inaprov = ispath(chemical, /singleton/reagent/inaprovaline) var/is_inaprov = ispath(chemical, /decl/reagent/inaprovaline)
if(is_dylo || is_inaprov) if(is_dylo || is_inaprov)
var/dylo_amount = REAGENT_VOLUME(occupant.reagents, /singleton/reagent/dylovene) var/dylo_amount = REAGENT_VOLUME(occupant.reagents, /decl/reagent/dylovene)
var/inaprov_amount = REAGENT_VOLUME(occupant.reagents, /singleton/reagent/inaprovaline) var/inaprov_amount = REAGENT_VOLUME(occupant.reagents, /decl/reagent/inaprovaline)
var/tricord_amount = REAGENT_VOLUME(occupant.reagents, /singleton/reagent/tricordrazine) var/tricord_amount = REAGENT_VOLUME(occupant.reagents, /decl/reagent/tricordrazine)
if(tricord_amount > 20) if(tricord_amount > 20)
if(is_dylo && inaprov_amount) if(is_dylo && inaprov_amount)
to_chat(user, SPAN_WARNING("The subject has too much tricordrazine.")) to_chat(user, SPAN_WARNING("The subject has too much tricordrazine."))

View File

@@ -41,7 +41,7 @@
active_power_usage = 1500 //For heating/cooling rooms. 1000 joules equates to about 1 degree every 2 seconds for a single tile of air. active_power_usage = 1500 //For heating/cooling rooms. 1000 joules equates to about 1 degree every 2 seconds for a single tile of air.
power_channel = ENVIRON power_channel = ENVIRON
req_one_access = list(access_atmospherics, access_engine_equip) req_one_access = list(access_atmospherics, access_engine_equip)
clicksound = /singleton/sound_category/button_sound clicksound = /decl/sound_category/button_sound
clickvol = 30 clickvol = 30
var/alarm_id = null var/alarm_id = null

View File

@@ -35,7 +35,7 @@ var/global/list/bluespace_inhibitors
/obj/machinery/anti_bluespace/emag_act() /obj/machinery/anti_bluespace/emag_act()
spark(src, 3) spark(src, 3)
playsound(src, /singleton/sound_category/spark_sound, 50, 1) playsound(src, /decl/sound_category/spark_sound, 50, 1)
emp_act(1) emp_act(1)
return TRUE return TRUE

View File

@@ -7,7 +7,7 @@
use_power = POWER_USE_IDLE use_power = POWER_USE_IDLE
idle_power_usage = 10 idle_power_usage = 10
active_power_usage = 2000 active_power_usage = 2000
clicksound = /singleton/sound_category/keyboard_sound clicksound = /decl/sound_category/keyboard_sound
clickvol = 30 clickvol = 30
var/print_loc var/print_loc

View File

@@ -28,7 +28,7 @@
#define BIOGEN_MEDICAL "Medical" #define BIOGEN_MEDICAL "Medical"
#define BIOGEN_ILLEGAL "!@#$%^&*()" #define BIOGEN_ILLEGAL "!@#$%^&*()"
/singleton/biorecipe /decl/biorecipe
var/name = "fixme" var/name = "fixme"
var/class = BIOGEN_ITEMS var/class = BIOGEN_ITEMS
var/object var/object
@@ -36,46 +36,46 @@
var/amount = list(1, 2, 3, 4, 5) var/amount = list(1, 2, 3, 4, 5)
var/emag = FALSE var/emag = FALSE
/singleton/biorecipe/food /decl/biorecipe/food
name = "Meat Substitute" name = "Meat Substitute"
class = BIOGEN_FOOD class = BIOGEN_FOOD
object = /obj/item/reagent_containers/food/snacks/meat/biogenerated object = /obj/item/reagent_containers/food/snacks/meat/biogenerated
cost = 50 cost = 50
/singleton/biorecipe/food/fishfillet /decl/biorecipe/food/fishfillet
name = "Fish Fillet" name = "Fish Fillet"
object = /obj/item/reagent_containers/food/snacks/fish/fishfillet object = /obj/item/reagent_containers/food/snacks/fish/fishfillet
/singleton/biorecipe/food/syntiflesh /decl/biorecipe/food/syntiflesh
name = "Synthetic Meat" name = "Synthetic Meat"
object = /obj/item/reagent_containers/food/snacks/meat/syntiflesh object = /obj/item/reagent_containers/food/snacks/meat/syntiflesh
/singleton/biorecipe/food/soywafers /decl/biorecipe/food/soywafers
name = "Soy Wafers" name = "Soy Wafers"
object = /obj/item/reagent_containers/food/snacks/soywafers object = /obj/item/reagent_containers/food/snacks/soywafers
cost = 150 cost = 150
/singleton/biorecipe/food/bio_vitamin /decl/biorecipe/food/bio_vitamin
name = "Flavored Vitamin" name = "Flavored Vitamin"
object = /obj/item/reagent_containers/pill/bio_vitamin object = /obj/item/reagent_containers/pill/bio_vitamin
amount = list(1,5,10,25,50) amount = list(1,5,10,25,50)
/singleton/biorecipe/food/liquidfood /decl/biorecipe/food/liquidfood
name = "Food Ration" name = "Food Ration"
object = /obj/item/reagent_containers/food/snacks/liquidfood object = /obj/item/reagent_containers/food/snacks/liquidfood
cost = 30 cost = 30
/singleton/biorecipe/food/milk /decl/biorecipe/food/milk
name = "Space Milk (50u)" name = "Space Milk (50u)"
object = /obj/item/reagent_containers/food/drinks/milk object = /obj/item/reagent_containers/food/drinks/milk
cost = 100 cost = 100
/singleton/biorecipe/food/nutrispread /decl/biorecipe/food/nutrispread
name = "Nutri-spread" name = "Nutri-spread"
object = /obj/item/reagent_containers/food/snacks/spreads object = /obj/item/reagent_containers/food/snacks/spreads
cost = 80 cost = 80
/singleton/biorecipe/food/enzyme /decl/biorecipe/food/enzyme
name = "Universal Enzyme (50u)" name = "Universal Enzyme (50u)"
object = /obj/item/reagent_containers/food/condiment/enzyme object = /obj/item/reagent_containers/food/condiment/enzyme
@@ -83,18 +83,18 @@
FERTILIZER FERTILIZER
*/ */
/singleton/biorecipe/fertilizer /decl/biorecipe/fertilizer
name = "E-Z-Nutrient (60u)" name = "E-Z-Nutrient (60u)"
class = BIOGEN_FERTILIZER class = BIOGEN_FERTILIZER
object = /obj/item/reagent_containers/glass/fertilizer/ez object = /obj/item/reagent_containers/glass/fertilizer/ez
cost = 60 cost = 60
/singleton/biorecipe/fertilizer/l4z /decl/biorecipe/fertilizer/l4z
name = "Left 4 Zed (60u)" name = "Left 4 Zed (60u)"
object = /obj/item/reagent_containers/glass/fertilizer/l4z object = /obj/item/reagent_containers/glass/fertilizer/l4z
cost = 120 cost = 120
/singleton/biorecipe/fertilizer/rh /decl/biorecipe/fertilizer/rh
name = "Robust Harvest (60u)" name = "Robust Harvest (60u)"
object = /obj/item/reagent_containers/glass/fertilizer/rh object = /obj/item/reagent_containers/glass/fertilizer/rh
cost = 180 cost = 180
@@ -102,66 +102,66 @@
/* /*
ITEMS ITEMS
*/ */
/singleton/biorecipe/item /decl/biorecipe/item
name = "Towel" name = "Towel"
class = BIOGEN_ITEMS class = BIOGEN_ITEMS
object = /obj/item/towel/random object = /obj/item/towel/random
cost = 300 cost = 300
/singleton/biorecipe/item/jug /decl/biorecipe/item/jug
name = "Empty Jug" name = "Empty Jug"
object = /obj/item/reagent_containers/glass/fertilizer object = /obj/item/reagent_containers/glass/fertilizer
cost = 100 cost = 100
/singleton/biorecipe/item/custom_cigarettes /decl/biorecipe/item/custom_cigarettes
name = "Empty Cigarettes (x6)" name = "Empty Cigarettes (x6)"
object = /obj/item/storage/box/fancy/cigarettes/blank object = /obj/item/storage/box/fancy/cigarettes/blank
cost = 500 cost = 500
/singleton/biorecipe/item/tape_roll /decl/biorecipe/item/tape_roll
name = "Tape Roll" name = "Tape Roll"
object = /obj/item/tape_roll object = /obj/item/tape_roll
cost = 250 cost = 250
/singleton/biorecipe/item/botanic_leather /decl/biorecipe/item/botanic_leather
name = "Botanical Gloves" name = "Botanical Gloves"
object = /obj/item/clothing/gloves/botanic_leather object = /obj/item/clothing/gloves/botanic_leather
cost = 250 cost = 250
/singleton/biorecipe/item/utility /decl/biorecipe/item/utility
name = "Utility Belt" name = "Utility Belt"
object = /obj/item/storage/belt/utility object = /obj/item/storage/belt/utility
/singleton/biorecipe/item/hydrobelt /decl/biorecipe/item/hydrobelt
name = "Hydroponic Belt" name = "Hydroponic Belt"
object = /obj/item/storage/belt/hydro object = /obj/item/storage/belt/hydro
/singleton/biorecipe/item/plantbag /decl/biorecipe/item/plantbag
name = "Plant Bag" name = "Plant Bag"
object = /obj/item/storage/bag/plants object = /obj/item/storage/bag/plants
cost = 500 cost = 500
/singleton/biorecipe/item/wallet /decl/biorecipe/item/wallet
name = "Leather Wallet" name = "Leather Wallet"
object = /obj/item/storage/wallet object = /obj/item/storage/wallet
cost = 100 cost = 100
/singleton/biorecipe/item/satchel /decl/biorecipe/item/satchel
name = "Leather Satchel" name = "Leather Satchel"
object = /obj/item/storage/backpack/satchel/leather object = /obj/item/storage/backpack/satchel/leather
cost = 400 cost = 400
/singleton/biorecipe/item/cash /decl/biorecipe/item/cash
name = "Money Bag" name = "Money Bag"
object = /obj/item/storage/bag/money object = /obj/item/storage/bag/money
cost = 400 cost = 400
/singleton/biorecipe/item/soap /decl/biorecipe/item/soap
name = "Soap" name = "Soap"
object = /obj/item/soap/plant object = /obj/item/soap/plant
cost = 200 cost = 200
/singleton/biorecipe/item/crayon_box /decl/biorecipe/item/crayon_box
name = "Crayon Box" name = "Crayon Box"
object = /obj/item/storage/box/fancy/crayons object = /obj/item/storage/box/fancy/crayons
cost = 600 cost = 600
@@ -170,32 +170,32 @@
CONSTRUCTION CONSTRUCTION
*/ */
/singleton/biorecipe/construction /decl/biorecipe/construction
name = "Animal Hide" name = "Animal Hide"
class = BIOGEN_CONSTRUCTION class = BIOGEN_CONSTRUCTION
object = /obj/item/stack/material/animalhide object = /obj/item/stack/material/animalhide
cost = 100 cost = 100
amount = list(1,5,10,25,50) amount = list(1,5,10,25,50)
/singleton/biorecipe/construction/leather /decl/biorecipe/construction/leather
name = "Leather" name = "Leather"
object = /obj/item/stack/material/leather object = /obj/item/stack/material/leather
/singleton/biorecipe/construction/cloth /decl/biorecipe/construction/cloth
name = "Cloth" name = "Cloth"
object = /obj/item/stack/material/cloth object = /obj/item/stack/material/cloth
cost = 50 cost = 50
/singleton/biorecipe/construction/cardboard /decl/biorecipe/construction/cardboard
name = "Cardboard" name = "Cardboard"
object = /obj/item/stack/material/cardboard object = /obj/item/stack/material/cardboard
cost = 50 cost = 50
/singleton/biorecipe/construction/wax /decl/biorecipe/construction/wax
name = "Wax" name = "Wax"
object = /obj/item/stack/wax object = /obj/item/stack/wax
/singleton/biorecipe/construction/plastic /decl/biorecipe/construction/plastic
name = "Plastic" name = "Plastic"
object = /obj/item/stack/material/plastic object = /obj/item/stack/material/plastic
@@ -203,79 +203,79 @@
SPECIAL SPECIAL
*/ */
/singleton/biorecipe/mushroom /decl/biorecipe/mushroom
name = "Pet Mushroom" name = "Pet Mushroom"
class = BIOGEN_SPECIAL class = BIOGEN_SPECIAL
object = /mob/living/simple_animal/mushroom object = /mob/living/simple_animal/mushroom
cost = 1000 cost = 1000
/singleton/biorecipe/cube /decl/biorecipe/cube
name = "Monkey Cube" name = "Monkey Cube"
class = BIOGEN_SPECIAL class = BIOGEN_SPECIAL
object = /obj/item/reagent_containers/food/snacks/monkeycube/wrapped object = /obj/item/reagent_containers/food/snacks/monkeycube/wrapped
/singleton/biorecipe/cube/stok /decl/biorecipe/cube/stok
name = "Stok Cube" name = "Stok Cube"
object = /obj/item/reagent_containers/food/snacks/monkeycube/wrapped/stokcube object = /obj/item/reagent_containers/food/snacks/monkeycube/wrapped/stokcube
/singleton/biorecipe/cube/farwa /decl/biorecipe/cube/farwa
name = "Farwa Cube" name = "Farwa Cube"
object = /obj/item/reagent_containers/food/snacks/monkeycube/wrapped/farwacube object = /obj/item/reagent_containers/food/snacks/monkeycube/wrapped/farwacube
/singleton/biorecipe/cube/neaera /decl/biorecipe/cube/neaera
name = "Neaera Cube" name = "Neaera Cube"
object = /obj/item/reagent_containers/food/snacks/monkeycube/wrapped/neaeracube object = /obj/item/reagent_containers/food/snacks/monkeycube/wrapped/neaeracube
/singleton/biorecipe/cube/cazador /decl/biorecipe/cube/cazador
name = "V'krexi Cube" name = "V'krexi Cube"
object = /obj/item/reagent_containers/food/snacks/monkeycube/wrapped/vkrexicube object = /obj/item/reagent_containers/food/snacks/monkeycube/wrapped/vkrexicube
cost = 500 cost = 500
/singleton/biorecipe/medical /decl/biorecipe/medical
name = "Bruise Pack" name = "Bruise Pack"
class = BIOGEN_MEDICAL class = BIOGEN_MEDICAL
object = /obj/item/stack/medical/bruise_pack object = /obj/item/stack/medical/bruise_pack
cost = 400 cost = 400
/singleton/biorecipe/medical/ointment /decl/biorecipe/medical/ointment
name = "Burn Ointment" name = "Burn Ointment"
object = /obj/item/stack/medical/ointment object = /obj/item/stack/medical/ointment
/singleton/biorecipe/medical/perconol_pill /decl/biorecipe/medical/perconol_pill
name = "Perconol Pill" name = "Perconol Pill"
object = /obj/item/reagent_containers/pill/perconol object = /obj/item/reagent_containers/pill/perconol
cost = 250 cost = 250
amount = list(1,2,3,5,7) amount = list(1,2,3,5,7)
/singleton/biorecipe/illegal /decl/biorecipe/illegal
name = "Advanced Trauma Kit" name = "Advanced Trauma Kit"
class = BIOGEN_ILLEGAL class = BIOGEN_ILLEGAL
object = /obj/item/stack/medical/advanced/bruise_pack object = /obj/item/stack/medical/advanced/bruise_pack
cost = 600 cost = 600
emag = TRUE emag = TRUE
/singleton/biorecipe/illegal/adv_burn_kit /decl/biorecipe/illegal/adv_burn_kit
name = "Advanced Burn Kit" name = "Advanced Burn Kit"
object = /obj/item/stack/medical/advanced/ointment object = /obj/item/stack/medical/advanced/ointment
// Antag Items (Emag) // Antag Items (Emag)
/singleton/biorecipe/illegal/humanhide /decl/biorecipe/illegal/humanhide
name = "Human Hide" name = "Human Hide"
object = /obj/item/stack/material/animalhide/human object = /obj/item/stack/material/animalhide/human
cost = 50 cost = 50
amount = list(1,5,10,25,50) amount = list(1,5,10,25,50)
/singleton/biorecipe/illegal/syndie /decl/biorecipe/illegal/syndie
name = "Red Soap" name = "Red Soap"
object = /obj/item/soap/syndie object = /obj/item/soap/syndie
cost = 200 cost = 200
/singleton/biorecipe/illegal/buckler /decl/biorecipe/illegal/buckler
name = "Buckler" name = "Buckler"
object = /obj/item/shield/buckler object = /obj/item/shield/buckler
cost = 500 cost = 500
/singleton/biorecipe/illegal/tree /decl/biorecipe/illegal/tree
name = "Tree" name = "Tree"
object = /mob/living/simple_animal/hostile/tree object = /mob/living/simple_animal/hostile/tree
cost = 1000 cost = 1000
@@ -380,8 +380,8 @@
dat += "<tr><td colspan='2'>Name</td><td colspan='2'>Cost</td><td colspan='4'>Production Amount</td></tr>" dat += "<tr><td colspan='2'>Name</td><td colspan='2'>Cost</td><td colspan='4'>Production Amount</td></tr>"
var/lastclass = "Commands" var/lastclass = "Commands"
for (var/k in GET_SINGLETON_SUBTYPE_MAP(/singleton/biorecipe)) for (var/k in decls_repository.get_decls_of_subtype(/decl/biorecipe))
var/singleton/biorecipe/current_recipe = GET_SINGLETON(k) var/decl/biorecipe/current_recipe = decls_repository.get_decl(k)
if(emagged || !current_recipe.emag) if(emagged || !current_recipe.emag)
if(lastclass != current_recipe.class) if(lastclass != current_recipe.class)
@@ -434,9 +434,9 @@
var/S = 0 var/S = 0
for(var/obj/item/reagent_containers/food/snacks/grown/I in contents) for(var/obj/item/reagent_containers/food/snacks/grown/I in contents)
S += 5 S += 5
if(REAGENT_VOLUME(I.reagents, /singleton/reagent/nutriment) < 0.1) if(REAGENT_VOLUME(I.reagents, /decl/reagent/nutriment) < 0.1)
points += 1 points += 1
else points += REAGENT_VOLUME(I.reagents, /singleton/reagent/nutriment) * 10 * eat_eff else points += REAGENT_VOLUME(I.reagents, /decl/reagent/nutriment) * 10 * eat_eff
qdel(I) qdel(I)
CHECK_TICK CHECK_TICK
if(S) if(S)
@@ -454,12 +454,12 @@
return return
/obj/machinery/biogenerator/proc/create_product(var/itemtype, var/count) /obj/machinery/biogenerator/proc/create_product(var/itemtype, var/count)
if (!ispath(itemtype, /singleton/biorecipe)) if (!ispath(itemtype, /decl/biorecipe))
return FALSE return FALSE
var/singleton/biorecipe/recipe = GET_SINGLETON(itemtype) var/decl/biorecipe/recipe = decls_repository.get_decl(itemtype)
if (!ispath(recipe.object)) // this shouldn't happen unless someone tries to create /singleton/biorecipe with href hacking if (!ispath(recipe.object)) // this shouldn't happen unless someone tries to create /decl/biorecipe with href hacking
return FALSE return FALSE
if (recipe.emag && !emagged) if (recipe.emag && !emagged)
@@ -489,7 +489,7 @@
else else
points -= totake points -= totake
use_power_oneoff(totake * 0.25) use_power_oneoff(totake * 0.25)
playsound(src.loc, /singleton/sound_category/switch_sound, 50, 1) playsound(src.loc, /decl/sound_category/switch_sound, 50, 1)
intent_message(PING_SOUND) intent_message(PING_SOUND)
if(ispath(recipe.object, /obj/item/reagent_containers/pill)) if(ispath(recipe.object, /obj/item/reagent_containers/pill))
if(!made_container) if(!made_container)

View File

@@ -61,8 +61,8 @@
// DNA sample from syringe. // DNA sample from syringe.
if(!prints_prosthetics && istype(W,/obj/item/reagent_containers/syringe)) if(!prints_prosthetics && istype(W,/obj/item/reagent_containers/syringe))
var/obj/item/reagent_containers/syringe/S = W var/obj/item/reagent_containers/syringe/S = W
if(REAGENT_DATA(S.reagents, /singleton/reagent/blood)) if(REAGENT_DATA(S.reagents, /decl/reagent/blood))
loaded_dna = REAGENT_DATA(S.reagents, /singleton/reagent/blood) loaded_dna = REAGENT_DATA(S.reagents, /decl/reagent/blood)
S.reagents.clear_reagents() S.reagents.clear_reagents()
to_chat(user, "<span class='info'>You inject the blood sample into the bioprinter.</span>") to_chat(user, "<span class='info'>You inject the blood sample into the bioprinter.</span>")
return TRUE return TRUE

View File

@@ -448,12 +448,12 @@
VUEUI_SET_CHECK(data["paralysis"], occupant.paralysis, ., data) VUEUI_SET_CHECK(data["paralysis"], occupant.paralysis, ., data)
VUEUI_SET_CHECK(data["bodytemp"], occupant.bodytemperature, ., data) VUEUI_SET_CHECK(data["bodytemp"], occupant.bodytemperature, ., data)
VUEUI_SET_CHECK(data["occupant"], !!occupant, ., data) VUEUI_SET_CHECK(data["occupant"], !!occupant, ., data)
VUEUI_SET_CHECK(data["norepiAmt"], REAGENT_VOLUME(R, /singleton/reagent/inaprovaline), ., data) VUEUI_SET_CHECK(data["norepiAmt"], REAGENT_VOLUME(R, /decl/reagent/inaprovaline), ., data)
VUEUI_SET_CHECK(data["soporAmt"], REAGENT_VOLUME(R, /singleton/reagent/soporific), ., data) VUEUI_SET_CHECK(data["soporAmt"], REAGENT_VOLUME(R, /decl/reagent/soporific), ., data)
VUEUI_SET_CHECK(data["bicardAmt"], REAGENT_VOLUME(R, /singleton/reagent/bicaridine), ., data) VUEUI_SET_CHECK(data["bicardAmt"], REAGENT_VOLUME(R, /decl/reagent/bicaridine), ., data)
VUEUI_SET_CHECK(data["dexAmt"], REAGENT_VOLUME(R, /singleton/reagent/dexalin), ., data) VUEUI_SET_CHECK(data["dexAmt"], REAGENT_VOLUME(R, /decl/reagent/dexalin), ., data)
VUEUI_SET_CHECK(data["dermAmt"], REAGENT_VOLUME(R, /singleton/reagent/dermaline), ., data) VUEUI_SET_CHECK(data["dermAmt"], REAGENT_VOLUME(R, /decl/reagent/dermaline), ., data)
VUEUI_SET_CHECK(data["thetaAmt"], REAGENT_VOLUME(R, /singleton/reagent/thetamycin), ., data) VUEUI_SET_CHECK(data["thetaAmt"], REAGENT_VOLUME(R, /decl/reagent/thetamycin), ., data)
VUEUI_SET_CHECK(data["otherAmt"], R.total_volume - (data["soporAmt"] + data["dexAmt"] + data["bicardAmt"] + data["norepiAmt"] + data["dermAmt"] + data["thetaAmt"]), ., data) VUEUI_SET_CHECK(data["otherAmt"], R.total_volume - (data["soporAmt"] + data["dexAmt"] + data["bicardAmt"] + data["norepiAmt"] + data["dermAmt"] + data["thetaAmt"]), ., data)
has_internal_injuries = FALSE has_internal_injuries = FALSE
has_external_injuries = FALSE has_external_injuries = FALSE
@@ -662,13 +662,13 @@
"paralysis" = H.paralysis, "paralysis" = H.paralysis,
"bodytemp" = H.bodytemperature, "bodytemp" = H.bodytemperature,
"borer_present" = H.has_brain_worms(), "borer_present" = H.has_brain_worms(),
"inaprovaline_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/inaprovaline), "inaprovaline_amount" = REAGENT_VOLUME(H.reagents, /decl/reagent/inaprovaline),
"dexalin_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/dexalin), "dexalin_amount" = REAGENT_VOLUME(H.reagents, /decl/reagent/dexalin),
"stoxin_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/soporific), "stoxin_amount" = REAGENT_VOLUME(H.reagents, /decl/reagent/soporific),
"bicaridine_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/bicaridine), "bicaridine_amount" = REAGENT_VOLUME(H.reagents, /decl/reagent/bicaridine),
"dermaline_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/dermaline), "dermaline_amount" = REAGENT_VOLUME(H.reagents, /decl/reagent/dermaline),
"thetamycin_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/thetamycin), "thetamycin_amount" = REAGENT_VOLUME(H.reagents, /decl/reagent/thetamycin),
"blood_amount" = REAGENT_VOLUME(H.vessel, /singleton/reagent/blood), "blood_amount" = REAGENT_VOLUME(H.vessel, /decl/reagent/blood),
"disabilities" = H.sdisabilities, "disabilities" = H.sdisabilities,
"lung_ruptured" = H.is_lung_ruptured(), "lung_ruptured" = H.is_lung_ruptured(),
"lung_rescued" = H.is_lung_rescued(), "lung_rescued" = H.is_lung_rescued(),

View File

@@ -66,7 +66,7 @@
icon_state = "light[active]" icon_state = "light[active]"
/obj/machinery/button/switch/attack_hand() /obj/machinery/button/switch/attack_hand()
playsound(src, /singleton/sound_category/switch_sound, 30) playsound(src, /decl/sound_category/switch_sound, 30)
intent_message(BUTTON_FLICK, 5) intent_message(BUTTON_FLICK, 5)
//alternate button with the same functionality, except has a door control sprite instead //alternate button with the same functionality, except has a door control sprite instead

View File

@@ -260,7 +260,7 @@
//sparks //sparks
spark(loc, 5) spark(loc, 5)
playsound(loc, /singleton/sound_category/spark_sound, 50, 1) playsound(loc, /decl/sound_category/spark_sound, 50, 1)
/obj/machinery/camera/proc/set_status(var/newstatus) /obj/machinery/camera/proc/set_status(var/newstatus)
if (status != newstatus) if (status != newstatus)

View File

@@ -194,8 +194,8 @@
occupant.adjustCloneLoss(-2 * heal_rate) occupant.adjustCloneLoss(-2 * heal_rate)
//So clones don't die of oxyloss in a running pod. //So clones don't die of oxyloss in a running pod.
if(REAGENT_VOLUME(occupant.reagents, /singleton/reagent/inaprovaline) < 30) if(REAGENT_VOLUME(occupant.reagents, /decl/reagent/inaprovaline) < 30)
occupant.reagents.add_reagent(/singleton/reagent/inaprovaline, 60) occupant.reagents.add_reagent(/decl/reagent/inaprovaline, 60)
occupant.Sleeping(30) occupant.Sleeping(30)
//Also heal some oxyloss ourselves because inaprovaline is so bad at preventing it!! //Also heal some oxyloss ourselves because inaprovaline is so bad at preventing it!!
occupant.adjustOxyLoss(-4) occupant.adjustOxyLoss(-4)

View File

@@ -234,13 +234,13 @@
"paralysis" = H.paralysis, "paralysis" = H.paralysis,
"bodytemp" = H.bodytemperature, "bodytemp" = H.bodytemperature,
"borer_present" = H.has_brain_worms(), "borer_present" = H.has_brain_worms(),
"inaprovaline_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/inaprovaline), "inaprovaline_amount" = REAGENT_VOLUME(H.reagents, /decl/reagent/inaprovaline),
"dexalin_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/dexalin), "dexalin_amount" = REAGENT_VOLUME(H.reagents, /decl/reagent/dexalin),
"stoxin_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/soporific), "stoxin_amount" = REAGENT_VOLUME(H.reagents, /decl/reagent/soporific),
"bicaridine_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/bicaridine), "bicaridine_amount" = REAGENT_VOLUME(H.reagents, /decl/reagent/bicaridine),
"dermaline_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/dermaline), "dermaline_amount" = REAGENT_VOLUME(H.reagents, /decl/reagent/dermaline),
"thetamycin_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/thetamycin), "thetamycin_amount" = REAGENT_VOLUME(H.reagents, /decl/reagent/thetamycin),
"blood_amount" = REAGENT_VOLUME(H.vessel, /singleton/reagent/blood), "blood_amount" = REAGENT_VOLUME(H.vessel, /decl/reagent/blood),
"disabilities" = H.sdisabilities, "disabilities" = H.sdisabilities,
"lung_ruptured" = H.is_lung_ruptured(), "lung_ruptured" = H.is_lung_ruptured(),
"lung_rescued" = H.is_lung_rescued(), "lung_rescued" = H.is_lung_rescued(),

View File

@@ -6,7 +6,7 @@
anchored = 1.0 anchored = 1.0
idle_power_usage = 300 idle_power_usage = 300
active_power_usage = 300 active_power_usage = 300
clicksound = /singleton/sound_category/keyboard_sound clicksound = /decl/sound_category/keyboard_sound
var/circuit = null //The path to the circuit board type. If circuit==null, the computer can't be disassembled. var/circuit = null //The path to the circuit board type. If circuit==null, the computer can't be disassembled.
var/processing = 0 var/processing = 0

View File

@@ -129,7 +129,7 @@
if(!emagged) if(!emagged)
emmaged = TRUE emmaged = TRUE
spark(src, 3) spark(src, 3)
playsound(src, /singleton/sound_category/spark_sound, 50, 1) playsound(src, /decl/sound_category/spark_sound, 50, 1)
return TRUE return TRUE
/obj/machinery/computer/slot_machine/ui_interact(mob/living/user) /obj/machinery/computer/slot_machine/ui_interact(mob/living/user)
@@ -172,7 +172,7 @@
spin(usr) spin(usr)
else if(href_list["refund"]) else if(href_list["refund"])
playsound(src, /singleton/sound_category/button_sound, clickvol) playsound(src, /decl/sound_category/button_sound, clickvol)
if(balance > 0) if(balance > 0)
give_payout(balance, usr) give_payout(balance, usr)
balance = 0 balance = 0

View File

@@ -288,8 +288,8 @@
occupant.heal_organ_damage(heal_brute,heal_fire) occupant.heal_organ_damage(heal_brute,heal_fire)
else else
occupant.adjustFireLoss(3)//Cryopods kill diona. This damage combines with the normal cold temp damage, and their disabled regen occupant.adjustFireLoss(3)//Cryopods kill diona. This damage combines with the normal cold temp damage, and their disabled regen
var/has_cryo = REAGENT_VOLUME(occupant.reagents, /singleton/reagent/cryoxadone) >= 1 var/has_cryo = REAGENT_VOLUME(occupant.reagents, /decl/reagent/cryoxadone) >= 1
var/has_clonexa = REAGENT_VOLUME(occupant.reagents, /singleton/reagent/clonexadone) >= 1 var/has_clonexa = REAGENT_VOLUME(occupant.reagents, /decl/reagent/clonexadone) >= 1
var/has_cryo_medicine = has_cryo || has_clonexa var/has_cryo_medicine = has_cryo || has_clonexa
if(beaker && !has_cryo_medicine) if(beaker && !has_cryo_medicine)
beaker.reagents.trans_to_mob(occupant, 1, CHEM_BLOOD) beaker.reagents.trans_to_mob(occupant, 1, CHEM_BLOOD)

View File

@@ -33,7 +33,7 @@
if(req_access.len || req_one_access.len) if(req_access.len || req_one_access.len)
req_access = list() req_access = list()
req_one_access = list() req_one_access = list()
playsound(src.loc, /singleton/sound_category/spark_sound, 100, 1) playsound(src.loc, /decl/sound_category/spark_sound, 100, 1)
return 1 return 1
/obj/machinery/button/remote/attack_hand(mob/user as mob) /obj/machinery/button/remote/attack_hand(mob/user as mob)

View File

@@ -1054,7 +1054,7 @@ About the new airlock wires panel:
cutting = TRUE cutting = TRUE
else if(istype(tool,/obj/item/melee/energy/blade) || istype(tool,/obj/item/melee/energy/sword)) else if(istype(tool,/obj/item/melee/energy/blade) || istype(tool,/obj/item/melee/energy/sword))
cut_verb = "slicing" cut_verb = "slicing"
cut_sound = /singleton/sound_category/spark_sound cut_sound = /decl/sound_category/spark_sound
cut_delay *= 1 cut_delay *= 1
cutting = TRUE cutting = TRUE
else if(istype(tool,/obj/item/surgery/circular_saw)) else if(istype(tool,/obj/item/surgery/circular_saw))

View File

@@ -38,7 +38,7 @@
var/obj/item/stack/cable_coil/CC = new /obj/item/stack/cable_coil(loc) var/obj/item/stack/cable_coil/CC = new /obj/item/stack/cable_coil(loc)
CC.amount = 2 CC.amount = 2
src.density = FALSE src.density = FALSE
playsound(src, /singleton/sound_category/glass_break_sound, 70, 1) playsound(src, /decl/sound_category/glass_break_sound, 70, 1)
if(display_message) if(display_message)
visible_message("[src] shatters!") visible_message("[src] shatters!")
qdel(src) qdel(src)
@@ -160,7 +160,7 @@
if (istype(I, /obj/item/melee/energy/blade)) if (istype(I, /obj/item/melee/energy/blade))
if(emag_act(10, user)) if(emag_act(10, user))
spark(src.loc, 5) spark(src.loc, 5)
playsound(src.loc, /singleton/sound_category/spark_sound, 50, 1) playsound(src.loc, /decl/sound_category/spark_sound, 50, 1)
playsound(src.loc, 'sound/weapons/blade.ogg', 50, 1) playsound(src.loc, 'sound/weapons/blade.ogg', 50, 1)
visible_message("<span class='warning'>The glass door was sliced open by [user]!</span>") visible_message("<span class='warning'>The glass door was sliced open by [user]!</span>")
return TRUE return TRUE

View File

@@ -67,7 +67,7 @@ var/list/floor_light_cache = list()
if(user.a_intent == I_HURT && !issmall(user)) if(user.a_intent == I_HURT && !issmall(user))
if(!isnull(damaged) && !(stat & BROKEN)) if(!isnull(damaged) && !(stat & BROKEN))
visible_message("<span class='danger'>\The [user] smashes \the [src]!</span>") visible_message("<span class='danger'>\The [user] smashes \the [src]!</span>")
playsound(src, /singleton/sound_category/glass_break_sound, 70, 1) playsound(src, /decl/sound_category/glass_break_sound, 70, 1)
update_icon() update_icon()
stat |= BROKEN stat |= BROKEN
else else

View File

@@ -97,7 +97,7 @@
/obj/machinery/gumballmachine/proc/smashgumball() /obj/machinery/gumballmachine/proc/smashgumball()
icon_state = "[initialicon]_broken" icon_state = "[initialicon]_broken"
playsound(get_turf(src), /singleton/sound_category/glass_break_sound, 75, 1) playsound(get_turf(src), /decl/sound_category/glass_break_sound, 75, 1)
if(amountleft) if(amountleft)
var/amountleftinside = amountleft var/amountleftinside = amountleft
for(var/i = 1;i<=amountleftinside,i++) for(var/i = 1;i<=amountleftinside,i++)

View File

@@ -255,7 +255,7 @@
beaker.reagents.trans_to_mob(attached, transfer_amount, CHEM_BLOOD) beaker.reagents.trans_to_mob(attached, transfer_amount, CHEM_BLOOD)
update_icon() update_icon()
if(toggle_stop) // Automatically detaches if the blood volume is at 100% if(toggle_stop) // Automatically detaches if the blood volume is at 100%
if((beaker.reagents.has_reagent(/singleton/reagent/blood) || beaker.reagents.has_reagent(/singleton/reagent/saline)) && attached.get_blood_volume() >= 100) if((beaker.reagents.has_reagent(/decl/reagent/blood) || beaker.reagents.has_reagent(/decl/reagent/saline)) && attached.get_blood_volume() >= 100)
visible_message("\The <b>[src]</b> flashes a warning light, disengaging from [attached]'s [vein.name] automatically!") visible_message("\The <b>[src]</b> flashes a warning light, disengaging from [attached]'s [vein.name] automatically!")
playsound(src, 'sound/machines/buzz-two.ogg', 100) playsound(src, 'sound/machines/buzz-two.ogg', 100)
vein = null vein = null

View File

@@ -41,7 +41,7 @@
to_chat(user, "A light switch. It is [on? "on" : "off"].") to_chat(user, "A light switch. It is [on? "on" : "off"].")
/obj/machinery/light_switch/attack_hand(mob/user) /obj/machinery/light_switch/attack_hand(mob/user)
playsound(src, /singleton/sound_category/switch_sound, 30) playsound(src, /decl/sound_category/switch_sound, 30)
on = !on on = !on
sync_lights() sync_lights()
intent_message(BUTTON_FLICK, 5) intent_message(BUTTON_FLICK, 5)

View File

@@ -442,7 +442,7 @@ Class Procs:
return 1 return 1
/obj/machinery/proc/dismantle() /obj/machinery/proc/dismantle()
playsound(loc, /singleton/sound_category/crowbar_sound, 50, 1) playsound(loc, /decl/sound_category/crowbar_sound, 50, 1)
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(loc) var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(loc)
M.set_dir(src.dir) M.set_dir(src.dir)
M.state = 3 M.state = 3

View File

@@ -758,7 +758,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
for (var/mob/O in hearers(5, src.loc)) for (var/mob/O in hearers(5, src.loc))
O.show_message("[user.name] smashes the [src.name]!" ) O.show_message("[user.name] smashes the [src.name]!" )
src.isbroken=1 src.isbroken=1
playsound(src.loc, /singleton/sound_category/glass_break_sound, 100, 1) playsound(src.loc, /decl/sound_category/glass_break_sound, 100, 1)
else else
for (var/mob/O in hearers(5, src.loc)) for (var/mob/O in hearers(5, src.loc))
O.show_message("[user.name] forcefully slams the [src.name] with the [I.name]!" ) O.show_message("[user.name] forcefully slams the [src.name] with the [I.name]!" )
@@ -937,7 +937,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
if(curr_page == 0) //We're at the start, get to the middle if(curr_page == 0) //We're at the start, get to the middle
src.screen=1 src.screen=1
src.curr_page++ src.curr_page++
playsound(src.loc, /singleton/sound_category/page_sound, 50, 1) playsound(src.loc, /decl/sound_category/page_sound, 50, 1)
else if(href_list["prev_page"]) else if(href_list["prev_page"])
if(curr_page == 0) if(curr_page == 0)
@@ -949,7 +949,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
if(curr_page == src.pages+1) //we're at the end, let's go back to the middle. if(curr_page == src.pages+1) //we're at the end, let's go back to the middle.
src.screen = 1 src.screen = 1
src.curr_page-- src.curr_page--
playsound(src.loc, /singleton/sound_category/page_sound, 50, 1) playsound(src.loc, /decl/sound_category/page_sound, 50, 1)
if (istype(src.loc, /mob)) if (istype(src.loc, /mob))
src.attack_self(src.loc) src.attack_self(src.loc)

View File

@@ -430,7 +430,7 @@ var/bomb_set
/obj/machinery/nuclearbomb/station/LateInitialize() /obj/machinery/nuclearbomb/station/LateInitialize()
for(var/turf/simulated/floor/T in RANGE_TURFS(1, src)) for(var/turf/simulated/floor/T in RANGE_TURFS(1, src))
T.set_flooring(GET_SINGLETON(/singleton/flooring/reinforced/circuit/red)) T.set_flooring(decls_repository.get_decl(/decl/flooring/reinforced/circuit/red))
flash_tiles += T flash_tiles += T
update_icon() update_icon()
@@ -459,7 +459,7 @@ var/bomb_set
if(!last_turf_state || target_icon_state != last_turf_state) if(!last_turf_state || target_icon_state != last_turf_state)
for(var/thing in flash_tiles) for(var/thing in flash_tiles)
var/turf/simulated/floor/T = thing var/turf/simulated/floor/T = thing
if(!istype(T.flooring, /singleton/flooring/reinforced/circuit/red)) if(!istype(T.flooring, /decl/flooring/reinforced/circuit/red))
flash_tiles -= T flash_tiles -= T
continue continue
T.icon_state = target_icon_state T.icon_state = target_icon_state

View File

@@ -6,7 +6,7 @@
anchored = FALSE anchored = FALSE
density = TRUE density = TRUE
use_power = POWER_USE_OFF use_power = POWER_USE_OFF
clicksound = /singleton/sound_category/switch_sound clicksound = /decl/sound_category/switch_sound
var/on = FALSE var/on = FALSE
var/active = 0 var/active = 0
var/heating_power = 40 KILOWATTS var/heating_power = 40 KILOWATTS

View File

@@ -226,7 +226,7 @@
protected = 1 protected = 1
if(!protected) if(!protected)
playsound(src.loc, /singleton/sound_category/spark_sound, 75, 1, -1) playsound(src.loc, /decl/sound_category/spark_sound, 75, 1, -1)
to_chat(user, "<span class='warning'>You try to touch the controls but you get zapped. There must be a short circuit somewhere.</span>") to_chat(user, "<span class='warning'>You try to touch the controls but you get zapped. There must be a short circuit somewhere.</span>")
return*/ return*/
else //welp, the guy is protected, we can continue else //welp, the guy is protected, we can continue
@@ -252,7 +252,7 @@
protected = 1 protected = 1
if(!protected) if(!protected)
playsound(src.loc, /singleton/sound_category/spark_sound, 75, 1, -1) playsound(src.loc, /decl/sound_category/spark_sound, 75, 1, -1)
to_chat(user, "<span class='warning'>You try to touch the controls but you get zapped. There must be a short circuit somewhere.</span>") to_chat(user, "<span class='warning'>You try to touch the controls but you get zapped. There must be a short circuit somewhere.</span>")
return*/ return*/
else else

View File

@@ -47,7 +47,7 @@
layer = 2.9 layer = 2.9
anchored = 1 anchored = 1
density = 1 density = 1
clicksound = /singleton/sound_category/button_sound clicksound = /decl/sound_category/button_sound
var/icon_vend //Icon_state when vending var/icon_vend //Icon_state when vending
var/deny_time // How long the physical icon state lasts, used cut the deny overlay var/deny_time // How long the physical icon state lasts, used cut the deny overlay

View File

@@ -5,7 +5,7 @@
icon_state = "wm_10" icon_state = "wm_10"
density = 1 density = 1
anchored = 1.0 anchored = 1.0
clicksound = /singleton/sound_category/button_sound clicksound = /decl/sound_category/button_sound
clickvol = 40 clickvol = 40
var/state = 1 var/state = 1

View File

@@ -127,7 +127,7 @@
for(var/id in carried_reagents) for(var/id in carried_reagents)
F.reagents.add_reagent(id, 1, safety = 1) //makes a safety call because all reagents should have already reacted anyway F.reagents.add_reagent(id, 1, safety = 1) //makes a safety call because all reagents should have already reacted anyway
else else
F.reagents.add_reagent(/singleton/reagent/water, 1, safety = 1) F.reagents.add_reagent(/decl/reagent/water, 1, safety = 1)
// wall formed by metal foams, dense and opaque, but easy to break // wall formed by metal foams, dense and opaque, but easy to break

View File

@@ -10,7 +10,7 @@
var/health var/health
var/burn_point var/burn_point
var/burning var/burning
var/hitsound = /singleton/sound_category/swing_hit_sound//generic hit sound. var/hitsound = /decl/sound_category/swing_hit_sound//generic hit sound.
var/storage_cost var/storage_cost
var/slot_flags = 0 //This is used to determine on which slots an item can fit. var/slot_flags = 0 //This is used to determine on which slots an item can fit.
var/no_attack_log = 0 //If it's an item we don't want to log attack_logs with, set this to 1 var/no_attack_log = 0 //If it's an item we don't want to log attack_logs with, set this to 1
@@ -54,9 +54,9 @@
///Sound used when equipping the item into a valid slot ///Sound used when equipping the item into a valid slot
var/equip_sound = null var/equip_sound = null
///Sound uses when picking the item up (into your hands) ///Sound uses when picking the item up (into your hands)
var/pickup_sound = /singleton/sound_category/generic_pickup_sound var/pickup_sound = /decl/sound_category/generic_pickup_sound
///Sound uses when dropping the item, or when its thrown. ///Sound uses when dropping the item, or when its thrown.
var/drop_sound = /singleton/sound_category/generic_drop_sound // drop sound - this is the default var/drop_sound = /decl/sound_category/generic_drop_sound // drop sound - this is the default
var/list/armor var/list/armor
var/armor_degradation_speed //How fast armor will degrade, multiplier to blocked damage to get armor damage value. var/armor_degradation_speed //How fast armor will degrade, multiplier to blocked damage to get armor damage value.

View File

@@ -30,9 +30,9 @@
icon_state = "honeycomb" icon_state = "honeycomb"
desc = "Dripping with sugary sweetness." desc = "Dripping with sugary sweetness."
reagents_to_add = list( reagents_to_add = list(
/singleton/reagent/nutriment/honey = 10, /decl/reagent/nutriment/honey = 10,
/singleton/reagent/nutriment = 0.5, /decl/reagent/nutriment = 0.5,
/singleton/reagent/sugar = 2 /decl/reagent/sugar = 2
) )
bitesize = 2 bitesize = 2

View File

@@ -23,19 +23,19 @@
/obj/item/reagent_containers/glass/beaker/vial/random /obj/item/reagent_containers/glass/beaker/vial/random
flags = 0 flags = 0
var/list/random_reagent_list = list(list(/singleton/reagent/water = 15) = 1, list(/singleton/reagent/spacecleaner = 15) = 1) var/list/random_reagent_list = list(list(/decl/reagent/water = 15) = 1, list(/decl/reagent/spacecleaner = 15) = 1)
/obj/item/reagent_containers/glass/beaker/vial/random/toxin /obj/item/reagent_containers/glass/beaker/vial/random/toxin
random_reagent_list = list( random_reagent_list = list(
list(/singleton/reagent/mindbreaker = 10, /singleton/reagent/space_drugs = 20) = 3, list(/decl/reagent/mindbreaker = 10, /decl/reagent/space_drugs = 20) = 3,
list(/singleton/reagent/mercury = 15) = 3, list(/decl/reagent/mercury = 15) = 3,
list(/singleton/reagent/toxin/carpotoxin = 15) = 2, list(/decl/reagent/toxin/carpotoxin = 15) = 2,
list(/singleton/reagent/impedrezene = 15) = 2, list(/decl/reagent/impedrezene = 15) = 2,
list(/singleton/reagent/toxin/dextrotoxin = 10) = 1, list(/decl/reagent/toxin/dextrotoxin = 10) = 1,
list(/singleton/reagent/toxin/spectrocybin = 15) = 1, list(/decl/reagent/toxin/spectrocybin = 15) = 1,
list(/singleton/reagent/joy = 10, /singleton/reagent/water = 20) = 1, list(/decl/reagent/joy = 10, /decl/reagent/water = 20) = 1,
list(/singleton/reagent/toxin/berserk = 10) = 1, list(/decl/reagent/toxin/berserk = 10) = 1,
list(/singleton/reagent/ammonia = 15) = 3) list(/decl/reagent/ammonia = 15) = 3)
/obj/item/reagent_containers/glass/beaker/vial/random/Initialize() /obj/item/reagent_containers/glass/beaker/vial/random/Initialize()
. = ..() . = ..()
@@ -48,7 +48,7 @@
var/list/names = new var/list/names = new
for(var/_R in reagents.reagent_volumes) for(var/_R in reagents.reagent_volumes)
var/singleton/reagent/R = GET_SINGLETON(_R) var/decl/reagent/R = decls_repository.get_decl(_R)
names += R.name names += R.name
desc = "Contains [english_list(names)]." desc = "Contains [english_list(names)]."
@@ -62,6 +62,6 @@
. = ..() . = ..()
if(is_open_container()) if(is_open_container())
flags ^= OPENCONTAINER flags ^= OPENCONTAINER
reagents.add_reagent(/singleton/reagent/venenum,volume) reagents.add_reagent(/decl/reagent/venenum,volume)
desc = "Contains venenum." desc = "Contains venenum."
update_icon() update_icon()

View File

@@ -3,42 +3,42 @@
colour = "#DA0000" colour = "#DA0000"
shadeColour = "#810C0C" shadeColour = "#810C0C"
colourName = "red" colourName = "red"
reagents_to_add = list(/singleton/reagent/crayon_dust/red = 10) reagents_to_add = list(/decl/reagent/crayon_dust/red = 10)
/obj/item/pen/crayon/orange /obj/item/pen/crayon/orange
icon_state = "crayonorange" icon_state = "crayonorange"
colour = "#FF9300" colour = "#FF9300"
shadeColour = "#A55403" shadeColour = "#A55403"
colourName = "orange" colourName = "orange"
reagents_to_add = list(/singleton/reagent/crayon_dust/orange = 10) reagents_to_add = list(/decl/reagent/crayon_dust/orange = 10)
/obj/item/pen/crayon/yellow /obj/item/pen/crayon/yellow
icon_state = "crayonyellow" icon_state = "crayonyellow"
colour = "#FFF200" colour = "#FFF200"
shadeColour = "#886422" shadeColour = "#886422"
colourName = "yellow" colourName = "yellow"
reagents_to_add = list(/singleton/reagent/crayon_dust/yellow = 10) reagents_to_add = list(/decl/reagent/crayon_dust/yellow = 10)
/obj/item/pen/crayon/green /obj/item/pen/crayon/green
icon_state = "crayongreen" icon_state = "crayongreen"
colour = "#A8E61D" colour = "#A8E61D"
shadeColour = "#61840F" shadeColour = "#61840F"
colourName = "green" colourName = "green"
reagents_to_add = list(/singleton/reagent/crayon_dust/green = 10) reagents_to_add = list(/decl/reagent/crayon_dust/green = 10)
/obj/item/pen/crayon/blue /obj/item/pen/crayon/blue
icon_state = "crayonblue" icon_state = "crayonblue"
colour = "#00B7EF" colour = "#00B7EF"
shadeColour = "#0082A8" shadeColour = "#0082A8"
colourName = "blue" colourName = "blue"
reagents_to_add = list(/singleton/reagent/crayon_dust/blue = 10) reagents_to_add = list(/decl/reagent/crayon_dust/blue = 10)
/obj/item/pen/crayon/purple /obj/item/pen/crayon/purple
icon_state = "crayonpurple" icon_state = "crayonpurple"
colour = "#DA00FF" colour = "#DA00FF"
shadeColour = "#810CFF" shadeColour = "#810CFF"
colourName = "purple" colourName = "purple"
reagents_to_add = list(/singleton/reagent/crayon_dust/purple = 10) reagents_to_add = list(/decl/reagent/crayon_dust/purple = 10)
/obj/item/pen/crayon/mime /obj/item/pen/crayon/mime
icon_state = "crayonmime" icon_state = "crayonmime"
@@ -46,7 +46,7 @@
colour = "#FFFFFF" colour = "#FFFFFF"
shadeColour = "#000000" shadeColour = "#000000"
colourName = "mime" colourName = "mime"
reagents_to_add = list(/singleton/reagent/crayon_dust/grey = 15) reagents_to_add = list(/decl/reagent/crayon_dust/grey = 15)
/obj/item/pen/crayon/mime/attack_self(mob/living/user as mob) //inversion /obj/item/pen/crayon/mime/attack_self(mob/living/user as mob) //inversion
if(colour != "#FFFFFF" && shadeColour != "#000000") if(colour != "#FFFFFF" && shadeColour != "#000000")
@@ -64,7 +64,7 @@
colour = "#FFF000" colour = "#FFF000"
shadeColour = "#000FFF" shadeColour = "#000FFF"
colourName = "rainbow" colourName = "rainbow"
reagents_to_add = list(/singleton/reagent/crayon_dust/brown = 20) reagents_to_add = list(/decl/reagent/crayon_dust/brown = 20)
/obj/item/pen/crayon/rainbow/attack_self(mob/living/user as mob) /obj/item/pen/crayon/rainbow/attack_self(mob/living/user as mob)
colour = input(user, "Please select the main colour.", "Crayon colour") as color colour = input(user, "Please select the main colour.", "Crayon colour") as color
@@ -126,7 +126,7 @@
to_chat(user, "You finish drawing.") to_chat(user, "You finish drawing.")
target.add_fingerprint(user) // Adds their fingerprints to the floor the crayon is drawn on. target.add_fingerprint(user) // Adds their fingerprints to the floor the crayon is drawn on.
if(reagents && LAZYLEN(reagents_to_add)) if(reagents && LAZYLEN(reagents_to_add))
for(var/singleton/reagent/R in reagents_to_add) for(var/decl/reagent/R in reagents_to_add)
reagents.remove_reagent(R,0.5/LAZYLEN(reagents_to_add)) //using crayons reduces crayon dust in it. reagents.remove_reagent(R,0.5/LAZYLEN(reagents_to_add)) //using crayons reduces crayon dust in it.
if(!reagents.has_all_reagents(reagents_to_add)) if(!reagents.has_all_reagents(reagents_to_add))
to_chat(user, "<span class='warning'>You used up your crayon!</span>") to_chat(user, "<span class='warning'>You used up your crayon!</span>")

View File

@@ -116,8 +116,8 @@
if(M.getBrainLoss() > 15) if(M.getBrainLoss() > 15)
to_chat(user, SPAN_NOTICE("There's visible lag between left and right pupils' reactions.")) to_chat(user, SPAN_NOTICE("There's visible lag between left and right pupils' reactions."))
var/list/pinpoint = list(/singleton/reagent/oxycomorphine=1,/singleton/reagent/mortaphenyl=5) var/list/pinpoint = list(/decl/reagent/oxycomorphine=1,/decl/reagent/mortaphenyl=5)
var/list/dilating = list(/singleton/reagent/space_drugs=5,/singleton/reagent/mindbreaker=1) var/list/dilating = list(/decl/reagent/space_drugs=5,/decl/reagent/mindbreaker=1)
var/datum/reagents/ingested = H.get_ingested_reagents() var/datum/reagents/ingested = H.get_ingested_reagents()
if(H.reagents.has_any_reagent(pinpoint) || ingested.has_any_reagent(pinpoint)) if(H.reagents.has_any_reagent(pinpoint) || ingested.has_any_reagent(pinpoint))
to_chat(user, SPAN_NOTICE("\The [M]'s pupils are already pinpoint and cannot narrow any more.")) to_chat(user, SPAN_NOTICE("\The [M]'s pupils are already pinpoint and cannot narrow any more."))

View File

@@ -246,7 +246,7 @@
/obj/item/device/lightreplacer/emag_act(var/remaining_charges, var/mob/user) /obj/item/device/lightreplacer/emag_act(var/remaining_charges, var/mob/user)
emagged = !emagged emagged = !emagged
playsound(src.loc, /singleton/sound_category/spark_sound, 100, 1) playsound(src.loc, /decl/sound_category/spark_sound, 100, 1)
update_icon() update_icon()
return 1 return 1

View File

@@ -71,7 +71,7 @@
if(attached) if(attached)
to_chat(user, SPAN_NOTICE("You initialize the memory wipe protocols. This procedure will take approximately 30 seconds.")) to_chat(user, SPAN_NOTICE("You initialize the memory wipe protocols. This procedure will take approximately 30 seconds."))
to_chat(attached, SPAN_WARNING("The computer hums to life and you feel your memories bleed away into nothingness.")) to_chat(attached, SPAN_WARNING("The computer hums to life and you feel your memories bleed away into nothingness."))
playsound(src.loc, /singleton/sound_category/keyboard_sound, 30, TRUE) playsound(src.loc, /decl/sound_category/keyboard_sound, 30, TRUE)
wiping = TRUE wiping = TRUE
update_icon() update_icon()
if(wipe_bar) if(wipe_bar)

View File

@@ -42,7 +42,7 @@ var/global/list/default_medbay_channels = list(
var/radio_desc = "" var/radio_desc = ""
var/const/FREQ_LISTENING = TRUE var/const/FREQ_LISTENING = TRUE
var/list/internal_channels var/list/internal_channels
var/clicksound = /singleton/sound_category/button_sound //played sound on usage var/clicksound = /decl/sound_category/button_sound //played sound on usage
var/clickvol = 10 //volume var/clickvol = 10 //volume
var/obj/item/cell/cell = /obj/item/cell/device var/obj/item/cell/cell = /obj/item/cell/device

View File

@@ -305,7 +305,7 @@ BREATH ANALYZER
var/unknown = 0 var/unknown = 0
var/reagentdata[0] var/reagentdata[0]
for(var/_R in H.reagents.reagent_volumes) for(var/_R in H.reagents.reagent_volumes)
var/singleton/reagent/R = GET_SINGLETON(_R) var/decl/reagent/R = decls_repository.get_decl(_R)
if(R.scannable) if(R.scannable)
print_reagent_default_message = FALSE print_reagent_default_message = FALSE
reagentdata["[_R]"] = "<span class='notice'> [round(REAGENT_VOLUME(H.reagents, _R), 1)]u [R.name]</span>" reagentdata["[_R]"] = "<span class='notice'> [round(REAGENT_VOLUME(H.reagents, _R), 1)]u [R.name]</span>"
@@ -324,7 +324,7 @@ BREATH ANALYZER
if(ingested && ingested.total_volume) if(ingested && ingested.total_volume)
var/unknown = 0 var/unknown = 0
for(var/_R in ingested.reagent_volumes) for(var/_R in ingested.reagent_volumes)
var/singleton/reagent/R = GET_SINGLETON(_R) var/decl/reagent/R = decls_repository.get_decl(_R)
if(R.scannable) if(R.scannable)
print_reagent_default_message = FALSE print_reagent_default_message = FALSE
dat += "<span class='notice'>[R.name] found in subject's stomach.</span>" dat += "<span class='notice'>[R.name] found in subject's stomach.</span>"
@@ -438,13 +438,13 @@ BREATH ANALYZER
if(LAZYLEN(reagents.reagent_volumes) > 1) if(LAZYLEN(reagents.reagent_volumes) > 1)
to_chat(user, SPAN_WARNING("There isn't enough blood in the sample!")) to_chat(user, SPAN_WARNING("There isn't enough blood in the sample!"))
return return
if(!REAGENT_DATA(reagents, /singleton/reagent/blood)) if(!REAGENT_DATA(reagents, /decl/reagent/blood))
to_chat(user, SPAN_WARNING("The sample was contaminated with non-blood reagents!")) to_chat(user, SPAN_WARNING("The sample was contaminated with non-blood reagents!"))
return return
var/list/blood_traces = reagents.reagent_data[/singleton/reagent/blood]["trace_chem"] var/list/blood_traces = reagents.reagent_data[/decl/reagent/blood]["trace_chem"]
var/list/output_text = list("Trace Chemicals Found:") var/list/output_text = list("Trace Chemicals Found:")
for(var/_C in blood_traces) for(var/_C in blood_traces)
var/singleton/reagent/C = GET_SINGLETON(_C) var/decl/reagent/C = decls_repository.get_decl(_C)
if(C.spectro_hidden && !details) if(C.spectro_hidden && !details)
continue continue
if(details) if(details)
@@ -498,7 +498,7 @@ BREATH ANALYZER
var/dat = "" var/dat = ""
var/one_percent = O.reagents.total_volume / 100 var/one_percent = O.reagents.total_volume / 100
for (var/_R in O.reagents.reagent_volumes) for (var/_R in O.reagents.reagent_volumes)
var/singleton/reagent/R = GET_SINGLETON(_R) var/decl/reagent/R = decls_repository.get_decl(_R)
dat += "\n \t [R][details ? ": [O.reagents.reagent_volumes[_R] / one_percent]%" : ""]" dat += "\n \t [R][details ? ": [O.reagents.reagent_volumes[_R] / one_percent]%" : ""]"
to_chat(user, SPAN_NOTICE("Chemicals found: [dat]")) to_chat(user, SPAN_NOTICE("Chemicals found: [dat]"))
@@ -669,7 +669,7 @@ BREATH ANALYZER
if(H.breathing && H.breathing.total_volume) if(H.breathing && H.breathing.total_volume)
var/unknown = 0 var/unknown = 0
for(var/_R in H.breathing.reagent_volumes) for(var/_R in H.breathing.reagent_volumes)
var/singleton/reagent/R = GET_SINGLETON(_R) var/decl/reagent/R = decls_repository.get_decl(_R)
if(R.scannable) if(R.scannable)
to_chat(user,"<span class='notice'>[R.name] found in subject's respiratory system.</span>") to_chat(user,"<span class='notice'>[R.name] found in subject's respiratory system.</span>")
else else
@@ -739,13 +739,13 @@ BREATH ANALYZER
"paralysis" = H.paralysis, "paralysis" = H.paralysis,
"bodytemp" = H.bodytemperature, "bodytemp" = H.bodytemperature,
"borer_present" = H.has_brain_worms(), "borer_present" = H.has_brain_worms(),
"inaprovaline_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/inaprovaline), "inaprovaline_amount" = REAGENT_VOLUME(H.reagents, /decl/reagent/inaprovaline),
"dexalin_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/dexalin), "dexalin_amount" = REAGENT_VOLUME(H.reagents, /decl/reagent/dexalin),
"stoxin_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/soporific), "stoxin_amount" = REAGENT_VOLUME(H.reagents, /decl/reagent/soporific),
"bicaridine_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/bicaridine), "bicaridine_amount" = REAGENT_VOLUME(H.reagents, /decl/reagent/bicaridine),
"dermaline_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/dermaline), "dermaline_amount" = REAGENT_VOLUME(H.reagents, /decl/reagent/dermaline),
"thetamycin_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/thetamycin), "thetamycin_amount" = REAGENT_VOLUME(H.reagents, /decl/reagent/thetamycin),
"blood_amount" = REAGENT_VOLUME(H.vessel, /singleton/reagent/blood), "blood_amount" = REAGENT_VOLUME(H.vessel, /decl/reagent/blood),
"disabilities" = H.sdisabilities, "disabilities" = H.sdisabilities,
"lung_ruptured" = H.is_lung_ruptured(), "lung_ruptured" = H.is_lung_ruptured(),
"lung_rescued" = H.is_lung_rescued(), "lung_rescued" = H.is_lung_rescued(),

View File

@@ -68,7 +68,7 @@
if(O.reagents.total_volume < 1) if(O.reagents.total_volume < 1)
to_chat(user, "The [O] is empty.") to_chat(user, "The [O] is empty.")
else if(O.reagents.total_volume >= 1) else if(O.reagents.total_volume >= 1)
if(O.reagents.has_reagent(/singleton/reagent/acid/polyacid, 1)) if(O.reagents.has_reagent(/decl/reagent/acid/polyacid, 1))
to_chat(user, "The acid chews through the balloon!") to_chat(user, "The acid chews through the balloon!")
O.reagents.splash(user, reagents.total_volume) O.reagents.splash(user, reagents.total_volume)
qdel(src) qdel(src)
@@ -555,8 +555,8 @@
icon_state = "katana" icon_state = "katana"
item_state = "katana" item_state = "katana"
drop_sound = 'sound/items/drop/gun.ogg' drop_sound = 'sound/items/drop/gun.ogg'
pickup_sound = /singleton/sound_category/sword_pickup_sound pickup_sound = /decl/sound_category/sword_pickup_sound
equip_sound = /singleton/sound_category/sword_equip_sound equip_sound = /decl/sound_category/sword_equip_sound
flags = CONDUCT flags = CONDUCT
slot_flags = SLOT_BELT | SLOT_BACK slot_flags = SLOT_BELT | SLOT_BACK
force = 5 force = 5
@@ -1240,7 +1240,7 @@
/obj/item/toy/desk /obj/item/toy/desk
var/on = FALSE var/on = FALSE
var/activation_sound = /singleton/sound_category/switch_sound var/activation_sound = /decl/sound_category/switch_sound
/obj/item/toy/desk/update_icon() /obj/item/toy/desk/update_icon()
if(on) if(on)

View File

@@ -55,7 +55,7 @@
/obj/item/trash/waffles /obj/item/trash/waffles
name = "square tray" name = "square tray"
icon_state = "waffles" icon_state = "waffles"
drop_sound = /singleton/sound_category/tray_hit_sound drop_sound = /decl/sound_category/tray_hit_sound
/obj/item/trash/plate /obj/item/trash/plate
name = "plate" name = "plate"
@@ -83,7 +83,7 @@
/obj/item/trash/tray /obj/item/trash/tray
name = "tray" name = "tray"
icon_state = "tray" icon_state = "tray"
drop_sound = /singleton/sound_category/tray_hit_sound drop_sound = /decl/sound_category/tray_hit_sound
/obj/item/trash/candle /obj/item/trash/candle
name = "candle" name = "candle"
@@ -119,7 +119,7 @@
/obj/item/trash/brownies /obj/item/trash/brownies
name = "square tray" name = "square tray"
icon_state = "brownies" icon_state = "brownies"
drop_sound = /singleton/sound_category/tray_hit_sound drop_sound = /decl/sound_category/tray_hit_sound
/obj/item/trash/snacktray /obj/item/trash/snacktray
name = "snacktray" name = "snacktray"
@@ -166,7 +166,7 @@
/obj/item/trash/grease //used for generic plattered food. example is lasagna. /obj/item/trash/grease //used for generic plattered food. example is lasagna.
name = "square tray" name = "square tray"
icon_state = "grease" icon_state = "grease"
drop_sound = /singleton/sound_category/tray_hit_sound drop_sound = /decl/sound_category/tray_hit_sound
/obj/item/trash/cookiesnack /obj/item/trash/cookiesnack
name = "\improper Carps Ahoy! miniature cookies" name = "\improper Carps Ahoy! miniature cookies"

View File

@@ -474,8 +474,8 @@ var/const/NO_EMAG_ACT = -50
desc = "An ID straight from CentCom. Internal Affairs." desc = "An ID straight from CentCom. Internal Affairs."
icon_state = "ccia" icon_state = "ccia"
overlay_state = "ccia" overlay_state = "ccia"
drop_sound = /singleton/sound_category/generic_drop_sound drop_sound = /decl/sound_category/generic_drop_sound
pickup_sound = /singleton/sound_category/generic_pickup_sound pickup_sound = /decl/sound_category/generic_pickup_sound
/obj/item/card/id/ccia/id_flash(var/mob/user) /obj/item/card/id/ccia/id_flash(var/mob/user)
var/add_text = "Done with prejudice and professionalism, [user.get_pronoun("he")] means business." var/add_text = "Done with prejudice and professionalism, [user.get_pronoun("he")] means business."

View File

@@ -126,22 +126,22 @@ obj/item/clothing/mask/chewable/Destroy()
/obj/item/clothing/mask/chewable/tobacco/bad /obj/item/clothing/mask/chewable/tobacco/bad
name = "chewing tobacco" name = "chewing tobacco"
desc = "A chewy wad of cheap tobacco. Cut in long strands and treated with syrup so it tastes less like an ash-tray when you stuff it into your face." desc = "A chewy wad of cheap tobacco. Cut in long strands and treated with syrup so it tastes less like an ash-tray when you stuff it into your face."
reagents_to_add = list(/singleton/reagent/toxin/tobacco/fake = 2) reagents_to_add = list(/decl/reagent/toxin/tobacco/fake = 2)
/obj/item/clothing/mask/chewable/tobacco/generic /obj/item/clothing/mask/chewable/tobacco/generic
name = "chewing tobacco" name = "chewing tobacco"
desc = "A chewy wad of tobacco. Cut in long strands and treated with syrup so it doesn't taste like an ash-tray when you stuff it into your face." desc = "A chewy wad of tobacco. Cut in long strands and treated with syrup so it doesn't taste like an ash-tray when you stuff it into your face."
reagents_to_add = list(/singleton/reagent/toxin/tobacco = 2) reagents_to_add = list(/decl/reagent/toxin/tobacco = 2)
/obj/item/clothing/mask/chewable/tobacco/fine /obj/item/clothing/mask/chewable/tobacco/fine
name = "chewing tobacco" name = "chewing tobacco"
desc = "A chewy wad of fine tobacco. Cut in long strands and treated with syrup so it doesn't taste like an ash-tray when you stuff it into your face." desc = "A chewy wad of fine tobacco. Cut in long strands and treated with syrup so it doesn't taste like an ash-tray when you stuff it into your face."
reagents_to_add = list(/singleton/reagent/toxin/tobacco/rich = 2) reagents_to_add = list(/decl/reagent/toxin/tobacco/rich = 2)
/obj/item/clothing/mask/chewable/tobacco/nico /obj/item/clothing/mask/chewable/tobacco/nico
name = "nicotine gum" name = "nicotine gum"
desc = "A chewy wad of synthetic rubber, laced with nicotine. Possibly the least disgusting method of nicotine delivery." desc = "A chewy wad of synthetic rubber, laced with nicotine. Possibly the least disgusting method of nicotine delivery."
reagents_to_add = list(/singleton/reagent/mental/nicotine = 2) reagents_to_add = list(/decl/reagent/mental/nicotine = 2)
icon_state = "nic_gum" icon_state = "nic_gum"
type_butt = /obj/item/trash/spitgum type_butt = /obj/item/trash/spitgum
wrapped = TRUE wrapped = TRUE
@@ -156,7 +156,7 @@ obj/item/clothing/mask/chewable/Destroy()
slot_flags = SLOT_EARS | SLOT_MASK slot_flags = SLOT_EARS | SLOT_MASK
chem_volume = 50 chem_volume = 50
chewtime = 300 chewtime = 300
reagents_to_add = list(/singleton/reagent/sugar = 2) reagents_to_add = list(/decl/reagent/sugar = 2)
/obj/item/trash/spitgum /obj/item/trash/spitgum
name = "old gum" name = "old gum"
@@ -176,7 +176,7 @@ obj/item/clothing/mask/chewable/Destroy()
/obj/item/clothing/mask/chewable/candy/gum/Initialize() /obj/item/clothing/mask/chewable/candy/gum/Initialize()
. = ..() . = ..()
reagents.add_reagent(pick(/singleton/reagent/drink/banana,/singleton/reagent/drink/berryjuice,/singleton/reagent/drink/grapejuice,/singleton/reagent/drink/lemonjuice,/singleton/reagent/drink/limejuice,/singleton/reagent/drink/orangejuice,/singleton/reagent/drink/watermelonjuice),10) reagents.add_reagent(pick(/decl/reagent/drink/banana,/decl/reagent/drink/berryjuice,/decl/reagent/drink/grapejuice,/decl/reagent/drink/lemonjuice,/decl/reagent/drink/limejuice,/decl/reagent/drink/orangejuice,/decl/reagent/drink/watermelonjuice),10)
color = reagents.get_color() color = reagents.get_color()
update_icon() update_icon()
@@ -188,7 +188,7 @@ obj/item/clothing/mask/chewable/Destroy()
wrapped = FALSE wrapped = FALSE
/obj/item/clothing/mask/chewable/candy/gum/gumball/medical /obj/item/clothing/mask/chewable/candy/gum/gumball/medical
reagents_to_add = list(/singleton/reagent/tricordrazine = 5) reagents_to_add = list(/decl/reagent/tricordrazine = 5)
/obj/item/storage/box/fancy/gum /obj/item/storage/box/fancy/gum
@@ -243,7 +243,7 @@ obj/item/clothing/mask/chewable/Destroy()
/obj/item/clothing/mask/chewable/candy/lolli/Initialize() /obj/item/clothing/mask/chewable/candy/lolli/Initialize()
. = ..() . = ..()
reagents.add_reagent(pick(/singleton/reagent/drink/banana,/singleton/reagent/drink/berryjuice,/singleton/reagent/drink/grapejuice,/singleton/reagent/drink/lemonjuice,/singleton/reagent/drink/limejuice,/singleton/reagent/drink/orangejuice,/singleton/reagent/drink/watermelonjuice),20) reagents.add_reagent(pick(/decl/reagent/drink/banana,/decl/reagent/drink/berryjuice,/decl/reagent/drink/grapejuice,/decl/reagent/drink/lemonjuice,/decl/reagent/drink/limejuice,/decl/reagent/drink/orangejuice,/decl/reagent/drink/watermelonjuice),20)
color = reagents.get_color() color = reagents.get_color()
update_icon() update_icon()
@@ -255,10 +255,10 @@ obj/item/clothing/mask/chewable/Destroy()
/obj/item/clothing/mask/chewable/candy/lolli/meds/Initialize() /obj/item/clothing/mask/chewable/candy/lolli/meds/Initialize()
. = ..() . = ..()
var/singleton/reagent/payload = pick(list( var/decl/reagent/payload = pick(list(
/singleton/reagent/perconol, /decl/reagent/perconol,
/singleton/reagent/mortaphenyl, /decl/reagent/mortaphenyl,
/singleton/reagent/dylovene)) /decl/reagent/dylovene))
reagents.add_reagent(payload, 15) reagents.add_reagent(payload, 15)
color = reagents.get_color() color = reagents.get_color()
desc = "[desc] This one is labeled '[initial(payload.name)]'." desc = "[desc] This one is labeled '[initial(payload.name)]'."
@@ -266,13 +266,13 @@ obj/item/clothing/mask/chewable/Destroy()
/obj/item/clothing/mask/chewable/candy/lolli/weak_meds /obj/item/clothing/mask/chewable/candy/lolli/weak_meds
name = "medicine lollipop" name = "medicine lollipop"
desc = "A sucrose sphere on a small handle, it has been infused with medication." desc = "A sucrose sphere on a small handle, it has been infused with medication."
reagents_to_add = list(/singleton/reagent/sugar = 6) reagents_to_add = list(/decl/reagent/sugar = 6)
/obj/item/clothing/mask/chewable/candy/lolli/weak_meds/Initialize() /obj/item/clothing/mask/chewable/candy/lolli/weak_meds/Initialize()
. = ..() . = ..()
var/singleton/reagent/payload = pick(list( var/decl/reagent/payload = pick(list(
/singleton/reagent/dylovene, /decl/reagent/dylovene,
/singleton/reagent/inaprovaline)) /decl/reagent/inaprovaline))
reagents.add_reagent(payload, 15) reagents.add_reagent(payload, 15)
color = reagents.get_color() color = reagents.get_color()
desc = "[desc] This one is labeled '[initial(payload.name)]'." desc = "[desc] This one is labeled '[initial(payload.name)]'."

View File

@@ -200,15 +200,15 @@ CIGARETTE PACKETS ARE IN FANCY.DM
playsound(src, 'sound/items/cigs_lighters/cig_light.ogg', 75, 1, -1) playsound(src, 'sound/items/cigs_lighters/cig_light.ogg', 75, 1, -1)
src.reagents.set_temperature(T0C + 45) src.reagents.set_temperature(T0C + 45)
damtype = "fire" damtype = "fire"
if(REAGENT_VOLUME(reagents, /singleton/reagent/toxin/phoron)) // the phoron explodes when exposed to fire if(REAGENT_VOLUME(reagents, /decl/reagent/toxin/phoron)) // the phoron explodes when exposed to fire
var/datum/effect/effect/system/reagents_explosion/e = new() var/datum/effect/effect/system/reagents_explosion/e = new()
e.set_up(round(REAGENT_VOLUME(reagents, /singleton/reagent/toxin/phoron) / 2.5, 1), get_turf(src), 0, 0) e.set_up(round(REAGENT_VOLUME(reagents, /decl/reagent/toxin/phoron) / 2.5, 1), get_turf(src), 0, 0)
e.start() e.start()
qdel(src) qdel(src)
return return
if(REAGENT_VOLUME(reagents, /singleton/reagent/fuel)) // the fuel explodes, too, but much less violently if(REAGENT_VOLUME(reagents, /decl/reagent/fuel)) // the fuel explodes, too, but much less violently
var/datum/effect/effect/system/reagents_explosion/e = new() var/datum/effect/effect/system/reagents_explosion/e = new()
e.set_up(round(REAGENT_VOLUME(reagents, /singleton/reagent/fuel) / 5, 1), get_turf(src), 0, 0) e.set_up(round(REAGENT_VOLUME(reagents, /decl/reagent/fuel) / 5, 1), get_turf(src), 0, 0)
e.start() e.start()
qdel(src) qdel(src)
return return
@@ -312,8 +312,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM
weldermes = "<span class='notice'>USER casually lights the NAME with FLAME.</span>" weldermes = "<span class='notice'>USER casually lights the NAME with FLAME.</span>"
ignitermes = "<span class='notice'>USER fiddles with FLAME, and manages to light their NAME.</span>" ignitermes = "<span class='notice'>USER fiddles with FLAME, and manages to light their NAME.</span>"
reagents_to_add = list( reagents_to_add = list(
/singleton/reagent/toxin/tobacco = 10, /decl/reagent/toxin/tobacco = 10,
/singleton/reagent/mental/nicotine = 5 /decl/reagent/mental/nicotine = 5
) )
/obj/item/clothing/mask/smokable/cigarette/attackby(obj/item/W as obj, mob/user as mob) /obj/item/clothing/mask/smokable/cigarette/attackby(obj/item/W as obj, mob/user as mob)
@@ -373,15 +373,15 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/clothing/mask/smokable/cigarette/vanilla /obj/item/clothing/mask/smokable/cigarette/vanilla
burn_rate = 0.015 burn_rate = 0.015
reagents_to_add = list(/singleton/reagent/toxin/tobacco = 15) reagents_to_add = list(/decl/reagent/toxin/tobacco = 15)
/obj/item/clothing/mask/smokable/cigarette/acmeco /obj/item/clothing/mask/smokable/cigarette/acmeco
burn_rate = 0.015 burn_rate = 0.015
reagents_to_add = list( reagents_to_add = list(
/singleton/reagent/toxin/tobacco = 5, /decl/reagent/toxin/tobacco = 5,
/singleton/reagent/mental/nicotine = 5, /decl/reagent/mental/nicotine = 5,
/singleton/reagent/lexorin = 2, /decl/reagent/lexorin = 2,
/singleton/reagent/serotrotium = 3 /decl/reagent/serotrotium = 3
) )
/obj/item/clothing/mask/smokable/cigarette/blank /obj/item/clothing/mask/smokable/cigarette/blank
@@ -391,28 +391,28 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/clothing/mask/smokable/cigarette/dromedaryco /obj/item/clothing/mask/smokable/cigarette/dromedaryco
reagents_to_add = list( reagents_to_add = list(
/singleton/reagent/toxin/tobacco = 5, /decl/reagent/toxin/tobacco = 5,
/singleton/reagent/mental/nicotine = 10 /decl/reagent/mental/nicotine = 10
) )
/obj/item/clothing/mask/smokable/cigarette/nicotine /obj/item/clothing/mask/smokable/cigarette/nicotine
reagents_to_add = list( reagents_to_add = list(
/singleton/reagent/toxin/tobacco/rich = 5, /decl/reagent/toxin/tobacco/rich = 5,
/singleton/reagent/mental/nicotine = 10 /decl/reagent/mental/nicotine = 10
) )
/obj/item/clothing/mask/smokable/cigarette/rugged /obj/item/clothing/mask/smokable/cigarette/rugged
reagents_to_add = list( reagents_to_add = list(
/singleton/reagent/toxin/tobacco/fake = 10, /decl/reagent/toxin/tobacco/fake = 10,
/singleton/reagent/mental/nicotine = 5 /decl/reagent/mental/nicotine = 5
) )
/obj/item/clothing/mask/smokable/cigarette/adhomai /obj/item/clothing/mask/smokable/cigarette/adhomai
name = "adhomian cigarette" name = "adhomian cigarette"
desc = "An adhomian cigarette made from processed S'rendarr's Hand." desc = "An adhomian cigarette made from processed S'rendarr's Hand."
reagents_to_add = list( reagents_to_add = list(
/singleton/reagent/toxin/tobacco = 5, /decl/reagent/toxin/tobacco = 5,
/singleton/reagent/mental/nicotine = 5 /decl/reagent/mental/nicotine = 5
) )
//////////// ////////////
@@ -437,8 +437,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM
drop_sound = 'sound/items/drop/gloves.ogg' drop_sound = 'sound/items/drop/gloves.ogg'
pickup_sound = 'sound/items/pickup/gloves.ogg' pickup_sound = 'sound/items/pickup/gloves.ogg'
reagents_to_add = list( reagents_to_add = list(
/singleton/reagent/toxin/tobacco/rich = 25, /decl/reagent/toxin/tobacco/rich = 25,
/singleton/reagent/mental/nicotine = 5 /decl/reagent/mental/nicotine = 5
) )
/obj/item/clothing/mask/smokable/cigarette/cigar/havana /obj/item/clothing/mask/smokable/cigarette/cigar/havana
@@ -451,9 +451,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
type_butt = /obj/item/trash/cigbutt/cigarbutt/alt type_butt = /obj/item/trash/cigbutt/cigarbutt/alt
chem_volume = 60 chem_volume = 60
reagents_to_add = list( reagents_to_add = list(
/singleton/reagent/toxin/tobacco/rich = 15, /decl/reagent/toxin/tobacco/rich = 15,
/singleton/reagent/mental/nicotine = 5, /decl/reagent/mental/nicotine = 5,
/singleton/reagent/tricordrazine = 10 /decl/reagent/tricordrazine = 10
) )
/obj/item/clothing/mask/smokable/cigarette/cigar/cohiba /obj/item/clothing/mask/smokable/cigarette/cigar/cohiba
@@ -466,9 +466,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
type_butt = /obj/item/trash/cigbutt/cigarbutt/alt type_butt = /obj/item/trash/cigbutt/cigarbutt/alt
chem_volume = 120 chem_volume = 120
reagents_to_add = list( reagents_to_add = list(
/singleton/reagent/toxin/tobacco/rich = 30, /decl/reagent/toxin/tobacco/rich = 30,
/singleton/reagent/mental/nicotine = 10, /decl/reagent/mental/nicotine = 10,
/singleton/reagent/tricordrazine = 20 /decl/reagent/tricordrazine = 20
) )
/obj/item/trash/cigbutt /obj/item/trash/cigbutt
@@ -511,7 +511,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
icon_off = "sausageoff" icon_off = "sausageoff"
type_butt = /obj/item/trash/cigbutt/sausagebutt type_butt = /obj/item/trash/cigbutt/sausagebutt
chem_volume = 6 chem_volume = 6
reagents_to_add = list(/singleton/reagent/nutriment/protein = 6) reagents_to_add = list(/decl/reagent/nutriment/protein = 6)
/obj/item/trash/cigbutt/sausagebutt /obj/item/trash/cigbutt/sausagebutt
name = "sausage butt" name = "sausage butt"

View File

@@ -263,39 +263,39 @@ obj/item/clothing/mask/smokable/ecig/util/examine(mob/user)
/obj/item/reagent_containers/ecig_cartridge/blanknico /obj/item/reagent_containers/ecig_cartridge/blanknico
name = "flavorless nicotine cartridge" name = "flavorless nicotine cartridge"
desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says you can add whatever flavoring agents you want." desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says you can add whatever flavoring agents you want."
reagents_to_add = list(/singleton/reagent/toxin/tobacco/liquid = 5, /singleton/reagent/water = 10) reagents_to_add = list(/decl/reagent/toxin/tobacco/liquid = 5, /decl/reagent/water = 10)
/obj/item/reagent_containers/ecig_cartridge/med_nicotine /obj/item/reagent_containers/ecig_cartridge/med_nicotine
name = "tobacco flavour cartridge" name = "tobacco flavour cartridge"
desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its tobacco flavored." desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its tobacco flavored."
reagents_to_add = list(/singleton/reagent/toxin/tobacco/liquid = 5, /singleton/reagent/water = 15) reagents_to_add = list(/decl/reagent/toxin/tobacco/liquid = 5, /decl/reagent/water = 15)
/obj/item/reagent_containers/ecig_cartridge/high_nicotine /obj/item/reagent_containers/ecig_cartridge/high_nicotine
name = "high nicotine tobacco flavour cartridge" name = "high nicotine tobacco flavour cartridge"
desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its tobacco flavored, with extra nicotine." desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its tobacco flavored, with extra nicotine."
reagents_to_add = list(/singleton/reagent/toxin/tobacco/liquid = 10, /singleton/reagent/water = 10) reagents_to_add = list(/decl/reagent/toxin/tobacco/liquid = 10, /decl/reagent/water = 10)
/obj/item/reagent_containers/ecig_cartridge/orange /obj/item/reagent_containers/ecig_cartridge/orange
name = "orange flavour cartridge" name = "orange flavour cartridge"
desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its orange flavored." desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its orange flavored."
reagents_to_add = list(/singleton/reagent/toxin/tobacco/liquid = 5, /singleton/reagent/water = 10, /singleton/reagent/drink/orangejuice = 5) reagents_to_add = list(/decl/reagent/toxin/tobacco/liquid = 5, /decl/reagent/water = 10, /decl/reagent/drink/orangejuice = 5)
/obj/item/reagent_containers/ecig_cartridge/watermelon /obj/item/reagent_containers/ecig_cartridge/watermelon
name = "watermelon flavour cartridge" name = "watermelon flavour cartridge"
desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its watermelon flavored." desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its watermelon flavored."
reagents_to_add = list(/singleton/reagent/toxin/tobacco/liquid = 10, /singleton/reagent/water = 10, /singleton/reagent/drink/watermelonjuice = 5) reagents_to_add = list(/decl/reagent/toxin/tobacco/liquid = 10, /decl/reagent/water = 10, /decl/reagent/drink/watermelonjuice = 5)
/obj/item/reagent_containers/ecig_cartridge/grape /obj/item/reagent_containers/ecig_cartridge/grape
name = "grape flavour cartridge" name = "grape flavour cartridge"
desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its grape flavored." desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its grape flavored."
reagents_to_add = list(/singleton/reagent/toxin/tobacco/liquid = 10, /singleton/reagent/water = 10, /singleton/reagent/drink/grapejuice = 5) reagents_to_add = list(/decl/reagent/toxin/tobacco/liquid = 10, /decl/reagent/water = 10, /decl/reagent/drink/grapejuice = 5)
/obj/item/reagent_containers/ecig_cartridge/lemonlime /obj/item/reagent_containers/ecig_cartridge/lemonlime
name = "lemon-lime flavour cartridge" name = "lemon-lime flavour cartridge"
desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its lemon-lime flavored." desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its lemon-lime flavored."
reagents_to_add = list(/singleton/reagent/toxin/tobacco/liquid = 10, /singleton/reagent/water = 10, /singleton/reagent/drink/lemon_lime = 5) reagents_to_add = list(/decl/reagent/toxin/tobacco/liquid = 10, /decl/reagent/water = 10, /decl/reagent/drink/lemon_lime = 5)
/obj/item/reagent_containers/ecig_cartridge/coffee /obj/item/reagent_containers/ecig_cartridge/coffee
name = "coffee flavour cartridge" name = "coffee flavour cartridge"
desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its coffee flavored." desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its coffee flavored."
reagents_to_add = list(/singleton/reagent/toxin/tobacco/liquid = 10, /singleton/reagent/water = 10, /singleton/reagent/drink/coffee = 5) reagents_to_add = list(/decl/reagent/toxin/tobacco/liquid = 10, /decl/reagent/water = 10, /decl/reagent/drink/coffee = 5)

View File

@@ -76,7 +76,7 @@
/obj/item/reagent_containers/extinguisher_refill/filled/Initialize() /obj/item/reagent_containers/extinguisher_refill/filled/Initialize()
. = ..() . = ..()
reagents.add_reagent(/singleton/reagent/toxin/fertilizer/monoammoniumphosphate, volume) reagents.add_reagent(/decl/reagent/toxin/fertilizer/monoammoniumphosphate, volume)
flags &= ~OPENCONTAINER flags &= ~OPENCONTAINER
/obj/item/extinguisher /obj/item/extinguisher
@@ -123,7 +123,7 @@
/obj/item/extinguisher/New() /obj/item/extinguisher/New()
create_reagents(max_water) create_reagents(max_water)
reagents.add_reagent(/singleton/reagent/toxin/fertilizer/monoammoniumphosphate, max_water) reagents.add_reagent(/decl/reagent/toxin/fertilizer/monoammoniumphosphate, max_water)
..() ..()
/obj/item/extinguisher/examine(mob/user) /obj/item/extinguisher/examine(mob/user)

View File

@@ -201,9 +201,9 @@
var/obj/item/reagent_containers/glass/beaker/B1 = new(src) var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src) var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent(/singleton/reagent/aluminum, 30) B1.reagents.add_reagent(/decl/reagent/aluminum, 30)
B2.reagents.add_reagent(/singleton/reagent/foaming_agent, 10) B2.reagents.add_reagent(/decl/reagent/foaming_agent, 10)
B2.reagents.add_reagent(/singleton/reagent/acid/polyacid, 10) B2.reagents.add_reagent(/decl/reagent/acid/polyacid, 10)
detonator = new/obj/item/device/assembly_holder/timer_igniter(src) detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
@@ -222,11 +222,11 @@
var/obj/item/reagent_containers/glass/beaker/B1 = new(src) var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src) var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent(/singleton/reagent/aluminum, 15) B1.reagents.add_reagent(/decl/reagent/aluminum, 15)
B1.reagents.add_reagent(/singleton/reagent/fuel,20) B1.reagents.add_reagent(/decl/reagent/fuel,20)
B2.reagents.add_reagent(/singleton/reagent/toxin/phoron, 15) B2.reagents.add_reagent(/decl/reagent/toxin/phoron, 15)
B2.reagents.add_reagent(/singleton/reagent/acid, 15) B2.reagents.add_reagent(/decl/reagent/acid, 15)
B1.reagents.add_reagent(/singleton/reagent/fuel,20) B1.reagents.add_reagent(/decl/reagent/fuel,20)
detonator = new/obj/item/device/assembly_holder/timer_igniter(src) detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
@@ -245,10 +245,10 @@
var/obj/item/reagent_containers/glass/beaker/B1 = new(src) var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src) var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent(/singleton/reagent/toxin/plantbgone, 25) B1.reagents.add_reagent(/decl/reagent/toxin/plantbgone, 25)
B1.reagents.add_reagent(/singleton/reagent/potassium, 25) B1.reagents.add_reagent(/decl/reagent/potassium, 25)
B2.reagents.add_reagent(/singleton/reagent/phosphorus, 25) B2.reagents.add_reagent(/decl/reagent/phosphorus, 25)
B2.reagents.add_reagent(/singleton/reagent/sugar, 25) B2.reagents.add_reagent(/decl/reagent/sugar, 25)
detonator = new/obj/item/device/assembly_holder/timer_igniter(src) detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
@@ -267,12 +267,12 @@
var/obj/item/reagent_containers/glass/beaker/B1 = new(src) var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src) var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent(/singleton/reagent/sugar, 20) B1.reagents.add_reagent(/decl/reagent/sugar, 20)
B1.reagents.add_reagent(/singleton/reagent/potassium,20) B1.reagents.add_reagent(/decl/reagent/potassium,20)
B1.reagents.add_reagent(/singleton/reagent/soporific, 10) B1.reagents.add_reagent(/decl/reagent/soporific, 10)
B1.reagents.add_reagent(/singleton/reagent/dylovene, 10) B1.reagents.add_reagent(/decl/reagent/dylovene, 10)
B2.reagents.add_reagent(/singleton/reagent/polysomnine,40) B2.reagents.add_reagent(/decl/reagent/polysomnine,40)
B2.reagents.add_reagent(/singleton/reagent/phosphorus,20) B2.reagents.add_reagent(/decl/reagent/phosphorus,20)
detonator = new/obj/item/device/assembly_holder/timer_igniter(src) detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
@@ -291,9 +291,9 @@
var/obj/item/reagent_containers/glass/beaker/B1 = new(src) var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src) var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent(/singleton/reagent/surfactant, 40) B1.reagents.add_reagent(/decl/reagent/surfactant, 40)
B2.reagents.add_reagent(/singleton/reagent/water, 40) B2.reagents.add_reagent(/decl/reagent/water, 40)
B2.reagents.add_reagent(/singleton/reagent/spacecleaner, 10) B2.reagents.add_reagent(/decl/reagent/spacecleaner, 10)
detonator = new/obj/item/device/assembly_holder/timer_igniter(src) detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
@@ -312,9 +312,9 @@
var/obj/item/reagent_containers/glass/beaker/B1 = new(src) var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src) var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent(/singleton/reagent/surfactant, 40) B1.reagents.add_reagent(/decl/reagent/surfactant, 40)
B2.reagents.add_reagent(/singleton/reagent/water, 40) B2.reagents.add_reagent(/decl/reagent/water, 40)
B2.reagents.add_reagent(/singleton/reagent/antifuel, 10) B2.reagents.add_reagent(/decl/reagent/antifuel, 10)
detonator = new/obj/item/device/assembly_holder/timer_igniter(src) detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
@@ -333,10 +333,10 @@
var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src) var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src) var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
B1.reagents.add_reagent(/singleton/reagent/toxin/cardox, 40) B1.reagents.add_reagent(/decl/reagent/toxin/cardox, 40)
B1.reagents.add_reagent(/singleton/reagent/potassium, 40) B1.reagents.add_reagent(/decl/reagent/potassium, 40)
B2.reagents.add_reagent(/singleton/reagent/phosphorus, 40) B2.reagents.add_reagent(/decl/reagent/phosphorus, 40)
B2.reagents.add_reagent(/singleton/reagent/sugar, 40) B2.reagents.add_reagent(/decl/reagent/sugar, 40)
detonator = new/obj/item/device/assembly_holder/timer_igniter(src) detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
@@ -356,11 +356,11 @@
var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src) var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src) var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
B1.reagents.add_reagent(/singleton/reagent/phosphorus, 40) B1.reagents.add_reagent(/decl/reagent/phosphorus, 40)
B1.reagents.add_reagent(/singleton/reagent/potassium, 40) B1.reagents.add_reagent(/decl/reagent/potassium, 40)
B1.reagents.add_reagent(/singleton/reagent/capsaicin/condensed, 40) B1.reagents.add_reagent(/decl/reagent/capsaicin/condensed, 40)
B2.reagents.add_reagent(/singleton/reagent/sugar, 40) B2.reagents.add_reagent(/decl/reagent/sugar, 40)
B2.reagents.add_reagent(/singleton/reagent/capsaicin/condensed, 80) B2.reagents.add_reagent(/decl/reagent/capsaicin/condensed, 80)
detonator = new/obj/item/device/assembly_holder/timer_igniter(src) detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
@@ -379,10 +379,10 @@
var/obj/item/reagent_containers/glass/beaker/B1 = new(src) var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src) var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent(/singleton/reagent/surfactant, 40) B1.reagents.add_reagent(/decl/reagent/surfactant, 40)
B1.reagents.add_reagent(/singleton/reagent/toxin/fertilizer/monoammoniumphosphate, 20) B1.reagents.add_reagent(/decl/reagent/toxin/fertilizer/monoammoniumphosphate, 20)
B2.reagents.add_reagent(/singleton/reagent/water, 40) B2.reagents.add_reagent(/decl/reagent/water, 40)
B2.reagents.add_reagent(/singleton/reagent/toxin/fertilizer/monoammoniumphosphate, 20) B2.reagents.add_reagent(/decl/reagent/toxin/fertilizer/monoammoniumphosphate, 20)
detonator = new/obj/item/device/assembly_holder/timer_igniter(src) detonator = new/obj/item/device/assembly_holder/timer_igniter(src)

View File

@@ -6,5 +6,5 @@
/obj/item/grenade/fake/prime() /obj/item/grenade/fake/prime()
active = 0 active = 0
playsound(src.loc, get_sfx(/singleton/sound_category/explosion_sound), 50, 1, 30) playsound(src.loc, get_sfx(/decl/sound_category/explosion_sound), 50, 1, 30)
icon_state = "frag" icon_state = "frag"

View File

@@ -17,8 +17,8 @@
can_embed = 0 can_embed = 0
var/parry_chance = 40 var/parry_chance = 40
drop_sound = 'sound/items/drop/sword.ogg' drop_sound = 'sound/items/drop/sword.ogg'
pickup_sound = /singleton/sound_category/sword_pickup_sound pickup_sound = /decl/sound_category/sword_pickup_sound
equip_sound = /singleton/sound_category/sword_equip_sound equip_sound = /decl/sound_category/sword_equip_sound
/obj/item/material/sword/handle_shield(mob/user, var/on_back, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack") /obj/item/material/sword/handle_shield(mob/user, var/on_back, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
var/parry_bonus = 1 var/parry_bonus = 1

View File

@@ -21,7 +21,7 @@
var/wielded = 0 var/wielded = 0
var/force_wielded = 0 var/force_wielded = 0
var/force_unwielded var/force_unwielded
var/wield_sound = /singleton/sound_category/generic_wield_sound var/wield_sound = /decl/sound_category/generic_wield_sound
var/unwield_sound = null var/unwield_sound = null
var/base_name var/base_name
var/unwielded_force_divisor = 0.25 var/unwielded_force_divisor = 0.25
@@ -33,8 +33,8 @@
slot_r_hand_str = 'icons/mob/items/weapons/righthand_twohanded.dmi' slot_r_hand_str = 'icons/mob/items/weapons/righthand_twohanded.dmi'
) )
drop_sound = 'sound/items/drop/sword.ogg' drop_sound = 'sound/items/drop/sword.ogg'
pickup_sound = /singleton/sound_category/sword_pickup_sound pickup_sound = /decl/sound_category/sword_pickup_sound
equip_sound = /singleton/sound_category/sword_equip_sound equip_sound = /decl/sound_category/sword_equip_sound
hitsound = 'sound/weapons/bladeslice.ogg' hitsound = 'sound/weapons/bladeslice.ogg'
/obj/item/material/twohanded/proc/wield() /obj/item/material/twohanded/proc/wield()
@@ -92,7 +92,7 @@
/obj/item/material/twohanded/handle_shield(mob/user, var/on_back, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack") /obj/item/material/twohanded/handle_shield(mob/user, var/on_back, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
if(wielded && default_parry_check(user, attacker, damage_source) && prob(parry_chance)) if(wielded && default_parry_check(user, attacker, damage_source) && prob(parry_chance))
user.visible_message("<span class='danger'>\The [user] parries [attack_text] with \the [src]!</span>") user.visible_message("<span class='danger'>\The [user] parries [attack_text] with \the [src]!</span>")
playsound(user.loc, /singleton/sound_category/punchmiss_sound, 50, 1) playsound(user.loc, /decl/sound_category/punchmiss_sound, 50, 1)
return PROJECTILE_STOPPED return PROJECTILE_STOPPED
return FALSE return FALSE
@@ -352,7 +352,7 @@
applies_material_colour = FALSE applies_material_colour = FALSE
default_material = "steel" default_material = "steel"
parry_chance = 5 parry_chance = 5
var/fuel_type = /singleton/reagent/fuel var/fuel_type = /decl/reagent/fuel
var/opendelay = 30 // How long it takes to perform a door opening action with this chainsaw, in seconds. var/opendelay = 30 // How long it takes to perform a door opening action with this chainsaw, in seconds.
var/max_fuel = 300 // The maximum amount of fuel the chainsaw stores. var/max_fuel = 300 // The maximum amount of fuel the chainsaw stores.
var/fuel_cost = 1 // Multiplier for fuel cost. var/fuel_cost = 1 // Multiplier for fuel cost.
@@ -498,7 +498,7 @@
PowerDown(user) PowerDown(user)
else if(!wielded) else if(!wielded)
to_chat(user, SPAN_WARNING("You need to hold this with two hands to turn this on.")) to_chat(user, SPAN_WARNING("You need to hold this with two hands to turn this on."))
else if(REAGENT_VOLUME(reagents, /singleton/reagent/fuel) <= 0) else if(REAGENT_VOLUME(reagents, /decl/reagent/fuel) <= 0)
user.visible_message(SPAN_WARNING("[user] pulls the cord on \the [src], but nothing happens."), SPAN_WARNING("You pull the cord on \the [src], but nothing happens."), SPAN_NOTICE("You hear a cord being pulled.")) user.visible_message(SPAN_WARNING("[user] pulls the cord on \the [src], but nothing happens."), SPAN_WARNING("You pull the cord on \the [src], but nothing happens."), SPAN_NOTICE("You hear a cord being pulled."))
else else
var/max = rand(3,6) var/max = rand(3,6)

View File

@@ -345,8 +345,8 @@
active_w_class = ITEMSIZE_NORMAL active_w_class = ITEMSIZE_NORMAL
w_class = ITEMSIZE_NORMAL w_class = ITEMSIZE_NORMAL
drop_sound = 'sound/items/drop/sword.ogg' drop_sound = 'sound/items/drop/sword.ogg'
pickup_sound = /singleton/sound_category/sword_pickup_sound pickup_sound = /decl/sound_category/sword_pickup_sound
equip_sound = /singleton/sound_category/sword_equip_sound equip_sound = /decl/sound_category/sword_equip_sound
/obj/item/melee/energy/sword/powersword/activate(mob/living/user) /obj/item/melee/energy/sword/powersword/activate(mob/living/user)
..() ..()

View File

@@ -77,7 +77,7 @@
cleantime = 15 cleantime = 15
var/refill_enabled = TRUE //Self-refill toggle for when a janitor decides to mop with something other than water. var/refill_enabled = TRUE //Self-refill toggle for when a janitor decides to mop with something other than water.
var/refill_rate = 0.5 //Rate per process() tick mop refills itself var/refill_rate = 0.5 //Rate per process() tick mop refills itself
var/refill_reagent = /singleton/reagent/water //Determins what reagent to use for refilling, just in case someone wanted to make a HOLY MOP OF PURGING var/refill_reagent = /decl/reagent/water //Determins what reagent to use for refilling, just in case someone wanted to make a HOLY MOP OF PURGING
/obj/item/mop/advanced/New() /obj/item/mop/advanced/New()
..() ..()

View File

@@ -17,11 +17,11 @@
fragile = 0 fragile = 0
var/paint_reagent = null //name of the reagent responsible for colouring the paint var/paint_reagent = null //name of the reagent responsible for colouring the paint
var/paint_type = null //used for colouring detective technicolor coat and hat var/paint_type = null //used for colouring detective technicolor coat and hat
reagents_to_add = list(/singleton/reagent/paint = 4/5) reagents_to_add = list(/decl/reagent/paint = 4/5)
/obj/item/reagent_containers/glass/paint/Initialize() /obj/item/reagent_containers/glass/paint/Initialize()
reagents_to_add[paint_reagent] = 1/5 reagents_to_add[paint_reagent] = 1/5
for(var/singleton/reagent/R in reagents_to_add) for(var/decl/reagent/R in reagents_to_add)
reagents_to_add[R] *= volume reagents_to_add[R] *= volume
. = ..() . = ..()
reagents.handle_reactions() reagents.handle_reactions()
@@ -54,29 +54,29 @@
update_icon() update_icon()
/obj/item/reagent_containers/glass/paint/red /obj/item/reagent_containers/glass/paint/red
paint_reagent = /singleton/reagent/crayon_dust/red paint_reagent = /decl/reagent/crayon_dust/red
paint_type = "red" paint_type = "red"
/obj/item/reagent_containers/glass/paint/yellow /obj/item/reagent_containers/glass/paint/yellow
paint_reagent = /singleton/reagent/crayon_dust/yellow paint_reagent = /decl/reagent/crayon_dust/yellow
paint_type = "yellow" paint_type = "yellow"
/obj/item/reagent_containers/glass/paint/green /obj/item/reagent_containers/glass/paint/green
paint_reagent = /singleton/reagent/crayon_dust/green paint_reagent = /decl/reagent/crayon_dust/green
paint_type = "green" paint_type = "green"
/obj/item/reagent_containers/glass/paint/blue /obj/item/reagent_containers/glass/paint/blue
paint_reagent = /singleton/reagent/crayon_dust/blue paint_reagent = /decl/reagent/crayon_dust/blue
paint_type = "blue" paint_type = "blue"
/obj/item/reagent_containers/glass/paint/purple /obj/item/reagent_containers/glass/paint/purple
paint_reagent = /singleton/reagent/crayon_dust/purple paint_reagent = /decl/reagent/crayon_dust/purple
paint_type = "purple" paint_type = "purple"
/obj/item/reagent_containers/glass/paint/black /obj/item/reagent_containers/glass/paint/black
paint_reagent = /singleton/reagent/carbon paint_reagent = /decl/reagent/carbon
paint_type = "black" paint_type = "black"
/obj/item/reagent_containers/glass/paint/white /obj/item/reagent_containers/glass/paint/white
paint_reagent = /singleton/reagent/aluminum paint_reagent = /decl/reagent/aluminum
paint_type = "white" paint_type = "white"

View File

@@ -29,7 +29,7 @@
/obj/item/soap/proc/wet() /obj/item/soap/proc/wet()
playsound(loc, 'sound/effects/slosh.ogg', 25, 1) playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
reagents.add_reagent(/singleton/reagent/spacecleaner, capacity) reagents.add_reagent(/decl/reagent/spacecleaner, capacity)
/obj/item/soap/attackby(var/obj/item/I, var/mob/user) /obj/item/soap/attackby(var/obj/item/I, var/mob/user)
if(istype(I, /obj/item/key)) if(istype(I, /obj/item/key))

View File

@@ -28,14 +28,14 @@
if(!proximity) if(!proximity)
return return
if(user.mind && (user.mind.assigned_role == "Chaplain")) if(user.mind && (user.mind.assigned_role == "Chaplain"))
if(A.reagents && A.reagents.has_reagent(/singleton/reagent/water)) //blesses all the water in the holder if(A.reagents && A.reagents.has_reagent(/decl/reagent/water)) //blesses all the water in the holder
if(REAGENT_VOLUME(A.reagents, /singleton/reagent/water) > 60) if(REAGENT_VOLUME(A.reagents, /decl/reagent/water) > 60)
to_chat(user, SPAN_NOTICE("There's too much water for you to bless at once!")) to_chat(user, SPAN_NOTICE("There's too much water for you to bless at once!"))
else else
to_chat(user, SPAN_NOTICE("You bless the water in [A], turning it into holy water.")) to_chat(user, SPAN_NOTICE("You bless the water in [A], turning it into holy water."))
var/water2holy = REAGENT_VOLUME(A.reagents, /singleton/reagent/water) var/water2holy = REAGENT_VOLUME(A.reagents, /decl/reagent/water)
A.reagents.del_reagent(/singleton/reagent/water) A.reagents.del_reagent(/decl/reagent/water)
A.reagents.add_reagent(/singleton/reagent/water/holywater, water2holy) A.reagents.add_reagent(/decl/reagent/water/holywater, water2holy)
/obj/item/storage/bible/attackby(obj/item/W as obj, mob/user as mob) /obj/item/storage/bible/attackby(obj/item/W as obj, mob/user as mob)
if(src.use_sound) if(src.use_sound)

View File

@@ -42,7 +42,7 @@
var/obj/item/melee/energy/blade/blade = W var/obj/item/melee/energy/blade/blade = W
blade.spark_system.queue() blade.spark_system.queue()
playsound(src.loc, 'sound/weapons/blade.ogg', 50, 1) playsound(src.loc, 'sound/weapons/blade.ogg', 50, 1)
playsound(src.loc, /singleton/sound_category/spark_sound, 50, 1) playsound(src.loc, /decl/sound_category/spark_sound, 50, 1)
if(!locked) if(!locked)
..() ..()
else else

View File

@@ -3,7 +3,7 @@
desc = "It's a small container with dice inside." desc = "It's a small container with dice inside."
icon = 'icons/obj/dice.dmi' icon = 'icons/obj/dice.dmi'
icon_state = "dicebag" icon_state = "dicebag"
use_sound = /singleton/sound_category/rustle_sound use_sound = /decl/sound_category/rustle_sound
drop_sound = 'sound/items/drop/hat.ogg' drop_sound = 'sound/items/drop/hat.ogg'
pickup_sound = 'sound/items/pickup/hat.ogg' pickup_sound = 'sound/items/pickup/hat.ogg'
starts_with = list( starts_with = list(

View File

@@ -38,7 +38,7 @@
var/obj/item/melee/energy/blade/blade = W var/obj/item/melee/energy/blade/blade = W
blade.spark_system.queue() blade.spark_system.queue()
playsound(src.loc, 'sound/weapons/blade.ogg', 50, 1) playsound(src.loc, 'sound/weapons/blade.ogg', 50, 1)
playsound(src.loc, /singleton/sound_category/spark_sound, 50, 1) playsound(src.loc, /decl/sound_category/spark_sound, 50, 1)
return return
if (W.isscrewdriver()) if (W.isscrewdriver())

View File

@@ -40,7 +40,7 @@
var/allow_quick_empty //Set this variable to allow the object to have the 'empty' verb, which dumps all the contents on the floor. var/allow_quick_empty //Set this variable to allow the object to have the 'empty' verb, which dumps all the contents on the floor.
var/allow_quick_gather //Set this variable to allow the object to have the 'toggle mode' verb, which quickly collects all items from a tile. var/allow_quick_gather //Set this variable to allow the object to have the 'toggle mode' verb, which quickly collects all items from a tile.
var/collection_mode = 1 //0 = pick one at a time, 1 = pick all on tile var/collection_mode = 1 //0 = pick one at a time, 1 = pick all on tile
var/use_sound = /singleton/sound_category/rustle_sound //sound played when used. null for no sound. var/use_sound = /decl/sound_category/rustle_sound //sound played when used. null for no sound.
var/list/starts_with // for pre-filled items var/list/starts_with // for pre-filled items
var/empty_delay = 0 SECOND // time it takes to empty bag. this is multiplies by number of objects stored var/empty_delay = 0 SECOND // time it takes to empty bag. this is multiplies by number of objects stored

View File

@@ -137,7 +137,7 @@
if (..()) if (..())
if (contents.len) if (contents.len)
spill(3, get_turf(M)) spill(3, get_turf(M))
playsound(M, /singleton/sound_category/tray_hit_sound, 100, 1) //sound playin' again playsound(M, /decl/sound_category/tray_hit_sound, 100, 1) //sound playin' again
update_force() update_force()
user.visible_message(SPAN_DANGER("[user] smashes the [src] into [M], causing it to break open and strew its contents across the area")) user.visible_message(SPAN_DANGER("[user] smashes the [src] into [M], causing it to break open and strew its contents across the area"))

View File

@@ -118,31 +118,31 @@
..() ..()
var/obj/item/storage/box/fancy/cigarettes/pack var/obj/item/storage/box/fancy/cigarettes/pack
pack = new /obj/item/storage/box/fancy/cigarettes(src) pack = new /obj/item/storage/box/fancy/cigarettes(src)
fill_cigarre_package(pack, list(/singleton/reagent/aluminum = 5, /singleton/reagent/potassium = 5, /singleton/reagent/sulfur = 5)) fill_cigarre_package(pack, list(/decl/reagent/aluminum = 5, /decl/reagent/potassium = 5, /decl/reagent/sulfur = 5))
pack.desc += " 'F' has been scribbled on it." pack.desc += " 'F' has been scribbled on it."
pack = new /obj/item/storage/box/fancy/cigarettes(src) pack = new /obj/item/storage/box/fancy/cigarettes(src)
fill_cigarre_package(pack, list(/singleton/reagent/aluminum = 5, /singleton/reagent/potassium = 5, /singleton/reagent/sulfur = 5)) fill_cigarre_package(pack, list(/decl/reagent/aluminum = 5, /decl/reagent/potassium = 5, /decl/reagent/sulfur = 5))
pack.desc += " 'F' has been scribbled on it." pack.desc += " 'F' has been scribbled on it."
pack = new /obj/item/storage/box/fancy/cigarettes(src) pack = new /obj/item/storage/box/fancy/cigarettes(src)
fill_cigarre_package(pack, list(/singleton/reagent/potassium = 5, /singleton/reagent/sugar = 5, /singleton/reagent/phosphorus = 5)) fill_cigarre_package(pack, list(/decl/reagent/potassium = 5, /decl/reagent/sugar = 5, /decl/reagent/phosphorus = 5))
pack.desc += " 'S' has been scribbled on it." pack.desc += " 'S' has been scribbled on it."
pack = new /obj/item/storage/box/fancy/cigarettes(src) pack = new /obj/item/storage/box/fancy/cigarettes(src)
fill_cigarre_package(pack, list(/singleton/reagent/potassium = 5, /singleton/reagent/sugar = 5, /singleton/reagent/phosphorus = 5)) fill_cigarre_package(pack, list(/decl/reagent/potassium = 5, /decl/reagent/sugar = 5, /decl/reagent/phosphorus = 5))
pack.desc += " 'S' has been scribbled on it." pack.desc += " 'S' has been scribbled on it."
pack = new /obj/item/storage/box/fancy/cigarettes(src) pack = new /obj/item/storage/box/fancy/cigarettes(src)
// Dylovene. Going with 1.5 rather than 1.6666666... // Dylovene. Going with 1.5 rather than 1.6666666...
fill_cigarre_package(pack, list(/singleton/reagent/potassium = 1.5, /singleton/reagent/ammonia = 1.5, /singleton/reagent/silicon = 1.5)) fill_cigarre_package(pack, list(/decl/reagent/potassium = 1.5, /decl/reagent/ammonia = 1.5, /decl/reagent/silicon = 1.5))
// Mindbreaker // Mindbreaker
fill_cigarre_package(pack, list(/singleton/reagent/silicon = 4.5, /singleton/reagent/hydrazine = 4.5, /singleton/reagent/dylovene = 4.5)) fill_cigarre_package(pack, list(/decl/reagent/silicon = 4.5, /decl/reagent/hydrazine = 4.5, /decl/reagent/dylovene = 4.5))
pack.desc += " 'MB' has been scribbled on it." pack.desc += " 'MB' has been scribbled on it."
pack = new /obj/item/storage/box/fancy/cigarettes(src) pack = new /obj/item/storage/box/fancy/cigarettes(src)
pack.reagents.add_reagent(/singleton/reagent/tricordrazine, 15 * pack.storage_slots) pack.reagents.add_reagent(/decl/reagent/tricordrazine, 15 * pack.storage_slots)
pack.desc += " 'T' has been scribbled on it." pack.desc += " 'T' has been scribbled on it."
new /obj/item/flame/lighter/zippo(src) new /obj/item/flame/lighter/zippo(src)

Some files were not shown because too many files have changed in this diff Show More