[ailment.name] | "
var/list/ailment_cures = list()
diff --git a/code/modules/organs/ailments/ailments_medical.dm b/code/modules/organs/ailments/ailments_medical.dm
index 4cf930ac0f9..c9d3dad9751 100644
--- a/code/modules/organs/ailments/ailments_medical.dm
+++ b/code/modules/organs/ailments/ailments_medical.dm
@@ -1,5 +1,5 @@
/datum/ailment/head
- category = /datum/ailment/head
+ abstract_type = /datum/ailment/head
applies_to_organ = list(BP_HEAD)
/datum/ailment/head/headache
diff --git a/code/modules/organs/ailments/faults/_fault.dm b/code/modules/organs/ailments/faults/_fault.dm
index 8219540a8dc..52a9b747a84 100644
--- a/code/modules/organs/ailments/faults/_fault.dm
+++ b/code/modules/organs/ailments/faults/_fault.dm
@@ -1,7 +1,7 @@
/datum/ailment/fault
applies_to_robotics = TRUE
applies_to_prosthetics = TRUE
- category = /datum/ailment/fault
+ abstract_type = /datum/ailment/fault
treated_by_item_type = list(
/obj/item/stack/nanopaste,
/obj/item/stack/tape_roll/duct_tape
diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm
index 92bcc2d8ed7..36d6a3ac531 100644
--- a/code/modules/organs/organ.dm
+++ b/code/modules/organs/organ.dm
@@ -482,9 +482,11 @@
return
var/global/list/ailment_reference_cache = list()
-/proc/get_ailment_reference(var/ailment_type)
+/proc/get_ailment_reference(var/datum/ailment/ailment_type)
if(!ispath(ailment_type, /datum/ailment))
return
+ if(TYPE_IS_ABSTRACT(ailment_type))
+ return
if(!global.ailment_reference_cache[ailment_type])
global.ailment_reference_cache[ailment_type] = new ailment_type
return global.ailment_reference_cache[ailment_type]
@@ -495,7 +497,7 @@ var/global/list/ailment_reference_cache = list()
return .
for(var/ailment_type in subtypesof(/datum/ailment))
var/datum/ailment/ailment = ailment_type
- if(initial(ailment.category) == ailment_type)
+ if(TYPE_IS_ABSTRACT(ailment))
continue
ailment = get_ailment_reference(ailment_type)
if(ailment.can_apply_to(src))
diff --git a/code/modules/overmap/overmap_shuttle.dm b/code/modules/overmap/overmap_shuttle.dm
index 408db04970a..2a7e5b3fb64 100644
--- a/code/modules/overmap/overmap_shuttle.dm
+++ b/code/modules/overmap/overmap_shuttle.dm
@@ -7,7 +7,7 @@
var/fuel_consumption = 0 //Amount of moles of gas consumed per trip; If zero, then shuttle is magic and does not need fuel
var/list/obj/structure/fuel_port/fuel_ports //the fuel ports of the shuttle (but usually just one)
- category = /datum/shuttle/autodock/overmap
+ abstract_type = /datum/shuttle/autodock/overmap
var/skill_needed = SKILL_BASIC
var/landing_skill_needed = SKILL_EXPERT
var/operator_skill = SKILL_MIN
diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm
index 48abeb8383a..a60fab7f939 100644
--- a/code/modules/power/cell.dm
+++ b/code/modules/power/cell.dm
@@ -85,7 +85,8 @@
to_chat(user, "The charge meter reads [round(src.percent(), 0.1)]%.")
/obj/item/cell/emp_act(severity)
- //remove this once emp changes on dev are merged in
+ // remove this if EMPs are ever rebalanced so that they don't instantly drain borg cells
+ // todo: containers (partially) shielding contents?
if(isrobot(loc))
var/mob/living/silicon/robot/R = loc
severity *= R.cell_emp_mult
diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm
index 2a3ae1574c8..46ce049defb 100644
--- a/code/modules/power/lighting.dm
+++ b/code/modules/power/lighting.dm
@@ -612,13 +612,7 @@
/obj/item/light/proc/switch_on()
switchcount++
if(rigged)
- log_and_message_admins("Rigged light explosion, last touched by [fingerprintslast]")
- var/turf/T = get_turf(src.loc)
- spawn(0)
- sleep(2)
- explosion(T, 0, 0, 3, 5)
- sleep(1)
- qdel(src)
+ addtimer(CALLBACK(src, PROC_REF(do_rigged_explosion)), 0.2 SECONDS)
status = LIGHT_BROKEN
else if(prob(min(60, switchcount*switchcount*0.01)))
status = LIGHT_BURNED
@@ -626,6 +620,15 @@
playsound(src, sound_on, 75)
return status
+/obj/item/light/proc/do_rigged_explosion()
+ if(!rigged)
+ return
+ log_and_message_admins("Rigged light explosion, last touched by [fingerprintslast]")
+ var/turf/T = get_turf(src)
+ explosion(T, 0, 0, 3, 5)
+ if(!QDELETED(src))
+ QDEL_IN(src, 1)
+
/obj/machinery/light/do_simple_ranged_interaction(var/mob/user)
if(lightbulb)
remove_bulb()
diff --git a/code/modules/prometheus_metrics/metric_family.dm b/code/modules/prometheus_metrics/metric_family.dm
index 373130e297a..0054e97a257 100644
--- a/code/modules/prometheus_metrics/metric_family.dm
+++ b/code/modules/prometheus_metrics/metric_family.dm
@@ -1,11 +1,11 @@
// Datum used for gathering a set of prometheus metrics.
-/datum/metric_family
+/decl/metric_family
var/name = null
var/metric_type = null
var/help = null
// Collect should return a list of lists with two entries, one being a list and the other being a number.
-/datum/metric_family/proc/collect()
+/decl/metric_family/proc/collect()
var/list/out = list()
out[++out.len] = list(list("foo" = "bar"), 3.14)
@@ -15,9 +15,9 @@
// _to_proto will call the collect() method and format its result in a list
// suitable for encoding as a JSON protobuf mapping.
-/datum/metric_family/proc/_to_proto()
+/decl/metric_family/proc/_to_proto()
var/list/collected = collect()
-
+
var/list/out = list(
"name" = name,
"type" = metric_type,
@@ -36,7 +36,7 @@
label_pairs[++label_pairs.len] = list("name" = k, "value" = m[1][k])
metrics[++metrics.len] = list("label" = label_pairs, PROMETHEUS_METRIC_NAME(metric_type) = list("value" = m[2]))
-
+
if(metrics.len == 0)
return null
out["metric"] = metrics
diff --git a/code/modules/prometheus_metrics/metrics.dm b/code/modules/prometheus_metrics/metrics.dm
index 95e2f819002..ad98b6c178f 100644
--- a/code/modules/prometheus_metrics/metrics.dm
+++ b/code/modules/prometheus_metrics/metrics.dm
@@ -1,24 +1,15 @@
-var/global/datum/prometheus_metrics/prometheus_metrics = new
-
// prometheus_metrics holds a list of metric_family datums and uses them to
// create a json protobuf.
-/datum/prometheus_metrics
+/decl/prometheus_metrics
var/list/metric_families
-/datum/prometheus_metrics/New()
- metric_families = list()
- for(var/T in subtypesof(/datum/metric_family))
- var/datum/metric_family/mf = T
- if(initial(mf.name) == null || initial(mf.metric_type) == null)
- continue
- metric_families += new T
-
-/datum/prometheus_metrics/proc/collect()
+/decl/prometheus_metrics/proc/collect()
var/list/out = list()
- for(var/datum/metric_family/MF in metric_families)
- var/proto = MF._to_proto()
+ for(var/decl/metric_family/metric_family in decls_repository.get_decls_of_type_unassociated(/decl/metric_family))
+ var/proto = metric_family._to_proto()
if(proto != null)
- out[++out.len] = MF._to_proto()
-
+ // out += proto will try to merge the lists, we have to insert it at the end instead
+ out[++out.len] = proto
+
return json_encode(out)
diff --git a/code/modules/prometheus_metrics/metrics/byond.dm b/code/modules/prometheus_metrics/metrics/byond.dm
index 232bce38faf..3aa58ba942d 100644
--- a/code/modules/prometheus_metrics/metrics/byond.dm
+++ b/code/modules/prometheus_metrics/metrics/byond.dm
@@ -1,29 +1,29 @@
// byond-specific metrics
-/datum/metric_family/byond_time
+/decl/metric_family/byond_time
name = "byond_world_time_seconds"
metric_type = PROMETHEUS_METRIC_COUNTER
help = "Counter of 'game-time' seconds since server startup"
-/datum/metric_family/byond_time/collect()
+/decl/metric_family/byond_time/collect()
return list(list(null, world.time / 10))
-/datum/metric_family/byond_tick_lag
+/decl/metric_family/byond_tick_lag
name = "byond_tick_lag"
metric_type = PROMETHEUS_METRIC_GAUGE
help = "Current value of world.tick_lag"
-/datum/metric_family/byond_tick_lag/collect()
+/decl/metric_family/byond_tick_lag/collect()
return list(list(null, world.tick_lag))
-/datum/metric_family/byond_players
+/decl/metric_family/byond_players
name = "byond_players"
metric_type = PROMETHEUS_METRIC_GAUGE
help = "Number of players currently connected to the server"
-/datum/metric_family/byond_players/collect()
+/decl/metric_family/byond_players/collect()
var/c = 0
for(var/client/C)
if(C.connection == "seeker" || C.connection == "web")
@@ -31,10 +31,10 @@
return list(list(null, c))
-/datum/metric_family/byond_cpu
+/decl/metric_family/byond_cpu
name = "byond_cpu"
metric_type = PROMETHEUS_METRIC_GAUGE
help = "Current value of world.cpu"
-/datum/metric_family/byond_cpu/collect()
+/decl/metric_family/byond_cpu/collect()
return list(list(null, world.cpu))
diff --git a/code/modules/prometheus_metrics/metrics/ss13.dm b/code/modules/prometheus_metrics/metrics/ss13.dm
index 5c6d315b04d..f686f1d1bed 100644
--- a/code/modules/prometheus_metrics/metrics/ss13.dm
+++ b/code/modules/prometheus_metrics/metrics/ss13.dm
@@ -1,11 +1,11 @@
// ss13-specific metrics
-/datum/metric_family/ss13_controller_time_seconds
+/decl/metric_family/ss13_controller_time_seconds
name = "ss13_controller_time_seconds"
metric_type = PROMETHEUS_METRIC_COUNTER
help = "Counter of time spent in a controller in seconds"
-/datum/metric_family/ss13_controller_time_seconds/collect()
+/decl/metric_family/ss13_controller_time_seconds/collect()
var/list/out = list()
if(Master)
for(var/name in Master.total_run_times)
@@ -14,23 +14,23 @@
return out
-/datum/metric_family/ss13_master_runlevel
+/decl/metric_family/ss13_master_runlevel
name = "ss13_master_runlevel"
metric_type = PROMETHEUS_METRIC_GAUGE
help = "Current MC runlevel"
-/datum/metric_family/ss13_master_runlevel/collect()
+/decl/metric_family/ss13_master_runlevel/collect()
if(Master)
return list(list(null, Master.current_runlevel))
return list()
-/datum/metric_family/ss13_garbage_queue_length
+/decl/metric_family/ss13_garbage_queue_length
name = "ss13_garbage_queue_length"
metric_type = PROMETHEUS_METRIC_GAUGE
help = "Length of SSgarbage queues"
-/datum/metric_family/ss13_garbage_queue_length/collect()
+/decl/metric_family/ss13_garbage_queue_length/collect()
var/list/out = list()
if(SSgarbage)
@@ -40,12 +40,12 @@
return out
-/datum/metric_family/ss13_garbage_queue_results
+/decl/metric_family/ss13_garbage_queue_results
name = "ss13_garbage_queue_results"
metric_type = PROMETHEUS_METRIC_COUNTER
help = "Counter of pass/fail results for SSgarbage queues"
-/datum/metric_family/ss13_garbage_queue_results/collect()
+/decl/metric_family/ss13_garbage_queue_results/collect()
var/list/out = list()
if(SSgarbage)
@@ -56,12 +56,12 @@
return out
-/datum/metric_family/ss13_garbage_total_cleaned
+/decl/metric_family/ss13_garbage_total_cleaned
name = "ss13_garbage_total_cleaned"
metric_type = PROMETHEUS_METRIC_COUNTER
help = "Counter for number of objects deleted/GCed by SSgarbage"
-/datum/metric_family/ss13_garbage_total_cleaned/collect()
+/decl/metric_family/ss13_garbage_total_cleaned/collect()
var/list/out = list()
if(SSgarbage)
diff --git a/code/modules/recycling/disposalpipe.dm b/code/modules/recycling/disposalpipe.dm
index e035da8b825..b1e5ab0afc4 100644
--- a/code/modules/recycling/disposalpipe.dm
+++ b/code/modules/recycling/disposalpipe.dm
@@ -184,8 +184,7 @@
if(H)
expel(H, T, 0)
- spawn(2) // delete pipe after 2 ticks to ensure expel proc finished
- qdel(src)
+ QDEL_IN(src, 2) // delete pipe after 2 ticks to ensure expel proc finished
// pipe affected by explosion
diff --git a/code/modules/shuttles/escape_pods.dm b/code/modules/shuttles/escape_pods.dm
index c12dc6e38d9..bd13d30c417 100644
--- a/code/modules/shuttles/escape_pods.dm
+++ b/code/modules/shuttles/escape_pods.dm
@@ -3,7 +3,7 @@ var/global/list/escape_pods_by_name = list()
/datum/shuttle/autodock/ferry/escape_pod
var/datum/computer/file/embedded_program/docking/simple/escape_pod_berth/arming_controller
- category = /datum/shuttle/autodock/ferry/escape_pod
+ abstract_type = /datum/shuttle/autodock/ferry/escape_pod
move_time = 100
/datum/shuttle/autodock/ferry/escape_pod/New(map_hash)
diff --git a/code/modules/shuttles/shuttle.dm b/code/modules/shuttles/shuttle.dm
index 794f0736f12..85ee565817b 100644
--- a/code/modules/shuttles/shuttle.dm
+++ b/code/modules/shuttles/shuttle.dm
@@ -12,7 +12,7 @@
var/arrive_time = 0 //the time at which the shuttle arrives when long jumping
var/flags = 0
var/process_state = IDLE_STATE //Used with SHUTTLE_FLAGS_PROCESS, as well as to store current state.
- var/category = /datum/shuttle
+ abstract_type = /datum/shuttle
var/multiz = 0 //how many multiz levels, starts at 0
var/ceiling_type = /turf/unsimulated/floor/shuttle_ceiling
diff --git a/code/modules/shuttles/shuttle_autodock.dm b/code/modules/shuttles/shuttle_autodock.dm
index 74c157df8fe..f2003eb0129 100644
--- a/code/modules/shuttles/shuttle_autodock.dm
+++ b/code/modules/shuttles/shuttle_autodock.dm
@@ -16,7 +16,7 @@
var/obj/effect/shuttle_landmark/landmark_transition //This variable is type-abused initially: specify the landmark_tag, not the actual landmark.
var/move_time = 240 //the time spent in the transition area
- category = /datum/shuttle/autodock
+ abstract_type = /datum/shuttle/autodock
flags = SHUTTLE_FLAGS_PROCESS | SHUTTLE_FLAGS_ZERO_G
/datum/shuttle/autodock/New(var/map_hash, var/obj/effect/shuttle_landmark/start_waypoint)
diff --git a/code/modules/shuttles/shuttle_emergency.dm b/code/modules/shuttles/shuttle_emergency.dm
index 2bdc11d2284..f6efaa4a864 100644
--- a/code/modules/shuttles/shuttle_emergency.dm
+++ b/code/modules/shuttles/shuttle_emergency.dm
@@ -1,5 +1,5 @@
/datum/shuttle/autodock/ferry/emergency
- category = /datum/shuttle/autodock/ferry/emergency
+ abstract_type = /datum/shuttle/autodock/ferry/emergency
move_time = 10 MINUTES
flags = SHUTTLE_FLAGS_PROCESS | SHUTTLE_FLAGS_ZERO_G | SHUTTLE_FLAGS_NO_CODE
var/datum/evacuation_controller/shuttle/emergency_controller
diff --git a/code/modules/shuttles/shuttle_ferry.dm b/code/modules/shuttles/shuttle_ferry.dm
index 4f23361de2b..ebe0a7cf54f 100644
--- a/code/modules/shuttles/shuttle_ferry.dm
+++ b/code/modules/shuttles/shuttle_ferry.dm
@@ -7,7 +7,7 @@
var/obj/effect/shuttle_landmark/waypoint_station //This variable is type-abused initially: specify the landmark_tag, not the actual landmark.
var/obj/effect/shuttle_landmark/waypoint_offsite //This variable is type-abused initially: specify the landmark_tag, not the actual landmark.
- category = /datum/shuttle/autodock/ferry
+ abstract_type = /datum/shuttle/autodock/ferry
/datum/shuttle/autodock/ferry/New(map_hash)
if(map_hash)
diff --git a/code/modules/shuttles/shuttle_specops.dm b/code/modules/shuttles/shuttle_specops.dm
index 41778075e99..cd3e55c4fdb 100644
--- a/code/modules/shuttles/shuttle_specops.dm
+++ b/code/modules/shuttles/shuttle_specops.dm
@@ -14,10 +14,7 @@
var/reset_time = 0 //the world.time at which the shuttle will be ready to move again.
var/launch_prep = 0
var/cancel_countdown = 0
- category = /datum/shuttle/autodock/ferry/specops
-
-/datum/shuttle/autodock/ferry/specops/New()
- ..()
+ abstract_type = /datum/shuttle/autodock/ferry/specops
/datum/shuttle/autodock/ferry/specops/launch(var/user)
if (!can_launch())
diff --git a/code/modules/shuttles/shuttle_supply.dm b/code/modules/shuttles/shuttle_supply.dm
index 175924860dc..f38e5fef5b3 100644
--- a/code/modules/shuttles/shuttle_supply.dm
+++ b/code/modules/shuttles/shuttle_supply.dm
@@ -3,7 +3,7 @@
var/late_chance = 80
var/max_late_time = (30 SECONDS)
flags = SHUTTLE_FLAGS_PROCESS|SHUTTLE_FLAGS_SUPPLY|SHUTTLE_FLAGS_NO_CODE
- category = /datum/shuttle/autodock/ferry/supply
+ abstract_type = /datum/shuttle/autodock/ferry/supply
ceiling_type = /turf/floor/shuttle_ceiling
/datum/shuttle/autodock/ferry/supply/short_jump(var/area/destination)
diff --git a/code/modules/shuttles/shuttles_multi.dm b/code/modules/shuttles/shuttles_multi.dm
index 35e00c68be6..71e144e02e2 100644
--- a/code/modules/shuttles/shuttles_multi.dm
+++ b/code/modules/shuttles/shuttles_multi.dm
@@ -2,7 +2,7 @@
var/list/destination_tags
var/list/destinations_cache = list()
var/last_cache_rebuild_time = 0
- category = /datum/shuttle/autodock/multi
+ abstract_type = /datum/shuttle/autodock/multi
/datum/shuttle/autodock/multi/New(map_hash)
..()
@@ -42,7 +42,7 @@
var/arrival_message
var/departure_message
- category = /datum/shuttle/autodock/multi/antag
+ abstract_type = /datum/shuttle/autodock/multi/antag
/datum/shuttle/autodock/multi/antag/New(map_hash)
..()
diff --git a/code/modules/vehicles/vehicle.dm b/code/modules/vehicles/vehicle.dm
index ce40b54d230..1098bd2bf01 100644
--- a/code/modules/vehicles/vehicle.dm
+++ b/code/modules/vehicles/vehicle.dm
@@ -144,23 +144,17 @@
healthcheck()
/obj/vehicle/emp_act(severity)
- var/was_on = on
+ addtimer(CALLBACK(src, PROC_REF(end_emp), on), severity * 30 SECONDS)
stat |= EMPED
- var/obj/effect/overlay/pulse2 = new /obj/effect/overlay(loc)
- pulse2.icon = 'icons/effects/effects.dmi'
- pulse2.icon_state = "empdisable"
- pulse2.SetName("emp sparks")
- pulse2.anchored = TRUE
- pulse2.set_dir(pick(global.cardinal))
-
- spawn(10)
- qdel(pulse2)
+ var/obj/effect/temp_visual/emp_burst/burst = new /obj/effect/temp_visual/emp_burst(loc)
+ burst.set_dir(pick(global.cardinal))
if(on)
turn_off()
- spawn(severity*300)
- stat &= ~EMPED
- if(was_on)
- turn_on()
+
+/obj/vehicle/proc/end_emp(was_on)
+ stat &= ~EMPED
+ if(was_on)
+ turn_on()
/obj/vehicle/attack_ai(mob/living/silicon/ai/user)
return
diff --git a/code/unit_tests/_template.dm b/code/unit_tests/_template.dm
index 556941cb1ce..36dc0ddfa18 100644
--- a/code/unit_tests/_template.dm
+++ b/code/unit_tests/_template.dm
@@ -7,8 +7,8 @@
/datum/unit_test/template
name = "Test Template - Change My name"
- template = /datum/unit_test/template // Set this var equal to the test path to treat it as a template, i.e. it should not be run
- async = 1 // Set if we should continue testing elsewhere and come back and check on the results.
+ abstract_type = /datum/unit_test/template // Set this var equal to the test path to treat it as a template, i.e. it should not be run
+ async = 1 // Set if we should continue testing elsewhere and come back and check on the results.
/datum/unit_test/template/start_test()
diff --git a/code/unit_tests/atmospherics_tests.dm b/code/unit_tests/atmospherics_tests.dm
index 5a9c69c15cf..46837d818bf 100644
--- a/code/unit_tests/atmospherics_tests.dm
+++ b/code/unit_tests/atmospherics_tests.dm
@@ -2,7 +2,7 @@
Unit tests for ATMOSPHERICS primitives
*/
/datum/unit_test/atmos_machinery
- template = /datum/unit_test/atmos_machinery
+ abstract_type = /datum/unit_test/atmos_machinery
var/list/test_cases = list()
/datum/unit_test/atmos_machinery/proc/create_gas_mixes(gas_mix_data)
@@ -60,7 +60,7 @@
pass("[case_name]: conserved moles of each gas ID.")
/datum/unit_test/atmos_machinery/conserve_moles
- template = /datum/unit_test/atmos_machinery/conserve_moles
+ abstract_type = /datum/unit_test/atmos_machinery/conserve_moles
test_cases = list(
uphill = list(
source = list(
diff --git a/code/unit_tests/chemistry_tests.dm b/code/unit_tests/chemistry_tests.dm
index bb6e9d90477..cdc9dae00d4 100644
--- a/code/unit_tests/chemistry_tests.dm
+++ b/code/unit_tests/chemistry_tests.dm
@@ -1,6 +1,6 @@
/datum/unit_test/chemistry
name = "CHEMISTRY: Reagent Template"
- template = /datum/unit_test/chemistry
+ abstract_type = /datum/unit_test/chemistry
var/container_volume = 45
var/donor_type = /obj/item
diff --git a/code/unit_tests/equipment_tests.dm b/code/unit_tests/equipment_tests.dm
index 25146ab9251..d082e6fc91a 100644
--- a/code/unit_tests/equipment_tests.dm
+++ b/code/unit_tests/equipment_tests.dm
@@ -1,6 +1,6 @@
/datum/unit_test/vision_glasses
name = "EQUIPMENT: Vision Template"
- template = /datum/unit_test/vision_glasses
+ abstract_type = /datum/unit_test/vision_glasses
var/mob/living/human/H = null
var/expectation = SEE_INVISIBLE_NOLIGHTING
var/glasses_type = null
diff --git a/code/unit_tests/extension_tests.dm b/code/unit_tests/extension_tests.dm
index 49f9769fa43..2a7724e3cc7 100644
--- a/code/unit_tests/extension_tests.dm
+++ b/code/unit_tests/extension_tests.dm
@@ -1,6 +1,6 @@
/datum/unit_test/extensions
name = "EXTENSIONS template"
- template = /datum/unit_test/extensions
+ abstract_type = /datum/unit_test/extensions
async = 0
/datum/unit_test/extensions/basic_extension_shall_lazy_initalize_as_expected
diff --git a/code/unit_tests/foundation_tests.dm b/code/unit_tests/foundation_tests.dm
index 66fb31643b3..27196ec37ff 100644
--- a/code/unit_tests/foundation_tests.dm
+++ b/code/unit_tests/foundation_tests.dm
@@ -3,7 +3,7 @@
*/
/datum/unit_test/foundation
name = "FOUNDATION template"
- template = /datum/unit_test/foundation
+ abstract_type = /datum/unit_test/foundation
async = 0
/datum/unit_test/foundation/step_shall_return_true_on_success
diff --git a/code/unit_tests/graph_tests.dm b/code/unit_tests/graph_tests.dm
index d3adbe5210d..47cdb388f62 100644
--- a/code/unit_tests/graph_tests.dm
+++ b/code/unit_tests/graph_tests.dm
@@ -430,7 +430,7 @@
* Base Test Setup *
******************/
/datum/unit_test/graph_test
- template = /datum/unit_test/graph_test
+ abstract_type = /datum/unit_test/graph_test
async = TRUE
var/list/graphs
diff --git a/code/unit_tests/icon_tests.dm b/code/unit_tests/icon_tests.dm
index 5e4e751e6c9..8ab79c314a2 100644
--- a/code/unit_tests/icon_tests.dm
+++ b/code/unit_tests/icon_tests.dm
@@ -1,6 +1,6 @@
/datum/unit_test/icon_test
name = "ICON STATE template"
- template = /datum/unit_test/icon_test
+ abstract_type = /datum/unit_test/icon_test
/datum/unit_test/icon_test/food_shall_have_icon_states
name = "ICON STATE: Food And Drink Subtypes Shall Have Icon States"
diff --git a/code/unit_tests/integrated_circuits.dm b/code/unit_tests/integrated_circuits.dm
index 79c26d52a3a..84de2ac2ff3 100644
--- a/code/unit_tests/integrated_circuits.dm
+++ b/code/unit_tests/integrated_circuits.dm
@@ -1,5 +1,5 @@
/datum/unit_test/integrated_circuits
- template = /datum/unit_test/integrated_circuits
+ abstract_type = /datum/unit_test/integrated_circuits
/datum/unit_test/integrated_circuits/unique_names
name = "INTEGRATED CIRCUITS: Circuits must have unique names"
@@ -64,7 +64,7 @@
/datum/unit_test/integrated_circuits/input_output
name = "INTEGRATED CIRCUITS: INPUT/OUTPUT - TEMPLATE"
- template = /datum/unit_test/integrated_circuits/input_output
+ abstract_type = /datum/unit_test/integrated_circuits/input_output
var/list/all_inputs = list()
var/list/all_expected_outputs = list()
var/activation_pin = 1
diff --git a/code/unit_tests/mob_tests.dm b/code/unit_tests/mob_tests.dm
index 0228ea80341..86adfc0c9f1 100644
--- a/code/unit_tests/mob_tests.dm
+++ b/code/unit_tests/mob_tests.dm
@@ -129,7 +129,7 @@ var/global/default_mobloc = null
/datum/unit_test/mob_damage
name = "MOB: Template for mob damage"
- template = /datum/unit_test/mob_damage
+ abstract_type = /datum/unit_test/mob_damage
var/damagetype = BRUTE
var/mob_type = /mob/living/human
var/expected_vulnerability = STANDARD
diff --git a/code/unit_tests/movement_tests.dm b/code/unit_tests/movement_tests.dm
index 8d45dbe20cf..dbcb2bc4499 100644
--- a/code/unit_tests/movement_tests.dm
+++ b/code/unit_tests/movement_tests.dm
@@ -1,6 +1,6 @@
/datum/unit_test/movement
name = "MOVEMENT template"
- template = /datum/unit_test/movement
+ abstract_type = /datum/unit_test/movement
async = 0
/datum/unit_test/movement/force_move_shall_trigger_crossed_when_entering_turf
diff --git a/code/unit_tests/observation_tests.dm b/code/unit_tests/observation_tests.dm
index b9174d26fe8..829bc743576 100644
--- a/code/unit_tests/observation_tests.dm
+++ b/code/unit_tests/observation_tests.dm
@@ -4,7 +4,7 @@
/datum/unit_test/observation
name = "OBSERVATION template"
- template = /datum/unit_test/observation
+ abstract_type = /datum/unit_test/observation
async = 0
var/list/received_moves
var/list/received_name_set_events
diff --git a/code/unit_tests/override_tests.dm b/code/unit_tests/override_tests.dm
index 2c8d6bc47cc..4687b0c72aa 100644
--- a/code/unit_tests/override_tests.dm
+++ b/code/unit_tests/override_tests.dm
@@ -2,7 +2,7 @@
/datum/unit_test/override
name = "OVERRIDE template"
- template = /datum/unit_test/override
+ abstract_type = /datum/unit_test/override
/datum/unit_test/override/obj_random_shall_spawn_heaviest_item
name = "OVERRIDE: obj/random shall spawn heaviest item"
diff --git a/code/unit_tests/proximity_tests.dm b/code/unit_tests/proximity_tests.dm
index b77946ec739..b405a2c3db2 100644
--- a/code/unit_tests/proximity_tests.dm
+++ b/code/unit_tests/proximity_tests.dm
@@ -2,7 +2,7 @@
* Template Setup *
*****************/
/datum/unit_test/proximity
- template = /datum/unit_test/proximity
+ abstract_type = /datum/unit_test/proximity
var/turf/wall/wall
var/obj/proximity_listener/proximity_listener
@@ -24,7 +24,7 @@
wall.set_opacity(opacity)
/datum/unit_test/proximity/visibility
- template = /datum/unit_test/proximity/visibility
+ abstract_type = /datum/unit_test/proximity/visibility
var/list/expected_number_of_turfs_by_trigger_type
/datum/unit_test/proximity/visibility/start_test()
diff --git a/code/unit_tests/time_tests.dm b/code/unit_tests/time_tests.dm
index 2dbf636d1e9..55a17518a60 100644
--- a/code/unit_tests/time_tests.dm
+++ b/code/unit_tests/time_tests.dm
@@ -1,6 +1,6 @@
/datum/unit_test/time
name = "TIME: Template"
- template = /datum/unit_test/time
+ abstract_type = /datum/unit_test/time
/datum/unit_test/time/shall_validate_sixth_of_june
name = "TIME: Shall validate 6th of June"
diff --git a/code/unit_tests/unit_test.dm b/code/unit_tests/unit_test.dm
index 4fe4fedfdc5..24fd800c854 100644
--- a/code/unit_tests/unit_test.dm
+++ b/code/unit_tests/unit_test.dm
@@ -4,7 +4,7 @@
* For the most part I think any test can be created that doesn't require a client in a mob or require a game mode other then extended
*
* The easiest way to make effective tests is to create a "template" if you intend to run the same test over and over and make your actual
- * tests be a "child object" of those templates. Be sure and name your templates with the word "template" somewhere in var/name.
+ * tests be a "child object" of those templates. Be sure to set abstract_type on your template type.
*
* The goal is to have all sorts of tests that run and to run them as quickly as possible.
*
@@ -51,8 +51,8 @@ var/global/ascii_reset = "[ascii_esc]\[0m"
// Templates aren't intended to be ran but just serve as a way to create child objects of it with inheritable tests for quick test creation.
/datum/unit_test
+ abstract_type = /datum/unit_test
var/name = "template - should not be ran."
- var/template // Treat the unit test as a template if its type is the same as the value of this var
var/disabled = 0 // If we want to keep a unit test in the codebase but not run it for some reason.
var/async = 0 // If the check can be left to do it's own thing, you must define a check_result() proc if you use this.
var/reported = 0 // If it's reported a success or failure. Any tests that have not are assumed to be failures.
@@ -157,11 +157,10 @@ var/global/ascii_reset = "[ascii_esc]\[0m"
/proc/get_test_datums()
. = list()
- for(var/test in subtypesof(/datum/unit_test))
- var/datum/unit_test/d = test
- if(test == initial(d.template))
+ for(var/datum/unit_test/test as anything in subtypesof(/datum/unit_test))
+ if(TYPE_IS_ABSTRACT(test))
continue
- . += d
+ . += test
/proc/do_unit_test(datum/unit_test/test, end_time, skip_disabled_tests = TRUE)
if(test.disabled && skip_disabled_tests)
diff --git a/code/unit_tests/virtual_mob_tests.dm b/code/unit_tests/virtual_mob_tests.dm
index dab89f395ec..718bf010748 100644
--- a/code/unit_tests/virtual_mob_tests.dm
+++ b/code/unit_tests/virtual_mob_tests.dm
@@ -1,10 +1,10 @@
/datum/unit_test/virtual
name = "VIRTUAL: Template"
- template = /datum/unit_test/virtual
+ abstract_type = /datum/unit_test/virtual
/datum/unit_test/virtual/helper
name = "VIRTUAL: Template Helper"
- template = /datum/unit_test/virtual/helper
+ abstract_type = /datum/unit_test/virtual/helper
var/helper_proc
var/list/expected_mobs
diff --git a/code/unit_tests/zas_tests.dm b/code/unit_tests/zas_tests.dm
index b83f880bff9..7866c78bd62 100644
--- a/code/unit_tests/zas_tests.dm
+++ b/code/unit_tests/zas_tests.dm
@@ -12,7 +12,7 @@
/datum/unit_test/zas_area_test
name = "ZAS: Area Test Template"
- template = /datum/unit_test/zas_area_test
+ abstract_type = /datum/unit_test/zas_area_test
var/area_path = null // Put the area you are testing here.
var/expectation = UT_NORMAL // See defines above.
diff --git a/maps/random_ruins/space_ruins/space_ruins.dm b/maps/random_ruins/space_ruins/space_ruins.dm
index 6310e536a7e..460f5a6995a 100644
--- a/maps/random_ruins/space_ruins/space_ruins.dm
+++ b/maps/random_ruins/space_ruins/space_ruins.dm
@@ -5,6 +5,7 @@
material = /decl/material/solid/gemstone/diamond
/datum/map_template/ruin/space
+ abstract_type = /datum/map_template/ruin/space
template_categories = list(MAP_TEMPLATE_CATEGORY_SPACE)
prefix = "maps/random_ruins/space_ruins/"
cost = 1
diff --git a/mods/content/fantasy/submaps/_submaps.dm b/mods/content/fantasy/submaps/_submaps.dm
index 71cfb9e98a0..64c03240f4b 100644
--- a/mods/content/fantasy/submaps/_submaps.dm
+++ b/mods/content/fantasy/submaps/_submaps.dm
@@ -7,7 +7,6 @@
/datum/map_template/fantasy
abstract_type = /datum/map_template/fantasy
- template_parent_type = /datum/map_template/fantasy
template_flags = TEMPLATE_FLAG_CLEAR_CONTENTS | TEMPLATE_FLAG_NO_RUINS
area_usage_test_exempted_root_areas = list(
/area/fantasy/outside/point_of_interest
diff --git a/mods/content/fantasy/submaps/downlands/_downlands.dm b/mods/content/fantasy/submaps/downlands/_downlands.dm
index c97d04705d0..5086d54dc54 100644
--- a/mods/content/fantasy/submaps/downlands/_downlands.dm
+++ b/mods/content/fantasy/submaps/downlands/_downlands.dm
@@ -1,9 +1,7 @@
/datum/map_template/fantasy/downlands
abstract_type = /datum/map_template/fantasy/downlands
template_categories = list(MAP_TEMPLATE_CATEGORY_FANTASY_DOWNLANDS)
- template_parent_type = /datum/map_template/fantasy/downlands
/datum/map_template/fantasy/dungeon
abstract_type = /datum/map_template/fantasy/dungeon
template_categories = list(MAP_TEMPLATE_CATEGORY_FANTASY_DUNGEON)
- template_parent_type = /datum/map_template/fantasy/dungeon
diff --git a/mods/content/fantasy/submaps/grassland/_grassland.dm b/mods/content/fantasy/submaps/grassland/_grassland.dm
index 57fcd595c5f..19b70b9367f 100644
--- a/mods/content/fantasy/submaps/grassland/_grassland.dm
+++ b/mods/content/fantasy/submaps/grassland/_grassland.dm
@@ -1,9 +1,7 @@
/datum/map_template/fantasy/grassland
abstract_type = /datum/map_template/fantasy/grassland
template_categories = list(MAP_TEMPLATE_CATEGORY_FANTASY_GRASSLAND)
- template_parent_type = /datum/map_template/fantasy/grassland
/datum/map_template/fantasy/cavern
abstract_type = /datum/map_template/fantasy/cavern
- template_categories = list(MAP_TEMPLATE_CATEGORY_FANTASY_CAVERNS)
- template_parent_type = /datum/map_template/fantasy/cavern
\ No newline at end of file
+ template_categories = list(MAP_TEMPLATE_CATEGORY_FANTASY_CAVERNS)
\ No newline at end of file
diff --git a/mods/content/fantasy/submaps/swamp/_swamp.dm b/mods/content/fantasy/submaps/swamp/_swamp.dm
index 60ece589b4a..6a3c2054ea9 100644
--- a/mods/content/fantasy/submaps/swamp/_swamp.dm
+++ b/mods/content/fantasy/submaps/swamp/_swamp.dm
@@ -1,4 +1,3 @@
/datum/map_template/fantasy/swamp
abstract_type = /datum/map_template/fantasy/swamp
- template_categories = list(MAP_TEMPLATE_CATEGORY_FANTASY_SWAMP)
- template_parent_type = /datum/map_template/fantasy/swamp
\ No newline at end of file
+ template_categories = list(MAP_TEMPLATE_CATEGORY_FANTASY_SWAMP)
\ No newline at end of file
diff --git a/mods/content/fantasy/submaps/woods/_woods.dm b/mods/content/fantasy/submaps/woods/_woods.dm
index 657ce2c6b26..dc1429ef559 100644
--- a/mods/content/fantasy/submaps/woods/_woods.dm
+++ b/mods/content/fantasy/submaps/woods/_woods.dm
@@ -1,4 +1,3 @@
/datum/map_template/fantasy/woods
abstract_type = /datum/map_template/fantasy/woods
template_categories = list(MAP_TEMPLATE_CATEGORY_FANTASY_WOODS)
- template_parent_type = /datum/map_template/fantasy/woods
diff --git a/mods/content/psionics/system/psionics/equipment/psipower_tk.dm b/mods/content/psionics/system/psionics/equipment/psipower_tk.dm
index ee21afaa907..ee529a0d922 100644
--- a/mods/content/psionics/system/psionics/equipment/psipower_tk.dm
+++ b/mods/content/psionics/system/psionics/equipment/psipower_tk.dm
@@ -106,5 +106,4 @@
O.icon = 'icons/effects/effects.dmi'
O.icon_state = "nothing"
flick("empdisable",O)
- sleep(5)
- qdel(O)
+ QDEL_IN(src, 0.5 SECONDS)
diff --git a/mods/mobs/borers/mob/organ.dm b/mods/mobs/borers/mob/organ.dm
index c1f686ade98..80c12e77c94 100644
--- a/mods/mobs/borers/mob/organ.dm
+++ b/mods/mobs/borers/mob/organ.dm
@@ -38,5 +38,4 @@
B.leave_host()
B.ckey = last_owner.ckey
- spawn(0)
- qdel(src)
+ qdel(src)
diff --git a/mods/species/vox/datum/unit_testing.dm b/mods/species/vox/datum/unit_testing.dm
index 1026f897cad..1010d534842 100644
--- a/mods/species/vox/datum/unit_testing.dm
+++ b/mods/species/vox/datum/unit_testing.dm
@@ -4,7 +4,7 @@
/datum/unit_test/mob_damage/vox
name = "MOB: Vox damage check template"
- template = /datum/unit_test/mob_damage/vox
+ abstract_type = /datum/unit_test/mob_damage/vox
mob_type = /mob/living/human/vox
/datum/unit_test/mob_damage/vox/brute
|