diff --git a/code/controllers/subsystem/activity.dm b/code/controllers/subsystem/activity.dm index 0a8d248e58..d10e67f210 100644 --- a/code/controllers/subsystem/activity.dm +++ b/code/controllers/subsystem/activity.dm @@ -11,6 +11,7 @@ SUBSYSTEM_DEF(activity) /datum/controller/subsystem/activity/Initialize(timeofday) RegisterSignal(SSdcs,COMSIG_GLOB_EXPLOSION,.proc/on_explosion) RegisterSignal(SSdcs,COMSIG_GLOB_MOB_DEATH,.proc/on_death) + return ..() /datum/controller/subsystem/activity/fire(resumed = 0) calculate_threat() @@ -54,7 +55,10 @@ SUBSYSTEM_DEF(activity) var/weight = (text2num(threat_history[i+1])-text2num(threat_history[i])) total_weight += weight total_amt += weight * (threat_history[threat_history[i]]) - return round(total_amt / total_weight,0.1) + if(total_weight == 0) + return total_amt + else + return round(total_amt / total_weight,0.1) /datum/controller/subsystem/activity/proc/get_max_threat() . = 0 diff --git a/code/controllers/subsystem/research.dm b/code/controllers/subsystem/research.dm index ac9db60ccc..946980389c 100644 --- a/code/controllers/subsystem/research.dm +++ b/code/controllers/subsystem/research.dm @@ -409,8 +409,7 @@ SUBSYSTEM_DEF(research) var/datum/techweb_node/TN = techweb_nodes[id] TN.Initialize() techweb_nodes = returned - if (!verify_techweb_nodes()) //Verify all nodes have ids and such. - stack_trace("Invalid techweb nodes detected") + verify_techweb_nodes() calculate_techweb_nodes() calculate_techweb_boost_list() if (!verify_techweb_nodes()) //Verify nodes and designs have been crosslinked properly. @@ -442,52 +441,52 @@ SUBSYSTEM_DEF(research) for(var/n in techweb_nodes) var/datum/techweb_node/N = techweb_nodes[n] if(!istype(N)) - WARNING("Invalid research node with ID [n] detected and removed.") + stack_trace("Invalid research node with ID [n] detected and removed.") techweb_nodes -= n research_node_id_error(n) . = FALSE for(var/p in N.prereq_ids) var/datum/techweb_node/P = techweb_nodes[p] if(!istype(P)) - WARNING("Invalid research prerequisite node with ID [p] detected in node [N.display_name]\[[N.id]\] removed.") + stack_trace("Invalid research prerequisite node with ID [p] detected in node [N.display_name]\[[N.id]\] removed.") N.prereq_ids -= p research_node_id_error(p) . = FALSE for(var/d in N.design_ids) var/datum/design/D = techweb_designs[d] if(!istype(D)) - WARNING("Invalid research design with ID [d] detected in node [N.display_name]\[[N.id]\] removed.") + stack_trace("Invalid research design with ID [d] detected in node [N.display_name]\[[N.id]\] removed.") N.design_ids -= d design_id_error(d) . = FALSE for(var/u in N.unlock_ids) var/datum/techweb_node/U = techweb_nodes[u] if(!istype(U)) - WARNING("Invalid research unlock node with ID [u] detected in node [N.display_name]\[[N.id]\] removed.") + stack_trace("Invalid research unlock node with ID [u] detected in node [N.display_name]\[[N.id]\] removed.") N.unlock_ids -= u research_node_id_error(u) . = FALSE for(var/p in N.boost_item_paths) if(!ispath(p)) N.boost_item_paths -= p - WARNING("[p] is not a valid path.") + stack_trace("[p] is not a valid path.") node_boost_error(N.id, "[p] is not a valid path.") . = FALSE var/list/points = N.boost_item_paths[p] if(islist(points)) for(var/i in points) if(!isnum(points[i])) - WARNING("[points[i]] is not a valid number.") + stack_trace("[points[i]] is not a valid number.") node_boost_error(N.id, "[points[i]] is not a valid number.") . = FALSE else if(!point_types[i]) - WARNING("[i] is not a valid point type.") + stack_trace("[i] is not a valid point type.") node_boost_error(N.id, "[i] is not a valid point type.") . = FALSE else if(!isnull(points)) N.boost_item_paths -= p node_boost_error(N.id, "No valid list.") - WARNING("No valid list.") + stack_trace("No valid list.") . = FALSE CHECK_TICK diff --git a/code/controllers/subsystem/title.dm b/code/controllers/subsystem/title.dm index 996f73ccf6..ee2bfd354d 100644 --- a/code/controllers/subsystem/title.dm +++ b/code/controllers/subsystem/title.dm @@ -10,7 +10,7 @@ SUBSYSTEM_DEF(title) /datum/controller/subsystem/title/Initialize() if(file_path && icon) - return + return ..() if(fexists("data/previous_title.dat")) var/previous_path = file2text("data/previous_title.dat") @@ -31,15 +31,13 @@ SUBSYSTEM_DEF(title) if(length(title_screens)) file_path = "[global.config.directory]/title_screens/images/[pick(title_screens)]" - if(!file_path) + if(!file_path || !fexists(file_path)) file_path = "icons/default_title.dmi" - ASSERT(fexists(file_path)) - - icon = new(fcopy_rsc(file_path)) - - if(splash_turf) - splash_turf.icon = icon + if(fexists(file_path)) + icon = new(fcopy_rsc(file_path)) + if(splash_turf) + splash_turf.icon = icon return ..() diff --git a/code/datums/elements/trash.dm b/code/datums/elements/trash.dm index 3a4d5b0150..a83889c6ca 100644 --- a/code/datums/elements/trash.dm +++ b/code/datums/elements/trash.dm @@ -1,5 +1,5 @@ /datum/element/trash - element_flags = ELEMENT_BESPOKE|ELEMENT_DETACH + element_flags = ELEMENT_DETACH /datum/element/trash/Attach(datum/target) . = ..() diff --git a/code/game/objects/effects/decals/cleanable/humans.dm b/code/game/objects/effects/decals/cleanable/humans.dm index bd32ddadf3..e5ccd9f21a 100644 --- a/code/game/objects/effects/decals/cleanable/humans.dm +++ b/code/game/objects/effects/decals/cleanable/humans.dm @@ -53,7 +53,7 @@ bloodiness = 0 /obj/effect/decal/cleanable/blood/old/Initialize(mapload, list/datum/disease/diseases) - ..() + . = ..() icon_state += "-old" add_blood_DNA(list("Non-human DNA" = "A+")) diff --git a/code/game/objects/items/manuals.dm b/code/game/objects/items/manuals.dm index 0673e1d489..05b7ef4802 100644 --- a/code/game/objects/items/manuals.dm +++ b/code/game/objects/items/manuals.dm @@ -337,7 +337,7 @@ page_link = "Guide_to_chemistry" /obj/item/book/manual/wiki/chemistry/Initialize() - ..() + . = ..() new /obj/item/book/manual/wiki/cit/chemistry(loc) new /obj/item/book/manual/wiki/cit/chem_recipies(loc) diff --git a/code/game/objects/items/plushes.dm b/code/game/objects/items/plushes.dm index 31481f58cf..13ababa0d5 100644 --- a/code/game/objects/items/plushes.dm +++ b/code/game/objects/items/plushes.dm @@ -466,7 +466,7 @@ GLOBAL_LIST_INIT(valid_plushie_paths, valid_plushie_paths()) can_random_spawn = FALSE /obj/item/toy/plush/random/Initialize() - SHOULD_CALL_PARENT(FALSE) + ..() var/newtype var/list/snowflake_list = CONFIG_GET(keyed_list/snowflake_plushies) diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index d126e39873..266d8b7b86 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -48,7 +48,7 @@ amount -= max_amount new type(loc, max_amount, FALSE) if(!merge_type) - merge_type = type + merge_type = src.type if(LAZYLEN(mats_per_unit)) set_mats_per_unit(mats_per_unit, 1) diff --git a/code/modules/clothing/suits/cloaks.dm b/code/modules/clothing/suits/cloaks.dm index b56f689979..b41cab06d9 100644 --- a/code/modules/clothing/suits/cloaks.dm +++ b/code/modules/clothing/suits/cloaks.dm @@ -103,7 +103,7 @@ . = ..() AddElement(/datum/element/polychromic, poly_colors, 3) -/obj/item/clothing/neck/cancloak/polychromic +/obj/item/clothing/neck/cloak/cancloak/polychromic name = "canvas cloak" desc = "A rugged cloak made of canvas." icon_state = "cancloak" diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index f97ef17364..5f0c01a5c8 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -468,7 +468,7 @@ /obj/item/reagent_containers/medspray/sterilizine = 1) /obj/machinery/smartfridge/organ/preloaded/Initialize() - ..() + . = ..() var/list = list(/obj/item/organ/tongue, /obj/item/organ/brain, /obj/item/organ/heart, /obj/item/organ/liver, /obj/item/organ/ears, /obj/item/organ/eyes, /obj/item/organ/tail, /obj/item/organ/stomach) var/newtype = pick(list) load(new newtype(src.loc)) diff --git a/code/modules/integrated_electronics/subtypes/atmospherics.dm b/code/modules/integrated_electronics/subtypes/atmospherics.dm index 600f5113e1..b3056d46cf 100644 --- a/code/modules/integrated_electronics/subtypes/atmospherics.dm +++ b/code/modules/integrated_electronics/subtypes/atmospherics.dm @@ -19,7 +19,7 @@ /obj/item/integrated_circuit/atmospherics/Initialize() air_contents = new(volume) - ..() + return ..() /obj/item/integrated_circuit/atmospherics/return_air() return air_contents diff --git a/code/modules/projectiles/guns/misc/syringe_gun.dm b/code/modules/projectiles/guns/misc/syringe_gun.dm index dc2a1df03a..39b7cbf540 100644 --- a/code/modules/projectiles/guns/misc/syringe_gun.dm +++ b/code/modules/projectiles/guns/misc/syringe_gun.dm @@ -114,7 +114,7 @@ can_unsuppress = FALSE /obj/item/gun/syringe/dart/Initialize() - ..() + . = ..() chambered = new /obj/item/ammo_casing/syringegun/dart(src) /obj/item/gun/syringe/dart/attackby(obj/item/A, mob/user, params, show_msg = TRUE) diff --git a/code/modules/unit_tests/keybinding_init.dm b/code/modules/unit_tests/keybinding_init.dm index 2bd2fdee1e..16141bc553 100644 --- a/code/modules/unit_tests/keybinding_init.dm +++ b/code/modules/unit_tests/keybinding_init.dm @@ -3,4 +3,4 @@ var/datum/keybinding/KB = i if(initial(KB.keybind_signal) || !initial(KB.name)) continue - Fail("[KB.name] does not have a keybind signal defined.") + Fail("[initial(KB.name)] does not have a keybind signal defined.") diff --git a/code/modules/unit_tests/merge_type.dm b/code/modules/unit_tests/merge_type.dm index ba3cfcf492..1aed82e6a3 100644 --- a/code/modules/unit_tests/merge_type.dm +++ b/code/modules/unit_tests/merge_type.dm @@ -10,6 +10,6 @@ var/list/paths = subtypesof(/obj/item/stack) - blacklist for(var/stackpath in paths) - var/obj/item/stack/stack = stackpath - if(!initial(stack.merge_type)) + var/obj/item/stack/stack = new stackpath + if(!stack.merge_type) Fail("([stack]) lacks set merge_type variable!")