diff --git a/code/datums/martial/sleeping_carp.dm b/code/datums/martial/sleeping_carp.dm index 68c384a4b86..10a9a76831a 100644 --- a/code/datums/martial/sleeping_carp.dm +++ b/code/datums/martial/sleeping_carp.dm @@ -168,9 +168,13 @@ righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi' block_chance = 50 -/obj/item/staff/bostaff/ComponentInitialize() +/obj/item/staff/bostaff/Initialize(mapload) . = ..() - AddComponent(/datum/component/two_handed, force_unwielded=10, force_wielded=24, icon_wielded="[base_icon_state]1") + AddComponent(/datum/component/two_handed, \ + force_unwielded = 10, \ + force_wielded = 24, \ + icon_wielded = "[base_icon_state]1", \ + ) /obj/item/staff/bostaff/update_icon_state() icon_state = "[base_icon_state]0" diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 73bc2554adb..bde2684b3bb 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -272,7 +272,6 @@ // The integrity to max_integrity ratio is still preserved. set_custom_materials(custom_materials) - ComponentInitialize() InitializeAIController() return INITIALIZE_HINT_NORMAL @@ -291,10 +290,6 @@ /atom/proc/LateInitialize() set waitfor = FALSE -/// Put your [AddComponent] calls here -/atom/proc/ComponentInitialize() - return - /** * Top level of the destroy chain for most atoms * diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 111dbc88e8b..26ebb3e7307 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -61,9 +61,6 @@ AddElement(/datum/element/connect_loc, loc_connections) AddElement(/datum/element/atmos_sensitive, mapload) - -/obj/machinery/door/window/ComponentInitialize() - . = ..() AddComponent(/datum/component/ntnet_interface) /obj/machinery/door/window/Destroy() diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index 0692c51c788..c2cd3bfc9bd 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -317,13 +317,10 @@ inject_only = TRUE /obj/machinery/iv_drip/saline/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) . = ..() reagent_container = new /obj/item/reagent_containers/glass/saline(src) -/obj/machinery/iv_drip/saline/ComponentInitialize() - . = ..() - AddElement(/datum/element/update_icon_blocker) - /obj/machinery/iv_drip/saline/eject_beaker() return diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index 382458e7a79..c4a5ddae24a 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -724,7 +724,7 @@ DEFINE_BITFIELD(turret_flags, list( faction = list(ROLE_SYNDICATE) desc = "A ballistic machine gun auto-turret." -/obj/machinery/porta_turret/syndicate/ComponentInitialize() +/obj/machinery/porta_turret/syndicate/Initialize(mapload) . = ..() AddElement(/datum/element/empprotection, EMP_PROTECT_SELF | EMP_PROTECT_WIRES) @@ -827,7 +827,7 @@ DEFINE_BITFIELD(turret_flags, list( faction = list("neutral","silicon","turret") mode = TURRET_LETHAL -/obj/machinery/porta_turret/centcom_shuttle/ComponentInitialize() +/obj/machinery/porta_turret/centcom_shuttle/Initialize(mapload) . = ..() AddElement(/datum/element/empprotection, EMP_PROTECT_SELF | EMP_PROTECT_WIRES) diff --git a/code/game/objects/effects/decals/cleanable/robots.dm b/code/game/objects/effects/decals/cleanable/robots.dm index b7fe891900b..fd048e16f99 100644 --- a/code/game/objects/effects/decals/cleanable/robots.dm +++ b/code/game/objects/effects/decals/cleanable/robots.dm @@ -104,6 +104,6 @@ random_icon_states = list("streak1", "streak2", "streak3", "streak4", "streak5") beauty = -50 -/obj/effect/decal/cleanable/oil/slippery/ComponentInitialize() +/obj/effect/decal/cleanable/oil/slippery/Initialize(mapload) . = ..() AddComponent(/datum/component/slippery, 80, (NO_SLIP_WHEN_WALKING | SLIDE)) diff --git a/code/game/objects/effects/decals/decal.dm b/code/game/objects/effects/decals/decal.dm index 309fc091388..68e446c9d42 100644 --- a/code/game/objects/effects/decals/decal.dm +++ b/code/game/objects/effects/decals/decal.dm @@ -37,12 +37,9 @@ layer = TURF_DECAL_LAYER /obj/effect/turf_decal/Initialize(mapload) - ..() - return INITIALIZE_HINT_QDEL - -/obj/effect/turf_decal/ComponentInitialize() . = ..() var/turf/T = loc if(!istype(T)) //you know this will happen somehow CRASH("Turf decal initialized in an object/nullspace") T.AddElement(/datum/element/decal, icon, icon_state, dir, null, null, alpha, color, null, FALSE, null) + return INITIALIZE_HINT_QDEL diff --git a/code/game/objects/effects/effect_system/fluid_spread/effects_foam.dm b/code/game/objects/effects/effect_system/fluid_spread/effects_foam.dm index fb08bfa4ab0..6d0f7b7c95a 100644 --- a/code/game/objects/effects/effect_system/fluid_spread/effects_foam.dm +++ b/code/game/objects/effects/effect_system/fluid_spread/effects_foam.dm @@ -38,16 +38,13 @@ /obj/effect/particle_effect/fluid/foam/Initialize(mapload) . = ..() + if(slippery_foam) + AddComponent(/datum/component/slippery, 100) create_reagents(1000, REAGENT_HOLDER_INSTANT_REACT) playsound(src, 'sound/effects/bubbles2.ogg', 80, TRUE, -3) AddElement(/datum/element/atmos_sensitive, mapload) SSfoam.start_processing(src) -/obj/effect/particle_effect/fluid/foam/ComponentInitialize() - . = ..() - if(slippery_foam) - AddComponent(/datum/component/slippery, 100) - /obj/effect/particle_effect/fluid/foam/Destroy() SSfoam.stop_processing(src) if (spread_bucket) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 22601521109..9d8edc39696 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -221,6 +221,9 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons if(species_exception) species_exception = string_list(species_exception) + if(sharpness && force > 5) //give sharp objects butchering functionality, for consistency + AddComponent(/datum/component/butchering, speed = 8 SECONDS * toolspeed) + . = ..() // Handle adding item associated actions @@ -320,14 +323,6 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons if(B && B.loc == loc) atom_destruction(MELEE) -/obj/item/ComponentInitialize() - . = ..() - - if(sharpness && force > 5) //give sharp objects butchering functionality, for consistency - AddComponent(/datum/component/butchering, \ - speed = 8 SECONDS * toolspeed, \ - ) - /**Makes cool stuff happen when you suicide with an item * *Outputs a creative message and then return the damagetype done diff --git a/code/game/objects/items/RCL.dm b/code/game/objects/items/RCL.dm index b6115099303..de5e72f8eb9 100644 --- a/code/game/objects/items/RCL.dm +++ b/code/game/objects/items/RCL.dm @@ -23,8 +23,7 @@ var/datum/radial_menu/persistent/wiring_gui_menu var/mob/listeningTo - -/obj/item/rcl/ComponentInitialize() +/obj/item/rcl/Initialize(mapload) . = ..() AddElement(/datum/element/update_icon_updates_onmob) AddComponent(/datum/component/two_handed, wield_callback = CALLBACK(src, .proc/on_wield), unwield_callback = CALLBACK(src, .proc/on_unwield)) diff --git a/code/game/objects/items/binoculars.dm b/code/game/objects/items/binoculars.dm index f42abf7a836..c2d37828d5e 100644 --- a/code/game/objects/items/binoculars.dm +++ b/code/game/objects/items/binoculars.dm @@ -12,7 +12,7 @@ var/zoom_out_amt = 5.5 var/zoom_amt = 10 -/obj/item/binoculars/ComponentInitialize() +/obj/item/binoculars/Initialize(mapload) . = ..() AddComponent(/datum/component/two_handed, force_unwielded=8, force_wielded=12, wield_callback = CALLBACK(src, .proc/on_wield), unwield_callback = CALLBACK(src, .proc/on_unwield)) diff --git a/code/game/objects/items/broom.dm b/code/game/objects/items/broom.dm index 9a16bf70863..3ca34b281d8 100644 --- a/code/game/objects/items/broom.dm +++ b/code/game/objects/items/broom.dm @@ -18,7 +18,7 @@ attack_verb_simple = list("sweep", "brush off", "bludgeon", "whack") resistance_flags = FLAMMABLE -/obj/item/pushbroom/ComponentInitialize() +/obj/item/pushbroom/Initialize(mapload) . = ..() AddComponent(/datum/component/two_handed, force_unwielded=8, force_wielded=12, icon_wielded="[base_icon_state]1", wield_callback = CALLBACK(src, .proc/on_wield), unwield_callback = CALLBACK(src, .proc/on_unwield)) diff --git a/code/game/objects/items/chainsaw.dm b/code/game/objects/items/chainsaw.dm index b99c67fcb49..bba0fa956cb 100644 --- a/code/game/objects/items/chainsaw.dm +++ b/code/game/objects/items/chainsaw.dm @@ -24,14 +24,14 @@ toolspeed = 1.5 //Turn it on first you dork var/on = FALSE -/obj/item/chainsaw/ComponentInitialize() +/obj/item/chainsaw/Initialize(mapload) . = ..() AddComponent(/datum/component/butchering, \ - speed = 3 SECONDS, \ - effectiveness = 100, \ - bonus_modifier = 0, \ - butcher_sound = 'sound/weapons/chainsawhit.ogg', \ - disabled = TRUE, \ + speed = 3 SECONDS, \ + effectiveness = 100, \ + bonus_modifier = 0, \ + butcher_sound = 'sound/weapons/chainsawhit.ogg', \ + disabled = TRUE, \ ) AddComponent(/datum/component/two_handed, require_twohands=TRUE) diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index 85523154ad5..62a4ef7b3ac 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -340,7 +340,7 @@ var/recharge_time = 6 SECONDS // Only applies to defibs that do not require a defibrilator. See: .proc/do_success var/combat = FALSE //If it penetrates armor and gives additional functionality -/obj/item/shockpaddles/ComponentInitialize() +/obj/item/shockpaddles/Initialize(mapload) . = ..() AddElement(/datum/element/update_icon_updates_onmob) AddComponent(/datum/component/two_handed, force_unwielded=8, force_wielded=12) diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index 05a6442825e..36d7728831d 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -104,13 +104,17 @@ GLOBAL_LIST_INIT(channel_tokens, list( /obj/item/radio/headset/syndicate //disguised to look like a normal headset for stealth ops +/obj/item/radio/headset/syndicate/Initialize(mapload) + . = ..() + make_syndie() + /obj/item/radio/headset/syndicate/alt //undisguised bowman with flash protection name = "syndicate headset" desc = "A syndicate headset that can be used to hear all radio frequencies. Protects ears from flashbangs." icon_state = "syndie_headset" inhand_icon_state = "syndie_headset" -/obj/item/radio/headset/syndicate/alt/ComponentInitialize() +/obj/item/radio/headset/syndicate/alt/Initialize(mapload) . = ..() AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS)) @@ -118,11 +122,8 @@ GLOBAL_LIST_INIT(channel_tokens, list( name = "team leader headset" command = TRUE -/obj/item/radio/headset/syndicate/Initialize(mapload) - . = ..() - make_syndie() - /obj/item/radio/headset/binary + /obj/item/radio/headset/binary/Initialize(mapload) . = ..() qdel(keyslot) @@ -141,7 +142,7 @@ GLOBAL_LIST_INIT(channel_tokens, list( icon_state = "sec_headset_alt" inhand_icon_state = "sec_headset_alt" -/obj/item/radio/headset/headset_sec/alt/ComponentInitialize() +/obj/item/radio/headset/headset_sec/alt/Initialize(mapload) . = ..() AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS)) @@ -208,7 +209,7 @@ GLOBAL_LIST_INIT(channel_tokens, list( icon_state = "com_headset_alt" inhand_icon_state = "com_headset_alt" -/obj/item/radio/headset/heads/captain/alt/ComponentInitialize() +/obj/item/radio/headset/heads/captain/alt/Initialize(mapload) . = ..() AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS)) @@ -230,7 +231,7 @@ GLOBAL_LIST_INIT(channel_tokens, list( icon_state = "com_headset_alt" inhand_icon_state = "com_headset_alt" -/obj/item/radio/headset/heads/hos/alt/ComponentInitialize() +/obj/item/radio/headset/heads/hos/alt/Initialize(mapload) . = ..() AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS)) @@ -297,7 +298,7 @@ GLOBAL_LIST_INIT(channel_tokens, list( inhand_icon_state = "cent_headset_alt" keyslot = null -/obj/item/radio/headset/headset_cent/alt/ComponentInitialize() +/obj/item/radio/headset/headset_cent/alt/Initialize(mapload) . = ..() AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS)) diff --git a/code/game/objects/items/dice.dm b/code/game/objects/items/dice.dm index 6e61c32c8ad..e663c1e5004 100644 --- a/code/game/objects/items/dice.dm +++ b/code/game/objects/items/dice.dm @@ -157,9 +157,9 @@ w_class = WEIGHT_CLASS_SMALL sides = 100 -/obj/item/dice/d100/ComponentInitialize() - . = ..() +/obj/item/dice/d100/Initialize(mapload) AddElement(/datum/element/update_icon_blocker) + return ..() /obj/item/dice/eightbd20 name = "strange d20" @@ -168,9 +168,9 @@ sides = 20 special_faces = list("It is certain","It is decidedly so","Without a doubt","Yes, definitely","You may rely on it","As I see it, yes","Most likely","Outlook good","Yes","Signs point to yes","Reply hazy try again","Ask again later","Better not tell you now","Cannot predict now","Concentrate and ask again","Don't count on it","My reply is no","My sources say no","Outlook not so good","Very doubtful") -/obj/item/dice/eightbd20/ComponentInitialize() - . = ..() +/obj/item/dice/eightbd20/Initialize(mapload) AddElement(/datum/element/update_icon_blocker) + return ..() /obj/item/dice/fourdd6 name = "4d d6" @@ -179,9 +179,9 @@ sides = 48 special_faces = list("Cube-Side: 1-1","Cube-Side: 1-2","Cube-Side: 1-3","Cube-Side: 1-4","Cube-Side: 1-5","Cube-Side: 1-6","Cube-Side: 2-1","Cube-Side: 2-2","Cube-Side: 2-3","Cube-Side: 2-4","Cube-Side: 2-5","Cube-Side: 2-6","Cube-Side: 3-1","Cube-Side: 3-2","Cube-Side: 3-3","Cube-Side: 3-4","Cube-Side: 3-5","Cube-Side: 3-6","Cube-Side: 4-1","Cube-Side: 4-2","Cube-Side: 4-3","Cube-Side: 4-4","Cube-Side: 4-5","Cube-Side: 4-6","Cube-Side: 5-1","Cube-Side: 5-2","Cube-Side: 5-3","Cube-Side: 5-4","Cube-Side: 5-5","Cube-Side: 5-6","Cube-Side: 6-1","Cube-Side: 6-2","Cube-Side: 6-3","Cube-Side: 6-4","Cube-Side: 6-5","Cube-Side: 6-6","Cube-Side: 7-1","Cube-Side: 7-2","Cube-Side: 7-3","Cube-Side: 7-4","Cube-Side: 7-5","Cube-Side: 7-6","Cube-Side: 8-1","Cube-Side: 8-2","Cube-Side: 8-3","Cube-Side: 8-4","Cube-Side: 8-5","Cube-Side: 8-6") -/obj/item/dice/fourdd6/ComponentInitialize() - . = ..() +/obj/item/dice/fourdd6/Initialize(mapload) AddElement(/datum/element/update_icon_blocker) + return ..() /obj/item/dice/attack_self(mob/user) diceroll(user) diff --git a/code/game/objects/items/dualsaber.dm b/code/game/objects/items/dualsaber.dm index 91d84bf6f84..07e4e36ce27 100644 --- a/code/game/objects/items/dualsaber.dm +++ b/code/game/objects/items/dualsaber.dm @@ -34,10 +34,16 @@ var/hacked = FALSE var/list/possible_colors = list("red", "blue", "green", "purple") -/obj/item/dualsaber/ComponentInitialize() +/obj/item/dualsaber/Initialize(mapload) . = ..() - AddComponent(/datum/component/two_handed, force_unwielded=force, force_wielded=two_hand_force, wieldsound='sound/weapons/saberon.ogg', unwieldsound='sound/weapons/saberoff.ogg', \ - wield_callback = CALLBACK(src, .proc/on_wield), unwield_callback = CALLBACK(src, .proc/on_unwield)) + AddComponent(/datum/component/two_handed, \ + force_unwielded = force, \ + force_wielded = two_hand_force, \ + wieldsound = 'sound/weapons/saberon.ogg', \ + unwieldsound = 'sound/weapons/saberoff.ogg', \ + wield_callback = CALLBACK(src, .proc/on_wield), \ + unwield_callback = CALLBACK(src, .proc/on_unwield), \ + ) /// Triggered on wield of two handed item /// Specific hulk checks due to reflection chance for balance issues and switches hitsounds. diff --git a/code/game/objects/items/extinguisher.dm b/code/game/objects/items/extinguisher.dm index ae607c3ddc2..a42914a2c96 100644 --- a/code/game/objects/items/extinguisher.dm +++ b/code/game/objects/items/extinguisher.dm @@ -77,13 +77,10 @@ reagents.add_reagent(chem, max_water) /obj/item/extinguisher/Initialize(mapload) - . = ..() - refill() - -/obj/item/extinguisher/ComponentInitialize() . = ..() if(tank_holder_icon_state) AddComponent(/datum/component/container_item/tank_holder, tank_holder_icon_state) + refill() /obj/item/extinguisher/advanced name = "advanced fire extinguisher" diff --git a/code/game/objects/items/fireaxe.dm b/code/game/objects/items/fireaxe.dm index 7b8b6410820..362efc741c3 100644 --- a/code/game/objects/items/fireaxe.dm +++ b/code/game/objects/items/fireaxe.dm @@ -29,14 +29,11 @@ /obj/item/fireaxe/Initialize(mapload) . = ..() - -/obj/item/fireaxe/ComponentInitialize() - . = ..() AddComponent(/datum/component/butchering, \ - speed = 10 SECONDS, \ - effectiveness = 80, \ - bonus_modifier = 0 , \ - butcher_sound = hitsound, \ + speed = 10 SECONDS, \ + effectiveness = 80, \ + bonus_modifier = 0 , \ + butcher_sound = hitsound, \ ) //axes are not known for being precision butchering tools AddComponent(/datum/component/two_handed, force_unwielded=force_unwielded, force_wielded=force_wielded, icon_wielded="[base_icon_state]1") diff --git a/code/game/objects/items/flamethrower.dm b/code/game/objects/items/flamethrower.dm index 400b9898951..1ba161adb87 100644 --- a/code/game/objects/items/flamethrower.dm +++ b/code/game/objects/items/flamethrower.dm @@ -31,7 +31,7 @@ var/acti_sound = 'sound/items/welderactivate.ogg' var/deac_sound = 'sound/items/welderdeactivate.ogg' -/obj/item/flamethrower/ComponentInitialize() +/obj/item/flamethrower/Initialize(mapload) . = ..() AddElement(/datum/element/update_icon_updates_onmob) diff --git a/code/game/objects/items/food/bread.dm b/code/game/objects/items/food/bread.dm index d0faabefd48..e3c8d148a98 100644 --- a/code/game/objects/items/food/bread.dm +++ b/code/game/objects/items/food/bread.dm @@ -291,7 +291,7 @@ foodtypes = GRAIN | DAIRY w_class = WEIGHT_CLASS_SMALL -/obj/item/food/butterdog/ComponentInitialize() +/obj/item/food/butterdog/Initialize(mapload) . = ..() AddComponent(/datum/component/slippery, 8 SECONDS) diff --git a/code/game/objects/items/food/meat.dm b/code/game/objects/items/food/meat.dm index 4fa00ec9ca6..cac7503f20a 100644 --- a/code/game/objects/items/food/meat.dm +++ b/code/game/objects/items/food/meat.dm @@ -616,9 +616,9 @@ tastes = list("meat" = 5, "clowns" = 3, "sixteen teslas" = 1) w_class = WEIGHT_CLASS_SMALL -/obj/item/food/meatclown/ComponentInitialize() +/obj/item/food/meatclown/Initialize(mapload) . = ..() - AddComponent(/datum/component/slippery, 30) + AddComponent(/datum/component/slippery, 3 SECONDS) /obj/item/food/lasagna name = "Lasagna" diff --git a/code/game/objects/items/grenades/chem_grenade.dm b/code/game/objects/items/grenades/chem_grenade.dm index 51870c43210..d4e91d0ef59 100644 --- a/code/game/objects/items/grenades/chem_grenade.dm +++ b/code/game/objects/items/grenades/chem_grenade.dm @@ -29,14 +29,11 @@ /obj/item/grenade/chem_grenade/Initialize(mapload) . = ..() + AddElement(/datum/element/empprotection, EMP_PROTECT_WIRES) create_reagents(casing_holder_volume) stage_change() // If no argument is set, it will change the stage to the current stage, useful for stock grenades that start READY. wires = new /datum/wires/explosive/chem_grenade(src) -/obj/item/grenade/chem_grenade/ComponentInitialize() - . = ..() - AddElement(/datum/element/empprotection, EMP_PROTECT_WIRES) - /obj/item/grenade/chem_grenade/examine(mob/user) display_timer = (stage == GRENADE_READY) //show/hide the timer based on assembly state . = ..() diff --git a/code/game/objects/items/grenades/plastic.dm b/code/game/objects/items/grenades/plastic.dm index bfd5c1494cd..1e24bb948f0 100644 --- a/code/game/objects/items/grenades/plastic.dm +++ b/code/game/objects/items/grenades/plastic.dm @@ -25,13 +25,10 @@ /obj/item/grenade/c4/Initialize(mapload) . = ..() + AddElement(/datum/element/empprotection, EMP_PROTECT_WIRES) plastic_overlay = mutable_appearance(icon, "[inhand_icon_state]2", HIGH_OBJ_LAYER) wires = new /datum/wires/explosive/c4(src) -/obj/item/grenade/c4/ComponentInitialize() - . = ..() - AddElement(/datum/element/empprotection, EMP_PROTECT_WIRES) - /obj/item/grenade/c4/Destroy() qdel(wires) wires = null diff --git a/code/game/objects/items/pitchfork.dm b/code/game/objects/items/pitchfork.dm index a2c6d70331f..2ae15fb8eb4 100644 --- a/code/game/objects/items/pitchfork.dm +++ b/code/game/objects/items/pitchfork.dm @@ -22,7 +22,7 @@ armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 100, ACID = 30) resistance_flags = FIRE_PROOF -/obj/item/pitchfork/ComponentInitialize() +/obj/item/pitchfork/Initialize(mapload) . = ..() AddComponent(/datum/component/two_handed, force_unwielded=7, force_wielded=15, icon_wielded="[base_icon_state]1") diff --git a/code/game/objects/items/plushes.dm b/code/game/objects/items/plushes.dm index 5166d66690c..938f7c81f64 100644 --- a/code/game/objects/items/plushes.dm +++ b/code/game/objects/items/plushes.dm @@ -576,7 +576,7 @@ icon_state = "plushie_awake" inhand_icon_state = "plushie_awake" -/obj/item/toy/plush/awakenedplushie/ComponentInitialize() +/obj/item/toy/plush/awakenedplushie/Initialize(mapload) . = ..() AddComponent(/datum/component/edit_complainer) diff --git a/code/game/objects/items/shields.dm b/code/game/objects/items/shields.dm index de0718fe643..150fdfdf33f 100644 --- a/code/game/objects/items/shields.dm +++ b/code/game/objects/items/shields.dm @@ -129,9 +129,6 @@ /obj/item/shield/riot/flash/Initialize(mapload) . = ..() embedded_flash = new(src) - -/obj/item/shield/riot/flash/ComponentInitialize() - . = .. () AddElement(/datum/element/update_icon_updates_onmob) /obj/item/shield/riot/flash/attack(mob/living/M, mob/user) diff --git a/code/game/objects/items/singularityhammer.dm b/code/game/objects/items/singularityhammer.dm index c70aa3dc2aa..bff80cc9020 100644 --- a/code/game/objects/items/singularityhammer.dm +++ b/code/game/objects/items/singularityhammer.dm @@ -21,10 +21,10 @@ /obj/item/singularityhammer/Initialize(mapload) . = ..() AddElement(/datum/element/kneejerk) - -/obj/item/singularityhammer/ComponentInitialize() - . = ..() - AddComponent(/datum/component/two_handed, force_multiplier=4, icon_wielded="[base_icon_state]1") + AddComponent(/datum/component/two_handed, \ + force_multiplier = 4, \ + icon_wielded = "[base_icon_state]1", \ + ) /obj/item/singularityhammer/update_icon_state() icon_state = "[base_icon_state]0" @@ -80,9 +80,13 @@ throw_range = 7 w_class = WEIGHT_CLASS_HUGE -/obj/item/mjollnir/ComponentInitialize() +/obj/item/mjollnir/Initialize(mapload) . = ..() - AddComponent(/datum/component/two_handed, force_multiplier=5, icon_wielded="[base_icon_state]1", attacksound=SFX_SPARKS) + AddComponent(/datum/component/two_handed, \ + force_multiplier = 5, \ + icon_wielded = "[base_icon_state]1", \ + attacksound = SFX_SPARKS, \ + ) /obj/item/mjollnir/update_icon_state() icon_state = "[base_icon_state]0" diff --git a/code/game/objects/items/skub.dm b/code/game/objects/items/skub.dm index a35f817f54f..ba1231f1520 100644 --- a/code/game/objects/items/skub.dm +++ b/code/game/objects/items/skub.dm @@ -7,7 +7,7 @@ attack_verb_continuous = list("skubs") attack_verb_simple = list("skub") -/obj/item/skub/ComponentInitialize() +/obj/item/skub/Initialize(mapload) . = ..() AddComponent(/datum/component/container_item/tank_holder, "holder_skub", FALSE) diff --git a/code/game/objects/items/spear.dm b/code/game/objects/items/spear.dm index c10b03aef09..ed95660053d 100644 --- a/code/game/objects/items/spear.dm +++ b/code/game/objects/items/spear.dm @@ -34,16 +34,18 @@ /obj/item/spear/Initialize(mapload) . = ..() force = force_unwielded - -/obj/item/spear/ComponentInitialize() - . = ..() - AddComponent(/datum/component/butchering, \ - speed = 10 SECONDS, \ - effectiveness = 70, \ - ) //decent in a pinch, but pretty bad. AddComponent(/datum/component/jousting) - AddComponent(/datum/component/two_handed, force_unwielded=force_unwielded, force_wielded=force_wielded, icon_wielded="[icon_prefix]1") + + AddComponent(/datum/component/butchering, \ + speed = 10 SECONDS, \ + effectiveness = 70, \ + ) + AddComponent(/datum/component/two_handed, \ + force_unwielded = force_unwielded, \ + force_wielded = force_wielded, \ + icon_wielded = "[icon_prefix]1", \ + ) update_appearance() /obj/item/spear/update_icon_state() diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm index f8067896b1d..c1591626805 100644 --- a/code/game/objects/items/stacks/rods.dm +++ b/code/game/objects/items/stacks/rods.dm @@ -80,9 +80,9 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \ else return ..() -/obj/item/stack/rods/cyborg/ComponentInitialize() - . = ..() +/obj/item/stack/rods/cyborg/Initialize(mapload) AddElement(/datum/element/update_icon_blocker) + return ..() /obj/item/stack/rods/ten amount = 10 diff --git a/code/game/objects/items/tanks/tanks.dm b/code/game/objects/items/tanks/tanks.dm index dfd68b339d5..c05300dd2e4 100644 --- a/code/game/objects/items/tanks/tanks.dm +++ b/code/game/objects/items/tanks/tanks.dm @@ -78,6 +78,9 @@ /obj/item/tank/Initialize(mapload) . = ..() + if(tank_holder_icon_state) + AddComponent(/datum/component/container_item/tank_holder, tank_holder_icon_state) + air_contents = new(volume) //liters air_contents.temperature = T20C @@ -97,11 +100,6 @@ /obj/item/tank/proc/populate_gas() return -/obj/item/tank/ComponentInitialize() - . = ..() - if(tank_holder_icon_state) - AddComponent(/datum/component/container_item/tank_holder, tank_holder_icon_state) - /obj/item/tank/Destroy() UnregisterSignal(air_contents, COMSIG_GASMIX_MERGED) air_contents = null diff --git a/code/game/objects/items/tools/weldingtool.dm b/code/game/objects/items/tools/weldingtool.dm index 2f337741362..3adcdf58ba5 100644 --- a/code/game/objects/items/tools/weldingtool.dm +++ b/code/game/objects/items/tools/weldingtool.dm @@ -51,15 +51,12 @@ /obj/item/weldingtool/Initialize(mapload) . = ..() + AddElement(/datum/element/update_icon_updates_onmob) + AddElement(/datum/element/tool_flash, light_range) create_reagents(max_fuel) reagents.add_reagent(/datum/reagent/fuel, max_fuel) update_appearance() -/obj/item/weldingtool/ComponentInitialize() - . = ..() - AddElement(/datum/element/update_icon_updates_onmob) - AddElement(/datum/element/tool_flash, light_range) - /obj/item/weldingtool/update_icon_state() if(welding) inhand_icon_state = "[initial(inhand_icon_state)]1" diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 5c256f740e6..2c6b11b112b 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -43,12 +43,9 @@ inhand_icon_state = "balloon-empty" /obj/item/toy/waterballoon/Initialize(mapload) - . = ..() - create_reagents(10) - -/obj/item/toy/waterballoon/ComponentInitialize() . = ..() AddElement(/datum/element/update_icon_updates_onmob) + create_reagents(10) /obj/item/toy/waterballoon/attack(mob/living/carbon/human/M, mob/user) return diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index c0cb4a77941..553dbb2e00f 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -960,12 +960,12 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 /obj/item/highfrequencyblade/Initialize(mapload) . = ..() + AddComponent(/datum/component/two_handed, \ + wield_callback = CALLBACK(src, .proc/on_wield), \ + unwield_callback = CALLBACK(src, .proc/on_unwield), \ + ) AddElement(/datum/element/update_icon_updates_onmob) -/obj/item/highfrequencyblade/ComponentInitialize() - . = ..() - AddComponent(/datum/component/two_handed, wield_callback = CALLBACK(src, .proc/on_wield), unwield_callback = CALLBACK(src, .proc/on_unwield)) - /obj/item/highfrequencyblade/update_icon_state() icon_state = "hfrequency[HAS_TRAIT(src, TRAIT_WIELDED)]" return ..() diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index be5b72dc8b7..3d3e2202d0a 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -76,7 +76,6 @@ log_telecomms("Created [src]([REF(src)] in nullspace, assuming network to be in station") network_id = NETWORK_NAME_COMBINE(STATION_NETWORK_ROOT, network_id) // I regret nothing!! AddComponent(/datum/component/ntnet_interface, network_id, id_tag) - /// Needs to run before as ComponentInitialize runs after this statement...why do we have ComponentInitialize again? /obj/Destroy(force) diff --git a/code/game/objects/structures/life_candle.dm b/code/game/objects/structures/life_candle.dm index 988203a7eeb..2ce45d8f018 100644 --- a/code/game/objects/structures/life_candle.dm +++ b/code/game/objects/structures/life_candle.dm @@ -24,7 +24,7 @@ var/respawn_time = 50 var/respawn_sound = 'sound/magic/staff_animation.ogg' -/obj/structure/life_candle/ComponentInitialize() +/obj/structure/life_candle/Initialize(mapload) . = ..() AddElement(/datum/element/movetype_handler) diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm index 35fad6d07e0..c1d82f868f5 100644 --- a/code/game/objects/structures/mineral_doors.dm +++ b/code/game/objects/structures/mineral_doors.dm @@ -233,9 +233,6 @@ max_integrity = 300 light_range = 2 -/obj/structure/mineral_door/uranium/ComponentInitialize() - return - /obj/structure/mineral_door/sandstone name = "sandstone door" icon_state = "sandstone" @@ -332,9 +329,6 @@ return ..() -/obj/structure/mineral_door/paperframe/ComponentInitialize() - return - /obj/structure/mineral_door/paperframe/Destroy() if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK)) QUEUE_SMOOTH_NEIGHBORS(src) diff --git a/code/game/turfs/open/_open.dm b/code/game/turfs/open/_open.dm index 0429891bc42..e8d99e2558d 100644 --- a/code/game/turfs/open/_open.dm +++ b/code/game/turfs/open/_open.dm @@ -70,7 +70,7 @@ /turf/open/indestructible/permalube icon_state = "darkfull" -/turf/open/indestructible/permalube/ComponentInitialize() +/turf/open/indestructible/permalube/Initialize(mapload) . = ..() AddComponent(/datum/component/wet_floor, TURF_WET_LUBE, INFINITY, 0, INFINITY, TRUE) @@ -83,7 +83,7 @@ heavyfootstep = null var/sound = 'sound/effects/clownstep1.ogg' -/turf/open/indestructible/honk/ComponentInitialize() +/turf/open/indestructible/honk/Initialize(mapload) . = ..() AddComponent(/datum/component/wet_floor, TURF_WET_SUPERLUBE, INFINITY, 0, INFINITY, TRUE) diff --git a/code/game/turfs/open/floor/misc_floor.dm b/code/game/turfs/open/floor/misc_floor.dm index bb65ee31383..a08af3da60a 100644 --- a/code/game/turfs/open/floor/misc_floor.dm +++ b/code/game/turfs/open/floor/misc_floor.dm @@ -205,12 +205,9 @@ color = COLOR_BROWN /turf/open/floor/plating/rust/Initialize(mapload) - . = ..() - color = null - -/turf/open/floor/plating/rust/ComponentInitialize() . = ..() AddElement(/datum/element/rust) + color = null /turf/open/floor/plating/plasma initial_gas_mix = ATMOS_TANK_PLASMA diff --git a/code/game/turfs/open/space/space.dm b/code/game/turfs/open/space/space.dm index fbfc6cebe0a..2623c05c406 100644 --- a/code/game/turfs/open/space/space.dm +++ b/code/game/turfs/open/space/space.dm @@ -73,8 +73,6 @@ if(T) T.multiz_turf_new(src, UP) - ComponentInitialize() - return INITIALIZE_HINT_NORMAL //ATTACK GHOST IGNORING PARENT RETURN VALUE diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index ce7b633c45a..ee6b5cb96d8 100755 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -148,8 +148,6 @@ GLOBAL_LIST_EMPTY(station_turfs) // apply materials properly from the default custom_materials value set_custom_materials(custom_materials) - ComponentInitialize() - if(uses_integrity) atom_integrity = max_integrity diff --git a/code/modules/antagonists/abductor/equipment/abduction_gear.dm b/code/modules/antagonists/abductor/equipment/abduction_gear.dm index 3834bff8782..066dcb031e2 100644 --- a/code/modules/antagonists/abductor/equipment/abduction_gear.dm +++ b/code/modules/antagonists/abductor/equipment/abduction_gear.dm @@ -456,7 +456,7 @@ Congratulations! You are now trained for invasive xenobiology research!"} var/sleep_time = 2 MINUTES var/time_to_cuff = 3 SECONDS -/obj/item/melee/baton/abductor/ComponentInitialize() +/obj/item/melee/baton/abductor/Initialize(mapload) . = ..() AddElement(/datum/element/update_icon_updates_onmob) @@ -645,12 +645,9 @@ Congratulations! You are now trained for invasive xenobiology research!"} keyslot2 = new /obj/item/encryptionkey/heads/captain /obj/item/radio/headset/abductor/Initialize(mapload) - . = ..() - make_syndie() - -/obj/item/radio/headset/abductor/ComponentInitialize() . = ..() AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS)) + make_syndie() // Stops humans from disassembling abductor headsets. /obj/item/radio/headset/abductor/screwdriver_act(mob/living/user, obj/item/tool) diff --git a/code/modules/antagonists/blob/structures/core.dm b/code/modules/antagonists/blob/structures/core.dm index 776e8f1cd26..ed4da5c339a 100644 --- a/code/modules/antagonists/blob/structures/core.dm +++ b/code/modules/antagonists/blob/structures/core.dm @@ -27,7 +27,8 @@ if(overmind) overmind.blobstrain.on_gain() update_appearance() - . = ..() + AddComponent(/datum/component/stationloving, FALSE, TRUE) + return ..() /obj/structure/blob/special/core/Destroy() GLOB.blob_cores -= src @@ -75,10 +76,6 @@ produce_spores() ..() -/obj/structure/blob/special/core/ComponentInitialize() - . = ..() - AddComponent(/datum/component/stationloving, FALSE, TRUE) - /obj/structure/blob/special/core/on_changed_z_level(turf/old_turf, turf/new_turf) if(overmind && is_station_level(new_turf?.z)) overmind.forceMove(get_turf(src)) diff --git a/code/modules/antagonists/clown_ops/clown_weapons.dm b/code/modules/antagonists/clown_ops/clown_weapons.dm index 4cb548d9071..27ebf75aeb8 100644 --- a/code/modules/antagonists/clown_ops/clown_weapons.dm +++ b/code/modules/antagonists/clown_ops/clown_weapons.dm @@ -23,7 +23,7 @@ /obj/item/clothing/shoes/clown_shoes/combat/Initialize(mapload) . = ..() - + create_storage(type = /datum/storage/pockets/shoes) /// Recharging rate in PPS (peels per second) @@ -190,16 +190,13 @@ /obj/item/grown/bananapeel/bombanana/Initialize(mapload) . = ..() + AddComponent(/datum/component/slippery, det_time) bomb = new /obj/item/grenade/syndieminibomb(src) bomb.det_time = det_time if(iscarbon(loc)) to_chat(loc, span_danger("[src] begins to beep.")) bomb.arm_grenade(loc, null, FALSE) -/obj/item/grown/bananapeel/bombanana/ComponentInitialize() - . = ..() - AddComponent(/datum/component/slippery, det_time) - /obj/item/grown/bananapeel/bombanana/Destroy() . = ..() QDEL_NULL(bomb) diff --git a/code/modules/antagonists/cult/cult_items.dm b/code/modules/antagonists/cult/cult_items.dm index 3c9520ead2c..c38242ca62d 100644 --- a/code/modules/antagonists/cult/cult_items.dm +++ b/code/modules/antagonists/cult/cult_items.dm @@ -731,13 +731,16 @@ Striking a noncultist, however, will tear their flesh."} hitsound = 'sound/weapons/bladeslice.ogg' var/datum/action/innate/cult/halberd/halberd_act -/obj/item/melee/cultblade/halberd/ComponentInitialize() +/obj/item/melee/cultblade/halberd/Initialize(mapload) . = ..() AddComponent(/datum/component/butchering, \ - speed = 10 SECONDS, \ - effectiveness = 90, \ + speed = 10 SECONDS, \ + effectiveness = 90, \ + ) + AddComponent(/datum/component/two_handed, \ + force_unwielded = 17, \ + force_wielded = 24, \ ) - AddComponent(/datum/component/two_handed, force_unwielded=17, force_wielded=24) /obj/item/melee/cultblade/halberd/update_icon_state() icon_state = HAS_TRAIT(src, TRAIT_WIELDED) ? "[base_icon_state]1" : "[base_icon_state]0" diff --git a/code/modules/antagonists/nightmare/nightmare_organs.dm b/code/modules/antagonists/nightmare/nightmare_organs.dm index 19fc189b3fc..c843bcc0c92 100644 --- a/code/modules/antagonists/nightmare/nightmare_organs.dm +++ b/code/modules/antagonists/nightmare/nightmare_organs.dm @@ -36,9 +36,9 @@ /// The armblade granted to the host of this heart. var/obj/item/light_eater/blade -/obj/item/organ/internal/heart/nightmare/ComponentInitialize() - . = ..() +/obj/item/organ/internal/heart/nightmare/Initialize(mapload) AddElement(/datum/element/update_icon_blocker) + return ..() /obj/item/organ/internal/heart/nightmare/attack(mob/M, mob/living/carbon/user, obj/target) if(M != user) diff --git a/code/modules/antagonists/slaughter/slaughter.dm b/code/modules/antagonists/slaughter/slaughter.dm index bb46ad16d15..38765ca1364 100644 --- a/code/modules/antagonists/slaughter/slaughter.dm +++ b/code/modules/antagonists/slaughter/slaughter.dm @@ -153,9 +153,9 @@ icon_state = "demon_heart-on" decay_factor = 0 -/obj/item/organ/internal/heart/demon/ComponentInitialize() - . = ..() +/obj/item/organ/internal/heart/demon/Initialize(mapload) AddElement(/datum/element/update_icon_blocker) + return ..() /obj/item/organ/internal/heart/demon/attack(mob/M, mob/living/carbon/user, obj/target) if(M != user) diff --git a/code/modules/awaymissions/mission_code/Cabin.dm b/code/modules/awaymissions/mission_code/Cabin.dm index d529723fed9..e34e78b02bd 100644 --- a/code/modules/awaymissions/mission_code/Cabin.dm +++ b/code/modules/awaymissions/mission_code/Cabin.dm @@ -111,8 +111,8 @@ color = rgb(0,0,255) /obj/structure/ladder/unbreakable/rune/Initialize(mapload) - . = ..() AddElement(/datum/element/update_icon_blocker) + return ..() /obj/structure/ladder/add_context(atom/source, list/context, obj/item/held_item, mob/user) if(up) diff --git a/code/modules/clothing/ears/_ears.dm b/code/modules/clothing/ears/_ears.dm index 070a665da1f..4c2aa14b305 100644 --- a/code/modules/clothing/ears/_ears.dm +++ b/code/modules/clothing/ears/_ears.dm @@ -18,7 +18,7 @@ resistance_flags = FLAMMABLE custom_price = PAYCHECK_COMMAND * 1.5 -/obj/item/clothing/ears/earmuffs/ComponentInitialize() +/obj/item/clothing/ears/earmuffs/Initialize(mapload) . = ..() AddElement(/datum/element/earhealing) AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS)) diff --git a/code/modules/clothing/glasses/engine_goggles.dm b/code/modules/clothing/glasses/engine_goggles.dm index 43324a63629..f62465c4b14 100644 --- a/code/modules/clothing/glasses/engine_goggles.dm +++ b/code/modules/clothing/glasses/engine_goggles.dm @@ -26,13 +26,10 @@ /obj/item/clothing/glasses/meson/engine/Initialize(mapload) . = ..() + AddElement(/datum/element/update_icon_updates_onmob) START_PROCESSING(SSobj, src) update_appearance() -/obj/item/clothing/glasses/meson/engine/ComponentInitialize() - . = ..() - AddElement(/datum/element/update_icon_updates_onmob) - /obj/item/clothing/glasses/meson/engine/Destroy() STOP_PROCESSING(SSobj, src) return ..() diff --git a/code/modules/clothing/gloves/special.dm b/code/modules/clothing/gloves/special.dm index d66f2d9008a..bd09fc4451a 100644 --- a/code/modules/clothing/gloves/special.dm +++ b/code/modules/clothing/gloves/special.dm @@ -56,7 +56,7 @@ inhand_icon_state = "rapid" clothing_traits = list(TRAIT_FINGERPRINT_PASSTHROUGH) -/obj/item/clothing/gloves/rapid/ComponentInitialize() +/obj/item/clothing/gloves/rapid/Initialize(mapload) . = ..() AddComponent(/datum/component/wearertargeting/punchcooldown) diff --git a/code/modules/clothing/head/hardhat.dm b/code/modules/clothing/head/hardhat.dm index d74deaffdc1..4e99ba8ff54 100644 --- a/code/modules/clothing/head/hardhat.dm +++ b/code/modules/clothing/head/hardhat.dm @@ -21,7 +21,7 @@ var/on = FALSE -/obj/item/clothing/head/hardhat/ComponentInitialize() +/obj/item/clothing/head/hardhat/Initialize(mapload) . = ..() AddElement(/datum/element/update_icon_updates_onmob) diff --git a/code/modules/clothing/shoes/bananashoes.dm b/code/modules/clothing/shoes/bananashoes.dm index f7b380f88cc..e36e50158d5 100644 --- a/code/modules/clothing/shoes/bananashoes.dm +++ b/code/modules/clothing/shoes/bananashoes.dm @@ -9,16 +9,13 @@ var/always_noslip = FALSE /obj/item/clothing/shoes/clown_shoes/banana_shoes/Initialize(mapload) - . = ..() - if(always_noslip) - clothing_flags |= NOSLIP - -/obj/item/clothing/shoes/clown_shoes/banana_shoes/ComponentInitialize() . = ..() AddElement(/datum/element/update_icon_updates_onmob) AddComponent(/datum/component/material_container, list(/datum/material/bananium), 100 * MINERAL_MATERIAL_AMOUNT, MATCONTAINER_EXAMINE|MATCONTAINER_ANY_INTENT|MATCONTAINER_SILENT, allowed_items=/obj/item/stack) AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 75, falloff_exponent = 20) RegisterSignal(src, COMSIG_SHOES_STEP_ACTION, .proc/on_step) + if(always_noslip) + clothing_flags |= NOSLIP /obj/item/clothing/shoes/clown_shoes/banana_shoes/proc/on_step() SIGNAL_HANDLER diff --git a/code/modules/hydroponics/grown/banana.dm b/code/modules/hydroponics/grown/banana.dm index a40d6b9dbfc..a49cb76e4b9 100644 --- a/code/modules/hydroponics/grown/banana.dm +++ b/code/modules/hydroponics/grown/banana.dm @@ -137,11 +137,11 @@ icon_state = "bluenana_peel" // Other -/obj/item/grown/bananapeel/specialpeel //used by /obj/item/clothing/shoes/clown_shoes/banana_shoes +/obj/item/grown/bananapeel/specialpeel //used by /obj/item/clothing/shoes/clown_shoes/banana_shoes name = "synthesized banana peel" desc = "A synthetic banana peel." -/obj/item/grown/bananapeel/specialpeel/ComponentInitialize() +/obj/item/grown/bananapeel/specialpeel/Initialize(mapload) . = ..() AddComponent(/datum/component/slippery, 40) diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index 717b994fa02..c31003423a3 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -153,7 +153,7 @@ icon = 'icons/obj/hydroponics/equipment.dmi' icon_state = "hydrotray3" -/obj/machinery/hydroponics/constructable/ComponentInitialize() +/obj/machinery/hydroponics/constructable/Initialize(mapload) . = ..() AddComponent(/datum/component/simple_rotation) AddComponent(/datum/component/plumbing/hydroponics) diff --git a/code/modules/instruments/piano_synth.dm b/code/modules/instruments/piano_synth.dm index 05436a68543..c666a30510f 100644 --- a/code/modules/instruments/piano_synth.dm +++ b/code/modules/instruments/piano_synth.dm @@ -29,7 +29,7 @@ circuit_type = /obj/item/circuit_component/synth/headphones shell_capacity = SHELL_CAPACITY_TINY -/obj/item/instrument/piano_synth/headphones/ComponentInitialize() +/obj/item/instrument/piano_synth/headphones/Initialize(mapload) . = ..() AddElement(/datum/element/update_icon_updates_onmob) RegisterSignal(src, COMSIG_INSTRUMENT_START, .proc/start_playing) diff --git a/code/modules/mapfluff/ruins/spaceruin_code/forgottenship.dm b/code/modules/mapfluff/ruins/spaceruin_code/forgottenship.dm index 6603e531866..7d1d6b9dec4 100644 --- a/code/modules/mapfluff/ruins/spaceruin_code/forgottenship.dm +++ b/code/modules/mapfluff/ruins/spaceruin_code/forgottenship.dm @@ -80,7 +80,7 @@ GLOBAL_VAR_INIT(fscpassword, generate_password()) resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF deconstructible = FALSE -/obj/structure/fluff/empty_sleeper/syndicate/captain/ComponentInitialize() +/obj/structure/fluff/empty_sleeper/syndicate/captain/Initialize(mapload) . = ..() AddComponent(/datum/component/gps, "Old Encrypted Signal") diff --git a/code/modules/mining/equipment/kinetic_crusher.dm b/code/modules/mining/equipment/kinetic_crusher.dm index 7142c38e271..f794eb7e5b6 100644 --- a/code/modules/mining/equipment/kinetic_crusher.dm +++ b/code/modules/mining/equipment/kinetic_crusher.dm @@ -30,11 +30,11 @@ var/detonation_damage = 50 var/backstab_bonus = 30 -/obj/item/kinetic_crusher/ComponentInitialize() +/obj/item/kinetic_crusher/Initialize(mapload) . = ..() AddComponent(/datum/component/butchering, \ - speed = 6 SECONDS, \ - effectiveness = 110, \ + speed = 6 SECONDS, \ + effectiveness = 110, \ ) //technically it's huge and bulky, but this provides an incentive to use it AddComponent(/datum/component/two_handed, force_unwielded=0, force_wielded=20) diff --git a/code/modules/mining/equipment/survival_pod.dm b/code/modules/mining/equipment/survival_pod.dm index d6c8a5b826e..5b3f319b506 100644 --- a/code/modules/mining/equipment/survival_pod.dm +++ b/code/modules/mining/equipment/survival_pod.dm @@ -205,9 +205,9 @@ pixel_y = -4 flags_1 = NODECONSTRUCT_1 -/obj/machinery/smartfridge/survival_pod/ComponentInitialize() - . = ..() +/obj/machinery/smartfridge/survival_pod/Initialize(mapload) AddElement(/datum/element/update_icon_blocker) + return ..() /obj/machinery/smartfridge/survival_pod/preloaded/Initialize(mapload) . = ..() diff --git a/code/modules/mining/lavaland/megafauna_loot.dm b/code/modules/mining/lavaland/megafauna_loot.dm index ba95e8b0e39..17165f4dd16 100644 --- a/code/modules/mining/lavaland/megafauna_loot.dm +++ b/code/modules/mining/lavaland/megafauna_loot.dm @@ -70,16 +70,13 @@ /obj/item/hierophant_club/Initialize(mapload) . = ..() + AddElement(/datum/element/update_icon_updates_onmob) blink = new(src) /obj/item/hierophant_club/Destroy() QDEL_NULL(blink) return ..() -/obj/item/hierophant_club/ComponentInitialize() - . = ..() - AddElement(/datum/element/update_icon_updates_onmob) - /obj/item/hierophant_club/examine(mob/user) . = ..() . += span_hierophant_warning("The[beacon ? " beacon is not currently":"re is a beacon"] attached.") diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index c0fecc3df21..cb3ed415315 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -245,7 +245,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ var/attacher = "UNKNOWN" var/det_timer -/obj/item/gibtonite/ComponentInitialize() +/obj/item/gibtonite/Initialize(mapload) . = ..() AddComponent(/datum/component/two_handed, require_twohands=TRUE) diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index a9e4993630a..75702a40319 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -26,8 +26,6 @@ else forceMove(locate(1,1,1)) - ComponentInitialize() - . = ..() GLOB.new_player_list += src diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index b30c03a483c..9dd37fc96a9 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -30,6 +30,8 @@ var/static/list/loc_connections = list( COMSIG_ATOM_ENTERED = .proc/on_entered, ) + if(!CONFIG_GET(flag/disable_human_mood)) + AddComponent(/datum/component/mood) AddElement(/datum/element/connect_loc, loc_connections) GLOB.human_list += src diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 82596cd8fdc..ef961f3d503 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1,5 +1,6 @@ /mob/living/Initialize(mapload) . = ..() + AddElement(/datum/element/movetype_handler) register_init_signals() if(unique_name) set_name() @@ -12,10 +13,6 @@ SSpoints_of_interest.make_point_of_interest(src) update_fov() -/mob/living/ComponentInitialize() - . = ..() - AddElement(/datum/element/movetype_handler) - /mob/living/prepare_huds() ..() prepare_data_huds() diff --git a/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm b/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm index e67eaa3ae19..96db95258a5 100644 --- a/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm +++ b/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm @@ -87,6 +87,8 @@ /obj/structure/leaper_bubble/Initialize(mapload) . = ..() + AddElement(/datum/element/movetype_handler) + ADD_TRAIT(src, TRAIT_MOVE_FLOATING, LEAPER_BUBBLE_TRAIT) QDEL_IN(src, 100) var/static/list/loc_connections = list( COMSIG_ATOM_ENTERED = .proc/on_entered, @@ -94,11 +96,6 @@ AddElement(/datum/element/connect_loc, loc_connections) AddElement(/datum/element/swabable, CELL_LINE_TABLE_LEAPER, CELL_VIRUS_TABLE_GENERIC_MOB, 1, 5) -/obj/structure/leaper_bubble/ComponentInitialize() - . = ..() - AddElement(/datum/element/movetype_handler) - ADD_TRAIT(src, TRAIT_MOVE_FLOATING, LEAPER_BUBBLE_TRAIT) - /obj/structure/leaper_bubble/Destroy() new /obj/effect/temp_visual/leaper_projectile_impact(get_turf(src)) playsound(src,'sound/effects/snap.ogg',50, TRUE, -1) diff --git a/code/modules/modular_computers/computers/item/role_tablet_presets.dm b/code/modules/modular_computers/computers/item/role_tablet_presets.dm index e6a56d7a489..b1ecf52f62e 100644 --- a/code/modules/modular_computers/computers/item/role_tablet_presets.dm +++ b/code/modules/modular_computers/computers/item/role_tablet_presets.dm @@ -321,7 +321,7 @@ greyscale_colors = null insert_type = /obj/item/toy/crayon/rainbow -/obj/item/modular_computer/tablet/pda/clown/ComponentInitialize() +/obj/item/modular_computer/tablet/pda/clown/Initialize(mapload) . = ..() AddComponent(/datum/component/slippery/clowning, 120, NO_SLIP_WHEN_WALKING, CALLBACK(src, .proc/AfterSlip), slot_whitelist = list(ITEM_SLOT_ID, ITEM_SLOT_BELT)) AddComponent(/datum/component/wearertargeting/sitcomlaughter, CALLBACK(src, .proc/after_sitcom_laugh)) diff --git a/code/modules/paperwork/contract.dm b/code/modules/paperwork/contract.dm index 7fdbcdeed4e..3770b0628b1 100644 --- a/code/modules/paperwork/contract.dm +++ b/code/modules/paperwork/contract.dm @@ -7,14 +7,11 @@ item_flags = NOBLUDGEON var/employee_name = "" -/obj/item/paper/employment_contract/Initialize(mapload) - . = ..() - AddElement(/datum/element/update_icon_blocker) - /obj/item/paper/employment_contract/Initialize(mapload, new_employee_name) - . = ..() if(!new_employee_name) return INITIALIZE_HINT_QDEL + AddElement(/datum/element/update_icon_blocker) + . = ..() employee_name = new_employee_name name = "paper- [employee_name] employment contract" add_raw_text("