mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 05:27:01 +01:00
Removes the need for ComponentInitialize (#18833)
* removes `ComponentInitialize` * mapload * add back CRASH
This commit is contained in:
@@ -4,11 +4,8 @@
|
||||
layer = TURF_DECAL_LAYER
|
||||
|
||||
/obj/effect/turf_decal/Initialize(mapload)
|
||||
. = ..()
|
||||
qdel(src) // return INITIALIZE_HINT_QDEL <-- Doesn't work
|
||||
|
||||
/obj/effect/turf_decal/ComponentInitialize()
|
||||
. = ..()
|
||||
..()
|
||||
. = INITIALIZE_HINT_QDEL
|
||||
var/turf/T = loc
|
||||
if(!istype(T)) //you know this will happen somehow
|
||||
CRASH("Turf decal initialized in an object/nullspace")
|
||||
|
||||
@@ -572,7 +572,7 @@
|
||||
name = "grumpy fox"
|
||||
desc = "An ancient plushie that seems particularly grumpy."
|
||||
|
||||
/obj/item/toy/plushie/orange_fox/grump/ComponentInitialize()
|
||||
/obj/item/toy/plushie/orange_fox/grump/Initialize(mapload)
|
||||
. = ..()
|
||||
var/static/list/grumps = list("Ahh, yes, you're so clever, var editing that.", "Really?", "If you make a runtime with var edits, it's your own damn fault.",
|
||||
"Don't you dare post issues on the git when you don't even know how this works.", "Was that necessary?", "Ohhh, setting admin edited var must be your favorite pastime!",
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
var/armed = FALSE
|
||||
var/timepassed = 0
|
||||
|
||||
/obj/item/caution/proximity_sign/ComponentInitialize()
|
||||
/obj/item/caution/proximity_sign/Initialize(mapload)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/proximity_monitor)
|
||||
|
||||
|
||||
@@ -29,10 +29,8 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/grown/bananapeel/traitorpeel/New(newloc, obj/item/seeds/new_seed)
|
||||
/obj/item/grown/bananapeel/traitorpeel/Initialize(mapload)
|
||||
. = ..()
|
||||
// The reason this AddComponent is here and not in ComponentInitialize() is because if it's put there, it will be ran before the parent New proc for /grown types.
|
||||
// And then be overriden by the generic component placed onto it by the `/datum/plant_gene/trait/slip`.
|
||||
AddComponent(/datum/component/slippery, src, 14 SECONDS, 100, 4, FALSE)
|
||||
|
||||
/obj/item/grown/bananapeel/traitorpeel/after_slip(mob/living/carbon/human/H)
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
discrete = 1
|
||||
var/cleanspeed = 50 //slower than mop
|
||||
|
||||
/obj/item/soap/ComponentInitialize()
|
||||
/obj/item/soap/Initialize(mapload)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/slippery, src, 8 SECONDS, 100, 0, FALSE)
|
||||
|
||||
/obj/item/soap/afterattack(atom/target, mob/user, proximity)
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
layer = 9
|
||||
|
||||
//Adds the transparency component, exists to be overridden for different args.
|
||||
/obj/structure/flora/tree/ComponentInitialize()
|
||||
/obj/structure/flora/tree/Initialize(mapload)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/largetransparency)
|
||||
|
||||
/obj/structure/flora/tree/pine
|
||||
@@ -32,7 +33,8 @@
|
||||
icon = 'icons/obj/flora/deadtrees.dmi'
|
||||
icon_state = "tree_1"
|
||||
|
||||
/obj/structure/flora/tree/dead/ComponentInitialize()
|
||||
/obj/structure/flora/tree/dead/Initialize(mapload)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/largetransparency, 0, 1, 0, 0)
|
||||
|
||||
/obj/structure/flora/tree/dead/Initialize(mapload)
|
||||
@@ -57,10 +59,8 @@
|
||||
pixel_y = -20
|
||||
|
||||
/obj/structure/flora/tree/jungle/Initialize(mapload)
|
||||
icon_state = "[icon_state][rand(1, 6)]"
|
||||
. = ..()
|
||||
|
||||
/obj/structure/flora/tree/jungle/ComponentInitialize()
|
||||
icon_state = "[icon_state][rand(1, 6)]"
|
||||
AddComponent(/datum/component/largetransparency, -1, 1, 2, 2)
|
||||
|
||||
/obj/structure/flora/tree/jungle/small
|
||||
@@ -68,7 +68,8 @@
|
||||
pixel_x = -32
|
||||
icon = 'icons/obj/flora/jungletreesmall.dmi'
|
||||
|
||||
/obj/structure/flora/tree/jungle/small/ComponentInitialize()
|
||||
/obj/structure/flora/tree/jungle/small/Initialize(mapload)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/largetransparency)
|
||||
|
||||
//grass
|
||||
|
||||
Reference in New Issue
Block a user