Skip to content

Commit

Permalink
Fixes several bad inits (#2605)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bokkiewokkie authored Mar 29, 2024
1 parent 38f9b33 commit 192b80b
Show file tree
Hide file tree
Showing 18 changed files with 27 additions and 35 deletions.
1 change: 1 addition & 0 deletions code/_onclick/hud/parallax.dm
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@
icon_state = "random_layer1"

/atom/movable/screen/parallax_layer/random/space_gas/Initialize(mapload, view)
. = ..()
src.add_atom_colour(SSparallax.random_parallax_color, ADMIN_COLOUR_PRIORITY)

/atom/movable/screen/parallax_layer/random/asteroids
Expand Down
3 changes: 2 additions & 1 deletion code/controllers/subsystem/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ SUBSYSTEM_DEF(atoms)
qdeleted = TRUE
else
BadInitializeCalls[the_type] |= BAD_INIT_NO_HINT

if(qdeleted) //you are GONE (nsv13, but fine to replace in update)
return TRUE
if(!A) //possible harddel
qdeleted = TRUE
else if(!(A.flags_1 & INITIALIZED_1))
Expand Down
2 changes: 1 addition & 1 deletion code/datums/mutations/antenna.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
icon_state = "walkietalkie"

/obj/item/implant/radio/antenna/Initialize(mapload)
..()
. = ..()
radio.name = "internal antenna"

/datum/mutation/antenna/on_acquiring(mob/living/carbon/owner)
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/bedsheets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET

/obj/item/bedsheet/double/Initialize()
..()
. = ..()
desc += " This one is double."

/obj/item/bedsheet/double/blue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
..()

/obj/structure/closet/secure_closet/freezer/Initialize(mapload)
..()
. = ..()
recursive_organ_check(src)

/obj/structure/closet/secure_closet/freezer/open(mob/living/user)
Expand Down
4 changes: 1 addition & 3 deletions code/game/objects/structures/crates_lockers/crates.dm
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,9 @@
return ..()

/obj/structure/closet/crate/freezer/Initialize(mapload)
..()
. = ..()
recursive_organ_check(src)



/obj/structure/closet/crate/freezer/blood
name = "blood freezer"
desc = "A freezer containing packs of blood."
Expand Down
2 changes: 1 addition & 1 deletion code/modules/surgery/bodyparts/bodyparts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
var/heavy_burn_msg = "peeling away"

/obj/item/bodypart/Initialize(mapload)
..()
. = ..()
name = "[limb_id] [parse_zone(body_zone)]"
if(is_dimorphic)
limb_gender = pick("m", "f")
Expand Down
6 changes: 3 additions & 3 deletions code/modules/xenoarchaeology/xenoartifact.dm
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@
if(prob(1))
material = pick(XENOA_PLASMA, XENOA_URANIUM, XENOA_BANANIUM)
difficulty = material
..()
. = ..()

/datum/component/xenoartifact_pricing ///Pricing component for shipping solution. Consider swapping to cargo after change.
///Buying and selling related, based on guess qaulity
Expand All @@ -434,7 +434,7 @@

/datum/component/xenoartifact_pricing/Initialize(...)
RegisterSignal(parent, XENOA_CHANGE_PRICE, PROC_REF(update_price))
..()
. = ..()

/datum/component/xenoartifact_pricing/Destroy(force, silent)
UnregisterSignal(parent, XENOA_CHANGE_PRICE)
Expand All @@ -447,7 +447,7 @@
///Objective version for exploration
/obj/item/xenoartifact/objective/Initialize(mapload, difficulty)
traits += new /datum/xenoartifact_trait/special/objective
..()
. = ..()

/obj/item/xenoartifact/objective/ComponentInitialize()
AddComponent(/datum/component/gps, "[scramble_message_replace_chars("#########", 100)]", TRUE)
Expand Down
3 changes: 0 additions & 3 deletions nsv13/code/modules/munitions/ammunition/gauss_ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@
var/goal = 45 SECONDS
var/ready = FALSE

/obj/machinery/gauss_dispenser/Initialize(mapload)
. = ..()

/obj/machinery/gauss_dispenser/RefreshParts()
progress_rate = 0 SECONDS
for(var/obj/item/stock_parts/S in component_parts)
Expand Down
2 changes: 1 addition & 1 deletion nsv13/code/modules/munitions/ammunition/railgun_ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
projectile_type = /obj/item/projectile/bullet/railgun_slug

/obj/item/ship_weapon/ammunition/railgun_ammo/Initialize(mapload)
..()
. = ..()
AddComponent(/datum/component/two_handed, require_twohands=TRUE)

/obj/item/ship_weapon/ammunition/railgun_ammo/uranium
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
bound_x = -64

/obj/machinery/ship_weapon/torpedo_launcher/cargo/Initialize(mapload)
..()

. = ..()
if(!linked_dradis)
if(launcher_id) //If mappers set an ID
for(var/obj/machinery/computer/ship/dradis/minor/cargo/W in GLOB.machines)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,7 @@
return INITIALIZE_HINT_LATELOAD

/obj/machinery/ship_weapon/deck_turret/LateInitialize()
. = ..()
link_via_id()

/obj/machinery/ship_weapon/deck_turret/RefreshParts()//using this proc to create the parts instead
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
var/output_path = /obj/machinery/ship_weapon/deck_turret

/obj/structure/ship_weapon/artillery_frame/Initialize(mapload)
..()
. = ..()
LAZYINITLIST(contents)

/obj/structure/ship_weapon/artillery_frame/examine(mob/user)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@
var/list/linked_sorters = list()

/obj/machinery/computer/ammo_sorter/Initialize(mapload, obj/item/circuitboard/C)
..()
. = ..()
if(mapload)
return INITIALIZE_HINT_LATELOAD

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
bound_x = -64

/obj/machinery/ship_weapon/torpedo_launcher/Initialize(mapload)
..()
. = ..()
component_parts = list()
component_parts += new/obj/item/ship_weapon/parts/firing_electronics

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
righthand_file = 'nsv13/icons/mob/inhands/weapons/bombs_righthand.dmi'

/obj/item/ship_weapon/parts/loading_tray/Initialize(mapload)
..()
. = ..()
AddComponent(/datum/component/two_handed, require_twohands=TRUE)

/**
Expand All @@ -46,7 +46,7 @@
righthand_file = 'nsv13/icons/mob/inhands/weapons/bombs_righthand.dmi'

/obj/item/ship_weapon/parts/railgun_rail/Initialize(mapload)
..()
. = ..()
AddComponent(/datum/component/two_handed, require_twohands=TRUE)

/**
Expand All @@ -61,7 +61,7 @@
righthand_file = 'nsv13/icons/mob/inhands/weapons/bombs_righthand.dmi'

/obj/item/ship_weapon/parts/mac_barrel/Initialize(mapload)
..()
. = ..()
AddComponent(/datum/component/two_handed, require_twohands=TRUE)

/obj/item/ship_weapon/parts/broadside_casing
Expand Down
7 changes: 1 addition & 6 deletions nsv13/code/modules/overmap/effects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
anchored = TRUE

/obj/effect/particle_effect/phoron_explosion/Initialize(mapload)
..()
return INITIALIZE_HINT_LATELOAD

/obj/effect/particle_effect/phoron_explosion/LateInitialize()
. = ..()
QDEL_IN(src, 1.5 SECONDS)

/obj/effect/particle_effect/phoron_explosion/Destroy()
return ..()
12 changes: 6 additions & 6 deletions nsv13/code/modules/overmap/starmap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
var/datum/star_system/selected_system = null
var/screen = STARMAP
var/can_control_ship = TRUE
var/current_sector = 2
var/current_sector = SECTOR_NEUTRAL
circuit = /obj/item/circuitboard/computer/ship/navigation

/obj/machinery/computer/ship/navigation/LateInitialize()
Expand Down Expand Up @@ -154,11 +154,11 @@
if(system.is_hypergate)
label += " HYPERGATE"
if(system.is_capital && !label)
label = "CAPITAL"
if(system.trader && system.sector != 3) //Use shortnames in brazil for readability
label = " [system.trader.name]"
if(system.trader && system.sector == 3) //Use shortnames in brazil for readability
label = " [system.trader.shortname]"
label += "CAPITAL"
if(system.trader && system.sector != SECTOR_NEUTRAL) //Use shortnames in brazil for readability
label += " [system.trader.name]"
if(system.trader && system.sector == SECTOR_NEUTRAL) //Use shortnames in brazil for readability
label += " [system.trader.shortname]"
if(system.mission_sector)
label += " OCCUPIED"
if(system.objective_sector)
Expand Down

0 comments on commit 192b80b

Please sign in to comment.