mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
LateInitialize is not allowed to call parent anymore (#82540)
## About The Pull Request I've seen a few cases in the past where LateInitialize is done cause of the init return value being set to do so for no real reason, I thought I should try to avoid that by ensuring LateInitialize isn't ever called without overriding. This fixes a ton of machine's LateInitialize not calling parent (mechpad, door buttons, message monitor, a lot of tram machines, abductor console, holodeck computer & disposal bin), avoiding having to set itself up to be connected to power. If they were intended to not connect to power, they should be using ``NO_POWER_USE`` instead. Also removes a ton of returns to LateInit when it's already getting it from parent regardless (many cases of that in machine code). ## Why It's Good For The Game I think this is better for coding standard reasons as well as just making sure we're not calling this proc on things that does absolutely nothing with them. A machine not using power can be seen evidently not using power with ``NO_POWER_USE``, not so much if it's LateInitialize not calling parent. ## Changelog 🆑 fix: Mech pads, door buttons, message monitors, tram machines, abductor consoles & holodeck computers now use power. /🆑
This commit is contained in:
@@ -191,7 +191,6 @@
|
||||
|
||||
// Late init so that we can wait for air to exist in lazyloaded templates
|
||||
/obj/structure/bonfire/prelit/LateInitialize()
|
||||
. = ..()
|
||||
start_burning()
|
||||
|
||||
#undef BONFIRE_FIRE_STACK_STRENGTH
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/structure/broken_flooring/LateInitialize()
|
||||
. = ..()
|
||||
var/turf/turf = get_turf(src)
|
||||
if(!isplatingturf(turf) && !always_floorplane) // Render as trash if not on plating
|
||||
plane = GAME_PLANE
|
||||
|
||||
@@ -163,7 +163,6 @@ GLOBAL_LIST_EMPTY(roundstart_station_closets)
|
||||
update_appearance()
|
||||
|
||||
/obj/structure/closet/LateInitialize()
|
||||
. = ..()
|
||||
if(!opened && is_maploaded)
|
||||
take_contents()
|
||||
|
||||
|
||||
@@ -46,20 +46,20 @@
|
||||
var/static/list/crate_paint_jobs
|
||||
if(isnull(crate_paint_jobs))
|
||||
crate_paint_jobs = list(
|
||||
"Internals" = list("icon_state" = "o2crate"),
|
||||
"Medical" = list("icon_state" = "medical"),
|
||||
"Medical Plus" = list("icon_state" = "medicalcrate"),
|
||||
"Radiation" = list("icon_state" = "radiation"),
|
||||
"Hydrophonics" = list("icon_state" = "hydrocrate"),
|
||||
"Science" = list("icon_state" = "scicrate"),
|
||||
"Robotics" = list("icon_state" = "robo"),
|
||||
"Solar" = list("icon_state" = "engi_e_crate"),
|
||||
"Engineering" = list("icon_state" = "engi_crate"),
|
||||
"Atmospherics" = list("icon_state" = "atmos"),
|
||||
"Cargo" = list("icon_state" = "cargo"),
|
||||
"Mining" = list("icon_state" = "mining"),
|
||||
"Command" = list("icon_state" = "centcom")
|
||||
)
|
||||
"Internals" = list("icon_state" = "o2crate"),
|
||||
"Medical" = list("icon_state" = "medical"),
|
||||
"Medical Plus" = list("icon_state" = "medicalcrate"),
|
||||
"Radiation" = list("icon_state" = "radiation"),
|
||||
"Hydrophonics" = list("icon_state" = "hydrocrate"),
|
||||
"Science" = list("icon_state" = "scicrate"),
|
||||
"Robotics" = list("icon_state" = "robo"),
|
||||
"Solar" = list("icon_state" = "engi_e_crate"),
|
||||
"Engineering" = list("icon_state" = "engi_crate"),
|
||||
"Atmospherics" = list("icon_state" = "atmos"),
|
||||
"Cargo" = list("icon_state" = "cargo"),
|
||||
"Mining" = list("icon_state" = "mining"),
|
||||
"Command" = list("icon_state" = "centcom"),
|
||||
)
|
||||
if(paint_jobs)
|
||||
paint_jobs = crate_paint_jobs
|
||||
|
||||
|
||||
@@ -190,13 +190,11 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an
|
||||
/// Minimum temperature of the internal air mixture
|
||||
var/minimum_temperature = T0C - 60
|
||||
|
||||
|
||||
/obj/structure/bodycontainer/morgue/Initialize(mapload)
|
||||
..()
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/structure/bodycontainer/morgue/LateInitialize()
|
||||
. = ..()
|
||||
var/datum/gas_mixture/external_air = loc.return_air()
|
||||
if(external_air)
|
||||
internal_air = external_air.copy()
|
||||
|
||||
@@ -35,8 +35,7 @@
|
||||
. = ..()
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/structure/plaque/static_plaque/tram/LateInitialize(mapload)
|
||||
. = ..()
|
||||
/obj/structure/plaque/static_plaque/tram/LateInitialize()
|
||||
link_tram()
|
||||
set_tram_serial()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user