From b842e3909a30d7513800e4fefe030ccb4e20560e Mon Sep 17 00:00:00 2001 From: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Date: Wed, 12 Jun 2024 22:53:58 +0100 Subject: [PATCH] [TM FOR THE LOVE OF GOD] Makes a bunch of random things initialise. (#25539) * I disabled my lunacy inhibitors * Update code/game/objects/objs.dm Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com> --------- Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> --- code/__HELPERS/unsorted.dm | 4 ---- code/game/gamemodes/cult/blood_magic.dm | 4 ++-- code/game/gamemodes/cult/cult_items.dm | 8 +++---- code/game/gamemodes/cult/ritual.dm | 4 ++-- code/game/gamemodes/cult/runes.dm | 12 +++++------ .../miniantags/abduction/abduction_gear.dm | 8 +++---- .../miniantags/abduction/machinery/pad.dm | 4 ++-- code/game/machinery/portable_turret.dm | 2 +- code/game/objects/objs.dm | 21 +++++++++---------- 9 files changed, 31 insertions(+), 36 deletions(-) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 3182629e953..2ada9d04ea6 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1344,10 +1344,6 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new) simulated = 0 see_in_dark = 1e6 -/mob/dview/New() //For whatever reason, if this isn't called, then BYOND will throw a type mismatch runtime when attempting to add this to the mobs list. -Fox - SHOULD_CALL_PARENT(FALSE) - return - /mob/dview/Destroy() SHOULD_CALL_PARENT(FALSE) // should never be deleted diff --git a/code/game/gamemodes/cult/blood_magic.dm b/code/game/gamemodes/cult/blood_magic.dm index 5a62abbd8c1..aada8ca02f5 100644 --- a/code/game/gamemodes/cult/blood_magic.dm +++ b/code/game/gamemodes/cult/blood_magic.dm @@ -406,12 +406,12 @@ var/health_cost = 0 //The amount of health taken from the user when invoking the spell var/datum/action/innate/cult/blood_spell/source -/obj/item/melee/blood_magic/New(loc, spell) +/obj/item/melee/blood_magic/Initialize(mapload, spell) + . = ..() if(has_source) source = spell uses = source.charges health_cost = source.health_cost - ..() /obj/item/melee/blood_magic/Destroy() if(has_source && !QDELETED(source)) diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm index f8a3ca79d77..7456d2ea38a 100644 --- a/code/game/gamemodes/cult/cult_items.dm +++ b/code/game/gamemodes/cult/cult_items.dm @@ -6,9 +6,9 @@ throw_range = 5 w_class = WEIGHT_CLASS_SMALL -/obj/item/tome/New() +/obj/item/tome/Initialize(mapload) + . = ..() icon_state = GET_CULT_DATA(tome_icon, "tome") - ..() /obj/item/melee/cultblade name = "cult blade" @@ -24,10 +24,10 @@ attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") sprite_sheets_inhand = list("Skrell" = 'icons/mob/clothing/species/skrell/held.dmi') // To stop skrell stabbing themselves in the head -/obj/item/melee/cultblade/New() +/obj/item/melee/cultblade/Initialize(mapload) + . = ..() icon_state = GET_CULT_DATA(sword_icon, "blood_blade") item_state = GET_CULT_DATA(sword_icon, "blood_blade") - ..() /obj/item/melee/cultblade/examine(mob/user) . = ..() diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index b8134a23466..03647190c90 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -20,8 +20,8 @@ force = 16 scribe_multiplier = 0.1 -/obj/item/melee/cultblade/dagger/New() - ..() +/obj/item/melee/cultblade/dagger/Initialize(mapload) + . = ..() icon_state = GET_CULT_DATA(dagger_icon, "blood_dagger") item_state = GET_CULT_DATA(dagger_icon, "blood_dagger") diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 29af4cc5ffc..1acfaf66bd7 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -57,8 +57,8 @@ To draw a rune, use a ritual dagger. /// The color of the rune. (Based on species blood color) var/rune_blood_color = COLOR_BLOOD_BASE -/obj/effect/rune/New(loc, set_keyword) - ..() +/obj/effect/rune/Initialize(mapload, set_keyword) + . = ..() if(set_keyword) keyword = set_keyword var/image/blood = image(loc = src) @@ -440,8 +440,8 @@ structure_check() searches for nearby cultist structures required for the invoca var/obj/effect/temp_visual/cult/rune_spawn/rune2/outer_portal var/listkey -/obj/effect/rune/teleport/New(loc, set_keyword) - ..() +/obj/effect/rune/teleport/Initialize(mapload, set_keyword) + . = ..() var/area/A = get_area(src) var/locname = initial(A.name) listkey = set_keyword ? "[set_keyword] [locname]":"[locname]" @@ -1043,8 +1043,8 @@ structure_check() searches for nearby cultist structures required for the invoca scribe_damage = 10 //how much damage you take doing it var/used = FALSE -/obj/effect/rune/narsie/New() - ..() +/obj/effect/rune/narsie/Initialize(mapload) + . = ..() cultist_name = "Summon [GET_CULT_DATA(entity_name, "your god")]" cultist_desc = "tears apart dimensional barriers, calling forth [GET_CULT_DATA(entity_title3, "your god")]." diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm index 6e7eefce904..d4b73934eb1 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm @@ -427,12 +427,12 @@ CONTENTS: item_state = "abductor_headset" ks2type = /obj/item/encryptionkey/heads/captain -/obj/item/radio/headset/abductor/New() - ..() - make_syndie() +/obj/item/radio/headset/abductor/Initialize() + . = ..() + make_syndie() // Why the hell is this a proc why cant it just be a subtype /obj/item/radio/headset/abductor/screwdriver_act() - return// Stops humans from disassembling abductor headsets. + return // Stops humans from disassembling abductor headsets. ///////////////////////////////////////// ///////////// SCIENTIST GEAR //////////// diff --git a/code/game/gamemodes/miniantags/abduction/machinery/pad.dm b/code/game/gamemodes/miniantags/abduction/machinery/pad.dm index 57e91341865..38cf4478ad5 100644 --- a/code/game/gamemodes/miniantags/abduction/machinery/pad.dm +++ b/code/game/gamemodes/miniantags/abduction/machinery/pad.dm @@ -51,6 +51,6 @@ icon_state = "teleport" duration = 80 -/obj/effect/temp_visual/teleport_abductor/New() +/obj/effect/temp_visual/teleport_abductor/Initialize(mapload) + . = ..() do_sparks(10, 0, loc) - ..() diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 9954d7b9eca..1f585c9ffe1 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -384,7 +384,7 @@ GLOBAL_LIST_EMPTY(turret_icons) else if(allowed(user)) locked = !locked to_chat(user, "Controls are now [locked ? "locked" : "unlocked"].") - updateUsrDialog() + SStgui.update_uis(src) else to_chat(user, "Access denied.") diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 78cb8a28cfd..77878294b5a 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -39,17 +39,6 @@ var/list/req_one_access = null var/req_one_access_txt = "0" -/obj/New() - ..() - if(obj_integrity == null) - obj_integrity = max_integrity - if(on_blueprints && isturf(loc)) - var/turf/T = loc - if(force_blueprints) - T.add_blueprints(src) - else - T.add_blueprints_preround(src) - /obj/Initialize(mapload) . = ..() if(islist(armor)) @@ -61,6 +50,15 @@ if(sharp) AddComponent(/datum/component/surgery_initiator) + if(obj_integrity == null) + obj_integrity = max_integrity + if(on_blueprints && isturf(loc)) + var/turf/T = loc + if(force_blueprints) + T.add_blueprints(src) + else + T.add_blueprints_preround(src) + /obj/Topic(href, href_list, nowindow = FALSE, datum/ui_state/state = GLOB.default_state) // Calling Topic without a corresponding window open causes runtime errors if(!nowindow && ..()) @@ -86,6 +84,7 @@ if(!ismachinery(src)) if(!speed_process) STOP_PROCESSING(SSobj, src) // TODO: Have a processing bitflag to reduce on unnecessary loops through the processing lists + // AA 2024-05-20 - processing var????? else STOP_PROCESSING(SSfastprocess, src) return ..()