mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Replaces ComponentInitialize with Initialize (#19164)
* Removes ComponentInitialize Removes ComponentInitialize in favor of using Initialize instead, removing the 4 instances that call ComponentInitialize on everything. Also makes the EMP-proof cell EMP-proof, with some minor code adjustments to stasis component (no in-game changes). * Adds parent calls to structures * Update tables_racks.dm
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
icon_state = "monkeycubebox"
|
||||
illustration = null
|
||||
|
||||
/obj/item/storage/box/goatcubes/ComponentInitialize()
|
||||
/obj/item/storage/box/goatcubes/Initialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 4
|
||||
@@ -12,4 +12,4 @@
|
||||
|
||||
/obj/item/storage/box/goatcubes/PopulateContents()
|
||||
for(var/i in 2 to 4)
|
||||
new /obj/item/reagent_containers/food/snacks/monkeycube/goat(src)
|
||||
new /obj/item/reagent_containers/food/snacks/monkeycube/goat(src)
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
))
|
||||
|
||||
/obj/item/storage/belt/tool_switcher/ComponentInitialize()
|
||||
/obj/item/storage/belt/tool_switcher/Initialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
var/static/list/can_hold = typecacheof(list(
|
||||
@@ -57,9 +57,6 @@
|
||||
/obj/item/hemostat,
|
||||
))
|
||||
STR.can_hold = can_hold
|
||||
|
||||
/obj/item/storage/belt/tool_switcher/Initialize()
|
||||
. = ..()
|
||||
spark_system = new /datum/effect_system/spark_spread
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
|
||||
@@ -8,11 +8,6 @@
|
||||
var/mutable_appearance/weed_overlay
|
||||
|
||||
/obj/structure/toilet_bong/Initialize()
|
||||
. = ..()
|
||||
weed_overlay = mutable_appearance('yogstation/icons/obj/watercloset.dmi', "weed")
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/structure/toilet_bong/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = AddComponent(/datum/component/storage/concrete)
|
||||
STR.attack_hand_interact = FALSE
|
||||
@@ -22,6 +17,8 @@
|
||||
STR.max_items = 24
|
||||
RegisterSignal(STR, COMSIG_STORAGE_INSERTED, PROC_REF(update_icon))
|
||||
RegisterSignal(STR, COMSIG_STORAGE_REMOVED, PROC_REF(update_icon))
|
||||
weed_overlay = mutable_appearance('yogstation/icons/obj/watercloset.dmi', "weed")
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/structure/toilet_bong/update_icon()
|
||||
. = ..()
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
/obj/structure/goalnet/goalpost/right
|
||||
icon_state = "goal_post_right"
|
||||
|
||||
/obj/structure/goalnet/ComponentInitialize()
|
||||
/obj/structure/goalnet/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE,CALLBACK(src, PROC_REF(can_user_rotate)),CALLBACK(src, PROC_REF(can_be_rotated)),null)
|
||||
|
||||
|
||||
@@ -254,12 +254,9 @@
|
||||
|
||||
/obj/item/guardiancreator/Initialize()
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_ITEM_REFUND, PROC_REF(refund_check))
|
||||
builder = new(mob_name, theme, failure_message, max_points, allowspecial, debug_mode)
|
||||
|
||||
/obj/item/guardiancreator/ComponentInitialize()
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_ITEM_REFUND, PROC_REF(refund_check))
|
||||
|
||||
/obj/item/guardiancreator/proc/refund_check()
|
||||
return !builder.used
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/storage/photobook/ComponentInitialize()
|
||||
/obj/item/storage/photobook/Initialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_w_class = WEIGHT_CLASS_NORMAL
|
||||
@@ -22,10 +22,10 @@
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/storage/bag/photo/ComponentInitialize()
|
||||
/obj/item/storage/bag/photo/Initialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_w_class = WEIGHT_CLASS_NORMAL
|
||||
STR.max_combined_w_class = 50
|
||||
STR.max_items = 50
|
||||
STR.can_hold = typecacheof(list(/obj/item/camera_film,/obj/item/photo,/obj/item/storage/photo_album,/obj/item/camera,/obj/item/storage/photobook))
|
||||
STR.can_hold = typecacheof(list(/obj/item/camera_film,/obj/item/photo,/obj/item/storage/photo_album,/obj/item/camera,/obj/item/storage/photobook))
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
/obj/machinery/light/ComponentInitialize()
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, PROC_REF(clean_light))
|
||||
|
||||
/obj/machinery/light/proc/clean_light(O,strength)
|
||||
if(strength < CLEAN_TYPE_BLOOD)
|
||||
return
|
||||
bulb_colour = initial(bulb_colour)
|
||||
update()
|
||||
@@ -14,7 +14,8 @@
|
||||
var/link_to = null
|
||||
var/link_angle = 0
|
||||
|
||||
/obj/item/pod_parts/pod_frame/ComponentInitialize()
|
||||
/obj/item/pod_parts/pod_frame/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/simple_rotation, ROTATION_ALTCLICK | ROTATION_CLOCKWISE)
|
||||
|
||||
/obj/item/pod_parts/pod_frame/proc/find_square()
|
||||
|
||||
Reference in New Issue
Block a user