diff --git a/citadel.dme b/citadel.dme index 8c17ef8b229..5e4a39d7fad 100644 --- a/citadel.dme +++ b/citadel.dme @@ -78,6 +78,7 @@ #include "code\__DEFINES\shields.dm" #include "code\__DEFINES\shuttle.dm" #include "code\__DEFINES\shuttles.dm" +#include "code\__DEFINES\singletons.dm" #include "code\__DEFINES\skin.dm" #include "code\__DEFINES\sonar.dm" #include "code\__DEFINES\spaceman_dmm.dm" @@ -512,6 +513,7 @@ #include "code\datums\EPv2.dm" #include "code\datums\ghost_query.dm" #include "code\datums\hierarchy.dm" +#include "code\datums\is_abstract.dm" #include "code\datums\mind.dm" #include "code\datums\mixed.dm" #include "code\datums\mutable_appearance.dm" diff --git a/code/__DEFINES/singletons.dm b/code/__DEFINES/singletons.dm new file mode 100644 index 00000000000..514f20072ef --- /dev/null +++ b/code/__DEFINES/singletons.dm @@ -0,0 +1,23 @@ +/* + * 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.GetInstance(P)) : null) + +/// 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.GetSubtypeList(P)) : list()) diff --git a/code/controllers/configuration/config_entry.dm b/code/controllers/configuration/config_entry.dm index 7ee2d79d9a3..5de30814ed8 100644 --- a/code/controllers/configuration/config_entry.dm +++ b/code/controllers/configuration/config_entry.dm @@ -7,6 +7,9 @@ #define KEY_MODE_TYPE 1 /datum/config_entry + /// Do not instantiate if type matches this. + abstract_type = /datum/config_entry + /// Read-only, this is determined by the last portion of the derived entry type var/name /// The configured value for this entry. This shouldn't be initialized in code, instead set default @@ -21,8 +24,6 @@ var/deprecated_by /// The /datum/config_entry type that supercedes this one var/protection = NONE - /// Do not instantiate if type matches this - var/abstract_type = /datum/config_entry /// Force validate and set on VV. VAS proccall guard will run regardless. var/vv_VAS = TRUE /// Requires running OnPostload() diff --git a/code/controllers/subsystem/plants.dm b/code/controllers/subsystem/plants.dm index df0b8f6fa7c..1cc0fb55256 100644 --- a/code/controllers/subsystem/plants.dm +++ b/code/controllers/subsystem/plants.dm @@ -78,7 +78,7 @@ SUBSYSTEM_DEF(plants) S.update_seed() //Might as well mask the gene types while we're at it. - var/list/gene_datums = decls_repository.decls_of_subtype(/decl/plantgene) + var/list/gene_datums = GET_SINGLETON_SUBTYPE_MAP(/singleton/plantgene) var/list/used_masks = list() var/list/plant_traits = ALL_GENES while(plant_traits && plant_traits.len) @@ -88,10 +88,10 @@ SUBSYSTEM_DEF(plants) while(gene_mask in used_masks) gene_mask = "[uppertext(num2hex(rand(0,255), 2))]" - var/decl/plantgene/G + var/singleton/plantgene/G for(var/D in gene_datums) - var/decl/plantgene/P = gene_datums[D] + var/singleton/plantgene/P = gene_datums[D] if(gene_tag == P.gene_tag) G = P gene_datums -= D diff --git a/code/datums/hierarchy.dm b/code/datums/hierarchy.dm index e934dd6b0ca..7dc8d3fe248 100644 --- a/code/datums/hierarchy.dm +++ b/code/datums/hierarchy.dm @@ -1,10 +1,10 @@ -/decl/hierarchy +/singleton/hierarchy var/name = "Hierarchy" var/hierarchy_type - var/decl/hierarchy/parent - var/list/decl/hierarchy/children + var/singleton/hierarchy/parent + var/list/singleton/hierarchy/children -/decl/hierarchy/New(var/full_init = TRUE) +/singleton/hierarchy/New(var/full_init = TRUE) children = list() if(!full_init) return @@ -15,17 +15,17 @@ all_subtypes[subtype] = new subtype(FALSE) for(var/subtype in (all_subtypes - type)) - var/decl/hierarchy/subtype_instance = all_subtypes[subtype] - var/decl/hierarchy/subtype_parent = all_subtypes[subtype_instance.parent_type] + var/singleton/hierarchy/subtype_instance = all_subtypes[subtype] + var/singleton/hierarchy/subtype_parent = all_subtypes[subtype_instance.parent_type] subtype_instance.parent = subtype_parent dd_insertObjectList(subtype_parent.children, subtype_instance) -/decl/hierarchy/proc/is_category() +/singleton/hierarchy/proc/is_category() return hierarchy_type == type || children.len -/decl/hierarchy/proc/is_hidden_category() +/singleton/hierarchy/proc/is_hidden_category() return hierarchy_type == type -/decl/hierarchy/dd_SortValue() +/singleton/hierarchy/dd_SortValue() return name diff --git a/code/datums/is_abstract.dm b/code/datums/is_abstract.dm new file mode 100644 index 00000000000..3160bc38288 --- /dev/null +++ b/code/datums/is_abstract.dm @@ -0,0 +1,23 @@ +/** + * 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/is_datum_abstract() + 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.is_datum_abstract() diff --git a/code/datums/observation/observation.dm b/code/datums/observation/observation.dm index 02705a9e274..c2fe781a31e 100644 --- a/code/datums/observation/observation.dm +++ b/code/datums/observation/observation.dm @@ -3,19 +3,19 @@ // // Implements a basic observer pattern with the following main procs: // -// /decl/observ/proc/is_listening(var/event_source, var/datum/listener, var/proc_call) +// /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. // -// /decl/observ/proc/has_listeners(var/event_source) +// /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. // -// /decl/observ/proc/register(var/event_source, var/datum/listener, var/proc_call) +// /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. @@ -30,7 +30,7 @@ // 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. // -// /decl/observ/proc/unregister(var/event_source, var/datum/listener, var/proc_call) +// /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. @@ -39,34 +39,34 @@ // 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. // -// /decl/observ/proc/register_global(var/datum/listener, var/proc_call) +// /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. // -// /decl/observ/proc/unregister_global(var/datum/listener, var/proc_call) +// /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. // -// /decl/observ/proc/raise_event(src, ...) +// /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. -/decl/observ +/singleton/observ 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. var/expected_type = /datum // The expected event source for this event. register() will CRASH() if it receives an unexpected type. 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. -/decl/observ/New() +/singleton/observ/New() GLOB.all_observable_events.events += src . = ..() -/decl/observ/proc/is_listening(var/event_source, var/datum/listener, var/proc_call) +/singleton/observ/proc/is_listening(var/event_source, var/datum/listener, var/proc_call) // Return whether there are global listeners unless the event source is given. if (!event_source) return !!global_listeners.len @@ -95,14 +95,14 @@ return (proc_call in callback) -/decl/observ/proc/has_listeners(var/event_source) +/singleton/observ/proc/has_listeners(var/event_source) return is_listening(event_source) -/decl/observ/proc/register(var/datum/event_source, var/datum/listener, var/proc_call) +/singleton/observ/proc/register(var/datum/event_source, var/datum/listener, var/proc_call) // Sanity checking. if (!(event_source && listener && proc_call)) return FALSE - if (istype(event_source, /decl/observ)) + if (istype(event_source, /singleton/observ)) return FALSE // Crash if the event source is the wrong type. @@ -129,7 +129,7 @@ callbacks += proc_call return TRUE -/decl/observ/proc/unregister(var/event_source, var/datum/listener, var/proc_call) +/singleton/observ/proc/unregister(var/event_source, var/datum/listener, var/proc_call) // Sanity. if (!(event_source && listener && (event_source in event_sources))) return FALSE @@ -163,7 +163,7 @@ event_sources -= event_source return TRUE -/decl/observ/proc/register_global(var/datum/listener, var/proc_call) +/singleton/observ/proc/register_global(var/datum/listener, var/proc_call) // Sanity. if (!(listener && proc_call)) return FALSE @@ -178,7 +178,7 @@ callbacks |= proc_call return TRUE -/decl/observ/proc/unregister_global(var/datum/listener, var/proc_call) +/singleton/observ/proc/unregister_global(var/datum/listener, var/proc_call) // Return false unless the listener is set as a global listener. if (!(listener && (listener in global_listeners))) return FALSE @@ -201,7 +201,7 @@ global_listeners -= listener return TRUE -/decl/observ/proc/raise_event() +/singleton/observ/proc/raise_event() // Sanity if (!args.len) return FALSE diff --git a/code/datums/observation/shuttle_added.dm b/code/datums/observation/shuttle_added.dm index 8db95c4041e..b2aefbf1f63 100644 --- a/code/datums/observation/shuttle_added.dm +++ b/code/datums/observation/shuttle_added.dm @@ -6,9 +6,9 @@ // Arguments that the called proc should expect: // /datum/shuttle/shuttle: the new shuttle -GLOBAL_DATUM_INIT(shuttle_added, /decl/observ/shuttle_added, new) +GLOBAL_DATUM_INIT(shuttle_added, /singleton/observ/shuttle_added, new) -/decl/observ/shuttle_added +/singleton/observ/shuttle_added name = "Shuttle Added" expected_type = /datum/shuttle diff --git a/code/datums/observation/shuttle_moved.dm b/code/datums/observation/shuttle_moved.dm index 1d4847908c0..a0db8979340 100644 --- a/code/datums/observation/shuttle_moved.dm +++ b/code/datums/observation/shuttle_moved.dm @@ -18,15 +18,15 @@ // /obj/effect/shuttle_landmark/old_location: the old location's shuttle landmark // /obj/effect/shuttle_landmark/new_location: the new location's shuttle landmark -GLOBAL_DATUM_INIT(shuttle_moved_event, /decl/observ/shuttle_moved, new) +GLOBAL_DATUM_INIT(shuttle_moved_event, /singleton/observ/shuttle_moved, new) -/decl/observ/shuttle_moved +/singleton/observ/shuttle_moved name = "Shuttle Moved" expected_type = /datum/shuttle -GLOBAL_DATUM_INIT(shuttle_pre_move_event, /decl/observ/shuttle_pre_move, new) +GLOBAL_DATUM_INIT(shuttle_pre_move_event, /singleton/observ/shuttle_pre_move, new) -/decl/observ/shuttle_pre_move +/singleton/observ/shuttle_pre_move name = "Shuttle Pre Move" expected_type = /datum/shuttle diff --git a/code/datums/observation/stat_set.dm b/code/datums/observation/stat_set.dm index b980d06eccc..ec3aa0a36e4 100644 --- a/code/datums/observation/stat_set.dm +++ b/code/datums/observation/stat_set.dm @@ -8,9 +8,9 @@ // /old_stat: Status before the change. // /new_stat: Status after the change. -GLOBAL_DATUM_INIT(stat_set_event, /decl/observ/stat_set, new) +GLOBAL_DATUM_INIT(stat_set_event, /singleton/observ/stat_set, new) -/decl/observ/stat_set +/singleton/observ/stat_set name = "Stat Set" expected_type = /mob/living diff --git a/code/datums/observation/~cleanup.dm b/code/datums/observation/~cleanup.dm index ca33901988d..ca49a98d8fc 100644 --- a/code/datums/observation/~cleanup.dm +++ b/code/datums/observation/~cleanup.dm @@ -2,7 +2,7 @@ GLOBAL_LIST_EMPTY(global_listen_count) GLOBAL_LIST_EMPTY(event_sources_count) GLOBAL_LIST_EMPTY(event_listen_count) -/decl/observ/destroyed/raise_event() +/singleton/observ/destroyed/raise_event() . = ..() if(!.) return @@ -16,41 +16,41 @@ GLOBAL_LIST_EMPTY(event_listen_count) cleanup_event_listener(source, GLOB.event_listen_count[source]) -/decl/observ/register(var/datum/event_source, var/datum/listener, var/proc_call) +/singleton/observ/register(var/datum/event_source, var/datum/listener, var/proc_call) . = ..() if(.) GLOB.event_sources_count[event_source] += 1 GLOB.event_listen_count[listener] += 1 -/decl/observ/unregister(var/datum/event_source, var/datum/listener, var/proc_call) +/singleton/observ/unregister(var/datum/event_source, var/datum/listener, var/proc_call) . = ..() if(.) GLOB.event_sources_count[event_source] -= 1 GLOB.event_listen_count[listener] -= 1 -/decl/observ/register_global(var/datum/listener, var/proc_call) +/singleton/observ/register_global(var/datum/listener, var/proc_call) . = ..() if(.) GLOB.global_listen_count[listener] += 1 -/decl/observ/unregister_global(var/datum/listener, var/proc_call) +/singleton/observ/unregister_global(var/datum/listener, var/proc_call) . = ..() if(.) GLOB.global_listen_count[listener] -= 1 -/decl/observ/destroyed/proc/cleanup_global_listener(listener, listen_count) +/singleton/observ/destroyed/proc/cleanup_global_listener(listener, listen_count) GLOB.global_listen_count -= listener for(var/entry in GLOB.all_observable_events.events) - var/decl/observ/event = entry + var/singleton/observ/event = entry if(event.unregister_global(listener)) log_debug(SPAN_DEBUG("[event] - [listener] was deleted while still registered to global events.")) if(!(--listen_count)) return -/decl/observ/destroyed/proc/cleanup_source_listeners(event_source, source_listener_count) +/singleton/observ/destroyed/proc/cleanup_source_listeners(event_source, source_listener_count) GLOB.event_sources_count -= event_source for(var/entry in GLOB.all_observable_events.events) - var/decl/observ/event = entry + var/singleton/observ/event = entry var/proc_owners = event.event_sources[event_source] if(proc_owners) for(var/proc_owner in proc_owners) @@ -59,10 +59,10 @@ GLOBAL_LIST_EMPTY(event_listen_count) if(!(--source_listener_count)) return -/decl/observ/destroyed/proc/cleanup_event_listener(listener, listener_count) +/singleton/observ/destroyed/proc/cleanup_event_listener(listener, listener_count) GLOB.event_listen_count -= listener for(var/entry in GLOB.all_observable_events.events) - var/decl/observ/event = entry + var/singleton/observ/event = entry for(var/event_source in event.event_sources) if(event.unregister(event_source, listener)) log_debug(SPAN_DEBUG("[event] - [listener] was deleted while still listening to [event_source].")) diff --git a/code/datums/outfits/outfit.dm b/code/datums/outfits/outfit.dm index ecec7ba415a..9242cd7726d 100644 --- a/code/datums/outfits/outfit.dm +++ b/code/datums/outfits/outfit.dm @@ -8,10 +8,11 @@ tim_sort(., /proc/cmp_name_asc) /datum/outfit + /// Abstract type - set to self type for abstract outfits. + abstract_type = /datum/outfit + /// the outfit's name var/name = "Naked" - /// abstract type - set to self type for abstract outfits. - var/abstract_type = /datum/outfit var/uniform = null var/suit = null diff --git a/code/datums/repositories/decls.dm b/code/datums/repositories/decls.dm index d87e5e62901..e0a1c8032a6 100644 --- a/code/datums/repositories/decls.dm +++ b/code/datums/repositories/decls.dm @@ -1,40 +1,140 @@ -/var/repository/decls/decls_repository = new() +var/global/repository/singletons/Singletons = 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/singletons + /// A cache of individual singletons as (/singleton/path = Instance, ...) + var/static/list/instances = list() -/repository/decls/proc/decls_of_type(var/decl_prototype) - . = fetched_decl_types[decl_prototype] - if(!.) - . = get_decls(typesof(decl_prototype)) - fetched_decl_types[decl_prototype] = . + /// A map of (/singleton/path = TRUE, ...). Indicates whether a path has been tried for instances. + var/static/list/resolved_instances = list() -/repository/decls/proc/decls_of_subtype(var/decl_prototype) - . = fetched_decl_subtypes[decl_prototype] - if(!.) - . = get_decls(subtypesof(decl_prototype)) - fetched_decl_subtypes[decl_prototype] = . + /// 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() -/repository/decls/proc/get_decl(var/decl_type) - . = fetched_decls[decl_type] - if(!.) - . = new decl_type() - fetched_decls[decl_type] = . + /// A map of (/singleton/path = TRUE, ...). Indicates whether a path has been tried for type_maps. + var/static/list/resolved_type_maps = list() -/repository/decls/proc/get_decls(var/list/decl_types) - . = list() - for(var/decl_type in decl_types) - .[decl_type] = get_decl(decl_type) + /// A cache of singleton subtypes according to a parent type as (/singleton/path = list(/singleton/path/foo = Instance, ...)) + var/static/list/subtype_maps = list() -/decls/Destroy() - . = ..() - stack_trace("Prevented attempt to delete a decl instance: [log_info_line(src)]") - return QDEL_HINT_LETMELIVE // Prevents Decl destruction + /// 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/GetInstance(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 (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 = GetInstance(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 = GetInstance(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_LIST macro to minimize proc calls. + */ +/repository/singletons/proc/GetSubtypeList(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 + + +/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 diff --git a/code/game/atoms/atoms.dm b/code/game/atoms/atoms.dm index 1805b522e6f..f4c2c9a0c55 100644 --- a/code/game/atoms/atoms.dm +++ b/code/game/atoms/atoms.dm @@ -199,6 +199,10 @@ stack_trace("Warning: [src]([type]) initialized multiple times!") flags |= INITIALIZED + if (is_datum_abstract()) + log_debug("Abstract atom [type] created!") + return INITIALIZE_HINT_QDEL + if(loc) SEND_SIGNAL(loc, COMSIG_ATOM_INITIALIZED_ON, src) /// Sends a signal that the new atom `src`, has been created at `loc` diff --git a/code/game/objects/structures/charge_pylon.dm b/code/game/objects/structures/charge_pylon.dm index 042c00b8666..30f7f3ee1e5 100644 --- a/code/game/objects/structures/charge_pylon.dm +++ b/code/game/objects/structures/charge_pylon.dm @@ -42,7 +42,7 @@ if(ishuman(AM)) charge_user(AM) -/decl/flooring/crystal +/singleton/flooring/crystal name = "crystal floor" icon = 'icons/turf/flooring/crystal.dmi' build_type = null @@ -53,5 +53,4 @@ name = "crystal floor" icon = 'icons/turf/flooring/crystal.dmi' icon_state = "" - initial_flooring = /decl/flooring/crystal - + initial_flooring = /singleton/flooring/crystal diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index eb809e9096c..66a6c5879dc 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -28,7 +28,7 @@ // Flooring data. var/flooring_override var/initial_flooring - var/decl/flooring/flooring + var/singleton/flooring/flooring var/mineral = MAT_STEEL /turf/simulated/floor/is_plating() @@ -70,7 +70,7 @@ * TODO: REWORK FLOORING GETTERS/INIT/SETTERS THIS IS BAD */ -/turf/simulated/floor/proc/set_flooring(decl/flooring/newflooring, init) +/turf/simulated/floor/proc/set_flooring(singleton/flooring/newflooring, init) make_plating(null, TRUE, TRUE) flooring = newflooring footstep_sounds = newflooring.footstep_sounds diff --git a/code/game/turfs/simulated/floor_attackby.dm b/code/game/turfs/simulated/floor_attackby.dm index c953ffd61e9..6ced3c795d9 100644 --- a/code/game/turfs/simulated/floor_attackby.dm +++ b/code/game/turfs/simulated/floor_attackby.dm @@ -77,9 +77,9 @@ to_chat(user, "This section is too damaged to support anything. Use a welder to fix the damage.") return var/obj/item/stack/S = C - var/decl/flooring/use_flooring + var/singleton/flooring/use_flooring for(var/flooring_type in flooring_types) - var/decl/flooring/F = flooring_types[flooring_type] + var/singleton/flooring/F = flooring_types[flooring_type] if(!F.build_type) continue if((S.type == F.build_type) || (S.build_type == F.build_type)) diff --git a/code/game/turfs/simulated/floor_icon.dm b/code/game/turfs/simulated/floor_icon.dm index e1af868a60f..fc0091c1a88 100644 --- a/code/game/turfs/simulated/floor_icon.dm +++ b/code/game/turfs/simulated/floor_icon.dm @@ -141,7 +141,7 @@ var/list/flooring_cache = list() //Tests whether this flooring will smooth with the specified turf //You can override this if you want a flooring to have super special snowflake smoothing behaviour -/decl/flooring/proc/test_link(var/turf/origin, var/turf/T, var/countercheck = FALSE) +/singleton/flooring/proc/test_link(var/turf/origin, var/turf/T, var/countercheck = FALSE) var/is_linked = FALSE if (countercheck) diff --git a/code/game/turfs/simulated/floor_types_eris.dm b/code/game/turfs/simulated/floor_types_eris.dm index d664c3edfd8..d7cbf193af0 100644 --- a/code/game/turfs/simulated/floor_types_eris.dm +++ b/code/game/turfs/simulated/floor_types_eris.dm @@ -3,7 +3,7 @@ /// ERIS FLOOR DECLS /////// //////////////////////////// -/decl/flooring/tiling/eris +/singleton/flooring/tiling/eris name = "floor" desc = "Scuffed from the passage of countless greyshirts." icon = 'icons/turf/flooring/eris/tiles.dmi' @@ -14,11 +14,11 @@ build_type = /obj/item/stack/tile/floor/eris can_paint = 1 - plating_type = /decl/flooring/eris_plating/under + plating_type = /singleton/flooring/eris_plating/under floor_smooth = SMOOTH_WHITELIST flooring_whitelist = list( - /decl/flooring/eris_plating/under + /singleton/flooring/eris_plating/under ) smooth_movable_atom = SMOOTH_GREYLIST @@ -30,229 +30,229 @@ list(/obj/structure/window, list("anchored" = TRUE, "fulltile" = TRUE), 2) // Don't blend under full windows ) -/decl/flooring/tiling/eris/steel +/singleton/flooring/tiling/eris/steel name = "steel floor" icon_base = "tiles" icon = 'icons/turf/flooring/eris/tiles_steel.dmi' build_type = /obj/item/stack/tile/floor/eris/steel -/decl/flooring/tiling/eris/steel/panels +/singleton/flooring/tiling/eris/steel/panels icon_base = "panels" build_type = /obj/item/stack/tile/floor/eris/steel/panels -/decl/flooring/tiling/eris/steel/techfloor +/singleton/flooring/tiling/eris/steel/techfloor icon_base = "techfloor" build_type = /obj/item/stack/tile/floor/eris/steel/techfloor -/decl/flooring/tiling/eris/steel/techfloor_grid +/singleton/flooring/tiling/eris/steel/techfloor_grid icon_base = "techfloor_grid" build_type = /obj/item/stack/tile/floor/eris/steel/techfloor_grid -/decl/flooring/tiling/eris/steel/brown_perforated +/singleton/flooring/tiling/eris/steel/brown_perforated icon_base = "brown_perforated" build_type = /obj/item/stack/tile/floor/eris/steel/brown_perforated -/decl/flooring/tiling/eris/steel/gray_perforated +/singleton/flooring/tiling/eris/steel/gray_perforated icon_base = "gray_perforated" build_type = /obj/item/stack/tile/floor/eris/steel/gray_perforated -/decl/flooring/tiling/eris/steel/cargo +/singleton/flooring/tiling/eris/steel/cargo icon_base = "cargo" build_type = /obj/item/stack/tile/floor/eris/steel/cargo -/decl/flooring/tiling/eris/steel/brown_platform +/singleton/flooring/tiling/eris/steel/brown_platform icon_base = "brown_platform" build_type = /obj/item/stack/tile/floor/eris/steel/brown_platform -/decl/flooring/tiling/eris/steel/gray_platform +/singleton/flooring/tiling/eris/steel/gray_platform icon_base = "gray_platform" build_type = /obj/item/stack/tile/floor/eris/steel/gray_platform -/decl/flooring/tiling/eris/steel/danger +/singleton/flooring/tiling/eris/steel/danger icon_base = "danger" build_type = /obj/item/stack/tile/floor/eris/steel/danger -/decl/flooring/tiling/eris/steel/golden +/singleton/flooring/tiling/eris/steel/golden icon_base = "golden" build_type = /obj/item/stack/tile/floor/eris/steel/golden -/decl/flooring/tiling/eris/steel/bluecorner +/singleton/flooring/tiling/eris/steel/bluecorner icon_base = "bluecorner" build_type = /obj/item/stack/tile/floor/eris/steel/bluecorner -/decl/flooring/tiling/eris/steel/orangecorner +/singleton/flooring/tiling/eris/steel/orangecorner icon_base = "orangecorner" build_type = /obj/item/stack/tile/floor/eris/steel/orangecorner -/decl/flooring/tiling/eris/steel/cyancorner +/singleton/flooring/tiling/eris/steel/cyancorner icon_base = "cyancorner" build_type = /obj/item/stack/tile/floor/eris/steel/cyancorner -/decl/flooring/tiling/eris/steel/violetcorener +/singleton/flooring/tiling/eris/steel/violetcorener icon_base = "violetcorener" build_type = /obj/item/stack/tile/floor/eris/steel/violetcorener -/decl/flooring/tiling/eris/steel/monofloor +/singleton/flooring/tiling/eris/steel/monofloor icon_base = "monofloor" build_type = /obj/item/stack/tile/floor/eris/steel/monofloor has_base_range = 15 -/decl/flooring/tiling/eris/steel/bar_flat +/singleton/flooring/tiling/eris/steel/bar_flat name = "flat bar floor" icon_base = "bar_flat" build_type = /obj/item/stack/tile/floor/eris/steel/bar_flat floor_smooth = SMOOTH_NONE smooth_movable_atom = SMOOTH_NONE -/decl/flooring/tiling/eris/steel/bar_dance +/singleton/flooring/tiling/eris/steel/bar_dance name = "dancefloor" icon_base = "bar_dance" build_type = /obj/item/stack/tile/floor/eris/steel/bar_dance floor_smooth = SMOOTH_NONE smooth_movable_atom = SMOOTH_NONE -/decl/flooring/tiling/eris/steel/bar_light +/singleton/flooring/tiling/eris/steel/bar_light name = "lit bar floor" icon_base = "bar_light" build_type = /obj/item/stack/tile/floor/eris/steel/bar_light floor_smooth = SMOOTH_NONE smooth_movable_atom = SMOOTH_NONE -/decl/flooring/tiling/eris/white +/singleton/flooring/tiling/eris/white name = "white floor" icon_base = "tiles" icon = 'icons/turf/flooring/eris/tiles_white.dmi' build_type = /obj/item/stack/tile/floor/eris/white -/decl/flooring/tiling/eris/white/panels +/singleton/flooring/tiling/eris/white/panels icon_base = "panels" build_type = /obj/item/stack/tile/floor/eris/white/panels -/decl/flooring/tiling/eris/white/techfloor +/singleton/flooring/tiling/eris/white/techfloor icon_base = "techfloor" build_type = /obj/item/stack/tile/floor/eris/white/techfloor -/decl/flooring/tiling/eris/white/techfloor_grid +/singleton/flooring/tiling/eris/white/techfloor_grid icon_base = "techfloor_grid" build_type = /obj/item/stack/tile/floor/eris/white/techfloor_grid -/decl/flooring/tiling/eris/white/brown_perforated +/singleton/flooring/tiling/eris/white/brown_perforated icon_base = "brown_perforated" build_type = /obj/item/stack/tile/floor/eris/white/brown_perforated -/decl/flooring/tiling/eris/white/gray_perforated +/singleton/flooring/tiling/eris/white/gray_perforated icon_base = "gray_perforated" build_type = /obj/item/stack/tile/floor/eris/white/gray_perforated -/decl/flooring/tiling/eris/white/cargo +/singleton/flooring/tiling/eris/white/cargo icon_base = "cargo" build_type = /obj/item/stack/tile/floor/eris/white/cargo -/decl/flooring/tiling/eris/white/brown_platform +/singleton/flooring/tiling/eris/white/brown_platform icon_base = "brown_platform" build_type = /obj/item/stack/tile/floor/eris/white/brown_platform -/decl/flooring/tiling/eris/white/gray_platform +/singleton/flooring/tiling/eris/white/gray_platform icon_base = "gray_platform" build_type = /obj/item/stack/tile/floor/eris/white/gray_platform -/decl/flooring/tiling/eris/white/danger +/singleton/flooring/tiling/eris/white/danger icon_base = "danger" build_type = /obj/item/stack/tile/floor/eris/white/danger -/decl/flooring/tiling/eris/white/golden +/singleton/flooring/tiling/eris/white/golden icon_base = "golden" build_type = /obj/item/stack/tile/floor/eris/white/golden -/decl/flooring/tiling/eris/white/bluecorner +/singleton/flooring/tiling/eris/white/bluecorner icon_base = "bluecorner" build_type = /obj/item/stack/tile/floor/eris/white/bluecorner -/decl/flooring/tiling/eris/white/orangecorner +/singleton/flooring/tiling/eris/white/orangecorner icon_base = "orangecorner" build_type = /obj/item/stack/tile/floor/eris/white/orangecorner -/decl/flooring/tiling/eris/white/cyancorner +/singleton/flooring/tiling/eris/white/cyancorner icon_base = "cyancorner" build_type = /obj/item/stack/tile/floor/eris/white/cyancorner -/decl/flooring/tiling/eris/white/violetcorener +/singleton/flooring/tiling/eris/white/violetcorener icon_base = "violetcorener" build_type = /obj/item/stack/tile/floor/eris/white/violetcorener -/decl/flooring/tiling/eris/white/monofloor +/singleton/flooring/tiling/eris/white/monofloor icon_base = "monofloor" build_type = /obj/item/stack/tile/floor/eris/white/monofloor has_base_range = 15 -/decl/flooring/tiling/eris/dark +/singleton/flooring/tiling/eris/dark name = "dark floor" icon_base = "tiles" icon = 'icons/turf/flooring/eris/tiles_dark.dmi' build_type = /obj/item/stack/tile/floor/eris/dark -/decl/flooring/tiling/eris/dark/panels +/singleton/flooring/tiling/eris/dark/panels icon_base = "panels" build_type = /obj/item/stack/tile/floor/eris/dark/panels -/decl/flooring/tiling/eris/dark/techfloor +/singleton/flooring/tiling/eris/dark/techfloor icon_base = "techfloor" build_type = /obj/item/stack/tile/floor/eris/dark/techfloor -/decl/flooring/tiling/eris/dark/techfloor_grid +/singleton/flooring/tiling/eris/dark/techfloor_grid icon_base = "techfloor_grid" build_type = /obj/item/stack/tile/floor/eris/dark/techfloor_grid -/decl/flooring/tiling/eris/dark/brown_perforated +/singleton/flooring/tiling/eris/dark/brown_perforated icon_base = "brown_perforated" build_type = /obj/item/stack/tile/floor/eris/dark/brown_perforated -/decl/flooring/tiling/eris/dark/gray_perforated +/singleton/flooring/tiling/eris/dark/gray_perforated icon_base = "gray_perforated" build_type = /obj/item/stack/tile/floor/eris/dark/gray_perforated -/decl/flooring/tiling/eris/dark/cargo +/singleton/flooring/tiling/eris/dark/cargo icon_base = "cargo" build_type = /obj/item/stack/tile/floor/eris/dark/cargo -/decl/flooring/tiling/eris/dark/brown_platform +/singleton/flooring/tiling/eris/dark/brown_platform icon_base = "brown_platform" build_type = /obj/item/stack/tile/floor/eris/dark/brown_platform -/decl/flooring/tiling/eris/dark/gray_platform +/singleton/flooring/tiling/eris/dark/gray_platform icon_base = "gray_platform" build_type = /obj/item/stack/tile/floor/eris/dark/gray_platform -/decl/flooring/tiling/eris/dark/danger +/singleton/flooring/tiling/eris/dark/danger icon_base = "danger" build_type = /obj/item/stack/tile/floor/eris/dark/danger -/decl/flooring/tiling/eris/dark/golden +/singleton/flooring/tiling/eris/dark/golden icon_base = "golden" build_type = /obj/item/stack/tile/floor/eris/dark/golden -/decl/flooring/tiling/eris/dark/bluecorner +/singleton/flooring/tiling/eris/dark/bluecorner icon_base = "bluecorner" build_type = /obj/item/stack/tile/floor/eris/dark/bluecorner -/decl/flooring/tiling/eris/dark/orangecorner +/singleton/flooring/tiling/eris/dark/orangecorner icon_base = "orangecorner" build_type = /obj/item/stack/tile/floor/eris/dark/orangecorner -/decl/flooring/tiling/eris/dark/cyancorner +/singleton/flooring/tiling/eris/dark/cyancorner icon_base = "cyancorner" build_type = /obj/item/stack/tile/floor/eris/dark/cyancorner -/decl/flooring/tiling/eris/dark/violetcorener +/singleton/flooring/tiling/eris/dark/violetcorener icon_base = "violetcorener" build_type = /obj/item/stack/tile/floor/eris/dark/violetcorener -/decl/flooring/tiling/eris/dark/monofloor +/singleton/flooring/tiling/eris/dark/monofloor icon_base = "monofloor" build_type = /obj/item/stack/tile/floor/eris/dark/monofloor has_base_range = 15 -/decl/flooring/tiling/eris/cafe +/singleton/flooring/tiling/eris/cafe name = "linoleum floor" icon_base = "cafe" icon = 'icons/turf/flooring/eris/tiles.dmi' @@ -260,7 +260,7 @@ floor_smooth = SMOOTH_NONE smooth_movable_atom = SMOOTH_NONE -/decl/flooring/tiling/eris/techmaint +/singleton/flooring/tiling/eris/techmaint name = "techmaint floor" icon_base = "techmaint" icon = 'icons/turf/flooring/eris/tiles_maint.dmi' @@ -268,7 +268,7 @@ floor_smooth = SMOOTH_NONE smooth_movable_atom = SMOOTH_NONE -/decl/flooring/tiling/eris/techmaint_perforated +/singleton/flooring/tiling/eris/techmaint_perforated name = "techmaint floor" icon_base = "techmaint_perforated" icon = 'icons/turf/flooring/eris/tiles_maint.dmi' @@ -276,7 +276,7 @@ floor_smooth = SMOOTH_NONE smooth_movable_atom = SMOOTH_NONE -/decl/flooring/tiling/eris/techmaint_panels +/singleton/flooring/tiling/eris/techmaint_panels name = "techmaint floor" icon_base = "techmaint_panels" icon = 'icons/turf/flooring/eris/tiles_maint.dmi' @@ -284,7 +284,7 @@ floor_smooth = SMOOTH_NONE smooth_movable_atom = SMOOTH_NONE -/decl/flooring/tiling/eris/techmaint_cargo +/singleton/flooring/tiling/eris/techmaint_cargo name = "techmaint floor" icon_base = "techmaint_cargo" icon = 'icons/turf/flooring/eris/tiles_maint.dmi' @@ -604,7 +604,7 @@ name = "floor" icon = 'icons/turf/flooring/eris/tiles.dmi' icon_state = "tiles" - initial_flooring = /decl/flooring/tiling/eris + initial_flooring = /singleton/flooring/tiling/eris @@ -613,79 +613,79 @@ name = "floor" icon = 'icons/turf/flooring/eris/tiles_steel.dmi' icon_state = "tiles" - initial_flooring = /decl/flooring/tiling/eris/steel + initial_flooring = /singleton/flooring/tiling/eris/steel /turf/simulated/floor/tiled/eris/steel/panels icon_state = "panels" - initial_flooring = /decl/flooring/tiling/eris/steel/panels + initial_flooring = /singleton/flooring/tiling/eris/steel/panels /turf/simulated/floor/tiled/eris/steel/techfloor icon_state = "techfloor" - initial_flooring = /decl/flooring/tiling/eris/steel/techfloor + initial_flooring = /singleton/flooring/tiling/eris/steel/techfloor /turf/simulated/floor/tiled/eris/steel/techfloor_grid icon_state = "techfloor_grid" - initial_flooring = /decl/flooring/tiling/eris/steel/techfloor_grid + initial_flooring = /singleton/flooring/tiling/eris/steel/techfloor_grid /turf/simulated/floor/tiled/eris/steel/brown_perforated icon_state = "brown_perforated" - initial_flooring = /decl/flooring/tiling/eris/steel/brown_perforated + initial_flooring = /singleton/flooring/tiling/eris/steel/brown_perforated /turf/simulated/floor/tiled/eris/steel/gray_perforated icon_state = "gray_perforated" - initial_flooring = /decl/flooring/tiling/eris/steel/gray_perforated + initial_flooring = /singleton/flooring/tiling/eris/steel/gray_perforated /turf/simulated/floor/tiled/eris/steel/cargo icon_state = "cargo" - initial_flooring = /decl/flooring/tiling/eris/steel/cargo + initial_flooring = /singleton/flooring/tiling/eris/steel/cargo /turf/simulated/floor/tiled/eris/steel/brown_platform icon_state = "brown_platform" - initial_flooring = /decl/flooring/tiling/eris/steel/brown_platform + initial_flooring = /singleton/flooring/tiling/eris/steel/brown_platform /turf/simulated/floor/tiled/eris/steel/gray_platform icon_state = "gray_platform" - initial_flooring = /decl/flooring/tiling/eris/steel/gray_platform + initial_flooring = /singleton/flooring/tiling/eris/steel/gray_platform /turf/simulated/floor/tiled/eris/steel/danger icon_state = "danger" - initial_flooring = /decl/flooring/tiling/eris/steel/danger + initial_flooring = /singleton/flooring/tiling/eris/steel/danger /turf/simulated/floor/tiled/eris/steel/golden icon_state = "golden" - initial_flooring = /decl/flooring/tiling/eris/steel/golden + initial_flooring = /singleton/flooring/tiling/eris/steel/golden /turf/simulated/floor/tiled/eris/steel/bluecorner icon_state = "bluecorner" - initial_flooring = /decl/flooring/tiling/eris/steel/bluecorner + initial_flooring = /singleton/flooring/tiling/eris/steel/bluecorner /turf/simulated/floor/tiled/eris/steel/orangecorner icon_state = "orangecorner" - initial_flooring = /decl/flooring/tiling/eris/steel/orangecorner + initial_flooring = /singleton/flooring/tiling/eris/steel/orangecorner /turf/simulated/floor/tiled/eris/steel/cyancorner icon_state = "cyancorner" - initial_flooring = /decl/flooring/tiling/eris/steel/cyancorner + initial_flooring = /singleton/flooring/tiling/eris/steel/cyancorner /turf/simulated/floor/tiled/eris/steel/violetcorener icon_state = "violetcorener" - initial_flooring = /decl/flooring/tiling/eris/steel/violetcorener + initial_flooring = /singleton/flooring/tiling/eris/steel/violetcorener /turf/simulated/floor/tiled/eris/steel/monofloor icon_state = "monofloor" - initial_flooring = /decl/flooring/tiling/eris/steel/monofloor + initial_flooring = /singleton/flooring/tiling/eris/steel/monofloor /turf/simulated/floor/tiled/eris/steel/bar_flat icon_state = "bar_flat" - initial_flooring = /decl/flooring/tiling/eris/steel/bar_flat + initial_flooring = /singleton/flooring/tiling/eris/steel/bar_flat /turf/simulated/floor/tiled/eris/steel/bar_dance icon_state = "bar_dance" - initial_flooring = /decl/flooring/tiling/eris/steel/bar_dance + initial_flooring = /singleton/flooring/tiling/eris/steel/bar_dance /turf/simulated/floor/tiled/eris/steel/bar_light icon_state = "bar_light" - initial_flooring = /decl/flooring/tiling/eris/steel/bar_light + initial_flooring = /singleton/flooring/tiling/eris/steel/bar_light /turf/simulated/floor/tiled/eris/steel/bar_light/Initialize(mapload) . = ..() @@ -698,67 +698,67 @@ name = "floor" icon = 'icons/turf/flooring/eris/tiles_white.dmi' icon_state = "tiles" - initial_flooring = /decl/flooring/tiling/eris/white + initial_flooring = /singleton/flooring/tiling/eris/white /turf/simulated/floor/tiled/eris/white/panels icon_state = "panels" - initial_flooring = /decl/flooring/tiling/eris/white/panels + initial_flooring = /singleton/flooring/tiling/eris/white/panels /turf/simulated/floor/tiled/eris/white/techfloor icon_state = "techfloor" - initial_flooring = /decl/flooring/tiling/eris/white/techfloor + initial_flooring = /singleton/flooring/tiling/eris/white/techfloor /turf/simulated/floor/tiled/eris/white/techfloor_grid icon_state = "techfloor_grid" - initial_flooring = /decl/flooring/tiling/eris/white/techfloor_grid + initial_flooring = /singleton/flooring/tiling/eris/white/techfloor_grid /turf/simulated/floor/tiled/eris/white/brown_perforated icon_state = "brown_perforated" - initial_flooring = /decl/flooring/tiling/eris/white/brown_perforated + initial_flooring = /singleton/flooring/tiling/eris/white/brown_perforated /turf/simulated/floor/tiled/eris/white/gray_perforated icon_state = "gray_perforated" - initial_flooring = /decl/flooring/tiling/eris/white/gray_perforated + initial_flooring = /singleton/flooring/tiling/eris/white/gray_perforated /turf/simulated/floor/tiled/eris/white/cargo icon_state = "cargo" - initial_flooring = /decl/flooring/tiling/eris/white/cargo + initial_flooring = /singleton/flooring/tiling/eris/white/cargo /turf/simulated/floor/tiled/eris/white/brown_platform icon_state = "brown_platform" - initial_flooring = /decl/flooring/tiling/eris/white/brown_platform + initial_flooring = /singleton/flooring/tiling/eris/white/brown_platform /turf/simulated/floor/tiled/eris/white/gray_platform icon_state = "gray_platform" - initial_flooring = /decl/flooring/tiling/eris/white/gray_platform + initial_flooring = /singleton/flooring/tiling/eris/white/gray_platform /turf/simulated/floor/tiled/eris/white/danger icon_state = "danger" - initial_flooring = /decl/flooring/tiling/eris/white/danger + initial_flooring = /singleton/flooring/tiling/eris/white/danger /turf/simulated/floor/tiled/eris/white/golden icon_state = "golden" - initial_flooring = /decl/flooring/tiling/eris/white/golden + initial_flooring = /singleton/flooring/tiling/eris/white/golden /turf/simulated/floor/tiled/eris/white/bluecorner icon_state = "bluecorner" - initial_flooring = /decl/flooring/tiling/eris/white/bluecorner + initial_flooring = /singleton/flooring/tiling/eris/white/bluecorner /turf/simulated/floor/tiled/eris/white/orangecorner icon_state = "orangecorner" - initial_flooring = /decl/flooring/tiling/eris/white/orangecorner + initial_flooring = /singleton/flooring/tiling/eris/white/orangecorner /turf/simulated/floor/tiled/eris/white/cyancorner icon_state = "cyancorner" - initial_flooring = /decl/flooring/tiling/eris/white/cyancorner + initial_flooring = /singleton/flooring/tiling/eris/white/cyancorner /turf/simulated/floor/tiled/eris/white/violetcorener icon_state = "violetcorener" - initial_flooring = /decl/flooring/tiling/eris/white/violetcorener + initial_flooring = /singleton/flooring/tiling/eris/white/violetcorener /turf/simulated/floor/tiled/eris/white/monofloor icon_state = "monofloor" - initial_flooring = /decl/flooring/tiling/eris/white/monofloor + initial_flooring = /singleton/flooring/tiling/eris/white/monofloor @@ -767,67 +767,67 @@ name = "floor" icon = 'icons/turf/flooring/eris/tiles_dark.dmi' icon_state = "tiles" - initial_flooring = /decl/flooring/tiling/eris/dark + initial_flooring = /singleton/flooring/tiling/eris/dark /turf/simulated/floor/tiled/eris/dark/panels icon_state = "panels" - initial_flooring = /decl/flooring/tiling/eris/dark/panels + initial_flooring = /singleton/flooring/tiling/eris/dark/panels /turf/simulated/floor/tiled/eris/dark/techfloor icon_state = "techfloor" - initial_flooring = /decl/flooring/tiling/eris/dark/techfloor + initial_flooring = /singleton/flooring/tiling/eris/dark/techfloor /turf/simulated/floor/tiled/eris/dark/techfloor_grid icon_state = "techfloor_grid" - initial_flooring = /decl/flooring/tiling/eris/dark/techfloor_grid + initial_flooring = /singleton/flooring/tiling/eris/dark/techfloor_grid /turf/simulated/floor/tiled/eris/dark/brown_perforated icon_state = "brown_perforated" - initial_flooring = /decl/flooring/tiling/eris/dark/brown_perforated + initial_flooring = /singleton/flooring/tiling/eris/dark/brown_perforated /turf/simulated/floor/tiled/eris/dark/gray_perforated icon_state = "gray_perforated" - initial_flooring = /decl/flooring/tiling/eris/dark/gray_perforated + initial_flooring = /singleton/flooring/tiling/eris/dark/gray_perforated /turf/simulated/floor/tiled/eris/dark/cargo icon_state = "cargo" - initial_flooring = /decl/flooring/tiling/eris/dark/cargo + initial_flooring = /singleton/flooring/tiling/eris/dark/cargo /turf/simulated/floor/tiled/eris/dark/brown_platform icon_state = "brown_platform" - initial_flooring = /decl/flooring/tiling/eris/dark/brown_platform + initial_flooring = /singleton/flooring/tiling/eris/dark/brown_platform /turf/simulated/floor/tiled/eris/dark/gray_platform icon_state = "gray_platform" - initial_flooring = /decl/flooring/tiling/eris/dark/gray_platform + initial_flooring = /singleton/flooring/tiling/eris/dark/gray_platform /turf/simulated/floor/tiled/eris/dark/danger icon_state = "danger" - initial_flooring = /decl/flooring/tiling/eris/dark/danger + initial_flooring = /singleton/flooring/tiling/eris/dark/danger /turf/simulated/floor/tiled/eris/dark/golden icon_state = "golden" - initial_flooring = /decl/flooring/tiling/eris/dark/golden + initial_flooring = /singleton/flooring/tiling/eris/dark/golden /turf/simulated/floor/tiled/eris/dark/bluecorner icon_state = "bluecorner" - initial_flooring = /decl/flooring/tiling/eris/dark/bluecorner + initial_flooring = /singleton/flooring/tiling/eris/dark/bluecorner /turf/simulated/floor/tiled/eris/dark/orangecorner icon_state = "orangecorner" - initial_flooring = /decl/flooring/tiling/eris/dark/orangecorner + initial_flooring = /singleton/flooring/tiling/eris/dark/orangecorner /turf/simulated/floor/tiled/eris/dark/cyancorner icon_state = "cyancorner" - initial_flooring = /decl/flooring/tiling/eris/dark/cyancorner + initial_flooring = /singleton/flooring/tiling/eris/dark/cyancorner /turf/simulated/floor/tiled/eris/dark/violetcorener icon_state = "violetcorener" - initial_flooring = /decl/flooring/tiling/eris/dark/violetcorener + initial_flooring = /singleton/flooring/tiling/eris/dark/violetcorener /turf/simulated/floor/tiled/eris/dark/monofloor icon_state = "monofloor" - initial_flooring = /decl/flooring/tiling/eris/dark/monofloor + initial_flooring = /singleton/flooring/tiling/eris/dark/monofloor @@ -836,34 +836,34 @@ name = "floor" icon = 'icons/turf/flooring/eris/tiles.dmi' icon_state = "cafe" - initial_flooring = /decl/flooring/tiling/eris/cafe + initial_flooring = /singleton/flooring/tiling/eris/cafe /turf/simulated/floor/tiled/eris/techmaint name = "floor" icon = 'icons/turf/flooring/eris/tiles_maint.dmi' icon_state = "techmaint" - initial_flooring = /decl/flooring/tiling/eris/techmaint + initial_flooring = /singleton/flooring/tiling/eris/techmaint /turf/simulated/floor/tiled/eris/techmaint_perforated name = "floor" icon = 'icons/turf/flooring/eris/tiles_maint.dmi' icon_state = "techmaint_perforated" - initial_flooring = /decl/flooring/tiling/eris/techmaint_perforated + initial_flooring = /singleton/flooring/tiling/eris/techmaint_perforated /turf/simulated/floor/tiled/eris/techmaint_panels name = "floor" icon = 'icons/turf/flooring/eris/tiles_maint.dmi' icon_state = "techmaint_panels" - initial_flooring = /decl/flooring/tiling/eris/techmaint_panels + initial_flooring = /singleton/flooring/tiling/eris/techmaint_panels /turf/simulated/floor/tiled/eris/techmaint_cargo name = "floor" icon = 'icons/turf/flooring/eris/tiles_maint.dmi' icon_state = "techmaint_cargo" - initial_flooring = /decl/flooring/tiling/eris/techmaint_cargo + initial_flooring = /singleton/flooring/tiling/eris/techmaint_cargo //=========ERIS GRASS==========\\ -/decl/flooring/grass/heavy +/singleton/flooring/grass/heavy name = "heavy grass" desc = "A dense ground coating of grass" flags = TURF_REMOVE_SHOVEL @@ -875,7 +875,7 @@ name = "heavy grass" icon_state = "grass-heavy0" edge_blending_priority = 0 - initial_flooring = /decl/flooring/grass/heavy + initial_flooring = /singleton/flooring/grass/heavy baseturfs = /turf/simulated/floor/outdoors/dirt grass_chance = 40 @@ -890,7 +890,7 @@ //=========Eris Plating==========\\ // This is the light grey tiles with random geometric shapes extruded -/decl/flooring/eris_plating +/singleton/flooring/eris_plating name = "reinforced plating" descriptor = "reinforced plating" icon = 'icons/turf/flooring/eris/plating.dmi' @@ -902,7 +902,7 @@ build_type = null - plating_type = /decl/flooring/eris_plating/under + plating_type = /singleton/flooring/eris_plating/under /* footstep_sound = "plating" @@ -911,7 +911,7 @@ health = 100 floor_smooth = SMOOTH_BLACKLIST - flooring_blacklist = list(/decl/flooring/reinforced/plating/under,/decl/flooring/reinforced/plating/hull) //Smooth with everything except the contents of this list + flooring_blacklist = list(/singleton/flooring/reinforced/plating/under,/singleton/flooring/reinforced/plating/hull) //Smooth with everything except the contents of this list smooth_movable_atom = SMOOTH_GREYLIST movable_atom_blacklist = list(list(/obj, list("density" = TRUE, "anchored" = TRUE), 1)) movable_atom_whitelist = list(list(/obj/machinery/door/airlock, list(), 2)) @@ -921,14 +921,14 @@ name = "reinforced plating" icon = 'icons/turf/flooring/eris/plating.dmi' icon_state = "plating" - initial_flooring = /decl/flooring/eris_plating + initial_flooring = /singleton/flooring/eris_plating /turf/simulated/floor/plating/eris/airless initial_gas_mix = GAS_STRING_VACUUM //==========Eris Underplating==============\\ // This looks similar to normal plating, but with edges -/decl/flooring/eris_plating/under +/singleton/flooring/eris_plating/under name = "underplating" icon = 'icons/turf/flooring/eris/plating.dmi' descriptor = "support beams" @@ -939,7 +939,7 @@ floor_smooth = SMOOTH_WHITELIST flooring_whitelist = list( - /decl/flooring/tiling/eris + /singleton/flooring/tiling/eris ) plating_type = null @@ -959,14 +959,14 @@ /turf/simulated/floor/plating/eris/under name = "underplating" icon_state = "under" - initial_flooring = /decl/flooring/eris_plating/under + initial_flooring = /singleton/flooring/eris_plating/under /turf/simulated/floor/plating/eris/under/airless initial_gas_mix = GAS_STRING_VACUUM //============Eris Hull Plating=========\\ // This is 'spaceship outside' plating, black with random rounded rectangles. -/decl/flooring/eris_plating/hull +/singleton/flooring/eris_plating/hull name = "hull" descriptor = "outer hull" icon = 'icons/turf/flooring/eris/hull.dmi' @@ -990,14 +990,14 @@ /* Eris features we lack on flooring decls //Hull can upgrade to underplating -/decl/flooring/reinforced/plating/hull/can_build_floor(var/decl/flooring/newfloor) +/singleton/flooring/reinforced/plating/hull/can_build_floor(var/singleton/flooring/newfloor) return FALSE //Not allowed to build directly on hull, you must first remove it and then build on the underplating -/decl/flooring/reinforced/plating/hull/get_plating_type(var/turf/location) +/singleton/flooring/reinforced/plating/hull/get_plating_type(var/turf/location) if (turf_is_lower_hull(location)) //Hull plating is only on the lowest level of the ship return null else if (turf_is_upper_hull(location)) - return /decl/flooring/reinforced/plating/under + return /singleton/flooring/reinforced/plating/under else return null //This should never happen, hull plawell,ting should only be on the exterior */ @@ -1005,7 +1005,7 @@ name = "hull" icon = 'icons/turf/flooring/eris/hull.dmi' icon_state = "hullcenter0" - initial_flooring = /decl/flooring/eris_plating/hull + initial_flooring = /singleton/flooring/eris_plating/hull /turf/simulated/floor/hull/airless initial_gas_mix = GAS_STRING_VACUUM diff --git a/code/game/turfs/simulated/flooring/_flooring.dm b/code/game/turfs/simulated/flooring/_flooring.dm index 5b847c98a6a..8d8582a802b 100644 --- a/code/game/turfs/simulated/flooring/_flooring.dm +++ b/code/game/turfs/simulated/flooring/_flooring.dm @@ -2,7 +2,7 @@ var/list/flooring_types /proc/populate_flooring_types() flooring_types = list() - for (var/flooring_path in typesof(/decl/flooring)) + for (var/flooring_path in typesof(/singleton/flooring)) flooring_types["[flooring_path]"] = new flooring_path /proc/get_flooring_data(var/flooring_path) @@ -22,7 +22,7 @@ var/list/flooring_types // [icon_base]_edges: directional overlays for edges. // [icon_base]_corners: directional overlays for non-edge corners. -/decl/flooring +/singleton/flooring var/name = "floor" var/desc var/icon @@ -112,24 +112,24 @@ var/list/flooring_types var/list/movable_atom_whitelist = list() var/list/movable_atom_blacklist = list() -/decl/flooring/proc/get_plating_type(var/turf/T) +/singleton/flooring/proc/get_plating_type(var/turf/T) return plating_type -/decl/flooring/proc/get_flooring_overlay(var/cache_key, var/icon_base, var/icon_dir = 0, var/layer = BUILTIN_DECAL_LAYER) +/singleton/flooring/proc/get_flooring_overlay(var/cache_key, var/icon_base, var/icon_dir = 0, var/layer = BUILTIN_DECAL_LAYER) if(!flooring_cache[cache_key]) var/image/I = image(icon = icon, icon_state = icon_base, dir = icon_dir) I.layer = layer flooring_cache[cache_key] = I return flooring_cache[cache_key] -/decl/flooring/proc/drop_product(atom/A) +/singleton/flooring/proc/drop_product(atom/A) if(ispath(build_type, /obj/item/stack)) new build_type(A, build_cost) else for(var/i in 1 to min(build_cost, 50)) new build_type(A) -/decl/flooring/grass +/singleton/flooring/grass name = "grass" desc = "Do they smoke grass out in space, Bowie? Or do they smoke AstroTurf?" icon = 'icons/turf/flooring/grass.dmi' @@ -139,7 +139,7 @@ var/list/flooring_types flags = TURF_HAS_EDGES | TURF_REMOVE_SHOVEL build_type = /obj/item/stack/tile/grass -/decl/flooring/asteroid +/singleton/flooring/asteroid name = "coarse sand" desc = "Gritty and unpleasant." icon = 'icons/turf/flooring/asteroid.dmi' @@ -147,7 +147,7 @@ var/list/flooring_types flags = TURF_HAS_EDGES | TURF_REMOVE_SHOVEL build_type = null -/decl/flooring/snow +/singleton/flooring/snow name = "snow" desc = "A layer of many tiny bits of frozen water. It's hard to tell how deep it is." icon = 'icons/turf/snow_new.dmi' @@ -159,7 +159,7 @@ var/list/flooring_types 'sound/effects/footstep/snow4.ogg', 'sound/effects/footstep/snow5.ogg')) -/decl/flooring/snow/gravsnow +/singleton/flooring/snow/gravsnow name = "snowy gravel" desc = "A layer of coarse ice pebbles and assorted gravel." icon = 'icons/turf/snow_new.dmi' @@ -171,33 +171,33 @@ var/list/flooring_types 'sound/effects/footstep/snow4.ogg', 'sound/effects/footstep/snow5.ogg')) -/decl/flooring/snow/snow2 +/singleton/flooring/snow/snow2 name = "snow" desc = "A layer of many tiny bits of frozen water. It's hard to tell how deep it is." icon = 'icons/turf/snow.dmi' icon_base = "snow" flags = TURF_HAS_EDGES -/decl/flooring/snow/gravsnow2 +/singleton/flooring/snow/gravsnow2 name = "gravsnow" icon = 'icons/turf/snow.dmi' icon_base = "gravsnow" -/decl/flooring/snow/plating +/singleton/flooring/snow/plating name = "snowy plating" desc = "Steel plating coated with a light layer of snow." icon_base = "snowyplating" flags = null -/decl/flooring/snow/ice +/singleton/flooring/snow/ice name = "ice" desc = "Looks slippery." icon_base = "ice" -/decl/flooring/snow/plating/drift +/singleton/flooring/snow/plating/drift icon_base = "snowyplayingdrift" -/decl/flooring/carpet +/singleton/flooring/carpet name = "carpet" desc = "Imported and comfy." icon = 'icons/turf/flooring/carpet.dmi' @@ -212,52 +212,52 @@ var/list/flooring_types 'sound/effects/footstep/carpet4.ogg', 'sound/effects/footstep/carpet5.ogg')) -/decl/flooring/carpet/bcarpet +/singleton/flooring/carpet/bcarpet name = "black carpet" icon_base = "bcarpet" build_type = /obj/item/stack/tile/carpet/bcarpet -/decl/flooring/carpet/blucarpet +/singleton/flooring/carpet/blucarpet name = "blue carpet" icon_base = "blucarpet" build_type = /obj/item/stack/tile/carpet/blucarpet -/decl/flooring/carpet/turcarpet +/singleton/flooring/carpet/turcarpet name = "tur carpet" icon_base = "turcarpet" build_type = /obj/item/stack/tile/carpet/turcarpet -/decl/flooring/carpet/sblucarpet +/singleton/flooring/carpet/sblucarpet name = "silver blue carpet" icon_base = "sblucarpet" build_type = /obj/item/stack/tile/carpet/sblucarpet -/decl/flooring/carpet/gaycarpet +/singleton/flooring/carpet/gaycarpet name = "clown carpet" icon_base = "gaycarpet" build_type = /obj/item/stack/tile/carpet/gaycarpet -/decl/flooring/carpet/purcarpet +/singleton/flooring/carpet/purcarpet name = "purple carpet" icon_base = "purcarpet" build_type = /obj/item/stack/tile/carpet/purcarpet -/decl/flooring/carpet/oracarpet +/singleton/flooring/carpet/oracarpet name = "orange carpet" icon_base = "oracarpet" build_type = /obj/item/stack/tile/carpet/oracarpet -/decl/flooring/carpet/tealcarpet +/singleton/flooring/carpet/tealcarpet name = "teal carpet" icon_base = "tealcarpet" build_type = /obj/item/stack/tile/carpet/teal -/decl/flooring/carpet/arcadecarpet +/singleton/flooring/carpet/arcadecarpet name = "arcade carpet" icon_base = "arcade" build_type = /obj/item/stack/tile/carpet/arcadecarpet -/decl/flooring/tiling +/singleton/flooring/tiling name = "floor" desc = "Scuffed from the passage of countless greyshirts." icon = 'icons/turf/flooring/tiles_vr.dmi' // More ERIS Sprites... For now... @@ -274,48 +274,48 @@ var/list/flooring_types 'sound/effects/footstep/floor4.ogg', 'sound/effects/footstep/floor5.ogg')) -/decl/flooring/tiling/tech +/singleton/flooring/tiling/tech desc = "Scuffed from the passage of countless greyshirts." icon = 'icons/turf/flooring/techfloor_vr.dmi' icon_base = "techfloor_gray" build_type = /obj/item/stack/tile/floor/techgrey can_paint = null -/decl/flooring/tiling/tech/grid +/singleton/flooring/tiling/tech/grid icon_base = "techfloor_grid" build_type = /obj/item/stack/tile/floor/techgrid -/decl/flooring/tiling/new_tile +/singleton/flooring/tiling/new_tile name = "floor" icon_base = "tile_full" flags = TURF_CAN_BREAK | TURF_CAN_BURN | TURF_IS_FRAGILE build_type = null -/decl/flooring/tiling/new_tile/cargo_one +/singleton/flooring/tiling/new_tile/cargo_one icon_base = "cargo_one_full" -/decl/flooring/tiling/new_tile/kafel +/singleton/flooring/tiling/new_tile/kafel icon_base = "kafel_full" -/decl/flooring/tiling/new_tile/techmaint +/singleton/flooring/tiling/new_tile/techmaint icon_base = "techmaint" -/decl/flooring/tiling/new_tile/monofloor +/singleton/flooring/tiling/new_tile/monofloor icon_base = "monofloor" -/decl/flooring/tiling/new_tile/monotile +/singleton/flooring/tiling/new_tile/monotile icon_base = "monotile" -/decl/flooring/tiling/new_tile/monowhite +/singleton/flooring/tiling/new_tile/monowhite icon_base = "monowhite" -/decl/flooring/tiling/new_tile/steel_grid +/singleton/flooring/tiling/new_tile/steel_grid icon_base = "steel_grid" -/decl/flooring/tiling/new_tile/steel_ridged +/singleton/flooring/tiling/new_tile/steel_ridged icon_base = "steel_ridged" -/decl/flooring/linoleum +/singleton/flooring/linoleum name = "linoleum" desc = "It's like the 2390's all over again." icon = 'icons/turf/flooring/linoleum.dmi' @@ -324,44 +324,44 @@ var/list/flooring_types build_type = /obj/item/stack/tile/linoleum flags = TURF_REMOVE_SCREWDRIVER -/decl/flooring/tiling/red +/singleton/flooring/tiling/red name = "floor" icon_base = "white" has_damage_range = null flags = TURF_REMOVE_CROWBAR build_type = /obj/item/stack/tile/floor/red -/decl/flooring/tiling/steel +/singleton/flooring/tiling/steel name = "floor" icon_base = "steel" build_type = /obj/item/stack/tile/floor/steel -/decl/flooring/tiling/steel_dirty +/singleton/flooring/tiling/steel_dirty name = "floor" icon_base = "steel_dirty" build_type = /obj/item/stack/tile/floor/steel_dirty -/decl/flooring/tiling/asteroidfloor +/singleton/flooring/tiling/asteroidfloor name = "floor" icon_base = "asteroidfloor" has_damage_range = null flags = TURF_REMOVE_CROWBAR build_type = /obj/item/stack/tile/floor/steel -/decl/flooring/tiling/white +/singleton/flooring/tiling/white name = "floor" desc = "How sterile." icon_base = "white" build_type = /obj/item/stack/tile/floor/white -/decl/flooring/tiling/yellow +/singleton/flooring/tiling/yellow name = "floor" icon_base = "white" has_damage_range = null flags = TURF_REMOVE_CROWBAR build_type = /obj/item/stack/tile/floor/yellow -/decl/flooring/tiling/dark +/singleton/flooring/tiling/dark name = "floor" desc = "How ominous." icon_base = "dark" @@ -369,23 +369,23 @@ var/list/flooring_types flags = TURF_REMOVE_CROWBAR build_type = /obj/item/stack/tile/floor/dark -/decl/flooring/tiling/hydro +/singleton/flooring/tiling/hydro name = "floor" icon_base = "hydrofloor" build_type = /obj/item/stack/tile/floor/steel -/decl/flooring/tiling/neutral +/singleton/flooring/tiling/neutral name = "floor" icon_base = "neutral" build_type = /obj/item/stack/tile/floor/steel -/decl/flooring/tiling/freezer +/singleton/flooring/tiling/freezer name = "floor" desc = "Don't slip." icon_base = "freezer" build_type = /obj/item/stack/tile/floor/freezer -/decl/flooring/wmarble +/singleton/flooring/wmarble name = "marble floor" desc = "Very regal white marble flooring." icon = 'icons/turf/flooring/misc.dmi' @@ -393,7 +393,7 @@ var/list/flooring_types build_type = /obj/item/stack/tile/wmarble flags = TURF_REMOVE_CROWBAR -/decl/flooring/bmarble +/singleton/flooring/bmarble name = "marble floor" desc = "Very regal black marble flooring." icon = 'icons/turf/flooring/misc.dmi' @@ -401,7 +401,7 @@ var/list/flooring_types build_type = /obj/item/stack/tile/bmarble flags = TURF_REMOVE_CROWBAR -/decl/flooring/bananium +/singleton/flooring/bananium name = "bananium floor" desc = "Have you ever seen a clown frown?" icon = 'icons/turf/flooring/misc.dmi' @@ -409,7 +409,7 @@ var/list/flooring_types build_type = /obj/item/stack/tile/bananium flags = TURF_REMOVE_CROWBAR -/decl/flooring/silencium +/singleton/flooring/silencium name = "silencium floor" desc = "Surprisingly, doesn't mask your footsteps." icon = 'icons/turf/flooring/misc.dmi' @@ -417,7 +417,7 @@ var/list/flooring_types build_type = /obj/item/stack/tile/silencium flags = TURF_REMOVE_CROWBAR -/decl/flooring/silencium +/singleton/flooring/silencium name = "silencium floor" desc = "Surprisingly, doesn't mask your footsteps." icon = 'icons/turf/flooring/misc.dmi' @@ -425,7 +425,7 @@ var/list/flooring_types build_type = /obj/item/stack/tile/silencium flags = TURF_REMOVE_CROWBAR -/decl/flooring/plasteel +/singleton/flooring/plasteel name = "plasteel floor" desc = "Sturdy metal flooring. Almost certainly a waste." icon = 'icons/turf/flooring/misc.dmi' @@ -433,7 +433,7 @@ var/list/flooring_types build_type = /obj/item/stack/tile/plasteel flags = TURF_REMOVE_CROWBAR -/decl/flooring/durasteel +/singleton/flooring/durasteel name = "durasteel floor" desc = "Incredibly sturdy metal flooring. Definitely a waste." icon = 'icons/turf/flooring/misc.dmi' @@ -441,7 +441,7 @@ var/list/flooring_types build_type = /obj/item/stack/tile/durasteel flags = TURF_REMOVE_CROWBAR -/decl/flooring/silver +/singleton/flooring/silver name = "silver floor" desc = "This opulent flooring reminds you of the ocean. Almost certainly a waste." icon = 'icons/turf/flooring/misc.dmi' @@ -449,7 +449,7 @@ var/list/flooring_types build_type = /obj/item/stack/tile/silver flags = TURF_REMOVE_CROWBAR -/decl/flooring/gold +/singleton/flooring/gold name = "gold floor" desc = "This richly tooled flooring makes you feel powerful." icon = 'icons/turf/flooring/misc.dmi' @@ -457,7 +457,7 @@ var/list/flooring_types build_type = /obj/item/stack/tile/gold flags = TURF_REMOVE_CROWBAR -/decl/flooring/phoron +/singleton/flooring/phoron name = "phoron floor" desc = "Although stable for now, this solid phoron flooring radiates danger." icon = 'icons/turf/flooring/misc.dmi' @@ -465,7 +465,7 @@ var/list/flooring_types build_type = /obj/item/stack/tile/phoron flags = TURF_REMOVE_CROWBAR -/decl/flooring/uranium +/singleton/flooring/uranium name = "uranium floor" desc = "This flooring literally radiates danger." icon = 'icons/turf/flooring/misc.dmi' @@ -473,7 +473,7 @@ var/list/flooring_types build_type = /obj/item/stack/tile/uranium flags = TURF_REMOVE_CROWBAR -/decl/flooring/diamond +/singleton/flooring/diamond name = "diamond floor" desc = "This flooring proves that you are a king among peasants. It's virtually impossible to scuff." icon = 'icons/turf/flooring/misc.dmi' @@ -481,7 +481,7 @@ var/list/flooring_types build_type = /obj/item/stack/tile/diamond flags = TURF_REMOVE_CROWBAR -/decl/flooring/brass +/singleton/flooring/brass name = "brass floor" desc = "There's something strange about this tile. If you listen closely, it sounds like it's ticking." icon = 'icons/turf/flooring/misc.dmi' @@ -489,7 +489,7 @@ var/list/flooring_types build_type = /obj/item/stack/tile/brass flags = TURF_REMOVE_CROWBAR -/decl/flooring/wood +/singleton/flooring/wood name = "wooden floor" desc = "Polished redwood planks." icon = 'icons/turf/flooring/wood_vr.dmi' @@ -506,14 +506,14 @@ var/list/flooring_types 'sound/effects/footstep/wood4.ogg', 'sound/effects/footstep/wood5.ogg')) -/decl/flooring/wood/sif +/singleton/flooring/wood/sif name = "alien wooden floor" desc = "Polished alien wood planks." icon = 'icons/turf/flooring/wood.dmi' icon_base = "sifwood" build_type = /obj/item/stack/tile/wood/sif -/decl/flooring/reinforced +/singleton/flooring/reinforced name = "reinforced floor" desc = "Heavily reinforced with steel rods." icon = 'icons/turf/flooring/tiles.dmi' @@ -526,7 +526,7 @@ var/list/flooring_types apply_heat_capacity = 325000 can_paint = 1 -/decl/flooring/reinforced/circuit +/singleton/flooring/reinforced/circuit name = "processing strata" icon = 'icons/turf/flooring/circuit.dmi' icon_base = "bcircuit" @@ -534,11 +534,11 @@ var/list/flooring_types flags = TURF_ACID_IMMUNE | TURF_CAN_BREAK | TURF_REMOVE_CROWBAR can_paint = 1 -/decl/flooring/reinforced/circuit/green +/singleton/flooring/reinforced/circuit/green name = "processing strata" icon_base = "gcircuit" -/decl/flooring/reinforced/cult +/singleton/flooring/reinforced/cult name = "engraved floor" desc = "Unsettling whispers waver from the surface..." icon = 'icons/turf/flooring/cult.dmi' @@ -548,7 +548,7 @@ var/list/flooring_types flags = TURF_ACID_IMMUNE | TURF_CAN_BREAK can_paint = null -/decl/flooring/outdoors/lavaland +/singleton/flooring/outdoors/lavaland name = "ash sand" desc = "Soft and ominous." icon = 'icons/turf/flooring/asteroid.dmi' @@ -559,7 +559,7 @@ var/list/flooring_types 'sound/effects/footstep/asteroid3.ogg', 'sound/effects/footstep/asteroid4.ogg')) -/decl/flooring/outdoors/classd +/singleton/flooring/outdoors/classd name = "irradiated sand" desc = "It literally glows in the dark." icon = 'icons/turf/flooring/asteroid.dmi' @@ -570,7 +570,7 @@ var/list/flooring_types 'sound/effects/footstep/asteroid3.ogg', 'sound/effects/footstep/asteroid4.ogg')) -/decl/flooring/outdoors/dirt +/singleton/flooring/outdoors/dirt name = "dirt" icon = 'icons/turf/outdoors.dmi' icon_base = "dirt-dark" @@ -581,7 +581,7 @@ var/list/flooring_types 'sound/effects/footstep/asteroid4.ogg')) -/decl/flooring/outdoors/grass +/singleton/flooring/outdoors/grass name = "grass" icon = 'icons/turf/outdoors.dmi' icon_base = "grass" @@ -591,12 +591,12 @@ var/list/flooring_types 'sound/effects/footstep/grass3.ogg', 'sound/effects/footstep/grass4.ogg')) -/decl/flooring/outdoors/grass/sif +/singleton/flooring/outdoors/grass/sif name = "growth" icon = 'icons/turf/outdoors.dmi' icon_base = "grass_sif" -/decl/flooring/water +/singleton/flooring/water name = "water" desc = "Water is wet, gosh, who knew!" icon = 'icons/turf/outdoors.dmi' @@ -607,7 +607,7 @@ var/list/flooring_types 'sound/effects/footstep/water3.ogg', 'sound/effects/footstep/water4.ogg')) -/decl/flooring/outdoors/beach +/singleton/flooring/outdoors/beach name = "beach" icon = 'icons/turf/outdoors.dmi' icon_base = "sand" @@ -622,22 +622,22 @@ var/list/flooring_types desc = "This slick flesh ripples and squishes under your touch" icon = 'icons/turf/stomach_vr.dmi' icon_state = "flesh_floor" - initial_flooring = /decl/flooring/flesh + initial_flooring = /singleton/flooring/flesh /turf/simulated/floor/flesh/colour icon_state = "c_flesh_floor" - initial_flooring = /decl/flooring/flesh + initial_flooring = /singleton/flooring/flesh /turf/simulated/floor/flesh/attackby() return -/decl/flooring/flesh +/singleton/flooring/flesh name = "flesh" desc = "This slick flesh ripples and squishes under your touch" icon = 'icons/turf/stomach_vr.dmi' icon_base = "flesh_floor" -/decl/flooring/outdoors/beach/sand/desert +/singleton/flooring/outdoors/beach/sand/desert name = "sand" icon = 'icons/turf/outdoors.dmi' icon_base = "sand" @@ -649,7 +649,7 @@ var/list/flooring_types /turf/simulated/floor/tiled/freezer/cold temperature = T0C - 5 -/decl/flooring/trap +/singleton/flooring/trap name = "suspicious flooring" desc = "There's something off about this tile." icon = 'icons/turf/flooring/plating_vr.dmi' @@ -658,7 +658,7 @@ var/list/flooring_types flags = TURF_ACID_IMMUNE | TURF_CAN_BREAK can_paint = null -/decl/flooring/wax +/singleton/flooring/wax name = "wax floor" desc = "Soft wax sheets shaped into tile sheets. It's a little squishy, and leaves a waxy residue when touched." icon = 'icons/turf/flooring/misc.dmi' @@ -667,7 +667,7 @@ var/list/flooring_types build_type = /obj/item/stack/tile/wax flags = TURF_REMOVE_CROWBAR -/decl/flooring/honeycomb +/singleton/flooring/honeycomb name = "honeycomb floor" desc = "A shallow layer of honeycomb. Some pods have been filled with honey and sealed over in wax, while others are vacant." icon = 'icons/turf/flooring/misc.dmi' diff --git a/code/game/turfs/simulated/flooring/flooring_premade.dm b/code/game/turfs/simulated/flooring/flooring_premade.dm index 07b88e20306..a955d2d3b27 100644 --- a/code/game/turfs/simulated/flooring/flooring_premade.dm +++ b/code/game/turfs/simulated/flooring/flooring_premade.dm @@ -2,76 +2,76 @@ name = "carpet" icon = 'icons/turf/flooring/carpet.dmi' icon_state = "carpet" - initial_flooring = /decl/flooring/carpet + initial_flooring = /singleton/flooring/carpet /turf/simulated/floor/carpet/bcarpet name = "black carpet" icon_state = "bcarpet" - initial_flooring = /decl/flooring/carpet/bcarpet + initial_flooring = /singleton/flooring/carpet/bcarpet /turf/simulated/floor/carpet/blucarpet name = "blue carpet" icon_state = "blucarpet" - initial_flooring = /decl/flooring/carpet/blucarpet + initial_flooring = /singleton/flooring/carpet/blucarpet /turf/simulated/floor/carpet/tealcarpet name = "teal carpet" icon_state = "tealcarpet" - initial_flooring = /decl/flooring/carpet/tealcarpet + initial_flooring = /singleton/flooring/carpet/tealcarpet // Legacy support for existing paths for blue carpet /turf/simulated/floor/carpet/blue name = "blue carpet" icon_state = "blucarpet" - initial_flooring = /decl/flooring/carpet/blucarpet + initial_flooring = /singleton/flooring/carpet/blucarpet /turf/simulated/floor/carpet/turcarpet name = "tur carpet" icon_state = "turcarpet" - initial_flooring = /decl/flooring/carpet/turcarpet + initial_flooring = /singleton/flooring/carpet/turcarpet /turf/simulated/floor/carpet/sblucarpet name = "sblue carpet" icon_state = "sblucarpet" - initial_flooring = /decl/flooring/carpet/sblucarpet + initial_flooring = /singleton/flooring/carpet/sblucarpet /turf/simulated/floor/carpet/gaycarpet name = "clown carpet" icon_state = "gaycarpet" - initial_flooring = /decl/flooring/carpet/gaycarpet + initial_flooring = /singleton/flooring/carpet/gaycarpet /turf/simulated/floor/carpet/purcarpet name = "purple carpet" icon_state = "purcarpet" - initial_flooring = /decl/flooring/carpet/purcarpet + initial_flooring = /singleton/flooring/carpet/purcarpet /turf/simulated/floor/carpet/oracarpet name = "orange carpet" icon_state = "oracarpet" - initial_flooring = /decl/flooring/carpet/oracarpet + initial_flooring = /singleton/flooring/carpet/oracarpet /turf/simulated/floor/carpet/arcadecarpet name = "arcade carpet" icon_state = "arcade" - initial_flooring = /decl/flooring/carpet/arcadecarpet + initial_flooring = /singleton/flooring/carpet/arcadecarpet /turf/simulated/floor/bluegrid name = "mainframe floor" icon = 'icons/turf/flooring/circuit.dmi' icon_state = "bcircuit" - initial_flooring = /decl/flooring/reinforced/circuit + initial_flooring = /singleton/flooring/reinforced/circuit /turf/simulated/floor/greengrid name = "mainframe floor" icon = 'icons/turf/flooring/circuit.dmi' icon_state = "gcircuit" - initial_flooring = /decl/flooring/reinforced/circuit/green + initial_flooring = /singleton/flooring/reinforced/circuit/green /turf/simulated/floor/wood name = "wooden floor" icon = 'icons/turf/flooring/wood_vr.dmi' icon_state = "wood" - initial_flooring = /decl/flooring/wood + initial_flooring = /singleton/flooring/wood /turf/simulated/floor/wood/broken icon_state = "broken0" // This gets changed when spawned. @@ -84,7 +84,7 @@ name = "alien wooden floor" icon = 'icons/turf/flooring/wood.dmi' icon_state = "sifwood" - initial_flooring = /decl/flooring/wood/sif + initial_flooring = /singleton/flooring/wood/sif /turf/simulated/floor/wood/sif/broken icon_state = "sifwood_broken0" // This gets changed when spawned. @@ -97,60 +97,60 @@ name = "grass patch" icon = 'icons/turf/flooring/grass.dmi' icon_state = "grass0" - initial_flooring = /decl/flooring/grass + initial_flooring = /singleton/flooring/grass /turf/simulated/floor/tiled name = "floor" icon = 'icons/turf/flooring/tiles_vr.dmi' icon_state = "tiled" - initial_flooring = /decl/flooring/tiling + initial_flooring = /singleton/flooring/tiling /turf/simulated/floor/tiled/techmaint name = "floor" icon = 'icons/turf/flooring/tiles_vr.dmi' icon_state = "techmaint" - initial_flooring = /decl/flooring/tiling/new_tile/techmaint + initial_flooring = /singleton/flooring/tiling/new_tile/techmaint /turf/simulated/floor/tiled/monofloor name = "floor" icon = 'icons/turf/flooring/tiles_vr.dmi' icon_state = "monofloor" - initial_flooring = /decl/flooring/tiling/new_tile/monofloor + initial_flooring = /singleton/flooring/tiling/new_tile/monofloor /turf/simulated/floor/tiled/techfloor name = "floor" icon = 'icons/turf/flooring/techfloor_vr.dmi' icon_state = "techfloor_gray" - initial_flooring = /decl/flooring/tiling/tech + initial_flooring = /singleton/flooring/tiling/tech /turf/simulated/floor/tiled/monotile name = "floor" icon = 'icons/turf/flooring/tiles_vr.dmi' icon_state = "monotile" - initial_flooring = /decl/flooring/tiling/new_tile/monotile + initial_flooring = /singleton/flooring/tiling/new_tile/monotile /turf/simulated/floor/tiled/monowhite name = "floor" icon = 'icons/turf/flooring/tiles_vr.dmi' icon_state = "monowhite" - initial_flooring = /decl/flooring/tiling/new_tile/monowhite + initial_flooring = /singleton/flooring/tiling/new_tile/monowhite /turf/simulated/floor/tiled/steel_grid name = "floor" icon = 'icons/turf/flooring/tiles_vr.dmi' icon_state = "steel_grid" - initial_flooring = /decl/flooring/tiling/new_tile/steel_grid + initial_flooring = /singleton/flooring/tiling/new_tile/steel_grid /turf/simulated/floor/tiled/steel_ridged name = "floor" icon = 'icons/turf/flooring/tiles_vr.dmi' icon_state = "steel_ridged" - initial_flooring = /decl/flooring/tiling/new_tile/steel_ridged + initial_flooring = /singleton/flooring/tiling/new_tile/steel_ridged /turf/simulated/floor/tiled/old_tile name = "floor" icon_state = "tile_full" - initial_flooring = /decl/flooring/tiling/new_tile + initial_flooring = /singleton/flooring/tiling/new_tile /turf/simulated/floor/tiled/old_tile/white color = "#d9d9d9" /turf/simulated/floor/tiled/old_tile/blue @@ -173,7 +173,7 @@ /turf/simulated/floor/tiled/old_cargo name = "floor" icon_state = "cargo_one_full" - initial_flooring = /decl/flooring/tiling/new_tile/cargo_one + initial_flooring = /singleton/flooring/tiling/new_tile/cargo_one /turf/simulated/floor/tiled/old_cargo/white color = "#d9d9d9" /turf/simulated/floor/tiled/old_cargo/blue @@ -195,7 +195,7 @@ /turf/simulated/floor/tiled/kafel_full name = "floor" icon_state = "kafel_full" - initial_flooring = /decl/flooring/tiling/new_tile/kafel + initial_flooring = /singleton/flooring/tiling/new_tile/kafel /turf/simulated/floor/tiled/kafel_full/white color = "#d9d9d9" /turf/simulated/floor/tiled/kafel_full/blue @@ -217,13 +217,13 @@ /turf/simulated/floor/tiled/techfloor/grid name = "floor" icon_state = "techfloor_grid" - initial_flooring = /decl/flooring/tiling/tech/grid + initial_flooring = /singleton/flooring/tiling/tech/grid /turf/simulated/floor/reinforced name = "reinforced floor" icon = 'icons/turf/flooring/tiles.dmi' icon_state = "reinforced" - initial_flooring = /decl/flooring/reinforced + initial_flooring = /singleton/flooring/reinforced /turf/simulated/floor/reinforced/airless initial_gas_mix = GAS_STRING_VACUUM @@ -250,7 +250,7 @@ name = "engraved floor" icon = 'icons/turf/flooring/cult.dmi' icon_state = "cult" - initial_flooring = /decl/flooring/reinforced/cult + initial_flooring = /singleton/flooring/reinforced/cult /turf/simulated/floor/cult/cultify() return @@ -258,40 +258,40 @@ /turf/simulated/floor/tiled/dark name = "dark floor" icon_state = "dark" - initial_flooring = /decl/flooring/tiling/dark + initial_flooring = /singleton/flooring/tiling/dark /turf/simulated/floor/tiled/hydro name = "hydro floor" icon_state = "hydrofloor" - initial_flooring = /decl/flooring/tiling/hydro + initial_flooring = /singleton/flooring/tiling/hydro /turf/simulated/floor/tiled/neutral name = "light floor" icon_state = "neutral" - initial_flooring = /decl/flooring/tiling/neutral + initial_flooring = /singleton/flooring/tiling/neutral /turf/simulated/floor/tiled/red name = "red floor" color = COLOR_RED_GRAY icon_state = "white" - initial_flooring = /decl/flooring/tiling/red + initial_flooring = /singleton/flooring/tiling/red /turf/simulated/floor/tiled/steel name = "steel floor" icon_state = "steel" - initial_flooring = /decl/flooring/tiling/steel + initial_flooring = /singleton/flooring/tiling/steel /turf/simulated/floor/tiled/steel_dirty name = "steel floor" icon_state = "steel_dirty" - initial_flooring = /decl/flooring/tiling/steel_dirty + initial_flooring = /singleton/flooring/tiling/steel_dirty /turf/simulated/floor/tiled/steel/airless initial_gas_mix = GAS_STRING_VACUUM /turf/simulated/floor/tiled/asteroid_steel icon_state = "asteroidfloor" - initial_flooring = /decl/flooring/tiling/asteroidfloor + initial_flooring = /singleton/flooring/tiling/asteroidfloor /turf/simulated/floor/tiled/asteroid_steel/airless name = "plating" @@ -300,44 +300,44 @@ /turf/simulated/floor/tiled/white name = "white floor" icon_state = "white" - initial_flooring = /decl/flooring/tiling/white + initial_flooring = /singleton/flooring/tiling/white /turf/simulated/floor/tiled/yellow name = "yellow floor" color = COLOR_BROWN icon_state = "white" - initial_flooring = /decl/flooring/tiling/yellow + initial_flooring = /singleton/flooring/tiling/yellow /turf/simulated/floor/tiled/freezer name = "tiles" icon_state = "freezer" temperature = 277.15 - initial_flooring = /decl/flooring/tiling/freezer + initial_flooring = /singleton/flooring/tiling/freezer /turf/simulated/floor/lino name = "lino" icon = 'icons/turf/flooring/linoleum.dmi' icon_state = "lino" - initial_flooring = /decl/flooring/linoleum + initial_flooring = /singleton/flooring/linoleum /turf/simulated/floor/wmarble name = "marble" icon = 'icons/turf/flooring/misc.dmi' icon_state = "lightmarble" - initial_flooring = /decl/flooring/wmarble + initial_flooring = /singleton/flooring/wmarble /turf/simulated/floor/bmarble name = "marble" icon = 'icons/turf/flooring/misc.dmi' icon_state = "darkmarble" - initial_flooring = /decl/flooring/bmarble + initial_flooring = /singleton/flooring/bmarble /turf/simulated/floor/bananium name = "bananium" desc = "This floor feels vaguely springy and rubbery, and has an almost pleasant bounce when stepped on." icon = 'icons/turf/flooring/misc.dmi' icon_state = "bananium" - initial_flooring = /decl/flooring/bananium + initial_flooring = /singleton/flooring/bananium /turf/simulated/floor/bananium/Entered(atom/A) if(isliving(A)) @@ -351,55 +351,55 @@ name = "silencium" icon = 'icons/turf/flooring/misc.dmi' icon_state = "silencium" - initial_flooring = /decl/flooring/silencium + initial_flooring = /singleton/flooring/silencium /turf/simulated/floor/plasteel name = "plasteel" icon = 'icons/turf/flooring/misc.dmi' icon_state = "plasteel" - initial_flooring = /decl/flooring/plasteel + initial_flooring = /singleton/flooring/plasteel /turf/simulated/floor/durasteel name = "durasteel" icon = 'icons/turf/flooring/misc.dmi' icon_state = "durasteel" - initial_flooring = /decl/flooring/durasteel + initial_flooring = /singleton/flooring/durasteel /turf/simulated/floor/silver name = "silver" icon = 'icons/turf/flooring/misc.dmi' icon_state = "silver" - initial_flooring = /decl/flooring/silver + initial_flooring = /singleton/flooring/silver /turf/simulated/floor/gold name = "gold" icon = 'icons/turf/flooring/misc.dmi' icon_state = "gold" - initial_flooring = /decl/flooring/gold + initial_flooring = /singleton/flooring/gold /turf/simulated/floor/phoron name = "phoron" icon = 'icons/turf/flooring/misc.dmi' icon_state = "phoron" - initial_flooring = /decl/flooring/phoron + initial_flooring = /singleton/flooring/phoron /turf/simulated/floor/uranium name = "uranium" icon = 'icons/turf/flooring/misc.dmi' icon_state = "uranium" - initial_flooring = /decl/flooring/uranium + initial_flooring = /singleton/flooring/uranium /turf/simulated/floor/diamond name = "diamond" icon = 'icons/turf/flooring/misc.dmi' icon_state = "diamond" - initial_flooring = /decl/flooring/diamond + initial_flooring = /singleton/flooring/diamond /turf/simulated/floor/brass name = "clockwork floor" icon = 'icons/turf/flooring/misc.dmi' icon_state = "clockwork_floor" - initial_flooring = /decl/flooring/brass + initial_flooring = /singleton/flooring/brass //ATMOS PREMADES /turf/simulated/floor/reinforced/airless @@ -466,23 +466,23 @@ name = "snow" icon = 'icons/turf/snow.dmi' icon_state = "snow" - initial_flooring = /decl/flooring/snow + initial_flooring = /singleton/flooring/snow /turf/simulated/floor/snow/gravsnow2 name = "snow" icon = 'icons/turf/snow.dmi' icon_state = "gravsnow" - initial_flooring = /decl/flooring/snow/gravsnow2 + initial_flooring = /singleton/flooring/snow/gravsnow2 /turf/simulated/floor/snow/plating name = "snowy playing" icon_state = "snowyplating" - initial_flooring = /decl/flooring/snow/plating + initial_flooring = /singleton/flooring/snow/plating /turf/simulated/floor/snow/plating/drift name = "snowy plating" icon_state = "snowyplayingdrift" - initial_flooring = /decl/flooring/snow/plating/drift + initial_flooring = /singleton/flooring/snow/plating/drift #define FOOTSTEP_SPRITE_AMT 2 diff --git a/code/game/turfs/simulated/floors/dirt.dm b/code/game/turfs/simulated/floors/dirt.dm index 9fb8834dd6c..22fd31e3180 100644 --- a/code/game/turfs/simulated/floors/dirt.dm +++ b/code/game/turfs/simulated/floors/dirt.dm @@ -3,7 +3,7 @@ desc = "Quite dirty!" icon_state = "dirt-dark" edge_blending_priority = 0 - initial_flooring = /decl/flooring/outdoors/dirt + initial_flooring = /singleton/flooring/outdoors/dirt baseturfs = /turf/baseturf_bottom /turf/simulated/floor/outdoors/dirt @@ -14,7 +14,7 @@ desc = "Quite dirty!" icon_state = "dirt-light" edge_blending_priority = 0 - initial_flooring = /decl/flooring/outdoors/dirt + initial_flooring = /singleton/flooring/outdoors/dirt baseturfs = /turf/baseturf_bottom /turf/simulated/floor/outdoors/dirtlight diff --git a/code/game/turfs/simulated/floors/grass.dm b/code/game/turfs/simulated/floors/grass.dm index 679a20f5f2a..9c5fef73f11 100644 --- a/code/game/turfs/simulated/floors/grass.dm +++ b/code/game/turfs/simulated/floors/grass.dm @@ -5,7 +5,7 @@ var/list/grass_types = list( /turf/simulated/floor/outdoors/grass name = "grass" icon_state = "grass" - initial_flooring = /decl/flooring/outdoors/grass + initial_flooring = /singleton/flooring/outdoors/grass baseturfs = /turf/simulated/floor/outdoors/dirt var/grass_chance = 20 @@ -25,7 +25,7 @@ var/list/grass_types = list( /turf/simulated/floor/outdoors/grass/sif name = "growth" icon_state = "grass_sif" - initial_flooring = /decl/flooring/outdoors/grass/sif + initial_flooring = /singleton/flooring/outdoors/grass/sif grass_chance = 5 var/tree_chance = 2 diff --git a/code/game/turfs/simulated/floors/snow.dm b/code/game/turfs/simulated/floors/snow.dm index c5656330ea6..2bc5d26f840 100644 --- a/code/game/turfs/simulated/floors/snow.dm +++ b/code/game/turfs/simulated/floors/snow.dm @@ -3,7 +3,7 @@ icon_state = "snow" edge_blending_priority = 1 movement_cost = 2 - initial_flooring = /decl/flooring/snow + initial_flooring = /singleton/flooring/snow baseturfs = /turf/simulated/floor/outdoors/dirt var/list/crossed_dirs = list() @@ -84,5 +84,5 @@ icon_state = "gravsnow" desc = "A layer of coarse ice pebbles and assorted gravel." edge_blending_priority = 0 - initial_flooring = /decl/flooring/snow/gravsnow + initial_flooring = /singleton/flooring/snow/gravsnow baseturfs = /turf/simulated/floor/outdoors/dirt diff --git a/code/game/turfs/simulated/floors/water.dm b/code/game/turfs/simulated/floors/water.dm index 19340d5b827..c2abbe31254 100644 --- a/code/game/turfs/simulated/floors/water.dm +++ b/code/game/turfs/simulated/floors/water.dm @@ -20,7 +20,7 @@ /turf/simulated/floor/water/Initialize(mapload) . = ..() - var/decl/flooring/F = get_flooring_data(/decl/flooring/water) + var/singleton/flooring/F = get_flooring_data(/singleton/flooring/water) footstep_sounds = F?.footstep_sounds update_icon() handle_fish() diff --git a/code/game/turfs/unsimulated/beach.dm b/code/game/turfs/unsimulated/beach.dm index a43d15d5ad4..2f64174203f 100644 --- a/code/game/turfs/unsimulated/beach.dm +++ b/code/game/turfs/unsimulated/beach.dm @@ -27,7 +27,7 @@ /turf/simulated/floor/outdoors/beach name = "beach" icon = 'icons/misc/beach.dmi' - initial_flooring = /decl/flooring/outdoors/beach + initial_flooring = /singleton/flooring/outdoors/beach /turf/simulated/floor/outdoors/beach/sand name = "sand" @@ -38,7 +38,7 @@ desc = "It seems to go on and on.." icon = 'icons/turf/desert.dmi' icon_state = "desert" - initial_flooring = /decl/flooring/outdoors/beach/sand/desert + initial_flooring = /singleton/flooring/outdoors/beach/sand/desert /turf/simulated/floor/outdoors/beach/sand/desert/Initialize(mapload) . = ..() @@ -78,7 +78,7 @@ /turf/simulated/floor/outdoors/beach/water name = "Water" icon_state = "water" - initial_flooring = /decl/flooring/water + initial_flooring = /singleton/flooring/water /turf/simulated/floor/outdoors/beach/water/ocean icon_state = "seadeep" diff --git a/code/modules/atmospherics/atmosphere/_atmosphere.dm b/code/modules/atmospherics/atmosphere/_atmosphere.dm index ae3a73bc666..de786291f48 100644 --- a/code/modules/atmospherics/atmosphere/_atmosphere.dm +++ b/code/modules/atmospherics/atmosphere/_atmosphere.dm @@ -1,6 +1,7 @@ /datum/atmosphere - /// Don't initialize abstract datums - var/abstract_type = /datum/atmosphere + /// Don't initialize abstract datums. + abstract_type = /datum/atmosphere + /// Gas string. Do not modify directly. Generated by [generate_gas_string()] var/gas_string /// Unique ID. MUST be different for every atmosphere! Defaults to typepath. diff --git a/code/modules/atmospherics/gasmixtures/gas_types.dm b/code/modules/atmospherics/gasmixtures/gas_types.dm index abd230b149b..6fcd175161f 100644 --- a/code/modules/atmospherics/gasmixtures/gas_types.dm +++ b/code/modules/atmospherics/gasmixtures/gas_types.dm @@ -186,7 +186,7 @@ GLOBAL_LIST_INIT(meta_gas_reagent_amount, meta_gas_reagent_amount_list()) var/gas_flags var/gas_reagent_id //What is the ID of the reagent we want to apply - var/gas_reagent_amount = 0//How much of the reagent is applied + var/gas_reagent_amount = 0//How much of the reagent is applied //For a gas that makes up 21% of the atmos you need to be above 1.39, for it to instill any reagents, for lower percentages the number needs to be higher,and viceversa /datum/gas/oxygen @@ -277,7 +277,7 @@ GLOBAL_LIST_INIT(meta_gas_reagent_amount, meta_gas_reagent_amount_list()) //gas_symbol = "CH3Br" //taste_description = "pestkiller" /*vapor_products = list( - /decl/material/gas/methyl_bromide = 1 + /singleton/material/gas/methyl_bromide = 1 ) value = 0.25*/ @@ -379,7 +379,7 @@ GLOBAL_LIST_INIT(meta_gas_reagent_amount, meta_gas_reagent_amount_list()) toxicity = 15*/ gas_overlay = "chlorine" moles_visible = 1 - + gas_reagent_id = "sacid" gas_reagent_amount = 10 @@ -392,8 +392,8 @@ GLOBAL_LIST_INIT(meta_gas_reagent_amount, meta_gas_reagent_amount_list()) /*gas_symbol_html = "SO2" gas_symbol = "SO2" dissolves_into = list( - /decl/material/solid/sulfur = 0.5, - /decl/material/gas/oxygen = 0.5 + /singleton/material/solid/sulfur = 0.5, + /singleton/material/gas/oxygen = 0.5 )*/ /datum/gas/hydrogen @@ -406,11 +406,11 @@ GLOBAL_LIST_INIT(meta_gas_reagent_amount, meta_gas_reagent_amount_list()) specific_heat = 100 molar_mass = 0.002 gas_flags = GAS_FLAG_FUEL | GAS_FLAG_FUSION_FUEL - /*burn_product = /decl/material/liquid/water + /*burn_product = /singleton/material/liquid/water gas_symbol_html = "H2" gas_symbol = "H2" dissolves_into = list( - /decl/material/liquid/fuel/hydrazine = 1 + /singleton/material/liquid/fuel/hydrazine = 1 ) value = 0.4*/ @@ -441,7 +441,7 @@ GLOBAL_LIST_INIT(meta_gas_reagent_amount, meta_gas_reagent_amount_list()) INTERACTION_ABSORPTION = 1250 ) absorption_products = list( - /decl/material/gas/hydrogen/tritium = 1 + /singleton/material/gas/hydrogen/tritium = 1 ) neutron_absorption = 5 neutron_cross_section = 3*/ diff --git a/code/modules/ghostroles/role.dm b/code/modules/ghostroles/role.dm index bf72caee04c..c2458e60b21 100644 --- a/code/modules/ghostroles/role.dm +++ b/code/modules/ghostroles/role.dm @@ -25,6 +25,9 @@ GLOBAL_LIST_INIT(ghostroles, init_ghostroles()) * Ghostrole datums */ /datum/ghostrole + /// Abstract type. + abstract_type = /datum/ghostrole + /// name var/name = "Unnamed Role" /// **short** description - use spawntext for long one. @@ -33,8 +36,6 @@ GLOBAL_LIST_INIT(ghostroles, init_ghostroles()) var/lazy_init = TRUE /// allow selecting the spawner, or random? **If the spawner gets clicked by a player, they can still spawn from it!** var/allow_pick_spawner = FALSE - /// abstract type - var/abstract_type = /datum/ghostrole /// /datum/ghostrole_instantiator - handles mob creation, equip, and transfer. DOES NOT greet the ghostrole with role information. var/datum/ghostrole_instantiator/instantiator /// spawn count diff --git a/code/modules/holodeck/HolodeckObjects.dm b/code/modules/holodeck/HolodeckObjects.dm index d570c9af10c..ae30ef22e53 100644 --- a/code/modules/holodeck/HolodeckObjects.dm +++ b/code/modules/holodeck/HolodeckObjects.dm @@ -17,36 +17,36 @@ name = "carpet" icon = 'icons/turf/flooring/carpet.dmi' icon_state = "carpet" - initial_flooring = /decl/flooring/carpet + initial_flooring = /singleton/flooring/carpet /turf/simulated/floor/holofloor/tiled name = "floor" icon = 'icons/turf/flooring/tiles.dmi' icon_state = "steel" - initial_flooring = /decl/flooring/tiling + initial_flooring = /singleton/flooring/tiling /turf/simulated/floor/holofloor/tiled/dark name = "dark floor" icon_state = "dark" - initial_flooring = /decl/flooring/tiling/dark + initial_flooring = /singleton/flooring/tiling/dark /turf/simulated/floor/holofloor/lino name = "lino" icon = 'icons/turf/flooring/linoleum.dmi' icon_state = "lino" - initial_flooring = /decl/flooring/linoleum + initial_flooring = /singleton/flooring/linoleum /turf/simulated/floor/holofloor/wood name = "wooden floor" icon = 'icons/turf/flooring/wood.dmi' icon_state = "wood" - initial_flooring = /decl/flooring/wood + initial_flooring = /singleton/flooring/wood /turf/simulated/floor/holofloor/grass name = "lush grass" icon = 'icons/turf/flooring/grass.dmi' icon_state = "grass0" - initial_flooring = /decl/flooring/grass + initial_flooring = /singleton/flooring/grass /turf/simulated/floor/holofloor/snow name = "snow" @@ -64,7 +64,7 @@ /turf/simulated/floor/holofloor/reinforced icon = 'icons/turf/flooring/tiles.dmi' - initial_flooring = /decl/flooring/reinforced + initial_flooring = /singleton/flooring/reinforced name = "reinforced holofloor" icon_state = "reinforced" diff --git a/code/modules/hydroponics/seed_gene_mut.dm b/code/modules/hydroponics/seed_gene_mut.dm index 673f3df1889..91a40a4f4c9 100644 --- a/code/modules/hydroponics/seed_gene_mut.dm +++ b/code/modules/hydroponics/seed_gene_mut.dm @@ -1,4 +1,4 @@ -/datum/seed/proc/diverge_mutate_gene(var/decl/plantgene/G, var/turf/T) +/datum/seed/proc/diverge_mutate_gene(var/singleton/plantgene/G, var/turf/T) if(!istype(G)) log_debug(SPAN_DEBUG("Attempted to mutate [src] with a non-plantgene var.")) return src @@ -9,52 +9,52 @@ return S -/decl/plantgene +/singleton/plantgene var/gene_tag -/decl/plantgene/biochem +/singleton/plantgene/biochem gene_tag = GENE_BIOCHEMISTRY -/decl/plantgene/hardiness +/singleton/plantgene/hardiness gene_tag = GENE_HARDINESS -/decl/plantgene/environment +/singleton/plantgene/environment gene_tag = GENE_ENVIRONMENT -/decl/plantgene/metabolism +/singleton/plantgene/metabolism gene_tag = GENE_METABOLISM -/decl/plantgene/structure +/singleton/plantgene/structure gene_tag = GENE_STRUCTURE -/decl/plantgene/diet +/singleton/plantgene/diet gene_tag = GENE_DIET -/decl/plantgene/pigment +/singleton/plantgene/pigment gene_tag = GENE_PIGMENT -/decl/plantgene/output +/singleton/plantgene/output gene_tag = GENE_OUTPUT -/decl/plantgene/atmosphere +/singleton/plantgene/atmosphere gene_tag = GENE_ATMOSPHERE -/decl/plantgene/vigour +/singleton/plantgene/vigour gene_tag = GENE_VIGOUR -/decl/plantgene/fruit +/singleton/plantgene/fruit gene_tag = GENE_FRUIT -/decl/plantgene/special +/singleton/plantgene/special gene_tag = GENE_SPECIAL -/decl/plantgene/proc/mutate(var/datum/seed/S) +/singleton/plantgene/proc/mutate(var/datum/seed/S) return -/decl/plantgene/biochem/mutate(var/datum/seed/S) +/singleton/plantgene/biochem/mutate(var/datum/seed/S) S.set_trait(TRAIT_POTENCY, S.get_trait(TRAIT_POTENCY)+rand(-20,20),200, 0) -/decl/plantgene/hardiness/mutate(var/datum/seed/S) +/singleton/plantgene/hardiness/mutate(var/datum/seed/S) if(prob(60)) S.set_trait(TRAIT_TOXINS_TOLERANCE, S.get_trait(TRAIT_TOXINS_TOLERANCE)+rand(-2,2),10,0) if(prob(60)) @@ -64,7 +64,7 @@ if(prob(60)) S.set_trait(TRAIT_ENDURANCE, S.get_trait(TRAIT_ENDURANCE)+rand(-5,5),100,0) -/decl/plantgene/environment/mutate(var/datum/seed/S) +/singleton/plantgene/environment/mutate(var/datum/seed/S) if(prob(60)) S.set_trait(TRAIT_IDEAL_HEAT, S.get_trait(TRAIT_IDEAL_HEAT)+rand(-2,2),10,0) if(prob(60)) @@ -72,7 +72,7 @@ if(prob(60)) S.set_trait(TRAIT_LIGHT_TOLERANCE, S.get_trait(TRAIT_LIGHT_TOLERANCE)+rand(-5,5),100,0) -/decl/plantgene/metabolism/mutate(var/datum/seed/S) +/singleton/plantgene/metabolism/mutate(var/datum/seed/S) if(prob(65)) S.set_trait(TRAIT_REQUIRES_NUTRIENTS, S.get_trait(TRAIT_REQUIRES_NUTRIENTS)+rand(-2,2),10,0) if(prob(65)) @@ -80,7 +80,7 @@ if(prob(40)) S.set_trait(TRAIT_ALTER_TEMP, S.get_trait(TRAIT_ALTER_TEMP)+rand(-5,5),100,0) -/decl/plantgene/diet/mutate(var/datum/seed/S) +/singleton/plantgene/diet/mutate(var/datum/seed/S) if(prob(60)) S.set_trait(TRAIT_CARNIVOROUS, S.get_trait(TRAIT_CARNIVOROUS)+rand(-1,1),2,0) if(prob(60)) @@ -90,7 +90,7 @@ if(prob(65)) S.set_trait(TRAIT_WATER_CONSUMPTION, S.get_trait(TRAIT_WATER_CONSUMPTION)+rand(-1,1),50,0) -/decl/plantgene/output/mutate(var/datum/seed/S, var/turf/T) +/singleton/plantgene/output/mutate(var/datum/seed/S, var/turf/T) if(prob(50)) S.set_trait(TRAIT_BIOLUM, !S.get_trait(TRAIT_BIOLUM)) if(S.get_trait(TRAIT_BIOLUM)) @@ -103,7 +103,7 @@ if(prob(60)) S.set_trait(TRAIT_PRODUCES_POWER, !S.get_trait(TRAIT_PRODUCES_POWER)) -/decl/plantgene/atmosphere/mutate(var/datum/seed/S) +/singleton/plantgene/atmosphere/mutate(var/datum/seed/S) if(prob(60)) S.set_trait(TRAIT_HEAT_TOLERANCE, S.get_trait(TRAIT_HEAT_TOLERANCE)+rand(-2,2),40,0) if(prob(60)) @@ -111,7 +111,7 @@ if(prob(60)) S.set_trait(TRAIT_HIGHKPA_TOLERANCE, S.get_trait(TRAIT_HIGHKPA_TOLERANCE)+rand(-10,10),500,100) -/decl/plantgene/vigour/mutate(var/datum/seed/S, var/turf/T) +/singleton/plantgene/vigour/mutate(var/datum/seed/S, var/turf/T) if(prob(65)) S.set_trait(TRAIT_PRODUCTION, S.get_trait(TRAIT_PRODUCTION)+rand(-1,1),10,0) if(prob(65)) @@ -120,7 +120,7 @@ S.set_trait(TRAIT_SPREAD, S.get_trait(TRAIT_SPREAD)+rand(-1,1),2,0) T.visible_message("\The [S.display_name] spasms visibly, shifting in the tray.") -/decl/plantgene/fruit/mutate(var/datum/seed/S) +/singleton/plantgene/fruit/mutate(var/datum/seed/S) if(prob(65)) S.set_trait(TRAIT_STINGS, !S.get_trait(TRAIT_STINGS)) if(prob(65)) @@ -128,6 +128,6 @@ if(prob(65)) S.set_trait(TRAIT_JUICY, !S.get_trait(TRAIT_JUICY)) -/decl/plantgene/special/mutate(var/datum/seed/S) +/singleton/plantgene/special/mutate(var/datum/seed/S) if(prob(65)) S.set_trait(TRAIT_TELEPORTING, !S.get_trait(TRAIT_TELEPORTING)) diff --git a/code/modules/instruments/instrument_data/_instrument_data.dm b/code/modules/instruments/instrument_data/_instrument_data.dm index 8b46a9f26a4..9fbb3d5a8b5 100644 --- a/code/modules/instruments/instrument_data/_instrument_data.dm +++ b/code/modules/instruments/instrument_data/_instrument_data.dm @@ -21,14 +21,15 @@ . += I.id /datum/instrument + /// Used for categorization subtypes. + abstract_type = /datum/instrument + /// Name of the instrument var/name = "Generic instrument" /// Uniquely identifies this instrument so runtime changes are possible as opposed to paths. If this is unset, things will use path instead. var/id /// Category var/category = "Unsorted" - /// Used for categorization subtypes - var/abstract_type = /datum/instrument /// Write here however many samples, follow this syntax: "%note num%"='%sample file%' eg. "27"='synthesizer/e2.ogg'. Key must never be lower than 0 and higher than 127 var/list/real_samples /// assoc list key = /datum/instrument_key. do not fill this yourself! diff --git a/code/modules/jobs/job.dm b/code/modules/jobs/job.dm index 05323248c5f..371f4b982cc 100644 --- a/code/modules/jobs/job.dm +++ b/code/modules/jobs/job.dm @@ -1,4 +1,7 @@ /datum/job + /// Abstract type. + abstract_type = /datum/job + //! Intrinsics /// ID of the job, used for save/load var/id @@ -6,44 +9,65 @@ var/title = "NOPE" /// Description of the job var/desc = "No description provided." - /// Abstract type - var/abstract_type = /datum/job /// Faction this job is considered part of, for the future considerations of "offmap"/offstation jobs var/faction /// Determines if this job can be spawned into by players var/join_types = JOB_ROUNDSTART | JOB_LATEJOIN // Job access. The use of minimal_access or access is determined by a config setting: config.jobs_have_minimal_access - var/list/minimal_access = list() // Useful for servers which prefer to only have access given to the places a job absolutely needs (Larger server population) - var/list/access = list() // Useful for servers which either have fewer players, so each person needs to fill more than one role, or servers which like to give more access, so players can't hide forever in their super secure departments (I'm looking at you, chemistry!) - var/flag = 0 // Bitflags for the job + + /// Useful for servers which prefer to only have access given to the places a job absolutely needs (Larger server population). + var/list/minimal_access = list() + /// Useful for servers which either have fewer players, so each person needs to fill more than one role, or servers which like to give more access, so players can't hide forever in their super secure departments (I'm looking at you, chemistry!). + var/list/access = list() + /// Bitflags for the job. + var/flag = NONE var/department_flag = 0 - var/total_positions = 0 // How many players can be this job - var/spawn_positions = 0 // How many players can spawn in as this job - var/current_positions = 0 // How many players have this job - var/supervisors = null // Supervisors, who this person answers to directly + /// How many players can be this job. + var/total_positions = 0 + /// How many players can spawn in as this job. + var/spawn_positions = 0 + /// How many players have this job. + var/current_positions = 0 + /// Supervisors, who this person answers to directly. + var/supervisors = null /// Type of ID that the player will have. This is banned. Use outfits, this is only kept in for legacy. var/idtype = /obj/item/card/id - var/selection_color = COLOR_WHITE // Selection screen color - var/list/alt_titles = null // List of alternate titles; There is no need for an alt-title datum for the base job title. - var/req_admin_notify // If this is set to 1, a text is printed to the player when jobs are assigned, telling him that he should let admins know that he has to disconnect. - var/minimal_player_age = 0 // If you have use_age_restriction_for_jobs config option enabled and the database set up, this option will add a requirement for players to be at least minimal_player_age days old. (meaning they first signed in at least that many days before.) - var/list/departments = list() // List of departments this job belongs to, if any. The first one on the list will be the 'primary' department. - var/sorting_order = 0 // Used for sorting jobs so boss jobs go above regular ones, and their boss's boss is above that. Higher numbers = higher in sorting. - var/departments_managed = null // Is this a management position? If yes, list of departments managed. Otherwise null. - var/department_accounts = null // Which department accounts should people with this position be given the pin for? - var/assignable = TRUE // Should it show up on things like the ID computer? + /// Selection screen color + var/selection_color = COLOR_WHITE + /// List of alternate titles; There is no need for an alt-title datum for the base job title. + var/list/alt_titles = null + /// If this is set to 1, a text is printed to the player when jobs are assigned, telling him that he should let admins know that he has to disconnect. + var/req_admin_notify + /// If you have use_age_restriction_for_jobs config option enabled and the database set up, this option will add a requirement for players to be at least minimal_player_age days old. (meaning they first signed in at least that many days before.) + var/minimal_player_age = 0 + /// List of departments this job belongs to, if any. The first one on the list will be the 'primary' department. + var/list/departments = list() + /// Used for sorting jobs so boss jobs go above regular ones, and their boss's boss is above that. Higher numbers = higher in sorting. + var/sorting_order = 0 + /// Is this a management position? If yes, list of departments managed. Otherwise null. + var/departments_managed = null + /// Which department accounts should people with this position be given the pin for? + var/department_accounts = null + /// Should it show up on things like the ID computer? + var/assignable = TRUE var/minimum_character_age = 0 var/ideal_character_age = 30 - var/has_headset = TRUE //Do people with this job need to be given headsets and told how to use them? E.g. Cyborgs don't. + ///Do people with this job need to be given headsets and told how to use them? E.g. Cyborgs don't. + var/has_headset = TRUE - var/account_allowed = 1 // Does this job type come with a station account? - var/economic_modifier = 2 // With how much does this job modify the initial account amount? + /// Does this job type come with a station account? + var/account_allowed = 1 + /// With how much does this job modify the initial account amount? + var/economic_modifier = 2 - var/outfit_type // What outfit datum does this job use in its default title? + /// What outfit datum does this job use in its default title? + var/outfit_type - var/offmap_spawn = FALSE // Do we require weird and special spawning and datacore handling? - var/mob_type = JOB_CARBON // Bitflags representing mob type this job spawns + /// Do we require weird and special spawning and datacore handling? + var/offmap_spawn = FALSE + /// Bitflags representing mob type this job spawns + var/mob_type = JOB_CARBON // Requires a ckey to be whitelisted in jobwhitelist.txt var/whitelist_only = 0 diff --git a/code/modules/language/language.dm b/code/modules/language/language.dm index d4d7f6beb0d..3a4c7eb26a2 100644 --- a/code/modules/language/language.dm +++ b/code/modules/language/language.dm @@ -9,8 +9,9 @@ * singletons stored on SScharacters, only referenced by id most of the time. */ /datum/language - /// abstract type - var/abstract_type = /datum/language + /// Abstract type. + abstract_type = /datum/language + /// uid var/id // TODO: ref languages by id in code, so we can rename as needed diff --git a/code/modules/looking_glass/lg_turfs.dm b/code/modules/looking_glass/lg_turfs.dm index 21e8385785b..bf49ea2c987 100644 --- a/code/modules/looking_glass/lg_turfs.dm +++ b/code/modules/looking_glass/lg_turfs.dm @@ -1,4 +1,4 @@ -/decl/flooring/looking_glass +/singleton/flooring/looking_glass name = "looking glass surface" desc = "Too expensive to replace. Don't break it!" icon = 'icons/turf/flooring/lg_origin.dmi' @@ -11,7 +11,7 @@ name = "looking glass surface" icon = 'icons/turf/flooring/lg_origin.dmi' icon_state = "origin_arrow" - initial_flooring = /decl/flooring/looking_glass + initial_flooring = /singleton/flooring/looking_glass appearance_flags = TILE_BOUND dynamic_lighting = FALSE @@ -85,4 +85,3 @@ animate(src, color = null, time = 3 SECONDS) sleep(3 SECONDS) icon_state = "origin" - diff --git a/code/modules/lore_hardcoded/_hardcoded.dm b/code/modules/lore_hardcoded/_hardcoded.dm index bf3b7beb79c..1135d22ebac 100644 --- a/code/modules/lore_hardcoded/_hardcoded.dm +++ b/code/modules/lore_hardcoded/_hardcoded.dm @@ -1,9 +1,10 @@ /datum/lore /// abstract type - var/abstract_type = /datum/lore + abstract_type = /datum/lore /datum/lore/character_background abstract_type = /datum/lore/character_background + /// name var/name = "Unknown" /// id - **must be unique on subtypes diff --git a/code/modules/maps/rift/levels/classd.dm b/code/modules/maps/rift/levels/classd.dm index 27a2fa24e1c..46a051924de 100644 --- a/code/modules/maps/rift/levels/classd.dm +++ b/code/modules/maps/rift/levels/classd.dm @@ -138,7 +138,7 @@ CLASSD_TURF_CREATE(/turf/simulated/floor/outdoors/rocks) base_icon_state = "asteroid" initial_gas_mix = ATMOSPHERE_ID_CLASSD turf_layers = list(/turf/simulated/mineral/floor/classd) - initial_flooring = /decl/flooring/outdoors/classd + initial_flooring = /singleton/flooring/outdoors/classd ///Indoor usage turfs with Class D's Atmos. Unaffected by weather etc (Important because radioactive fallout will happen on a regular basis!) /turf/simulated/floor/classd/indoors diff --git a/code/modules/maps/talon/talon.dm b/code/modules/maps/talon/talon.dm index f243c8cec95..9f36743c120 100644 --- a/code/modules/maps/talon/talon.dm +++ b/code/modules/maps/talon/talon.dm @@ -245,7 +245,7 @@ Once in open space, consider disabling nonessential power-consuming electronics /obj/structure/closet/secure_closet/talon_captain name = "talon captain's locker" req_access = list(access_talon) - // closet_appearance = /decl/// closet_appearance/secure_closet/talon/captain + // closet_appearance = /singleton/// closet_appearance/secure_closet/talon/captain starts_with = list( /obj/item/storage/backpack/dufflebag/captain/talon, @@ -265,7 +265,7 @@ Once in open space, consider disabling nonessential power-consuming electronics /obj/structure/closet/secure_closet/talon_guard name = "talon guard's locker" req_access = list(access_talon) - // closet_appearance = /decl/// closet_appearance/secure_closet/talon/guard + // closet_appearance = /singleton/// closet_appearance/secure_closet/talon/guard starts_with = list( /obj/item/clothing/suit/armor/pcarrier/light, @@ -294,7 +294,7 @@ Once in open space, consider disabling nonessential power-consuming electronics /obj/structure/closet/secure_closet/talon_doctor name = "talon doctor's locker" req_access = list(access_talon) - // closet_appearance = /decl/// closet_appearance/secure_closet/talon/doctor + // closet_appearance = /singleton/// closet_appearance/secure_closet/talon/doctor starts_with = list( /obj/item/clothing/under/rank/medical, @@ -316,7 +316,7 @@ Once in open space, consider disabling nonessential power-consuming electronics /obj/structure/closet/secure_closet/talon_engineer name = "talon engineer's locker" req_access = list(access_talon) - // closet_appearance = /decl/// closet_appearance/secure_closet/talon/engineer + // closet_appearance = /singleton/// closet_appearance/secure_closet/talon/engineer starts_with = list( /obj/item/clothing/accessory/storage/brown_vest, @@ -339,7 +339,7 @@ Once in open space, consider disabling nonessential power-consuming electronics /obj/structure/closet/secure_closet/talon_pilot name = "talon pilot's locker" req_access = list(access_talon) - // closet_appearance = /decl/// closet_appearance/secure_closet/talon/pilot + // closet_appearance = /singleton/// closet_appearance/secure_closet/talon/pilot starts_with = list( /obj/item/material/knife/tacknife/survival, diff --git a/code/modules/maps/tg/map_template.dm b/code/modules/maps/tg/map_template.dm index 18a6b1041da..77ff9d55362 100644 --- a/code/modules/maps/tg/map_template.dm +++ b/code/modules/maps/tg/map_template.dm @@ -1,28 +1,34 @@ /datum/map_template + /// abstract type + abstract_type = /datum/map_template + var/name = "Default Template Name" var/desc = "Some text should go here. Maybe." - var/template_group = null // If this is set, no more than one template in the same group will be spawned, per submap seeding. + /// If this is set, no more than one template in the same group will be spawned, per submap seeding. + var/template_group = null var/width = 0 var/height = 0 var/mappath = null - var/loaded = 0 // Times loaded this round - var/annihilate = FALSE // If true, all (movable) atoms at the location where the map is loaded will be deleted before the map is loaded in. + /// Times loaded this round. + var/loaded = 0 + /// If true, all (movable) atoms at the location where the map is loaded will be deleted before the map is loaded in. + var/annihilate = FALSE /// The map generator has a set 'budget' it spends to place down different submaps. It will pick available submaps randomly until /// it runs out. The cost of a submap should roughly corrispond with several factors such as size, loot, difficulty, desired scarcity, etc. /// Set to -1 to force the submap to always be made. var/cost = null - var/allow_duplicates = FALSE // If false, only one map template will be spawned by the game. Doesn't affect admins spawning then manually. - var/discard_prob = 0 // If non-zero, there is a chance that the map seeding algorithm will skip this template when selecting potential templates to use. + /// If false, only one map template will be spawned by the game. Doesn't affect admins spawning then manually. + var/allow_duplicates = FALSE + /// If non-zero, there is a chance that the map seeding algorithm will skip this template when selecting potential templates to use. + var/discard_prob = 0 var/static/dmm_suite/maploader = new - - var/fixed_orientation = FALSE // For ruins + // For ruins + var/fixed_orientation = FALSE /// Zlevel traits var/list/ztraits - /// abstract type - var/abstract_type = /datum/map_template /datum/map_template/New(path = null, rename = null) if(path) diff --git a/code/modules/maps/triumph/levels/classd.dm b/code/modules/maps/triumph/levels/classd.dm index 471daec3abd..c75842561fd 100644 --- a/code/modules/maps/triumph/levels/classd.dm +++ b/code/modules/maps/triumph/levels/classd.dm @@ -138,7 +138,7 @@ CLASSD_TURF_CREATE(/turf/simulated/floor/outdoors/rocks) base_icon_state = "asteroid" initial_gas_mix = ATMOSPHERE_ID_CLASSD baseturfs = /turf/simulated/mineral/floor/classd - initial_flooring = /decl/flooring/outdoors/classd + initial_flooring = /singleton/flooring/outdoors/classd ///Indoor usage turfs with Class D's Atmos. Unaffected by weather etc (Important because radioactive fallout will happen on a regular basis!) /turf/simulated/floor/classd/indoors diff --git a/code/modules/mob/inventory/slot_meta.dm b/code/modules/mob/inventory/slot_meta.dm index e47c08fdd36..8fcb9d74364 100644 --- a/code/modules/mob/inventory/slot_meta.dm +++ b/code/modules/mob/inventory/slot_meta.dm @@ -77,6 +77,9 @@ GLOBAL_LIST_EMPTY(inventory_slot_type_cache) * Can equip supports some abstract slots but not others. */ /datum/inventory_slot_meta + /// abstract type + abstract_type = /datum/inventory_slot_meta + //! Intrinsics /// slot name var/name = "unknown" @@ -84,8 +87,6 @@ GLOBAL_LIST_EMPTY(inventory_slot_type_cache) var/id /// next id var/static/id_next = 0 - /// abstract type - var/abstract_type = /datum/inventory_slot_meta /// flags var/inventory_slot_flags = INV_SLOT_IS_RENDERED /// display order - higher is upper. a
is applied on 0. diff --git a/code/modules/mob/living/bot/floorbot.dm b/code/modules/mob/living/bot/floorbot.dm index 0e975a2f144..6ecd50452d8 100644 --- a/code/modules/mob/living/bot/floorbot.dm +++ b/code/modules/mob/living/bot/floorbot.dm @@ -31,7 +31,7 @@ var/eattiles = FALSE var/maketiles = FALSE var/targetdirection = null - var/floor_build_type = /decl/flooring/tiling // Basic steel floor. + var/floor_build_type = /singleton/flooring/tiling // Basic steel floor. var/toolbox = /obj/item/storage/toolbox/mechanical skin = "blue" // Blue Toolbox is the default diff --git a/code/modules/nifsoft/nifsoft.dm b/code/modules/nifsoft/nifsoft.dm index 440a14e1469..605f924f24b 100644 --- a/code/modules/nifsoft/nifsoft.dm +++ b/code/modules/nifsoft/nifsoft.dm @@ -3,10 +3,11 @@ //A single piece of NIF software /datum/nifsoft + abstract_type = /datum/nifsoft + var/name = "Prototype" var/desc = "Contact a dev!" - var/abstract_type = /datum/nifsoft /// The NIF that the software is stored in var/obj/item/nif/nif diff --git a/code/modules/overmap/events/event_handler.dm b/code/modules/overmap/events/event_handler.dm index 02495d9e048..17c102cea90 100644 --- a/code/modules/overmap/events/event_handler.dm +++ b/code/modules/overmap/events/event_handler.dm @@ -1,16 +1,16 @@ -GLOBAL_DATUM_INIT(overmap_event_handler, /decl/overmap_event_handler, new) +GLOBAL_DATUM_INIT(overmap_event_handler, /singleton/overmap_event_handler, new) -/decl/overmap_event_handler +/singleton/overmap_event_handler var/list/hazard_by_turf var/list/ship_events -/decl/overmap_event_handler/New() +/singleton/overmap_event_handler/New() ..() hazard_by_turf = list() ship_events = list() // Populates overmap with random events! Should be called once at startup at some point. -/decl/overmap_event_handler/proc/create_events(var/z_level, var/overmap_size, var/number_of_events) +/singleton/overmap_event_handler/proc/create_events(var/z_level, var/overmap_size, var/number_of_events) // Acquire the list of not-yet utilized overmap turfs on this Z-level var/list/overmap_turfs = block(locate(OVERMAP_EDGE, OVERMAP_EDGE, z_level), locate(overmap_size - OVERMAP_EDGE, overmap_size - OVERMAP_EDGE, z_level)) var/list/candidate_turfs = list() @@ -35,7 +35,7 @@ GLOBAL_DATUM_INIT(overmap_event_handler, /decl/overmap_event_handler, new) qdel(datum_spawn) // IDK help how do I do this better? -/decl/overmap_event_handler/proc/acquire_event_turfs(var/number_of_turfs, var/distance_from_origin, var/list/candidate_turfs, var/continuous = TRUE) +/singleton/overmap_event_handler/proc/acquire_event_turfs(var/number_of_turfs, var/distance_from_origin, var/list/candidate_turfs, var/continuous = TRUE) number_of_turfs = min(number_of_turfs, candidate_turfs.len) candidate_turfs = candidate_turfs.Copy() // Not this proc's responsibility to adjust the given lists @@ -58,7 +58,7 @@ GLOBAL_DATUM_INIT(overmap_event_handler, /decl/overmap_event_handler, new) return selected_turfs -/decl/overmap_event_handler/proc/get_random_neighbour(var/turf/origin_turf, var/list/candidate_turfs, var/continuous = TRUE, var/range) +/singleton/overmap_event_handler/proc/get_random_neighbour(var/turf/origin_turf, var/list/candidate_turfs, var/continuous = TRUE, var/range) var/fitting_turfs if(continuous) fitting_turfs = origin_turf.CardinalTurfs(FALSE) @@ -69,7 +69,7 @@ GLOBAL_DATUM_INIT(overmap_event_handler, /decl/overmap_event_handler, new) if(T in candidate_turfs) return T -/decl/overmap_event_handler/proc/start_hazard(var/obj/effect/overmap/visitable/ship/ship, var/obj/effect/overmap/event/hazard) // Make these accept both hazards or events +/singleton/overmap_event_handler/proc/start_hazard(var/obj/effect/overmap/visitable/ship/ship, var/obj/effect/overmap/event/hazard) // Make these accept both hazards or events if(!(ship in ship_events)) ship_events += ship @@ -85,20 +85,20 @@ GLOBAL_DATUM_INIT(overmap_event_handler, /decl/overmap_event_handler, new) E.victim = ship LAZYADD(ship_events[ship], E) -/decl/overmap_event_handler/proc/stop_hazard(var/obj/effect/overmap/visitable/ship/ship, var/obj/effect/overmap/event/hazard) +/singleton/overmap_event_handler/proc/stop_hazard(var/obj/effect/overmap/visitable/ship/ship, var/obj/effect/overmap/event/hazard) for(var/event_type in hazard.events) var/datum/event/E = is_event_active(ship, event_type, hazard.difficulty) if(E) E.kill() LAZYREMOVE(ship_events[ship], E) -/decl/overmap_event_handler/proc/is_event_active(var/ship, var/event_type, var/severity) +/singleton/overmap_event_handler/proc/is_event_active(var/ship, var/event_type, var/severity) if(!ship_events[ship]) return for(var/datum/event/E in ship_events[ship]) if(E.type == event_type && E.severity == severity) return E -/decl/overmap_event_handler/proc/on_turf_entered(var/turf/new_loc, var/obj/effect/overmap/visitable/ship/ship, var/old_loc) +/singleton/overmap_event_handler/proc/on_turf_entered(var/turf/new_loc, var/obj/effect/overmap/visitable/ship/ship, var/old_loc) if(!istype(ship)) return if(new_loc == old_loc) @@ -107,7 +107,7 @@ GLOBAL_DATUM_INIT(overmap_event_handler, /decl/overmap_event_handler, new) for(var/obj/effect/overmap/event/E in hazard_by_turf[new_loc]) start_hazard(ship, E) -/decl/overmap_event_handler/proc/on_turf_exited(var/turf/old_loc, var/obj/effect/overmap/visitable/ship/ship, var/new_loc) +/singleton/overmap_event_handler/proc/on_turf_exited(var/turf/old_loc, var/obj/effect/overmap/visitable/ship/ship, var/new_loc) if(!istype(ship)) return if(new_loc == old_loc) @@ -118,7 +118,7 @@ GLOBAL_DATUM_INIT(overmap_event_handler, /decl/overmap_event_handler, new) continue // If new turf has the same event as well... keep it going! stop_hazard(ship, E) -/decl/overmap_event_handler/proc/update_hazards(var/turf/T) // Catch all updater +/singleton/overmap_event_handler/proc/update_hazards(var/turf/T) // Catch all updater if(!istype(T)) return @@ -144,12 +144,12 @@ GLOBAL_DATUM_INIT(overmap_event_handler, /decl/overmap_event_handler, new) for(var/obj/effect/overmap/event/E in active_hazards) start_hazard(ship, E) -/decl/overmap_event_handler/proc/is_event_in_turf(var/datum/event/E, var/turf/T) +/singleton/overmap_event_handler/proc/is_event_in_turf(var/datum/event/E, var/turf/T) for(var/obj/effect/overmap/event/hazard in hazard_by_turf[T]) if(E in hazard.events && E.severity == hazard.difficulty) return TRUE -/decl/overmap_event_handler/proc/is_event_included(var/list/hazards, var/obj/effect/overmap/event/E, var/equal_or_better) // This proc is only used so it can break out of 2 loops cleanly +/singleton/overmap_event_handler/proc/is_event_included(var/list/hazards, var/obj/effect/overmap/event/E, var/equal_or_better) // This proc is only used so it can break out of 2 loops cleanly for(var/obj/effect/overmap/event/A in hazards) if(istype(A, E.type) || istype(E, A.type)) if(same_entries(A.events, E.events)) diff --git a/code/modules/overmap/ships/engines/gas_thruster.dm b/code/modules/overmap/ships/engines/gas_thruster.dm index 6978121b358..34f7a0447cd 100644 --- a/code/modules/overmap/ships/engines/gas_thruster.dm +++ b/code/modules/overmap/ships/engines/gas_thruster.dm @@ -62,7 +62,7 @@ CanAtmosPass = ATMOS_PASS_AIR_BLOCKED connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_FUEL - // construct_state = /decl/machine_construction/default/panel_closed + // construct_state = /singleton/machine_construction/default/panel_closed // maximum_component_parts = list(/obj/item/stock_parts = 6)//don't want too many, let upgraded component shine // uncreated_component_parts = list(/obj/item/stock_parts/power/apc/buildable = 1) @@ -218,5 +218,5 @@ // Not Implemented - Variant that pulls power from cables. Too complicated without bay's power components. // /obj/machinery/atmospherics/component/unary/engine/terminal // base_type = /obj/machinery/atmospherics/component/unary/engine -// stock_part_presets = list(/decl/stock_part_preset/terminal_setup) +// stock_part_presets = list(/singleton/stock_part_preset/terminal_setup) // uncreated_component_parts = list(/obj/item/stock_parts/power/terminal/buildable = 1) diff --git a/code/modules/overmap/ships/engines/ion_thruster.dm b/code/modules/overmap/ships/engines/ion_thruster.dm index 7b90ed0ba17..4e52fdec696 100644 --- a/code/modules/overmap/ships/engines/ion_thruster.dm +++ b/code/modules/overmap/ships/engines/ion_thruster.dm @@ -42,7 +42,7 @@ power_channel = ENVIRON idle_power_usage = 100 anchored = TRUE - // construct_state = /decl/machine_construction/default/panel_closed + // construct_state = /singleton/machine_construction/default/panel_closed var/datum/ship_engine/ion/controller var/thrust_limit = 1 var/on = 1 diff --git a/code/modules/paperwork/paper/tag.dm b/code/modules/paperwork/paper/tag.dm index c19f2c3fad7..5b6de919d32 100644 --- a/code/modules/paperwork/paper/tag.dm +++ b/code/modules/paperwork/paper/tag.dm @@ -87,7 +87,7 @@ GLOBAL_LIST(paired_paper_tag_lookup) * For now, this is what you get. */ /datum/paper_tag - var/abstract_type = /datum/paper_tag + abstract_type = /datum/paper_tag /** * simple macros diff --git a/code/modules/power/fusion/core/core_field.dm b/code/modules/power/fusion/core/core_field.dm index 690dcc89886..7c665794f27 100644 --- a/code/modules/power/fusion/core/core_field.dm +++ b/code/modules/power/fusion/core/core_field.dm @@ -400,7 +400,7 @@ GLOBAL_VAR_INIT(max_fusion_air_heat, INFINITY) for(var/cur_s_react in possible_s_reacts) if(possible_s_reacts[cur_s_react] < 1) continue - var/decl/fusion_reaction/cur_reaction = get_fusion_reaction(cur_p_react, cur_s_react) + var/singleton/fusion_reaction/cur_reaction = get_fusion_reaction(cur_p_react, cur_s_react) if(cur_reaction && plasma_temperature >= cur_reaction.minimum_energy_level) possible_reactions.Add(cur_reaction) @@ -410,7 +410,7 @@ GLOBAL_VAR_INIT(max_fusion_air_heat, INFINITY) //split up the reacting atoms between the possible reactions while(possible_reactions.len) - var/decl/fusion_reaction/cur_reaction = pick(possible_reactions) + var/singleton/fusion_reaction/cur_reaction = pick(possible_reactions) possible_reactions.Remove(cur_reaction) //set the randmax to be the lower of the two involved reactants diff --git a/code/modules/power/fusion/fusion_reactions.dm b/code/modules/power/fusion/fusion_reactions.dm index 7caf7829245..f1df5013e1b 100644 --- a/code/modules/power/fusion/fusion_reactions.dm +++ b/code/modules/power/fusion/fusion_reactions.dm @@ -1,6 +1,6 @@ var/list/fusion_reactions -/decl/fusion_reaction +/singleton/fusion_reaction var/p_react = "" // Primary reactant. var/s_react = "" // Secondary reactant. var/minimum_energy_level = 1 @@ -11,14 +11,14 @@ var/list/fusion_reactions var/list/products = list() var/minimum_reaction_temperature = 100 -/decl/fusion_reaction/proc/handle_reaction_special(var/obj/effect/fusion_em_field/holder) +/singleton/fusion_reaction/proc/handle_reaction_special(var/obj/effect/fusion_em_field/holder) return 0 /proc/get_fusion_reaction(p_react, s_react, m_energy) if(!fusion_reactions) fusion_reactions = list() - for(var/rtype in typesof(/decl/fusion_reaction) - /decl/fusion_reaction) - var/decl/fusion_reaction/cur_reaction = new rtype() + for(var/rtype in typesof(/singleton/fusion_reaction) - /singleton/fusion_reaction) + var/singleton/fusion_reaction/cur_reaction = new rtype() if(!fusion_reactions[cur_reaction.p_react]) fusion_reactions[cur_reaction.p_react] = list() fusion_reactions[cur_reaction.p_react][cur_reaction.s_react] = cur_reaction @@ -43,20 +43,20 @@ var/list/fusion_reactions // boron-11 // Basic power production reactions. -/decl/fusion_reaction/deuterium_deuterium +/singleton/fusion_reaction/deuterium_deuterium p_react = "deuterium" s_react = "deuterium" energy_consumption = 1 energy_production = 2 // Advanced production reactions (todo) -/decl/fusion_reaction/deuterium_helium +/singleton/fusion_reaction/deuterium_helium p_react = "deuterium" s_react = "helium-3" energy_consumption = 1 energy_production = 5 -/decl/fusion_reaction/deuterium_tritium +/singleton/fusion_reaction/deuterium_tritium p_react = "deuterium" s_react = "tritium" energy_consumption = 1 @@ -64,7 +64,7 @@ var/list/fusion_reactions products = list("helium-3" = 1) instability = 0.5 -/decl/fusion_reaction/deuterium_lithium +/singleton/fusion_reaction/deuterium_lithium p_react = "deuterium" s_react = "lithium" energy_consumption = 2 @@ -74,7 +74,7 @@ var/list/fusion_reactions instability = 1 // Unideal/material production reactions -/decl/fusion_reaction/oxygen_oxygen +/singleton/fusion_reaction/oxygen_oxygen p_react = "oxygen" s_react = "oxygen" energy_consumption = 10 @@ -83,7 +83,7 @@ var/list/fusion_reactions radiation = 5 products = list("silicon"= 1) -/decl/fusion_reaction/iron_iron +/singleton/fusion_reaction/iron_iron p_react = "iron" s_react = "iron" products = list(MAT_SILVER = 1, MAT_GOLD = 1, MAT_PLATINUM = 1) // Not realistic but w/e @@ -92,7 +92,7 @@ var/list/fusion_reactions instability = 2 minimum_reaction_temperature = 10000 -/decl/fusion_reaction/phoron_hydrogen +/singleton/fusion_reaction/phoron_hydrogen p_react = "hydrogen" s_react = "phoron" energy_consumption = 10 @@ -102,7 +102,7 @@ var/list/fusion_reactions minimum_reaction_temperature = 8000 // VERY UNIDEAL REACTIONS. -/decl/fusion_reaction/phoron_supermatter +/singleton/fusion_reaction/phoron_supermatter p_react = "supermatter" s_react = "phoron" energy_consumption = 0 @@ -110,7 +110,7 @@ var/list/fusion_reactions radiation = 20 instability = 20 -/decl/fusion_reaction/phoron_supermatter/handle_reaction_special(var/obj/effect/fusion_em_field/holder) +/singleton/fusion_reaction/phoron_supermatter/handle_reaction_special(var/obj/effect/fusion_em_field/holder) wormhole_event() @@ -142,7 +142,7 @@ var/list/fusion_reactions return 1 // High end reactions. -/decl/fusion_reaction/boron_hydrogen +/singleton/fusion_reaction/boron_hydrogen p_react = "boron" s_react = "hydrogen" minimum_energy_level = FUSION_HEAT_CAP * 0.5 @@ -151,7 +151,7 @@ var/list/fusion_reactions radiation = 3 instability = 3 -/decl/fusion_reaction/hydrogen_hydrogen +/singleton/fusion_reaction/hydrogen_hydrogen p_react = "hydrogen" s_react = "hydrogen" minimum_energy_level = FUSION_HEAT_CAP * 0.75 diff --git a/code/modules/preferences/preference_setup/loadout/loadout.dm b/code/modules/preferences/preference_setup/loadout/loadout.dm index 94df71dda03..0e401402fcd 100644 --- a/code/modules/preferences/preference_setup/loadout/loadout.dm +++ b/code/modules/preferences/preference_setup/loadout/loadout.dm @@ -10,17 +10,24 @@ var/list/gear_datums = list() var/name /// what we display our name as. feel free to change this. defaults to name. var/display_name - var/description // Description of this gear. If left blank will default to the description of the pathed item. - var/path // Path to item. - var/cost = 1 // Number of points used. Items in general cost 1 point, storage/armor/gloves/special use costs 2 points. - var/slot // Slot to equip to. - var/list/allowed_roles // Roles that can spawn with this item. + /// Description of this gear. If left blank will default to the description of the pathed item. + var/description + /// Path to item. + var/path + /// Number of points used. Items in general cost 1 point, storage/armor/gloves/special use costs 2 points. + var/cost = 1 + /// Slot to equip to. + var/slot + /// Roles that can spawn with this item. + var/list/allowed_roles // todo: remove in favor of uid locks and or just a better system. - var/legacy_species_lock // Term to check the whitelist for.. + // Term to check the whitelist for. + var/legacy_species_lock var/sort_category = "General" - var/list/gear_tweaks = list() // List of datums which will alter the item after it has been spawned. - var/exploitable = 0 // Does it go on the exploitable information list? - var/abstract_type = null + /// List of datums which will alter the item after it has been spawned. + var/list/gear_tweaks = list() + /// Does it go on the exploitable information list? + var/exploitable = 0 var/static/datum/gear_tweak/color/gear_tweak_free_color_choice = new var/list/ckeywhitelist var/list/character_name diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 4a7c45bd6c1..206ab2d1d1b 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -46,7 +46,7 @@ cell_type = /obj/item/cell/device/weapon/recharge no_pin_required = 1 battery_lock = 1 - var/decl/plantgene/gene = null + var/singleton/plantgene/gene = null firemodes = list( list(mode_name="induce mutations", projectile_type=/obj/item/projectile/energy/floramut, modifystate="floramut"), diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm index 0a1327cc448..6a05b300112 100644 --- a/code/modules/projectiles/projectile/special.dm +++ b/code/modules/projectiles/projectile/special.dm @@ -173,7 +173,7 @@ damage_type = TOX nodamage = 1 check_armour = "energy" - var/decl/plantgene/gene = null + var/singleton/plantgene/gene = null /obj/item/projectile/energy/florayield name = "beta somatoray" diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index de558376417..28beb3f4a2d 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -34,8 +34,9 @@ other types of metals and chemistry for reagents). ///Datum for object designs, used in construction /datum/design - /// abstract type - var/abstract_type = /datum/design + /// Abstract type. + abstract_type = /datum/design + ///Name of the created object. If null it will be 'guessed' from build_path if possible. var/name = null ///Description of the created object. If null it will use group_desc and name where applicable. diff --git a/code/modules/species/character_species.dm b/code/modules/species/character_species.dm index 1bc4199faa6..49d2190b33b 100644 --- a/code/modules/species/character_species.dm +++ b/code/modules/species/character_species.dm @@ -41,9 +41,10 @@ * /datum/character_species is a singleton type stored on SScharacters. */ /datum/character_species + /// Abstract type (i'm addicted to abstract types) @silicons + abstract_type = /datum/character_species + //! Intrinsics - /// abstract type (i'm addicted to abstract types) - var/abstract_type = /datum/character_species /// uid (this must be unique with both species and minor species, don't be outrageous with it, don't be stupid) var/uid /// master species id @@ -157,4 +158,3 @@ return S.uid //! LORE PEOPLE, SHOVE YOUR SNOWFLAKE HERE - diff --git a/code/modules/species/species.dm b/code/modules/species/species.dm index 39e8fbc40ea..59be6bbc9e0 100644 --- a/code/modules/species/species.dm +++ b/code/modules/species/species.dm @@ -18,9 +18,10 @@ * - A global cache of species by typepath will still be maintained for "static" usages of these datums, like for preferences rendering. */ /datum/species + /// Abstract type. + abstract_type = /datum/species + //! Intrinsics - /// abstract type - var/abstract_type = /datum/species /// uid - **must be unique** var/uid /// if we're a subspecies, real id diff --git a/code/modules/unit_tests/integrated_circuits/prefabs.dm b/code/modules/unit_tests/integrated_circuits/prefabs.dm index 43e1579424f..4f3ce49f77a 100644 --- a/code/modules/unit_tests/integrated_circuits/prefabs.dm +++ b/code/modules/unit_tests/integrated_circuits/prefabs.dm @@ -3,8 +3,8 @@ /datum/unit_test/integrated_circuit_prefabs_shall_respect_complexity_and_size_contraints/start_test() var/list/failed_prefabs = list() - for(var/prefab_type in subtypesof(/decl/prefab/ic_assembly)) - var/decl/prefab/ic_assembly/prefab = decls_repository.get_decl(prefab_type) + for(var/prefab_type in subtypesof(/singleton/prefab/ic_assembly)) + var/singleton/prefab/ic_assembly/prefab = decls_repository.get_decl(prefab_type) var/obj/item/electronic_assembly/assembly = prefab.assembly_type var/available_size = initial(assembly.max_components) @@ -33,8 +33,8 @@ /datum/unit_test/integrated_circuit_prefabs_shall_not_fail_to_create/start_test() var/list/failed_prefabs = list() - for(var/prefab_type in subtypesof(/decl/prefab/ic_assembly)) - var/decl/prefab/ic_assembly/prefab = decls_repository.get_decl(prefab_type) + for(var/prefab_type in subtypesof(/singleton/prefab/ic_assembly)) + var/singleton/prefab/ic_assembly/prefab = decls_repository.get_decl(prefab_type) try var/built_item = prefab.create(get_standard_turf()) diff --git a/code/modules/unit_tests/unit_test.dm b/code/modules/unit_tests/unit_test.dm index bd138e447cd..9a1757b0064 100644 --- a/code/modules/unit_tests/unit_test.dm +++ b/code/modules/unit_tests/unit_test.dm @@ -17,7 +17,7 @@ GLOBAL_VAR(test_log) /datum/unit_test /// Abstract type of the test - var/abstract_type = /datum/unit_test + abstract_type = /datum/unit_test //Bit of metadata for the future maybe var/list/procs_tested diff --git a/maps/nsv_triumph/submaps/lavaland/_lavaland.dm b/maps/nsv_triumph/submaps/lavaland/_lavaland.dm index eeabdd0e72a..f02c741adb5 100644 --- a/maps/nsv_triumph/submaps/lavaland/_lavaland.dm +++ b/maps/nsv_triumph/submaps/lavaland/_lavaland.dm @@ -99,7 +99,7 @@ base_icon_state = "asteroid" edge_blending_priority = 0 baseturfs = /turf/simulated/mineral/floor/lavaland - initial_flooring = /decl/flooring/outdoors/lavaland + initial_flooring = /singleton/flooring/outdoors/lavaland /turf/simulated/floor/outdoors/lavaland/indoors //I know this path is confusing. Basically this is a way to simulate interior caverns that don't use mapgen for specific POIs. outdoors = 0 diff --git a/maps/rift/rift_turfs.dm b/maps/rift/rift_turfs.dm index 58dcd3ed70c..8076789dac0 100644 --- a/maps/rift/rift_turfs.dm +++ b/maps/rift/rift_turfs.dm @@ -60,7 +60,7 @@ LYTHIOS43C_TURF_CREATE_UN(/turf/simulated/mineral/icerock/floor/ignore_cavegen) /turf/simulated/floor/outdoors/grass/sif name = "growth" icon_state = "grass_sif" - initial_flooring = /decl/flooring/outdoors/grass/sif + initial_flooring = /singleton/flooring/outdoors/grass/sif grass_chance = 5 var/tree_chance = 2 @@ -300,5 +300,3 @@ LYTHIOS43C_TURF_CREATE_UN(/turf/unsimulated/mineral/icerock) dir = EAST /turf/simulated/sky/lythios43c/moving/west dir = WEST - - diff --git a/maps/rift/submaps/lavaland/_lavaland.dm b/maps/rift/submaps/lavaland/_lavaland.dm index 9b4b607b3f8..54cb1f7279b 100644 --- a/maps/rift/submaps/lavaland/_lavaland.dm +++ b/maps/rift/submaps/lavaland/_lavaland.dm @@ -98,7 +98,7 @@ outdoors = 1 base_icon_state = "asteroid" baseturfs = /turf/simulated/mineral/floor/lavaland - initial_flooring = /decl/flooring/outdoors/lavaland + initial_flooring = /singleton/flooring/outdoors/lavaland /turf/simulated/floor/outdoors/lavaland/indoors //I know this path is confusing. Basically this is a way to simulate interior caverns that don't use mapgen for specific POIs. outdoors = 0