From 323ca60135dbd0f0599ec29d48d7d53e9de5ddae Mon Sep 17 00:00:00 2001 From: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Fri, 9 Jun 2023 20:56:11 -0400 Subject: [PATCH] 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 --- code/datums/components/rotation.dm | 2 +- code/datums/components/surgery_bed.dm | 8 +-- code/game/atoms.dm | 6 -- .../game/gamemodes/clown_ops/clown_weapons.dm | 5 +- code/game/machinery/_machinery.dm | 1 + code/game/machinery/doors/airlock.dm | 24 ++++---- code/game/machinery/doors/airlock_types.dm | 5 +- code/game/machinery/doors/firedoor.dm | 2 +- code/game/machinery/doors/windowdoor.dm | 5 +- code/game/machinery/doppler_array.dm | 4 +- code/game/machinery/pipe/construction.dm | 6 +- .../machinery/porta_turret/portable_turret.dm | 4 +- code/game/machinery/stasis.dm | 11 ++-- .../effects/decals/cleanable/robots.dm | 2 +- code/game/objects/effects/decals/decal.dm | 5 +- code/game/objects/items/clown_items.dm | 2 +- .../objects/items/devices/PDA/PDA_types.dm | 2 +- .../objects/items/devices/radio/headset.dm | 12 ++-- .../game/objects/items/devices/radio/radio.dm | 5 +- .../objects/items/devices/transfer_valve.dm | 3 - .../objects/items/grenades/chem_grenade.dm | 5 +- code/game/objects/items/grenades/plastic.dm | 3 - code/game/objects/items/mail.dm | 2 +- code/game/objects/items/plushes.dm | 2 +- code/game/objects/items/pneumaticCannon.dm | 6 +- code/game/objects/items/storage/backpack.dm | 21 +++---- code/game/objects/items/storage/bags.dm | 32 +++++----- code/game/objects/items/storage/belt.dm | 58 +++++++++---------- code/game/objects/items/storage/book.dm | 2 +- code/game/objects/items/storage/boxes.dm | 26 ++++----- code/game/objects/items/storage/briefcase.dm | 2 +- code/game/objects/items/storage/fancy.dm | 16 ++--- code/game/objects/items/storage/firstaid.dm | 12 ++-- code/game/objects/items/storage/food.dm | 21 +++---- code/game/objects/items/storage/lockbox.dm | 6 +- code/game/objects/items/storage/secure.dm | 8 +-- code/game/objects/items/storage/storage.dm | 4 +- code/game/objects/items/storage/toolbox.dm | 6 +- .../game/objects/items/storage/uplink_kits.dm | 4 +- code/game/objects/items/storage/wallets.dm | 2 +- .../objects/structures/beds_chairs/bed.dm | 7 ++- .../objects/structures/beds_chairs/chair.dm | 3 - code/game/objects/structures/holosign.dm | 9 ++- code/game/objects/structures/mineral_doors.dm | 9 --- code/game/objects/structures/railings.dm | 5 +- code/game/objects/structures/tables_racks.dm | 19 ++++-- .../transit_tube_construction.dm | 4 +- .../objects/structures/windoor_assembly.dm | 2 +- code/game/objects/structures/window.dm | 5 +- code/game/turfs/open.dm | 5 -- code/game/turfs/space/space.dm | 2 - code/game/turfs/turf.dm | 1 - .../abductor/equipment/abduction_gear.dm | 3 - .../antagonists/blob/structures/core.dm | 7 +-- .../bloodsuckers/powers/gangrel.dm | 5 +- .../structures/bloodsucker_crypt.dm | 2 +- code/modules/antagonists/cult/runes.dm | 3 - .../nukeop/equipment/nuclearbomb.dm | 3 - code/modules/assembly/bomb.dm | 3 - code/modules/assembly/helpers.dm | 16 ----- code/modules/assembly/holder.dm | 6 +- code/modules/assembly/infrared.dm | 5 +- .../environmental/LINDA_turf_tile.dm | 4 +- .../components/binary_devices/circulator.dm | 5 +- code/modules/clothing/chameleon.dm | 7 +-- code/modules/clothing/ears/_ears.dm | 2 +- code/modules/clothing/head/helmet.dm | 3 - code/modules/clothing/outfits/amber.dm | 6 +- code/modules/clothing/outfits/imperial.dm | 10 ++-- code/modules/clothing/outfits/occupying.dm | 6 +- code/modules/clothing/shoes/miscellaneous.dm | 2 +- code/modules/clothing/under/miscellaneous.dm | 2 +- .../food_and_drinks/food/snacks_bread.dm | 2 +- .../food_and_drinks/food/snacks_meat.dm | 2 +- code/modules/hydroponics/grown/banana.dm | 2 +- code/modules/instruments/items.dm | 2 +- .../modules/mob/dead/new_player/new_player.dm | 2 - code/modules/mob/living/carbon/human/human.dm | 8 +-- .../mob/living/simple_animal/bot/mulebot.dm | 3 - code/modules/plumbing/plumbers/pumps.dm | 4 +- code/modules/power/cell.dm | 8 +-- code/modules/power/generator.dm | 3 - code/modules/power/lighting.dm | 12 ++-- code/modules/power/singularity/emitter.dm | 8 +-- .../power/singularity/field_generator.dm | 3 - .../particle_accelerator.dm | 9 ++- .../projectiles/guns/energy/dueling.dm | 4 +- code/modules/reagents/reagent_dispenser.dm | 6 +- .../recycling/disposal/construction.dm | 8 +-- code/modules/religion/religion_structures.dm | 3 - code/modules/surgery/tools.dm | 4 +- code/modules/vehicles/wheelchair.dm | 3 - yogstation.dme | 2 - .../code/game/objects/items/storage/boxes.dm | 4 +- .../code/game/objects/items/tool_switcher.dm | 5 +- .../game/objects/structures/toilet_bong.dm | 7 +-- yogstation/code/game/soccer.dm | 2 +- .../code/modules/guardian/guardianbuilder.dm | 5 +- .../code/modules/paperwork/photography.dm | 6 +- yogstation/code/modules/power/lighting.dm | 9 --- yogstation/code/modules/spacepods/parts.dm | 3 +- 101 files changed, 259 insertions(+), 403 deletions(-) delete mode 100644 code/modules/assembly/helpers.dm delete mode 100644 yogstation/code/modules/power/lighting.dm diff --git a/code/datums/components/rotation.dm b/code/datums/components/rotation.dm index 4b8c016c6af8..e149013a48fa 100644 --- a/code/datums/components/rotation.dm +++ b/code/datums/components/rotation.dm @@ -13,7 +13,7 @@ var/rotation_flags = NONE var/default_rotation_direction = ROTATION_CLOCKWISE -/datum/component/simple_rotation/Initialize(rotation_flags = NONE ,can_user_rotate,can_be_rotated,after_rotation) +/datum/component/simple_rotation/Initialize(rotation_flags = NONE, can_user_rotate, can_be_rotated, after_rotation) if(!ismovable(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/datums/components/surgery_bed.dm b/code/datums/components/surgery_bed.dm index 1f4449224b1a..6679dbe9caf5 100644 --- a/code/datums/components/surgery_bed.dm +++ b/code/datums/components/surgery_bed.dm @@ -9,10 +9,10 @@ /// Linked computer for getting surgeries var/obj/machinery/computer/operating/computer -/datum/component/surgery_bed/Initialize(_success_chance = 1, _op_computer_linkable = FALSE, _extra_surgeries) - success_chance = _success_chance - op_computer_linkable = _op_computer_linkable - extra_surgeries = _extra_surgeries +/datum/component/surgery_bed/Initialize(success_chance = 1, op_computer_linkable = FALSE, extra_surgeries = FALSE) + src.success_chance = success_chance + src.op_computer_linkable = op_computer_linkable + src.extra_surgeries = extra_surgeries get_computer() /datum/component/surgery_bed/Destroy() diff --git a/code/game/atoms.dm b/code/game/atoms.dm index d0fcf47e4263..a06626e6348c 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -179,8 +179,6 @@ custom_materials = null //Null the list to prepare for applying the materials properly set_custom_materials(temp_list) - ComponentInitialize() - return INITIALIZE_HINT_NORMAL /** @@ -198,10 +196,6 @@ /atom/proc/LateInitialize() return -/// Put your AddComponent() calls here -/atom/proc/ComponentInitialize() - return - /** * Top level of the destroy chain for most atoms * diff --git a/code/game/gamemodes/clown_ops/clown_weapons.dm b/code/game/gamemodes/clown_ops/clown_weapons.dm index 10a05a7470b4..c49f6cfd565d 100644 --- a/code/game/gamemodes/clown_ops/clown_weapons.dm +++ b/code/game/gamemodes/clown_ops/clown_weapons.dm @@ -194,6 +194,7 @@ /obj/item/grown/bananapeel/bombanana/Initialize() . = ..() + AddComponent(/datum/component/slippery, det_time) bomb = new /obj/item/grenade/syndieminibomb/concussion(src) bomb.det_time = det_time if(iscarbon(loc)) @@ -202,10 +203,6 @@ C.throw_mode_on() bomb.preprime(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/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm index 220b4528b8c6..f1cc2e6d7f5b 100644 --- a/code/game/machinery/_machinery.dm +++ b/code/game/machinery/_machinery.dm @@ -428,6 +428,7 @@ Class Procs: SEND_SIGNAL(src, COMSIG_MACHINERY_BROKEN, damage_flag) update_icon() return TRUE + return FALSE /obj/machinery/contents_explosion(severity, target) if(occupant) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 02d0fefa3ecd..a08117e6fa9c 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -136,6 +136,9 @@ /// Log of who is shocking this door var/list/shocking_log + ///Whether wires should all cut themselves when this door is broken. + var/cut_wires_on_break = TRUE + flags_1 = RAD_PROTECT_CONTENTS_1 | RAD_NO_CONTAMINATE_1 rad_insulation = RAD_MEDIUM_INSULATION @@ -168,10 +171,19 @@ diag_hud_set_electrified() rebuild_parts() - RegisterSignal(src, COMSIG_MACHINERY_BROKEN, PROC_REF(on_break)) + AddComponent(/datum/component/ntnet_interface) return INITIALIZE_HINT_LATELOAD +/obj/machinery/door/airlock/obj_break(damage_flag) + . = ..() + if(!.) + return FALSE + if(!panel_open) + panel_open = TRUE + if(cut_wires_on_break) + wires.cut_all() + /obj/machinery/door/airlock/LateInitialize() . = ..() if(cyclelinkedx || cyclelinkedy) //yogs start @@ -204,10 +216,6 @@ panel_open = TRUE update_icon() -/obj/machinery/door/airlock/ComponentInitialize() - . = ..() - AddComponent(/datum/component/ntnet_interface) - /obj/machinery/door/airlock/proc/rebuild_parts() if(part_overlays) vis_contents -= part_overlays @@ -1551,12 +1559,6 @@ open() safe = TRUE - -/obj/machinery/door/airlock/proc/on_break() - if(!panel_open) - panel_open = TRUE - wires.cut_all() - /obj/machinery/door/airlock/proc/set_electrified(seconds, mob/user) secondsElectrified = seconds diag_hud_set_electrified() diff --git a/code/game/machinery/doors/airlock_types.dm b/code/game/machinery/doors/airlock_types.dm index 7e2238fc05ef..cfcc4f0f1648 100644 --- a/code/game/machinery/doors/airlock_types.dm +++ b/code/game/machinery/doors/airlock_types.dm @@ -459,6 +459,7 @@ aiControlDisabled = AI_WIRE_DISABLED req_access = list(ACCESS_BLOODCULT) damage_deflection = 10 + cut_wires_on_break = FALSE var/openingoverlaytype = /obj/effect/temp_visual/cult/door var/friendly = FALSE var/stealthy = FALSE @@ -470,10 +471,6 @@ /obj/machinery/door/airlock/cult/canAIControl(mob/user) return (iscultist(user) && !isAllPowerCut()) -/obj/machinery/door/airlock/cult/on_break() - if(!panel_open) - panel_open = TRUE - /obj/machinery/door/airlock/cult/isElectrified() return FALSE diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index fbfbfdb67735..9e52393b27c9 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -437,7 +437,7 @@ icon = 'icons/obj/doors/edge_Doorfire.dmi' border = TRUE -/obj/structure/firelock_frame/border/ComponentInitialize() +/obj/structure/firelock_frame/border/Initialize() . = ..() var/static/rotation_flags = ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS AddComponent(/datum/component/simple_rotation, rotation_flags) diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 639353a65a04..5a85886a7616 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -24,6 +24,7 @@ /obj/machinery/door/window/Initialize(mapload, set_dir) . = ..() + AddComponent(/datum/component/ntnet_interface) if(set_dir) setDir(set_dir) if(req_access && req_access.len) @@ -36,10 +37,6 @@ if(cable) debris += new /obj/item/stack/cable_coil(src, cable) -/obj/machinery/door/window/ComponentInitialize() - . = ..() - AddComponent(/datum/component/ntnet_interface) - /obj/machinery/door/window/Destroy() density = FALSE QDEL_LIST(debris) diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm index a81e1d3f0064..dcbfb33ef263 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -16,9 +16,7 @@ GLOBAL_LIST_EMPTY(doppler_arrays) /obj/machinery/doppler_array/Initialize() . = ..() RegisterSignal(SSdcs, COMSIG_GLOB_EXPLOSION, PROC_REF(sense_explosion)) - -/obj/machinery/doppler_array/ComponentInitialize() - AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE,null,null,CALLBACK(src, PROC_REF(rot_message))) + AddComponent(/datum/component/simple_rotation, ROTATION_ALTCLICK | ROTATION_CLOCKWISE, null, null, CALLBACK(src, PROC_REF(rot_message))) /obj/machinery/doppler_array/examine(mob/user) ..() diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index 1276560e6752..91742d81c00a 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -37,10 +37,6 @@ Buildable meters /obj/item/pipe/quaternary RPD_type = PIPE_ONEDIR -/obj/item/pipe/ComponentInitialize() - //Flipping handled manually due to custom handling for trinary pipes - AddComponent(/datum/component/simple_rotation, ROTATION_ALTCLICK | ROTATION_CLOCKWISE) - /obj/item/pipe/Initialize(mapload, _pipe_type, _dir, obj/machinery/atmospherics/make_from) if(make_from) make_from_existing(make_from) @@ -51,6 +47,8 @@ Buildable meters update() pixel_x += rand(-5, 5) pixel_y += rand(-5, 5) + //Flipping handled manually due to custom handling for trinary pipes + AddComponent(/datum/component/simple_rotation, ROTATION_ALTCLICK | ROTATION_CLOCKWISE) return ..() /obj/item/pipe/proc/make_from_existing(obj/machinery/atmospherics/make_from) diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index e75aa43e07d0..ed0794501fb2 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -653,7 +653,7 @@ faction = list(ROLE_SYNDICATE) desc = "A ballistic machine gun auto-turret." -/obj/machinery/porta_turret/syndicate/ComponentInitialize() +/obj/machinery/porta_turret/syndicate/Initialize() . = ..() AddComponent(/datum/component/empprotection, EMP_PROTECT_SELF | EMP_PROTECT_WIRES) @@ -761,7 +761,7 @@ faction = list("neutral","silicon","turret") mode = TURRET_LETHAL -/obj/machinery/porta_turret/centcom_shuttle/ComponentInitialize() +/obj/machinery/porta_turret/centcom_shuttle/Initialize() . = ..() AddComponent(/datum/component/empprotection, EMP_PROTECT_SELF | EMP_PROTECT_WIRES) diff --git a/code/game/machinery/stasis.dm b/code/game/machinery/stasis.dm index 71959216cf96..e7790c3e9c69 100644 --- a/code/game/machinery/stasis.dm +++ b/code/game/machinery/stasis.dm @@ -36,6 +36,13 @@ var/mattress_state = "stasis_on" var/obj/effect/overlay/vis/mattress_on +/obj/machinery/stasis/Initialize() + . = ..() + AddComponent(/datum/component/surgery_bed, \ + success_chance = 1, \ + op_computer_linkable = TRUE, \ + ) + /obj/machinery/stasis/RefreshParts() stasis_amount = initial(stasis_amount) stasis_cooldown = initial(stasis_cooldown) @@ -58,10 +65,6 @@ if(occupant) thaw_them(occupant) chill_out(occupant) - - -/obj/machinery/stasis/ComponentInitialize() - AddComponent(/datum/component/surgery_bed, 1, TRUE) /obj/machinery/stasis/examine(mob/user) . = ..() diff --git a/code/game/objects/effects/decals/cleanable/robots.dm b/code/game/objects/effects/decals/cleanable/robots.dm index 641e9eb69349..07d2de23620e 100644 --- a/code/game/objects/effects/decals/cleanable/robots.dm +++ b/code/game/objects/effects/decals/cleanable/robots.dm @@ -76,6 +76,6 @@ icon_state = "streak1" random_icon_states = list("streak1", "streak2", "streak3", "streak4", "streak5") -/obj/effect/decal/cleanable/oil/slippery/ComponentInitialize() +/obj/effect/decal/cleanable/oil/slippery/Initialize() . = ..() 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 0cacc65c35cb..55324a1da418 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() - ..() - 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.AddComponent(/datum/component/decal, icon, icon_state, dir, FALSE, color, null, null, alpha) + return INITIALIZE_HINT_QDEL diff --git a/code/game/objects/items/clown_items.dm b/code/game/objects/items/clown_items.dm index 91afba114166..13a8aaef3264 100644 --- a/code/game/objects/items/clown_items.dm +++ b/code/game/objects/items/clown_items.dm @@ -28,7 +28,7 @@ force_string = "robust... against germs" var/uses = 100 -/obj/item/soap/ComponentInitialize() +/obj/item/soap/Initialize() . = ..() AddComponent(/datum/component/slippery, 80) diff --git a/code/game/objects/items/devices/PDA/PDA_types.dm b/code/game/objects/items/devices/PDA/PDA_types.dm index c9edb8833b16..2070a3f72993 100644 --- a/code/game/objects/items/devices/PDA/PDA_types.dm +++ b/code/game/objects/items/devices/PDA/PDA_types.dm @@ -7,7 +7,7 @@ desc = "A portable microcomputer by Thinktronic Systems, LTD. The surface is coated with polytetrafluoroethylene and banana drippings." ttone = "honk" -/obj/item/pda/clown/ComponentInitialize() +/obj/item/pda/clown/Initialize() . = ..() AddComponent(/datum/component/slippery, 120, NO_SLIP_WHEN_WALKING, CALLBACK(src, PROC_REF(AfterSlip))) diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index c65b61260430..5398e14e049f 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -44,7 +44,7 @@ icon_state = "syndie_headset" item_state = "syndie_headset" -/obj/item/radio/headset/syndicate/alt/ComponentInitialize() +/obj/item/radio/headset/syndicate/alt/Initialize() . = ..() AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS)) @@ -75,7 +75,7 @@ icon_state = "sec_headset_alt" item_state = "sec_headset_alt" -/obj/item/radio/headset/headset_sec/alt/ComponentInitialize() +/obj/item/radio/headset/headset_sec/alt/Initialize() . = ..() AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS)) @@ -142,7 +142,7 @@ icon_state = "com_headset_alt" item_state = "com_headset_alt" -/obj/item/radio/headset/heads/captain/alt/ComponentInitialize() +/obj/item/radio/headset/heads/captain/alt/Initialize() . = ..() AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS)) @@ -164,7 +164,7 @@ icon_state = "com_headset_alt" item_state = "com_headset_alt" -/obj/item/radio/headset/heads/hos/ComponentInitialize() +/obj/item/radio/headset/heads/hos/Initialize() . = ..() AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS)) @@ -224,7 +224,7 @@ icon_state = "cent_headset_alt" item_state = "cent_headset_alt" -/obj/item/radio/headset/headset_cent/bowman/ComponentInitialize() +/obj/item/radio/headset/headset_cent/bowman/Initialize() . = ..() AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS)) @@ -235,7 +235,7 @@ item_state = "cent_headset_alt" keyslot = new /obj/item/encryptionkey/heads/captain -/obj/item/radio/headset/headset_cent/alt/ComponentInitialize() +/obj/item/radio/headset/headset_cent/alt/Initialize() . = ..() AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS)) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 920a7b075790..35c885483634 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -125,16 +125,13 @@ GLOBAL_LIST_INIT(channel_tokens, list( wires.cut(WIRE_TX) // OH GOD WHY secure_radio_connections = new . = ..() + AddComponent(/datum/component/empprotection, EMP_PROTECT_WIRES) frequency = sanitize_frequency(frequency, freerange) set_frequency(frequency) for(var/ch_name in channels) secure_radio_connections[ch_name] = add_radio(src, GLOB.radiochannels[ch_name]) -/obj/item/radio/ComponentInitialize() - . = ..() - AddComponent(/datum/component/empprotection, EMP_PROTECT_WIRES) - /obj/item/radio/interact(mob/user) if(unscrewed && !isAI(user)) wires.interact(user) diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index aa5a7fe16adc..60c337cbf110 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -18,9 +18,6 @@ attached_device = null return ..() -/obj/item/transfer_valve/IsAssemblyHolder() - return TRUE - /obj/item/transfer_valve/attackby(obj/item/item, mob/user, params) if(istype(item, /obj/item/tank)) if(tank_one && tank_two) diff --git a/code/game/objects/items/grenades/chem_grenade.dm b/code/game/objects/items/grenades/chem_grenade.dm index 76d9bf77a7b8..0d133ecee6be 100644 --- a/code/game/objects/items/grenades/chem_grenade.dm +++ b/code/game/objects/items/grenades/chem_grenade.dm @@ -16,15 +16,12 @@ var/casedesc = "This basic model accepts both beakers and bottles. It heats contents by 10°K upon ignition." // Appears when examining empty casings. var/obj/item/assembly/prox_sensor/landminemode = null -/obj/item/grenade/chem_grenade/ComponentInitialize() - . = ..() - AddComponent(/datum/component/empprotection, EMP_PROTECT_WIRES) - /obj/item/grenade/chem_grenade/Initialize() . = ..() create_reagents(1000) 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) + AddComponent(/datum/component/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 df14ac674abb..2f7319312fd9 100644 --- a/code/game/objects/items/grenades/plastic.dm +++ b/code/game/objects/items/grenades/plastic.dm @@ -24,9 +24,6 @@ /obj/item/grenade/plastic/Initialize() . = ..() plastic_overlay = mutable_appearance(icon, "[item_state]2", HIGH_OBJ_LAYER) - -/obj/item/grenade/plastic/ComponentInitialize() - . = ..() AddComponent(/datum/component/empprotection, EMP_PROTECT_WIRES) /obj/item/grenade/plastic/Destroy() diff --git a/code/game/objects/items/mail.dm b/code/game/objects/items/mail.dm index d1cc8e0a52d9..1836ece16989 100644 --- a/code/game/objects/items/mail.dm +++ b/code/game/objects/items/mail.dm @@ -284,7 +284,7 @@ //worn_icon_state = "bookbag" resistance_flags = FLAMMABLE -/obj/item/storage/bag/mail/ComponentInitialize() +/obj/item/storage/bag/mail/Initialize() . = ..() var/datum/component/storage/storage = GetComponent(/datum/component/storage) storage.max_w_class = WEIGHT_CLASS_NORMAL diff --git a/code/game/objects/items/plushes.dm b/code/game/objects/items/plushes.dm index 6f250f778db0..0224ee36cf68 100644 --- a/code/game/objects/items/plushes.dm +++ b/code/game/objects/items/plushes.dm @@ -516,7 +516,7 @@ icon_state = "plushie_awake" item_state = "plushie_awake" -/obj/item/toy/plush/awakenedplushie/ComponentInitialize() +/obj/item/toy/plush/awakenedplushie/Initialize() . = ..() AddComponent(/datum/component/edit_complainer) diff --git a/code/game/objects/items/pneumaticCannon.dm b/code/game/objects/items/pneumaticCannon.dm index cfb2fd05229a..fc27d3ff6412 100644 --- a/code/game/objects/items/pneumaticCannon.dm +++ b/code/game/objects/items/pneumaticCannon.dm @@ -335,15 +335,15 @@ icon_state = "quiver" item_state = "quiver" -/obj/item/storage/magspear_quiver/ComponentInitialize() +/obj/item/storage/magspear_quiver/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 20 STR.max_combined_w_class = 40 STR.display_numerical_stacking = TRUE STR.set_holdable(list( - /obj/item/throwing_star/magspear - )) + /obj/item/throwing_star/magspear, + )) /obj/item/storage/magspear_quiver/PopulateContents() for(var/i in 1 to 20) diff --git a/code/game/objects/items/storage/backpack.dm b/code/game/objects/items/storage/backpack.dm index 8a16dc156bd5..c50004f8c220 100644 --- a/code/game/objects/items/storage/backpack.dm +++ b/code/game/objects/items/storage/backpack.dm @@ -21,7 +21,7 @@ resistance_flags = NONE max_integrity = 300 -/obj/item/storage/backpack/ComponentInitialize() +/obj/item/storage/backpack/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 21 @@ -32,7 +32,7 @@ * Backpack Types */ -/obj/item/storage/backpack/old/ComponentInitialize() +/obj/item/storage/backpack/old/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 12 @@ -75,7 +75,7 @@ icon_state = "clownpack" item_state = "clownpack" -/obj/item/storage/backpack/holding/ComponentInitialize() +/obj/item/storage/backpack/holding/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.allow_big_nesting = TRUE @@ -102,14 +102,11 @@ w_class = WEIGHT_CLASS_BULKY /obj/item/storage/backpack/santabag/Initialize() - . = ..() - regenerate_presents() - -/obj/item/storage/backpack/santabag/ComponentInitialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_combined_w_class = 60 + regenerate_presents() /obj/item/storage/backpack/santabag/suicide_act(mob/user) user.visible_message(span_suicide("[user] places [src] over [user.p_their()] head and pulls it tight! It looks like [user.p_they()] [user.p_are()]n't in the Christmas spirit...")) @@ -320,7 +317,7 @@ w_class = WEIGHT_CLASS_NORMAL //Can fit in backpacks itself. level = 1 -/obj/item/storage/backpack/satchel/flat/ComponentInitialize() +/obj/item/storage/backpack/satchel/flat/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 15 @@ -362,7 +359,7 @@ item_state = "duffel" slowdown = 0.5 -/obj/item/storage/backpack/duffelbag/ComponentInitialize() +/obj/item/storage/backpack/duffelbag/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 30 @@ -474,7 +471,7 @@ slowdown = 0 resistance_flags = FIRE_PROOF -/obj/item/storage/backpack/duffelbag/syndie/ComponentInitialize() +/obj/item/storage/backpack/duffelbag/syndie/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.silent = TRUE @@ -648,7 +645,7 @@ new /obj/item/grenade/syndieminibomb(src) // For ClownOps. -/obj/item/storage/backpack/duffelbag/clown/syndie/ComponentInitialize() +/obj/item/storage/backpack/duffelbag/clown/syndie/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) slowdown = 0 @@ -669,7 +666,7 @@ name = "Clothing Dufflebag" desc = "Dufflebag designed for clothing in mind" -/obj/item/storage/backpack/duffelbag/clothing/ComponentInitialize() +/obj/item/storage/backpack/duffelbag/clothing/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 35 diff --git a/code/game/objects/items/storage/bags.dm b/code/game/objects/items/storage/bags.dm index abfcec34c960..4b62813d6b53 100644 --- a/code/game/objects/items/storage/bags.dm +++ b/code/game/objects/items/storage/bags.dm @@ -19,7 +19,7 @@ /obj/item/storage/bag slot_flags = ITEM_SLOT_BELT -/obj/item/storage/bag/ComponentInitialize() +/obj/item/storage/bag/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.allow_quick_gather = TRUE @@ -42,7 +42,7 @@ w_class = WEIGHT_CLASS_BULKY var/insertable = TRUE -/obj/item/storage/bag/trash/ComponentInitialize() +/obj/item/storage/bag/trash/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_SMALL @@ -89,7 +89,7 @@ righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi' item_flags = NO_MAT_REDEMPTION -/obj/item/storage/bag/trash/bluespace/ComponentInitialize() +/obj/item/storage/bag/trash/bluespace/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 60 @@ -113,7 +113,7 @@ var/spam_protection = FALSE //If this is TRUE, the holder won't receive any messages when they fail to pick up ore through crossing it var/mob/listeningTo -/obj/item/storage/bag/ore/ComponentInitialize() +/obj/item/storage/bag/ore/Initialize() . = ..() var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack) STR.allow_quick_empty = TRUE @@ -184,7 +184,7 @@ desc = "A revolution in convenience, this satchel allows for huge amounts of ore storage. It's been outfitted with anti-malfunction safety measures." icon_state = "satchel_bspace" -/obj/item/storage/bag/ore/holding/ComponentInitialize() +/obj/item/storage/bag/ore/holding/Initialize() . = ..() var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack) STR.max_items = INFINITY @@ -201,7 +201,7 @@ var/spam_protection = FALSE //If this is TRUE, the holder won't receive any messages when they fail to pick up ore through crossing it var/mob/listeningTo -/obj/item/storage/bag/gem/ComponentInitialize() +/obj/item/storage/bag/gem/Initialize() . = ..() var/datum/component/storage/concrete/STR = GetComponent(/datum/component/storage/concrete) STR.allow_quick_empty = TRUE @@ -258,7 +258,7 @@ w_class = WEIGHT_CLASS_TINY resistance_flags = FLAMMABLE -/obj/item/storage/bag/plants/ComponentInitialize() +/obj/item/storage/bag/plants/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL @@ -297,7 +297,7 @@ w_class = WEIGHT_CLASS_NORMAL component_type = /datum/component/storage/concrete/stack -/obj/item/storage/bag/sheetsnatcher/ComponentInitialize() +/obj/item/storage/bag/sheetsnatcher/Initialize() . = ..() var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack) STR.allow_quick_empty = TRUE @@ -313,7 +313,7 @@ desc = "" capacity = 1000//Borgs get more because >specialization -/obj/item/storage/bag/sheetsnatcher/borg/ComponentInitialize() +/obj/item/storage/bag/sheetsnatcher/borg/Initialize() . = ..() var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack) STR.max_items = 1000 @@ -330,7 +330,7 @@ w_class = WEIGHT_CLASS_BULKY //Bigger than a book because physics resistance_flags = FLAMMABLE -/obj/item/storage/bag/books/ComponentInitialize() +/obj/item/storage/bag/books/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL @@ -355,7 +355,7 @@ flags_1 = CONDUCT_1 materials = list(/datum/material/iron=3000) -/obj/item/storage/bag/tray/ComponentInitialize() +/obj/item/storage/bag/tray/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.insert_preposition = "on" @@ -409,7 +409,7 @@ w_class = WEIGHT_CLASS_SMALL resistance_flags = FLAMMABLE -/obj/item/storage/bag/chemistry/ComponentInitialize() +/obj/item/storage/bag/chemistry/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 50 @@ -429,7 +429,7 @@ w_class = WEIGHT_CLASS_SMALL resistance_flags = FLAMMABLE -/obj/item/storage/bag/bio/ComponentInitialize() +/obj/item/storage/bag/bio/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 100 @@ -449,7 +449,7 @@ w_class = WEIGHT_CLASS_SMALL resistance_flags = FLAMMABLE -/obj/item/storage/bag/construction/ComponentInitialize() +/obj/item/storage/bag/construction/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 50 @@ -459,7 +459,7 @@ STR.set_holdable(list(/obj/item/stack/ore/bluespace_crystal, /obj/item/assembly, /obj/item/stock_parts, /obj/item/reagent_containers/glass/beaker, /obj/item/stack/cable_coil, /obj/item/circuitboard, /obj/item/electronics, /obj/item/modular_computer)) -/obj/item/storage/bag/construction/admin/full/ComponentInitialize() +/obj/item/storage/bag/construction/admin/full/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 1000 @@ -487,7 +487,7 @@ w_class = WEIGHT_CLASS_NORMAL resistance_flags = FLAMMABLE -/obj/item/storage/bag/medpouch/ComponentInitialize() +/obj/item/storage/bag/medpouch/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 50 diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index 2e20fdc88034..92984b220264 100644 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -39,7 +39,7 @@ drop_sound = 'sound/items/handling/toolbelt_drop.ogg' pickup_sound = 'sound/items/handling/toolbelt_pickup.ogg' -/obj/item/storage/belt/utility/ComponentInitialize() +/obj/item/storage/belt/utility/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 11 @@ -88,7 +88,7 @@ icon_state = "makeshiftbelt" item_state = "makeshiftutility" -/obj/item/storage/belt/utility/makeshift/ComponentInitialize() +/obj/item/storage/belt/utility/makeshift/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 7 //It's a very crappy belt @@ -237,7 +237,7 @@ item_state = "medical" content_overlays = TRUE -/obj/item/storage/belt/medical/ComponentInitialize() +/obj/item/storage/belt/medical/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_BULKY @@ -315,7 +315,7 @@ w_class = WEIGHT_CLASS_BULKY content_overlays = TRUE -/obj/item/storage/belt/security/ComponentInitialize() +/obj/item/storage/belt/security/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 @@ -364,7 +364,7 @@ icon_state = "securitybelt_hos" item_state = "security_hos" -/obj/item/storage/belt/security/chief/ComponentInitialize() +/obj/item/storage/belt/security/chief/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 7 @@ -388,7 +388,7 @@ w_class = WEIGHT_CLASS_BULKY custom_premium_price = 200 -/obj/item/storage/belt/security/webbing/ComponentInitialize() +/obj/item/storage/belt/security/webbing/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 7 @@ -400,7 +400,7 @@ icon_state = "explorer1" item_state = "explorer1" -/obj/item/storage/belt/mining/ComponentInitialize() +/obj/item/storage/belt/mining/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 8 @@ -472,7 +472,7 @@ icon_state = "ebelt" item_state = "ebelt" -/obj/item/storage/belt/mining/primitive/ComponentInitialize() +/obj/item/storage/belt/mining/primitive/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 @@ -483,7 +483,7 @@ icon_state = "soulstonebelt" item_state = "soulstonebelt" -/obj/item/storage/belt/soulstone/ComponentInitialize() +/obj/item/storage/belt/soulstone/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 @@ -506,7 +506,7 @@ item_state = "champion" materials = list(/datum/material/gold=400) -/obj/item/storage/belt/champion/ComponentInitialize() +/obj/item/storage/belt/champion/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 1 @@ -521,7 +521,7 @@ item_state = "militarywebbing" resistance_flags = FIRE_PROOF -/obj/item/storage/belt/military/ComponentInitialize() +/obj/item/storage/belt/military/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_SMALL @@ -534,7 +534,7 @@ var/sponsor = pick("DonkCo", "Waffle Co.", "Roffle Co.", "Gorlax Marauders", "Tiger Cooperative") desc = "A set of snack-tical webbing worn by athletes of the [sponsor] VR sports division." -/obj/item/storage/belt/military/snack/ComponentInitialize() +/obj/item/storage/belt/military/snack/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 @@ -606,7 +606,7 @@ item_state = "security" content_overlays = TRUE // This won't end well -/obj/item/storage/belt/admin/ComponentInitialize() +/obj/item/storage/belt/admin/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 1000 @@ -657,7 +657,7 @@ icon_state = "grenadebeltnew" item_state = "security" -/obj/item/storage/belt/grenade/ComponentInitialize() +/obj/item/storage/belt/grenade/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 30 @@ -697,7 +697,7 @@ icon_state = "soulstonebelt" item_state = "soulstonebelt" -/obj/item/storage/belt/wands/ComponentInitialize() +/obj/item/storage/belt/wands/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 @@ -722,7 +722,7 @@ icon_state = "janibelt" item_state = "janibelt" -/obj/item/storage/belt/janitor/ComponentInitialize() +/obj/item/storage/belt/janitor/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 @@ -755,7 +755,7 @@ icon_state = "bandolier" item_state = "bandolier" -/obj/item/storage/belt/bandolier/ComponentInitialize() +/obj/item/storage/belt/bandolier/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 24 @@ -784,7 +784,7 @@ w_class = WEIGHT_CLASS_NORMAL alternate_worn_layer = UNDER_SUIT_LAYER -/obj/item/storage/belt/holster/ComponentInitialize() +/obj/item/storage/belt/holster/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 3 @@ -806,7 +806,7 @@ name = "syndicate shoulder holster" desc = "A modified holster that can carry more than enough firepower." -/obj/item/storage/belt/holster/syndicate/ComponentInitialize() +/obj/item/storage/belt/holster/syndicate/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 4 @@ -831,7 +831,7 @@ override_state = "[icon_state]_empty" return ..() -/obj/item/storage/belt/quiver/ComponentInitialize() +/obj/item/storage/belt/quiver/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 20 @@ -941,7 +941,7 @@ content_overlays = FALSE // The arrows are stored in the quiver, so none of it hangs out anti_magic_check = FALSE -/obj/item/storage/belt/quiver/returning/holding/ComponentInitialize() +/obj/item/storage/belt/quiver/returning/holding/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 50 @@ -953,7 +953,7 @@ icon_state = "quiver_anomaly_empty" item_state = "quiver_anomaly_empty" -/obj/item/storage/belt/quiver/anomaly/ComponentInitialize() +/obj/item/storage/belt/quiver/anomaly/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 10 // Less space for arrows due to all the parts inside @@ -962,10 +962,10 @@ /obj/item/storage/belt/quiver/anomaly/attackby(obj/item/I, mob/user, params) ..() var/static/list/anomaly_quiver_types = list( - /obj/effect/anomaly/grav = /obj/item/storage/belt/quiver/anomaly/vacuum, - /obj/effect/anomaly/pyro = /obj/item/storage/belt/quiver/anomaly/pyro, - /obj/effect/anomaly/bluespace = /obj/item/storage/belt/quiver/returning/holding - ) + /obj/effect/anomaly/grav = /obj/item/storage/belt/quiver/anomaly/vacuum, + /obj/effect/anomaly/pyro = /obj/item/storage/belt/quiver/anomaly/pyro, + /obj/effect/anomaly/bluespace = /obj/item/storage/belt/quiver/returning/holding, + ) if(istype(I, /obj/item/assembly/signaler/anomaly)) var/obj/item/assembly/signaler/anomaly/A = I @@ -1061,7 +1061,7 @@ content_overlays = FALSE w_class = WEIGHT_CLASS_TINY -/obj/item/storage/belt/quiver/admin/ComponentInitialize() +/obj/item/storage/belt/quiver/admin/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 100 @@ -1102,7 +1102,7 @@ dying_key = DYE_REGISTRY_FANNYPACK custom_price = 15 -/obj/item/storage/belt/fannypack/ComponentInitialize() +/obj/item/storage/belt/fannypack/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 3 @@ -1164,7 +1164,7 @@ icon_state = "sheath" item_state = "sheath" -/obj/item/storage/belt/sabre/ComponentInitialize() +/obj/item/storage/belt/sabre/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 1 diff --git a/code/game/objects/items/storage/book.dm b/code/game/objects/items/storage/book.dm index 31744eb5b65d..bb38221daf89 100644 --- a/code/game/objects/items/storage/book.dm +++ b/code/game/objects/items/storage/book.dm @@ -9,7 +9,7 @@ resistance_flags = FLAMMABLE var/title = "book" -/obj/item/storage/book/ComponentInitialize() +/obj/item/storage/book/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 1 diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm index eb1fb722d97b..2996e22ede74 100644 --- a/code/game/objects/items/storage/boxes.dm +++ b/code/game/objects/items/storage/boxes.dm @@ -490,7 +490,7 @@ illustration=null var/donktype = /obj/item/reagent_containers/food/snacks/donkpocket -/obj/item/storage/box/donkpockets/ComponentInitialize() +/obj/item/storage/box/donkpockets/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.set_holdable(list(/obj/item/reagent_containers/food/snacks/donkpocket)) @@ -536,7 +536,7 @@ illustration = null var/cube_type = /obj/item/reagent_containers/food/snacks/monkeycube -/obj/item/storage/box/monkeycubes/ComponentInitialize() +/obj/item/storage/box/monkeycubes/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 7 @@ -555,7 +555,7 @@ desc = "Waffle Co. brand mouse cubes. Just add water and a dash of subterfuge!" cube_type = /obj/item/reagent_containers/food/snacks/monkeycube/mouse/syndicate -/obj/item/storage/box/monkeycubes/syndicate/mice/ComponentInitialize() +/obj/item/storage/box/monkeycubes/syndicate/mice/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 24 @@ -571,7 +571,7 @@ icon_state = "monkeycubebox" illustration = null -/obj/item/storage/box/gorillacubes/ComponentInitialize() +/obj/item/storage/box/gorillacubes/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 3 @@ -587,7 +587,7 @@ icon_state = "monkeycubebox" illustration = null -/obj/item/storage/box/mixedcubes/ComponentInitialize() +/obj/item/storage/box/mixedcubes/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 @@ -753,7 +753,7 @@ icon = 'icons/obj/toy.dmi' icon_state = "spbox" -/obj/item/storage/box/snappops/ComponentInitialize() +/obj/item/storage/box/snappops/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.set_holdable(list(/obj/item/toy/snappop)) @@ -773,7 +773,7 @@ drop_sound = 'sound/items/handling/matchbox_drop.ogg' pickup_sound = 'sound/items/handling/matchbox_pickup.ogg' -/obj/item/storage/box/matches/ComponentInitialize() +/obj/item/storage/box/matches/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 10 @@ -796,7 +796,7 @@ righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' foldable = /obj/item/stack/sheet/cardboard //BubbleWrap -/obj/item/storage/box/lights/ComponentInitialize() +/obj/item/storage/box/lights/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 21 @@ -912,7 +912,7 @@ icon_state = "rubbershot_box" illustration = null -/obj/item/storage/box/rubbershot/ComponentInitialize() +/obj/item/storage/box/rubbershot/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 7 @@ -928,7 +928,7 @@ icon_state = "lethalshot_box" illustration = null -/obj/item/storage/box/lethalshot/ComponentInitialize() +/obj/item/storage/box/lethalshot/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 7 @@ -944,7 +944,7 @@ icon_state = "breachershot_box" illustration = null -/obj/item/storage/box/breacherslug/ComponentInitialize() +/obj/item/storage/box/breacherslug/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 7 @@ -960,7 +960,7 @@ icon_state = "rubbershot_box" illustration = null -/obj/item/storage/box/beanbag/ComponentInitialize() +/obj/item/storage/box/beanbag/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 7 @@ -1320,7 +1320,7 @@ /obj/item/stack/sheet/mineral/bananium/fifty = 1) generate_items_inside(items_inside,src) -/obj/item/storage/box/materials/ComponentInitialize() +/obj/item/storage/box/materials/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 200 diff --git a/code/game/objects/items/storage/briefcase.dm b/code/game/objects/items/storage/briefcase.dm index 9b79f72843bf..8bf01293d95d 100644 --- a/code/game/objects/items/storage/briefcase.dm +++ b/code/game/objects/items/storage/briefcase.dm @@ -15,7 +15,7 @@ max_integrity = 150 var/folder_path = /obj/item/folder //this is the path of the folder that gets spawned in New() -/obj/item/storage/briefcase/ComponentInitialize() +/obj/item/storage/briefcase/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL diff --git a/code/game/objects/items/storage/fancy.dm b/code/game/objects/items/storage/fancy.dm index 6f89037da156..345fba4e0963 100644 --- a/code/game/objects/items/storage/fancy.dm +++ b/code/game/objects/items/storage/fancy.dm @@ -70,7 +70,7 @@ spawn_type = /obj/item/reagent_containers/food/snacks/donut fancy_open = TRUE -/obj/item/storage/box/fancy/donut_box/ComponentInitialize() +/obj/item/storage/box/fancy/donut_box/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 @@ -84,7 +84,7 @@ spawn_type = /obj/item/reagent_containers/food/snacks/donut/deadly fancy_open = TRUE -/obj/item/storage/box/fancy/donut_box/ComponentInitialize() +/obj/item/storage/box/fancy/donut_box/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 @@ -106,7 +106,7 @@ desc = "A carton for containing eggs." spawn_type = /obj/item/reagent_containers/food/snacks/egg -/obj/item/storage/box/fancy/egg_box/ComponentInitialize() +/obj/item/storage/box/fancy/egg_box/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 12 @@ -132,7 +132,7 @@ . = ..() update_icon() -/obj/item/storage/box/fancy/candle_box/ComponentInitialize() +/obj/item/storage/box/fancy/candle_box/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 5 @@ -154,7 +154,7 @@ spawn_type = /obj/item/clothing/mask/cigarette/space_cigarette age_restricted = TRUE -/obj/item/storage/box/fancy/cigarettes/ComponentInitialize() +/obj/item/storage/box/fancy/cigarettes/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 @@ -298,7 +298,7 @@ icon_type = "rolling paper" spawn_type = /obj/item/rollingpaper -/obj/item/storage/box/fancy/rollingpapers/ComponentInitialize() +/obj/item/storage/box/fancy/rollingpapers/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 10 @@ -322,7 +322,7 @@ icon_type = "premium cigar" spawn_type = /obj/item/clothing/mask/cigarette/cigar -/obj/item/storage/box/fancy/cigarettes/cigars/ComponentInitialize() +/obj/item/storage/box/fancy/cigarettes/cigars/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 5 @@ -369,7 +369,7 @@ righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi' spawn_type = /obj/item/reagent_containers/food/snacks/tinychocolate -/obj/item/storage/box/fancy/heart_box/ComponentInitialize() +/obj/item/storage/box/fancy/heart_box/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 8 diff --git a/code/game/objects/items/storage/firstaid.dm b/code/game/objects/items/storage/firstaid.dm index 5d5f1bbb3f4f..9a53a39d56e1 100644 --- a/code/game/objects/items/storage/firstaid.dm +++ b/code/game/objects/items/storage/firstaid.dm @@ -62,7 +62,7 @@ item_state = "firstaid" desc = "A high capacity aid kit for doctors, full of medical supplies and basic surgical equipment" -/obj/item/storage/firstaid/medical/ComponentInitialize() +/obj/item/storage/firstaid/medical/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 12 @@ -241,7 +241,7 @@ item_state = "firstaid-rad" custom_premium_price = 600 -/obj/item/storage/firstaid/advanced/ComponentInitialize() +/obj/item/storage/firstaid/advanced/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 12 @@ -266,7 +266,7 @@ icon_state = "bezerk" item_state = "firstaid-bezerk" -/obj/item/storage/firstaid/tactical/ComponentInitialize() +/obj/item/storage/firstaid/tactical/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL @@ -320,7 +320,7 @@ custom_premium_price = 100 var/stored_hypo -/obj/item/storage/firstaid/hypospray/ComponentInitialize() +/obj/item/storage/firstaid/hypospray/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL @@ -582,7 +582,7 @@ righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' w_class = WEIGHT_CLASS_SMALL -/obj/item/storage/pill_bottle/ComponentInitialize() +/obj/item/storage/pill_bottle/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.allow_quick_gather = TRUE @@ -769,7 +769,7 @@ icon_state = "pill_canister_large" w_class = WEIGHT_CLASS_SMALL -/obj/item/storage/pill_bottle/gummies/ComponentInitialize() +/obj/item/storage/pill_bottle/gummies/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.allow_quick_gather = TRUE diff --git a/code/game/objects/items/storage/food.dm b/code/game/objects/items/storage/food.dm index 30dc523e27a7..2e70779dbcfd 100644 --- a/code/game/objects/items/storage/food.dm +++ b/code/game/objects/items/storage/food.dm @@ -11,17 +11,7 @@ w_class = WEIGHT_CLASS_TINY custom_price = 20 -/obj/item/storage/byummie/ComponentInitialize() - . = ..() - var/datum/component/storage/STR = GetComponent(/datum/component/storage) - STR.max_items = 4 - STR.max_w_class = WEIGHT_CLASS_TINY - STR.set_holdable(list( - /obj/item/reagent_containers/food/snacks/borer - )) - -/obj/item/storage/byummie/New() - ..() +/obj/item/storage/byummie/Initialize() var/obj/item/reagent_containers/food/snacks/borer/B for(var/i, i < 4, i++) B = new(src) @@ -34,4 +24,11 @@ if("greenyum") B.desc = "A green yummie! It's ... moving." if("yellowyum") - B.desc = "A banana flavoured yummie! Packed with lots of flavour!" \ No newline at end of file + B.desc = "A banana flavoured yummie! Packed with lots of flavour!" + . = ..() + var/datum/component/storage/STR = GetComponent(/datum/component/storage) + STR.max_items = 4 + STR.max_w_class = WEIGHT_CLASS_TINY + STR.set_holdable(list( + /obj/item/reagent_containers/food/snacks/borer, + )) diff --git a/code/game/objects/items/storage/lockbox.dm b/code/game/objects/items/storage/lockbox.dm index b059fee6e7b4..fa1ff1389205 100644 --- a/code/game/objects/items/storage/lockbox.dm +++ b/code/game/objects/items/storage/lockbox.dm @@ -13,7 +13,7 @@ var/icon_closed = "lockbox" var/icon_broken = "lockbox+b" -/obj/item/storage/lockbox/ComponentInitialize() +/obj/item/storage/lockbox/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL @@ -121,7 +121,7 @@ icon_closed = "medalbox" icon_broken = "medalbox+b" -/obj/item/storage/lockbox/medal/ComponentInitialize() +/obj/item/storage/lockbox/medal/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_SMALL @@ -272,7 +272,7 @@ . = ..() update_icon() -/obj/item/storage/lockbox/vialbox/ComponentInitialize() +/obj/item/storage/lockbox/vialbox/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_SMALL diff --git a/code/game/objects/items/storage/secure.dm b/code/game/objects/items/storage/secure.dm index 60bdf8a25108..b8010ad89e58 100644 --- a/code/game/objects/items/storage/secure.dm +++ b/code/game/objects/items/storage/secure.dm @@ -24,7 +24,7 @@ w_class = WEIGHT_CLASS_NORMAL desc = "This shouldn't exist. If it does, create an issue report." -/obj/item/storage/secure/ComponentInitialize() +/obj/item/storage/secure/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_SMALL @@ -138,7 +138,7 @@ new /obj/item/paper(src) new /obj/item/pen(src) -/obj/item/storage/secure/briefcase/ComponentInitialize() +/obj/item/storage/secure/briefcase/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 21 @@ -172,11 +172,11 @@ anchored = TRUE density = FALSE -/obj/item/storage/secure/safe/ComponentInitialize() +/obj/item/storage/secure/safe/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.set_holdable(null, list(/obj/item/storage/secure/briefcase)) - STR.max_w_class = 8 //?? + STR.max_w_class = 8 //?? /obj/item/storage/secure/safe/PopulateContents() new /obj/item/paper(src) diff --git a/code/game/objects/items/storage/storage.dm b/code/game/objects/items/storage/storage.dm index aee98909f0c1..e911203e2fda 100644 --- a/code/game/objects/items/storage/storage.dm +++ b/code/game/objects/items/storage/storage.dm @@ -14,10 +14,8 @@ /obj/item/storage/Initialize() . = ..() - PopulateContents() - -/obj/item/storage/ComponentInitialize() AddComponent(component_type) + PopulateContents() /obj/item/storage/AllowDrop() return FALSE diff --git a/code/game/objects/items/storage/toolbox.dm b/code/game/objects/items/storage/toolbox.dm index b76374179d67..8261137f9700 100644 --- a/code/game/objects/items/storage/toolbox.dm +++ b/code/game/objects/items/storage/toolbox.dm @@ -160,7 +160,7 @@ w_class = WEIGHT_CLASS_NORMAL material_flags = MATERIAL_NO_COLOR -/obj/item/storage/toolbox/syndicate/ComponentInitialize() +/obj/item/storage/toolbox/syndicate/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.silent = TRUE @@ -205,7 +205,7 @@ var/fabricator_type = /obj/item/clockwork/replica_fabricator/scarab material_flags = MATERIAL_NO_COLOR -/obj/item/storage/toolbox/brass/ComponentInitialize() +/obj/item/storage/toolbox/brass/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL @@ -243,7 +243,7 @@ item_state = "artistic_toolbox" w_class = WEIGHT_CLASS_GIGANTIC //Holds more than a regular toolbox! -/obj/item/storage/toolbox/artistic/ComponentInitialize() +/obj/item/storage/toolbox/artistic/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 20 diff --git a/code/game/objects/items/storage/uplink_kits.dm b/code/game/objects/items/storage/uplink_kits.dm index e77362be6af0..775677249295 100644 --- a/code/game/objects/items/storage/uplink_kits.dm +++ b/code/game/objects/items/storage/uplink_kits.dm @@ -515,7 +515,7 @@ /obj/item/storage/box/syndie_kit/space real_name = "boxed space suit and helmet" -/obj/item/storage/box/syndie_kit/space/ComponentInitialize() +/obj/item/storage/box/syndie_kit/space/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL @@ -541,7 +541,7 @@ /obj/item/storage/box/syndie_kit/chemical real_name = "chemical kit" -/obj/item/storage/box/syndie_kit/chemical/ComponentInitialize() +/obj/item/storage/box/syndie_kit/chemical/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 12 diff --git a/code/game/objects/items/storage/wallets.dm b/code/game/objects/items/storage/wallets.dm index 9b2a65ec972a..f36d6963cc49 100644 --- a/code/game/objects/items/storage/wallets.dm +++ b/code/game/objects/items/storage/wallets.dm @@ -9,7 +9,7 @@ var/obj/item/card/id/front_id = null var/list/combined_access -/obj/item/storage/wallet/ComponentInitialize() +/obj/item/storage/wallet/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 4 diff --git a/code/game/objects/structures/beds_chairs/bed.dm b/code/game/objects/structures/beds_chairs/bed.dm index d3d27856f56e..9f0fa41e8a76 100644 --- a/code/game/objects/structures/beds_chairs/bed.dm +++ b/code/game/objects/structures/beds_chairs/bed.dm @@ -22,8 +22,11 @@ var/buildstackamount = 2 var/bolts = TRUE -/obj/structure/bed/ComponentInitialize() - AddComponent(/datum/component/surgery_bed, 0.8) +/obj/structure/bed/Initialize() + . = ..() + AddComponent(/datum/component/surgery_bed, \ + success_chance = 0.8, \ + ) /obj/structure/bed/examine(mob/user) . = ..() diff --git a/code/game/objects/structures/beds_chairs/chair.dm b/code/game/objects/structures/beds_chairs/chair.dm index c60c8c725230..eb1547392b4f 100644 --- a/code/game/objects/structures/beds_chairs/chair.dm +++ b/code/game/objects/structures/beds_chairs/chair.dm @@ -24,9 +24,6 @@ . = ..() if(!anchored) //why would you put these on the shuttle? addtimer(CALLBACK(src, PROC_REF(RemoveFromLatejoin)), 0) - -/obj/structure/chair/ComponentInitialize() - . = ..() AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE, CALLBACK(src, PROC_REF(can_user_rotate)),CALLBACK(src, PROC_REF(can_be_rotated)),null) /obj/structure/chair/proc/can_be_rotated(mob/user) diff --git a/code/game/objects/structures/holosign.dm b/code/game/objects/structures/holosign.dm index b8be88a76bb2..0e74f21c660f 100644 --- a/code/game/objects/structures/holosign.dm +++ b/code/game/objects/structures/holosign.dm @@ -53,7 +53,7 @@ icon = 'icons/effects/effects.dmi' icon_state = "holosign_banana" -/obj/structure/holosign/holobanana/ComponentInitialize() +/obj/structure/holosign/holobanana/Initialize() . = ..() AddComponent(/datum/component/slippery, 120, GALOSHES_DONT_HELP) @@ -202,8 +202,11 @@ projector = null return ..() -/obj/structure/holobed/ComponentInitialize() - AddComponent(/datum/component/surgery_bed, 0.8) +/obj/structure/holobed/Initialize() + . = ..() + AddComponent(/datum/component/surgery_bed, \ + success_chance = 0.8, \ + ) /obj/structure/holobed/examine(mob/user) . = ..() diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm index a5af8c214ace..cbc91d16d46a 100644 --- a/code/game/objects/structures/mineral_doors.dm +++ b/code/game/objects/structures/mineral_doors.dm @@ -219,9 +219,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" @@ -241,9 +238,6 @@ icon_state = "plasma" sheetType = /obj/item/stack/sheet/mineral/plasma -/obj/structure/mineral_door/transparent/plasma/ComponentInitialize() - return - /obj/structure/mineral_door/transparent/plasma/welder_act(mob/living/user, obj/item/I) return @@ -340,9 +334,6 @@ return ..() -/obj/structure/mineral_door/paperframe/ComponentInitialize() - return - /obj/structure/mineral_door/paperframe/Destroy() queue_smooth_neighbors(src) return ..() diff --git a/code/game/objects/structures/railings.dm b/code/game/objects/structures/railings.dm index 33601bd2a7f3..5ee37f0ab736 100644 --- a/code/game/objects/structures/railings.dm +++ b/code/game/objects/structures/railings.dm @@ -17,13 +17,10 @@ density = FALSE climbable = FALSE -/obj/structure/railing/ComponentInitialize() - . = ..() - AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS ,null,CALLBACK(src, PROC_REF(can_be_rotated)),CALLBACK(src, PROC_REF(after_rotation))) - /obj/structure/railing/Initialize() . = ..() ini_dir = dir + AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS ,null,CALLBACK(src, PROC_REF(can_be_rotated)),CALLBACK(src, PROC_REF(after_rotation))) /obj/structure/railing/attackby(obj/item/I, mob/living/user, params) add_fingerprint(user) diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index b43ba8e6d852..63a69334283e 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -34,8 +34,11 @@ smooth = SMOOTH_TRUE canSmoothWith = list(/obj/structure/table, /obj/structure/table/reinforced) -/obj/structure/table/ComponentInitialize() - AddComponent(/datum/component/surgery_bed, 0.8) +/obj/structure/table/Initialize() + . = ..() + AddComponent(/datum/component/surgery_bed, \ + success_chance = 0.8, \ + ) /** Performs a complex check for toe stubbing as people would scream "IMPROVE DONT REMOVE" if I had my way. * Uses an early probability based return for to save cycles which is perfectly valid since the highest probability is 20 anyway. @@ -524,16 +527,20 @@ can_buckle = TRUE buckle_requires_restraints = TRUE -/obj/structure/table/optable/ComponentInitialize() - AddComponent(/datum/component/surgery_bed, 1, TRUE) +/obj/structure/table/optable/Initialize() + . = ..() + AddComponent(/datum/component/surgery_bed, \ + success_chance = 1, \ + extra_surgeries = TRUE, \ + ) /obj/structure/table/optable/tablepush(mob/living/user, mob/living/pushed_mob) pushed_mob.forceMove(loc) pushed_mob.set_resting(TRUE, TRUE) visible_message(span_notice("[user] lays [pushed_mob] on [src].")) -/obj/structure/table/optable/debug/ComponentInitialize() - ..() +/obj/structure/table/optable/debug/Initialize() + . = ..() var/datum/component/surgery_bed/SB = GetComponent(/datum/component/surgery_bed) SB.extra_surgeries = subtypesof(/datum/surgery) diff --git a/code/game/objects/structures/transit_tubes/transit_tube_construction.dm b/code/game/objects/structures/transit_tubes/transit_tube_construction.dm index c5d700cc8ae4..60cfb465db0d 100644 --- a/code/game/objects/structures/transit_tubes/transit_tube_construction.dm +++ b/code/game/objects/structures/transit_tubes/transit_tube_construction.dm @@ -25,7 +25,7 @@ return FALSE return TRUE -/obj/structure/c_transit_tube/ComponentInitialize() +/obj/structure/c_transit_tube/Initialize() . = ..() AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_FLIP | ROTATION_VERBS,null,null,CALLBACK(src, PROC_REF(after_rot))) @@ -134,4 +134,4 @@ /obj/structure/c_transit_tube_pod/cargo name = "unattached cargo transit tube" - icon_state = "pod_cargo" \ No newline at end of file + icon_state = "pod_cargo" diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index dd0090d3053e..e92d423887d7 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -313,7 +313,7 @@ -/obj/structure/windoor_assembly/ComponentInitialize() +/obj/structure/windoor_assembly/Initialize() . = ..() var/static/rotation_flags = ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS AddComponent(/datum/component/simple_rotation, rotation_flags, can_be_rotated=CALLBACK(src, PROC_REF(can_be_rotated)), after_rotation=CALLBACK(src, PROC_REF(after_rotation))) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 275e6dcf83d2..cda936881ad6 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -48,6 +48,7 @@ /obj/structure/window/Initialize(mapload, direct) . = ..() + AddComponent(/datum/component/simple_rotation, ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS, null, CALLBACK(src, PROC_REF(can_be_rotated)), CALLBACK(src, PROC_REF(after_rotation))) if(direct) setDir(direct) if(reinf && anchored) @@ -63,10 +64,6 @@ real_explosion_block = explosion_block explosion_block = EXPLOSION_BLOCK_PROC -/obj/structure/window/ComponentInitialize() - . = ..() - AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS ,null,CALLBACK(src, PROC_REF(can_be_rotated)),CALLBACK(src, PROC_REF(after_rotation))) - /obj/structure/window/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd) switch(the_rcd.mode) if(RCD_DECONSTRUCT) diff --git a/code/game/turfs/open.dm b/code/game/turfs/open.dm index de63a88639dd..687a5efde31e 100644 --- a/code/game/turfs/open.dm +++ b/code/game/turfs/open.dm @@ -16,11 +16,6 @@ var/clawfootstep = null var/heavyfootstep = null -/turf/open/ComponentInitialize() - . = ..() - if(wet) - AddComponent(/datum/component/wet_floor, wet, INFINITY, 0, INFINITY, TRUE) - //direction is direction of travel of A /turf/open/zPassIn(atom/movable/A, direction, turf/source) return (direction == DOWN) diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index 528f4381e122..d84fe628d154 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -52,8 +52,6 @@ if (opacity) has_opaque_atom = TRUE - 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 75f023db8c91..965412416d5f 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -89,7 +89,6 @@ GLOBAL_LIST_EMPTY(station_turfs) if (opacity) has_opaque_atom = TRUE - ComponentInitialize() if(color) add_atom_colour(color, FIXED_COLOUR_PRIORITY) return INITIALIZE_HINT_NORMAL diff --git a/code/modules/antagonists/abductor/equipment/abduction_gear.dm b/code/modules/antagonists/abductor/equipment/abduction_gear.dm index 3b783cd6e0c7..5b02e5079683 100644 --- a/code/modules/antagonists/abductor/equipment/abduction_gear.dm +++ b/code/modules/antagonists/abductor/equipment/abduction_gear.dm @@ -624,9 +624,6 @@ Congratulations! You are now trained for invasive xenobiology research!"} /obj/item/radio/headset/abductor/Initialize(mapload) . = ..() make_syndie() - -/obj/item/radio/headset/abductor/ComponentInitialize() - . = ..() AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS)) /obj/item/radio/headset/abductor/attackby(obj/item/W, mob/user, params) diff --git a/code/modules/antagonists/blob/structures/core.dm b/code/modules/antagonists/blob/structures/core.dm index 98ac915e8b11..1cecdc9f8e16 100644 --- a/code/modules/antagonists/blob/structures/core.dm +++ b/code/modules/antagonists/blob/structures/core.dm @@ -11,6 +11,7 @@ resistance_flags = LAVA_PROOF /obj/structure/blob/core/Initialize(mapload, client/new_overmind = null, placed = 0) + AddComponent(/datum/component/stationloving, FALSE, TRUE) GLOB.blob_cores += src START_PROCESSING(SSobj, src) GLOB.poi_list |= src @@ -19,7 +20,7 @@ return INITIALIZE_HINT_QDEL if(overmind) update_icon() - . = ..() + return ..() /obj/structure/blob/core/scannerreport() return "Directs the blob's expansion, gradually expands, and sustains nearby blob spores and blobbernauts." @@ -68,10 +69,6 @@ B.change_to(/obj/structure/blob/shield/core, overmind) ..() -/obj/structure/blob/core/ComponentInitialize() - . = ..() - AddComponent(/datum/component/stationloving, FALSE, TRUE) - /obj/structure/blob/core/onTransitZ(old_z, new_z) if(overmind && is_station_level(new_z)) overmind.forceMove(get_turf(src)) diff --git a/code/modules/antagonists/bloodsuckers/powers/gangrel.dm b/code/modules/antagonists/bloodsuckers/powers/gangrel.dm index 1739828d8618..058bb98b3ecb 100644 --- a/code/modules/antagonists/bloodsuckers/powers/gangrel.dm +++ b/code/modules/antagonists/bloodsuckers/powers/gangrel.dm @@ -630,11 +630,8 @@ /obj/item/radio/headset/wolfears/Initialize() . = ..() ADD_TRAIT(src, TRAIT_NODROP, BLOODSUCKER_TRAIT) - make_syndie() - -/obj/item/radio/headset/wolfears/ComponentInitialize() - . = ..() AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS)) + make_syndie() /obj/item/clothing/gloves/wolfclaws/Initialize() . = ..() diff --git a/code/modules/antagonists/bloodsuckers/structures/bloodsucker_crypt.dm b/code/modules/antagonists/bloodsuckers/structures/bloodsucker_crypt.dm index 5740e6d5cd4f..6b495566161f 100644 --- a/code/modules/antagonists/bloodsuckers/structures/bloodsucker_crypt.dm +++ b/code/modules/antagonists/bloodsuckers/structures/bloodsucker_crypt.dm @@ -476,7 +476,7 @@ desc = "It looks upsettingly familiar..." icon_state = "statue" -/obj/structure/bloodsucker/bloodstatue/ComponentInitialize() +/obj/structure/bloodsucker/bloodstatue/Initialize() . = ..() AddComponent(/datum/component/art, 30) diff --git a/code/modules/antagonists/cult/runes.dm b/code/modules/antagonists/cult/runes.dm index 81f1f960f9ee..8c731ac8ac94 100644 --- a/code/modules/antagonists/cult/runes.dm +++ b/code/modules/antagonists/cult/runes.dm @@ -45,9 +45,6 @@ Runes can either be invoked by one's self or with many different cultists. Each var/image/I = image(icon = 'icons/effects/blood.dmi', icon_state = null, loc = src) I.override = TRUE add_alt_appearance(/datum/atom_hud/alternate_appearance/basic/silicons, "cult_runes", I) - -/obj/effect/rune/ComponentInitialize() - . = ..() RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, PROC_REF(clean_act)) /obj/effect/rune/Destroy() diff --git a/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm b/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm index fa76d6315e05..d86339b48847 100644 --- a/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm +++ b/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm @@ -643,9 +643,6 @@ This is here to make the tiles around the station mininuke change when it's arme GLOB.poi_list |= src last_disk_move = world.time START_PROCESSING(SSobj, src) - -/obj/item/disk/nuclear/ComponentInitialize() - . = ..() AddComponent(/datum/component/stationloving, !fake) /obj/item/disk/nuclear/process() diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm index 7b8590f3d416..11796a177396 100644 --- a/code/modules/assembly/bomb.dm +++ b/code/modules/assembly/bomb.dm @@ -13,9 +13,6 @@ var/obj/item/assembly_holder/bombassembly = null //The first part of the bomb is an assembly holder, holding an igniter+some device var/obj/item/tank/bombtank = null //the second part of the bomb is a plasma tank -/obj/item/onetankbomb/IsSpecialAssembly() - return TRUE - /obj/item/onetankbomb/examine(mob/user) return bombtank.examine(user) diff --git a/code/modules/assembly/helpers.dm b/code/modules/assembly/helpers.dm deleted file mode 100644 index 3066b1485146..000000000000 --- a/code/modules/assembly/helpers.dm +++ /dev/null @@ -1,16 +0,0 @@ -// See _DEFINES/is_helpers.dm for type helpers - -/* -Name: IsSpecialAssembly -Desc: If true is an object that can be attached to an assembly holder but is a special thing like a plasma can or door -*/ - -/obj/proc/IsSpecialAssembly() - return FALSE - -/* -Name: IsAssemblyHolder -Desc: If true is an object that can hold an assemblyholder object -*/ -/obj/proc/IsAssemblyHolder() - return FALSE \ No newline at end of file diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm index b00f74e42374..efffbc03a861 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -14,15 +14,11 @@ var/obj/item/assembly/a_left = null var/obj/item/assembly/a_right = null -/obj/item/assembly_holder/ComponentInitialize() +/obj/item/assembly_holder/Initialize() . = ..() var/static/rotation_flags = ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_FLIP | ROTATION_VERBS AddComponent(/datum/component/simple_rotation, rotation_flags) -/obj/item/assembly_holder/IsAssemblyHolder() - return TRUE - - /obj/item/assembly_holder/proc/assemble(obj/item/assembly/A, obj/item/assembly/A2, mob/user) attach(A,user) attach(A2,user) diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm index b1078c082865..e19ace6dfc07 100644 --- a/code/modules/assembly/infrared.dm +++ b/code/modules/assembly/infrared.dm @@ -15,9 +15,6 @@ . = ..() beams = list() START_PROCESSING(SSobj, src) - -/obj/item/assembly/infra/ComponentInitialize() - . = ..() var/static/rotation_flags = ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_FLIP | ROTATION_VERBS AddComponent(/datum/component/simple_rotation, rotation_flags, after_rotation=CALLBACK(src, PROC_REF(after_rotation))) @@ -85,7 +82,7 @@ return if(holder) if(holder.master) //incase the sensor is part of an assembly that's contained in another item, such as a single tank bomb - if(!holder.master.IsSpecialAssembly() || !isturf(holder.master.loc)) + if(!istype(holder.master, /obj/item/onetankbomb) || !isturf(holder.master.loc)) return else if(!isturf(holder.loc)) //else just check where the holder is return diff --git a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm index fa6892fa62af..6f5e56423b8b 100644 --- a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm +++ b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm @@ -39,7 +39,9 @@ air = new air.copy_from_turf(src) update_air_ref() - . = ..() + if(wet) + AddComponent(/datum/component/wet_floor, wet, INFINITY, 0, INFINITY, TRUE) + return ..() /turf/open/Destroy() if(active_hotspot) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm b/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm index 4677507cec21..e4510f592166 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm @@ -34,12 +34,9 @@ icon_state = "circ-unassembled-1" /obj/machinery/atmospherics/components/binary/circulator/Initialize(mapload) - .=..() + . = ..() component_parts = list(new /obj/item/circuitboard/machine/circulator) update_icon() - -/obj/machinery/atmospherics/components/binary/circulator/ComponentInitialize() - . = ..() AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS ) /obj/machinery/atmospherics/components/binary/circulator/Destroy() diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index cc7039212f3e..46b352cf4c91 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -677,6 +677,8 @@ /obj/item/storage/belt/chameleon/Initialize() . = ..() + var/datum/component/storage/STR = GetComponent(/datum/component/storage) + STR.silent = TRUE chameleon_action = new(src) if(syndicate) chameleon_action.syndicate = TRUE @@ -685,11 +687,6 @@ chameleon_action.initialize_disguises() add_item_action(chameleon_action) -/obj/item/storage/belt/chameleon/ComponentInitialize() - . = ..() - var/datum/component/storage/STR = GetComponent(/datum/component/storage) - STR.silent = TRUE - /obj/item/storage/belt/chameleon/emp_act(severity) . = ..() if(. & EMP_PROTECT_SELF) diff --git a/code/modules/clothing/ears/_ears.dm b/code/modules/clothing/ears/_ears.dm index bc4f213ea14f..100706f63256 100644 --- a/code/modules/clothing/ears/_ears.dm +++ b/code/modules/clothing/ears/_ears.dm @@ -17,7 +17,7 @@ resistance_flags = FLAMMABLE custom_price = 40 -/obj/item/clothing/ears/earmuffs/ComponentInitialize() +/obj/item/clothing/ears/earmuffs/Initialize() . = ..() AddElement(/datum/element/earhealing) AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS)) diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index c2cfb47a1e4e..72702b84cf4d 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -25,9 +25,6 @@ . = ..() if(attached_light) alight = new(src) - -/obj/item/clothing/head/helmet/ComponentInitialize() - . = ..() AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_HEAD)) /obj/item/clothing/head/helmet/Destroy() diff --git a/code/modules/clothing/outfits/amber.dm b/code/modules/clothing/outfits/amber.dm index b8b56efc2356..04945d81a71c 100644 --- a/code/modules/clothing/outfits/amber.dm +++ b/code/modules/clothing/outfits/amber.dm @@ -16,7 +16,7 @@ // amber task force vest loadouts // To note: each vest has 7 normal slots - Hopek -/obj/item/storage/belt/military/amber/ComponentInitialize() // Amber Soldier +/obj/item/storage/belt/military/amber/Initialize() // Amber Soldier . = ..() new /obj/item/ammo_box/magazine/recharge(src) new /obj/item/ammo_box/magazine/recharge(src) @@ -27,7 +27,7 @@ new /obj/item/jawsoflife/jimmy(src) -/obj/item/storage/belt/military/amber_commander/ComponentInitialize() // Amber Commander +/obj/item/storage/belt/military/amber_commander/Initialize() // Amber Commander . = ..() new /obj/item/ammo_box/magazine/recharge(src) new /obj/item/ammo_box/magazine/recharge(src) @@ -37,7 +37,7 @@ new /obj/item/restraints/handcuffs/cable/zipties(src) new /obj/item/jawsoflife/jimmy(src) -/obj/item/storage/belt/military/amber_medic/ComponentInitialize() // Amber Medic +/obj/item/storage/belt/military/amber_medic/Initialize() // Amber Medic . = ..() new /obj/item/ammo_box/magazine/recharge(src) new /obj/item/reagent_containers/medspray/synthflesh(src) // for getting people back to defib range diff --git a/code/modules/clothing/outfits/imperial.dm b/code/modules/clothing/outfits/imperial.dm index be6da58e99b3..976b92a115db 100644 --- a/code/modules/clothing/outfits/imperial.dm +++ b/code/modules/clothing/outfits/imperial.dm @@ -105,7 +105,7 @@ // Belts -/obj/item/storage/belt/military/imperial/guardsman/ComponentInitialize() // Imperial Guardsman +/obj/item/storage/belt/military/imperial/guardsman/Initialize() // Imperial Guardsman . = ..() new /obj/item/ammo_box/magazine/recharge/lasgun(src) new /obj/item/ammo_box/magazine/recharge/lasgun(src) @@ -115,7 +115,7 @@ new /obj/item/restraints/handcuffs/cable/zipties(src) new /obj/item/jawsoflife/jimmy(src) -/obj/item/storage/belt/military/imperial/plasma/ComponentInitialize() // Plasma gunner +/obj/item/storage/belt/military/imperial/plasma/Initialize() // Plasma gunner . = ..() new /obj/item/ammo_box/magazine/recharge/lasgun/pistol(src) new /obj/item/ammo_box/magazine/recharge/lasgun/pistol(src) @@ -125,7 +125,7 @@ new /obj/item/jawsoflife/jimmy(src) new /obj/item/stack/medical/mesh(src) // for when his gun inevitably explodes -/obj/item/storage/belt/military/imperial/hotshot/ComponentInitialize() // Veteran +/obj/item/storage/belt/military/imperial/hotshot/Initialize() // Veteran . = ..() new /obj/item/ammo_box/magazine/recharge/lasgun/hotshot(src) new /obj/item/ammo_box/magazine/recharge/lasgun/hotshot(src) @@ -135,7 +135,7 @@ new /obj/item/restraints/handcuffs/cable/zipties(src) new /obj/item/jawsoflife/jimmy(src) -/obj/item/storage/belt/military/imperial/sniper/ComponentInitialize() // Marksman +/obj/item/storage/belt/military/imperial/sniper/Initialize() // Marksman . = ..() new /obj/item/ammo_box/magazine/recharge/lasgun/sniper(src) new /obj/item/ammo_box/magazine/recharge/lasgun/sniper(src) @@ -146,7 +146,7 @@ new /obj/item/twohanded/binoculars(src) -/obj/item/storage/belt/military/imperial/sergeant/ComponentInitialize() // Sergeant +/obj/item/storage/belt/military/imperial/sergeant/Initialize() // Sergeant . = ..() new /obj/item/ammo_box/magazine/boltpistol(src) new /obj/item/ammo_box/magazine/boltpistol(src) diff --git a/code/modules/clothing/outfits/occupying.dm b/code/modules/clothing/outfits/occupying.dm index 55efed2b41e2..449ef96fe011 100644 --- a/code/modules/clothing/outfits/occupying.dm +++ b/code/modules/clothing/outfits/occupying.dm @@ -26,7 +26,7 @@ // Peacekeeping force vest loadouts // To note: each vest has 7 normal slots - Hopek -/obj/item/storage/belt/military/occupying_officer/ComponentInitialize() // Occupying Officer +/obj/item/storage/belt/military/occupying_officer/Initialize() // Occupying Officer . = ..() new /obj/item/ammo_box/magazine/wt550m9/wtr(src) new /obj/item/ammo_box/magazine/wt550m9/wtr(src) @@ -37,7 +37,7 @@ new /obj/item/jawsoflife/jimmy(src) -/obj/item/storage/belt/military/occupying_commander/ComponentInitialize() // Occupying force Commander +/obj/item/storage/belt/military/occupying_commander/Initialize() // Occupying force Commander . = ..() new /obj/item/ammo_box/magazine/wt550m9/wtr(src) new /obj/item/ammo_box/magazine/wt550m9/wtr(src) @@ -50,7 +50,7 @@ /obj/item/storage/belt/military/occupying_heavy color = "#55ff9b" -/obj/item/storage/belt/military/occupying_heavy/ComponentInitialize() // Occupying Riot Officer +/obj/item/storage/belt/military/occupying_heavy/Initialize() // Occupying Riot Officer . = ..() new /obj/item/restraints/legcuffs/bola/energy(src) new /obj/item/restraints/legcuffs/bola/energy(src) diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index 3202ad2e894d..1b71d37cd955 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -17,7 +17,7 @@ resistance_flags = NONE pocket_storage_component_path = /datum/component/storage/concrete/pockets/shoes -/obj/item/clothing/shoes/combat/combat_knife/ComponentInitialize() +/obj/item/clothing/shoes/combat/combat_knife/Initialize() . = ..() new /obj/item/kitchen/knife/combat(src) diff --git a/code/modules/clothing/under/miscellaneous.dm b/code/modules/clothing/under/miscellaneous.dm index 3b005c9046f5..be4e0178a6c6 100644 --- a/code/modules/clothing/under/miscellaneous.dm +++ b/code/modules/clothing/under/miscellaneous.dm @@ -790,7 +790,7 @@ alternate_worn_layer = GLOVES_LAYER //covers hands but gloves can go over it. This is how these things work in my head. can_adjust = FALSE -/obj/item/clothing/under/mech_suit/ComponentInitialize() +/obj/item/clothing/under/mech_suit/Initialize() ..() AddComponent(/datum/component/mech_pilot, 0.9) diff --git a/code/modules/food_and_drinks/food/snacks_bread.dm b/code/modules/food_and_drinks/food/snacks_bread.dm index 0cbd47262cb9..6a1b76417add 100644 --- a/code/modules/food_and_drinks/food/snacks_bread.dm +++ b/code/modules/food_and_drinks/food/snacks_bread.dm @@ -213,7 +213,7 @@ bonus_reagents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/consumable/nutriment/vitamin = 1) tastes = list("butter", "exotic butter") -/obj/item/reagent_containers/food/snacks/butterdog/ComponentInitialize() +/obj/item/reagent_containers/food/snacks/butterdog/Initialize() . = ..() AddComponent(/datum/component/slippery, 80) diff --git a/code/modules/food_and_drinks/food/snacks_meat.dm b/code/modules/food_and_drinks/food/snacks_meat.dm index 39f2d1dd5958..d24e28d79088 100644 --- a/code/modules/food_and_drinks/food/snacks_meat.dm +++ b/code/modules/food_and_drinks/food/snacks_meat.dm @@ -418,7 +418,7 @@ tastes = list("meat" = 5, "clowns" = 3, "sixteen teslas" = 1) foodtype = MEAT -/obj/item/reagent_containers/food/snacks/meatclown/ComponentInitialize() +/obj/item/reagent_containers/food/snacks/meatclown/Initialize() . = ..() AddComponent(/datum/component/slippery, 30) diff --git a/code/modules/hydroponics/grown/banana.dm b/code/modules/hydroponics/grown/banana.dm index 532862fd2f1a..7e3fa3f495b7 100644 --- a/code/modules/hydroponics/grown/banana.dm +++ b/code/modules/hydroponics/grown/banana.dm @@ -132,6 +132,6 @@ name = "synthesized banana peel" desc = "A synthetic banana peel." -/obj/item/grown/bananapeel/specialpeel/ComponentInitialize() +/obj/item/grown/bananapeel/specialpeel/Initialize() . = ..() AddComponent(/datum/component/slippery, 40) diff --git a/code/modules/instruments/items.dm b/code/modules/instruments/items.dm index 59fd4e84fde6..e38ea5d4f973 100644 --- a/code/modules/instruments/items.dm +++ b/code/modules/instruments/items.dm @@ -84,7 +84,7 @@ custom_price = 125 instrument_range = 1 -/obj/item/instrument/piano_synth/headphones/ComponentInitialize() +/obj/item/instrument/piano_synth/headphones/Initialize() . = ..() RegisterSignal(src, COMSIG_SONG_START, PROC_REF(start_playing)) RegisterSignal(src, COMSIG_SONG_END, PROC_REF(stop_playing)) diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index 8b623a5b7edd..1d2f88d44a39 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -29,8 +29,6 @@ else forceMove(locate(1,1,1)) - ComponentInitialize() - add_verb(usr, /datum/latejoin_menu/verb/open_fallback_ui) . = ..() diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 5d6b8c20b40f..c7b0b0f8a7e5 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -16,6 +16,9 @@ setup_human_dna() + if(!(CONFIG_GET(flag/disable_human_mood))) + AddComponent(/datum/component/mood) + if(dna.species) set_species(dna.species.type) @@ -36,11 +39,6 @@ randomize_human(src) dna.initialize_dna() -/mob/living/carbon/human/ComponentInitialize() - . = ..() - if(!(CONFIG_GET(flag/disable_human_mood))) - AddComponent(/datum/component/mood) - /mob/living/carbon/human/Destroy() QDEL_NULL(physiology) return ..() diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 78b371ae68ae..7faa281c11c8 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -64,9 +64,6 @@ mulebot_count += 1 set_id(suffix || id || "#[mulebot_count]") suffix = null - -/mob/living/simple_animal/bot/mulebot/ComponentInitialize() - . = ..() AddComponent(/datum/component/ntnet_interface) /mob/living/simple_animal/bot/mulebot/Destroy() diff --git a/code/modules/plumbing/plumbers/pumps.dm b/code/modules/plumbing/plumbers/pumps.dm index 6ae02c3120fc..6f4d4e2ac297 100644 --- a/code/modules/plumbing/plumbers/pumps.dm +++ b/code/modules/plumbing/plumbers/pumps.dm @@ -18,10 +18,8 @@ /obj/machinery/power/liquid_pump/Initialize() create_reagents(volume) - return ..() - -/obj/machinery/power/liquid_pump/ComponentInitialize() AddComponent(/datum/component/plumbing/simple_supply) + return ..() /obj/machinery/power/liquid_pump/wrench_act(mob/living/user, obj/item/I) default_unfasten_wrench(user, I) diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index dc28c0f25167..f545ae16fed7 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -323,15 +323,15 @@ maxcharge = 500 rating = 3 +/obj/item/stock_parts/cell/emproof/Initialize() + . = ..() + AddComponent(/datum/component/empprotection, EMP_PROTECT_SELF) + /obj/item/stock_parts/cell/emproof/empty/Initialize() . = ..() charge = 0 update_icon() -/obj/item/stock_parts/cell/emproof/empty/ComponentInitialize() - . = ..() - AddComponent(/datum/component/empprotection, EMP_PROTECT_SELF) - /obj/item/stock_parts/cell/emproof/corrupt() return diff --git a/code/modules/power/generator.dm b/code/modules/power/generator.dm index 4f611e650120..6a61c3bbf381 100644 --- a/code/modules/power/generator.dm +++ b/code/modules/power/generator.dm @@ -24,9 +24,6 @@ SSair.atmos_machinery += src update_icon() component_parts = list(new /obj/item/circuitboard/machine/generator) - -/obj/machinery/power/generator/ComponentInitialize() - . = ..() AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS ) /obj/machinery/power/generator/Destroy() diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 87558aa6b688..bcc0bc31c0a0 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -302,12 +302,11 @@ status = LIGHT_EMPTY update(0) - - // create a new lighting fixture /obj/machinery/light/Initialize(mapload) . = ..() + RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, PROC_REF(clean_light)) if(!mapload) //sync up nightshift lighting for player made lights var/area/A = get_area(src) var/obj/machinery/power/apc/temp_apc = A.get_apc() @@ -366,6 +365,12 @@ icon_state = "[base_state]-broken" return +/obj/machinery/light/proc/clean_light(O,strength) + if(strength < CLEAN_TYPE_BLOOD) + return + bulb_colour = initial(bulb_colour) + update() + // update the icon_state and luminosity of the light depending on its state /obj/machinery/light/proc/update(trigger = TRUE) switch(status) @@ -880,9 +885,6 @@ /obj/item/light/Initialize() . = ..() update() - -/obj/item/light/ComponentInitialize() - . = ..() AddComponent(/datum/component/caltrop, force) /obj/item/light/Crossed(atom/movable/AM) diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index e8bb1661c7f0..192893b4a608 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -73,10 +73,8 @@ sparks = new sparks.attach(src) sparks.set_up(5, TRUE, src) - -/obj/machinery/power/emitter/ComponentInitialize() - . = ..() AddComponent(/datum/component/empprotection, EMP_PROTECT_SELF | EMP_PROTECT_WIRES) + AddComponent(/datum/component/simple_rotation, ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS, null, CALLBACK(src, PROC_REF(can_be_rotated))) /obj/machinery/power/emitter/RefreshParts() var/max_reload = initial(maximum_reload_time) + 20 @@ -106,10 +104,6 @@ if(in_range(user, src) || isobserver(user)) . += "The status display reads: Emitting one beam each [fire_delay*0.1] seconds, shooting [shots_before_reload] times before recharging.
Power consumption at [active_power_usage]W." -/obj/machinery/power/emitter/ComponentInitialize() - . = ..() - AddComponent(/datum/component/simple_rotation, ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS, null, CALLBACK(src, PROC_REF(can_be_rotated))) - /obj/machinery/power/emitter/proc/can_be_rotated(mob/user,rotation_type) if (anchored) to_chat(user, span_warning("It is fastened to the floor!")) diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index d9e087c18724..7255f1fa6697 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -58,9 +58,6 @@ field_generator power level display . = ..() fields = list() connected_gens = list() - -/obj/machinery/field/generator/ComponentInitialize() - . = ..() AddComponent(/datum/component/empprotection, EMP_PROTECT_SELF | EMP_PROTECT_WIRES) /obj/machinery/field/generator/process() diff --git a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm index 6f5824de0c19..88fa7266e58c 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm @@ -46,6 +46,10 @@ if(PA_CONSTRUCTION_PANEL_OPEN) . += "The panel is open." +/obj/structure/particle_accelerator/Initialize() + . = ..() + AddComponent(/datum/component/simple_rotation, ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS ) + /obj/structure/particle_accelerator/Destroy() construction_state = PA_CONSTRUCTION_UNSECURED if(master) @@ -54,11 +58,6 @@ master = null return ..() -/obj/structure/particle_accelerator/ComponentInitialize() - . = ..() - AddComponent(/datum/component/simple_rotation, ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS ) - - /obj/structure/particle_accelerator/attackby(obj/item/W, mob/user, params) if(user.a_intent == INTENT_HARM) return ..() diff --git a/code/modules/projectiles/guns/energy/dueling.dm b/code/modules/projectiles/guns/energy/dueling.dm index 6addb2cd4fe9..952fa6c2f420 100644 --- a/code/modules/projectiles/guns/energy/dueling.dm +++ b/code/modules/projectiles/guns/energy/dueling.dm @@ -316,7 +316,7 @@ icon_closed = "medalbox" icon_broken = "medalbox+b" -/obj/item/storage/lockbox/dueling/ComponentInitialize() +/obj/item/storage/lockbox/dueling/Initialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_SMALL @@ -343,4 +343,4 @@ gun_A.duel = D gun_B.duel = D D.gun_A = gun_A - D.gun_B = gun_B \ No newline at end of file + D.gun_B = gun_B diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index 3d38e3d93bca..5b7027ea68dd 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -208,7 +208,8 @@ else CP.disable() -/obj/structure/reagent_dispensers/plumbed/ComponentInitialize() +/obj/structure/reagent_dispensers/plumbed/Initialize() + . = ..() AddComponent(/datum/component/plumbing/simple_supply) /obj/structure/reagent_dispensers/plumbed/storage @@ -216,5 +217,6 @@ icon_state = "tank_stationairy" reagent_id = null //start empty -/obj/structure/reagent_dispensers/plumbed/storage/ComponentInitialize() +/obj/structure/reagent_dispensers/plumbed/storage/Initialize() + . = ..() AddComponent(/datum/component/plumbing/tank) diff --git a/code/modules/recycling/disposal/construction.dm b/code/modules/recycling/disposal/construction.dm index 83af120d4cb8..350c5a8a25e7 100644 --- a/code/modules/recycling/disposal/construction.dm +++ b/code/modules/recycling/disposal/construction.dm @@ -28,8 +28,8 @@ pipename = initial(pipe_type.name) + var/datum/component/simple_rotation/rotcomp = AddComponent(/datum/component/simple_rotation, ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_FLIP | ROTATION_VERBS, null, CALLBACK(src, PROC_REF(can_be_rotated)), CALLBACK(src, PROC_REF(after_rot))) if(flip) - var/datum/component/simple_rotation/rotcomp = GetComponent(/datum/component/simple_rotation) rotcomp.BaseRot(null,ROTATION_FLIP) update_icon() @@ -61,7 +61,7 @@ // hide called by levelupdate if turf intact status changes // change visibility status and force update of icon -/obj/structure/disposalconstruct/hide(var/intact) +/obj/structure/disposalconstruct/hide(intact) invisibility = (intact && level==1) ? INVISIBILITY_MAXIMUM: 0 // hide if floor is intact update_icon() @@ -87,10 +87,6 @@ dpdir |= turn(dir, 180) return dpdir -/obj/structure/disposalconstruct/ComponentInitialize() - . = ..() - AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_FLIP | ROTATION_VERBS ,null,CALLBACK(src, PROC_REF(can_be_rotated)), CALLBACK(src, PROC_REF(after_rot))) - /obj/structure/disposalconstruct/proc/after_rot(mob/user,rotation_type) if(rotation_type == ROTATION_FLIP) var/obj/structure/disposalpipe/temp = pipe_type diff --git a/code/modules/religion/religion_structures.dm b/code/modules/religion/religion_structures.dm index ae918a84d964..92f449b1f4c7 100644 --- a/code/modules/religion/religion_structures.dm +++ b/code/modules/religion/religion_structures.dm @@ -16,9 +16,6 @@ /obj/structure/altar_of_gods/Initialize(mapload) . = ..() reflect_sect_in_icons() - -/obj/structure/altar_of_gods/ComponentInitialize() - . = ..() AddComponent(/datum/component/religious_tool, ALL, FALSE, CALLBACK(src, PROC_REF(reflect_sect_in_icons))) /obj/structure/altar_of_gods/attack_hand(mob/living/user) diff --git a/code/modules/surgery/tools.dm b/code/modules/surgery/tools.dm index caabcfb447dd..b7d5affdcc66 100644 --- a/code/modules/surgery/tools.dm +++ b/code/modules/surgery/tools.dm @@ -479,7 +479,7 @@ bolts = FALSE var/obj/picked_up = /obj/item/surgical_mat -/obj/structure/bed/surgical_mat/ComponentInitialize() +/obj/structure/bed/surgical_mat/Initialize() ..() var/datum/component/surgery_bed/SB = GetComponent(/datum/component/surgery_bed) SB.success_chance = 0.8 @@ -538,7 +538,7 @@ icon_state = "opmat_goli" picked_up = /obj/item/surgical_mat/goliath -/obj/structure/bed/surgical_mat/goliath/ComponentInitialize() +/obj/structure/bed/surgical_mat/goliath/Initialize() ..() var/datum/component/surgery_bed/SB = GetComponent(/datum/component/surgery_bed) SB.success_chance = 0.85 diff --git a/code/modules/vehicles/wheelchair.dm b/code/modules/vehicles/wheelchair.dm index 33c194679763..abb28ebb490e 100644 --- a/code/modules/vehicles/wheelchair.dm +++ b/code/modules/vehicles/wheelchair.dm @@ -20,9 +20,6 @@ D.set_vehicle_dir_layer(NORTH, ABOVE_MOB_LAYER) D.set_vehicle_dir_layer(EAST, OBJ_LAYER) D.set_vehicle_dir_layer(WEST, OBJ_LAYER) - -/obj/vehicle/ridden/wheelchair/ComponentInitialize() //Since it's technically a chair I want it to have chair properties - . = ..() AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE, CALLBACK(src, PROC_REF(can_user_rotate)),CALLBACK(src, PROC_REF(can_be_rotated)),null) /obj/vehicle/ridden/wheelchair/obj_destruction(damage_flag) diff --git a/yogstation.dme b/yogstation.dme index 3e643d0be2b1..efd738d90655 100644 --- a/yogstation.dme +++ b/yogstation.dme @@ -1843,7 +1843,6 @@ #include "code\modules\assembly\doorcontrol.dm" #include "code\modules\assembly\flash.dm" #include "code\modules\assembly\health.dm" -#include "code\modules\assembly\helpers.dm" #include "code\modules\assembly\holder.dm" #include "code\modules\assembly\igniter.dm" #include "code\modules\assembly\infrared.dm" @@ -4108,7 +4107,6 @@ #include "yogstation\code\modules\paperwork\photography.dm" #include "yogstation\code\modules\power\apc.dm" #include "yogstation\code\modules\power\hugbox.dm" -#include "yogstation\code\modules\power\lighting.dm" #include "yogstation\code\modules\power\stationarybike.dm" #include "yogstation\code\modules\power\validhunter.dm" #include "yogstation\code\modules\power\singularity\particle_accelerator\particle.dm" diff --git a/yogstation/code/game/objects/items/storage/boxes.dm b/yogstation/code/game/objects/items/storage/boxes.dm index d7e81532a789..41d6140c305a 100644 --- a/yogstation/code/game/objects/items/storage/boxes.dm +++ b/yogstation/code/game/objects/items/storage/boxes.dm @@ -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) \ No newline at end of file + new /obj/item/reagent_containers/food/snacks/monkeycube/goat(src) diff --git a/yogstation/code/game/objects/items/tool_switcher.dm b/yogstation/code/game/objects/items/tool_switcher.dm index c2f268b97b9e..2c20f5641029 100644 --- a/yogstation/code/game/objects/items/tool_switcher.dm +++ b/yogstation/code/game/objects/items/tool_switcher.dm @@ -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) diff --git a/yogstation/code/game/objects/structures/toilet_bong.dm b/yogstation/code/game/objects/structures/toilet_bong.dm index 53d10d66c52d..64e995a4f3c9 100644 --- a/yogstation/code/game/objects/structures/toilet_bong.dm +++ b/yogstation/code/game/objects/structures/toilet_bong.dm @@ -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() . = ..() diff --git a/yogstation/code/game/soccer.dm b/yogstation/code/game/soccer.dm index 7352234ae0df..ccd15654d705 100644 --- a/yogstation/code/game/soccer.dm +++ b/yogstation/code/game/soccer.dm @@ -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) diff --git a/yogstation/code/modules/guardian/guardianbuilder.dm b/yogstation/code/modules/guardian/guardianbuilder.dm index 636af89c92f3..d6246f0f240c 100644 --- a/yogstation/code/modules/guardian/guardianbuilder.dm +++ b/yogstation/code/modules/guardian/guardianbuilder.dm @@ -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 diff --git a/yogstation/code/modules/paperwork/photography.dm b/yogstation/code/modules/paperwork/photography.dm index 769cb507bf83..002e184b4159 100644 --- a/yogstation/code/modules/paperwork/photography.dm +++ b/yogstation/code/modules/paperwork/photography.dm @@ -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)) \ No newline at end of file + STR.can_hold = typecacheof(list(/obj/item/camera_film,/obj/item/photo,/obj/item/storage/photo_album,/obj/item/camera,/obj/item/storage/photobook)) diff --git a/yogstation/code/modules/power/lighting.dm b/yogstation/code/modules/power/lighting.dm deleted file mode 100644 index 4c085c75522a..000000000000 --- a/yogstation/code/modules/power/lighting.dm +++ /dev/null @@ -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() diff --git a/yogstation/code/modules/spacepods/parts.dm b/yogstation/code/modules/spacepods/parts.dm index b261ec0cf842..0373bcb1da2e 100644 --- a/yogstation/code/modules/spacepods/parts.dm +++ b/yogstation/code/modules/spacepods/parts.dm @@ -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()