diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm index 18ae4ac0cf8..5cc94feba4b 100644 --- a/code/__DEFINES/components.dm +++ b/code/__DEFINES/components.dm @@ -2,10 +2,6 @@ #define SEND_GLOBAL_SIGNAL(sigtype, arguments...) ( SEND_SIGNAL(SSdcs, sigtype, ##arguments) ) -//shorthand -#define GET_COMPONENT_FROM(varname, path, target) var##path/##varname = ##target.GetComponent(##path) -#define GET_COMPONENT(varname, path) GET_COMPONENT_FROM(varname, path, src) - #define COMPONENT_INCOMPATIBLE 1 #define COMPONENT_NOTRANSFER 2 diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 5350500e79c..47e966f3ff4 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -40,7 +40,7 @@ return TRUE user.changeNext_move(CLICK_CD_MELEE) if(user.a_intent == INTENT_HARM && stat == DEAD && (butcher_results || guaranteed_butcher_results)) //can we butcher it? - GET_COMPONENT_FROM(butchering, /datum/component/butchering, I) + var/datum/component/butchering/butchering = I.GetComponent(/datum/component/butchering) if(butchering && butchering.butchering_enabled) to_chat(user, "You begin to butcher [src]...") playsound(loc, butchering.butcher_sound, 50, TRUE, -1) diff --git a/code/controllers/subsystem/economy.dm b/code/controllers/subsystem/economy.dm index 8c2e2d341ac..242c4ad7c18 100644 --- a/code/controllers/subsystem/economy.dm +++ b/code/controllers/subsystem/economy.dm @@ -91,7 +91,7 @@ SUBSYSTEM_DEF(economy) crew++ if(H.stat != DEAD) alive_crew++ - GET_COMPONENT_FROM(mood, /datum/component/mood, H) + var/datum/component/mood/mood = H.GetComponent(/datum/component/mood) var/medical_cash = (H.health / H.maxHealth) * alive_humans_bounty if(mood) var/datum/bank_account/D = get_dep_account(ACCOUNT_SRV) diff --git a/code/datums/brain_damage/creepy_trauma.dm b/code/datums/brain_damage/creepy_trauma.dm index bbbefc2cffe..59451332089 100644 --- a/code/datums/brain_damage/creepy_trauma.dm +++ b/code/datums/brain_damage/creepy_trauma.dm @@ -69,7 +69,7 @@ if(!viewing) return message var/choked_up - GET_COMPONENT_FROM(mood, /datum/component/mood, owner) + var/datum/component/mood/mood = owner.GetComponent(/datum/component/mood) if(mood) if(mood.sanity >= SANITY_GREAT) choked_up = social_interaction() diff --git a/code/datums/components/README.md b/code/datums/components/README.md index 05ce0577216..66b8f81e0dd 100644 --- a/code/datums/components/README.md +++ b/code/datums/components/README.md @@ -64,8 +64,6 @@ Stands have a lot of procs which mimic mob procs. Rather than inserting hooks fo * Returns a list of references to all components of component_type that exist in the datum 1. `/datum/proc/GetExactComponent(component_type(type)) -> datum/component?` (public, final) * Returns a reference to a component whose type MATCHES component_type if that component exists in the datum, null otherwise -1. `GET_COMPONENT(varname, component_type)` OR `GET_COMPONENT_FROM(varname, component_type, src)` - * Shorthand for `var/component_type/varname = src.GetComponent(component_type)` 1. `SEND_SIGNAL(target, sigtype, ...)` (public, final) * Use to send signals to target datum * Extra arguments are to be specified in the signal definition diff --git a/code/datums/components/ntnet_interface.dm b/code/datums/components/ntnet_interface.dm index 810465823c8..7623d5ef866 100644 --- a/code/datums/components/ntnet_interface.dm +++ b/code/datums/components/ntnet_interface.dm @@ -6,7 +6,7 @@ return /datum/proc/ntnet_send(datum/netdata/data, netid) - GET_COMPONENT(NIC, /datum/component/ntnet_interface) + var/datum/component/ntnet_interface/NIC = GetComponent(/datum/component/ntnet_interface) if(!NIC) return FALSE return NIC.__network_send(data, netid) diff --git a/code/datums/components/rotation.dm b/code/datums/components/rotation.dm index 273a4ed8172..5e0650f88a5 100644 --- a/code/datums/components/rotation.dm +++ b/code/datums/components/rotation.dm @@ -143,7 +143,7 @@ set name = "Rotate Clockwise" set category = "Object" set src in oview(1) - GET_COMPONENT(rotcomp,/datum/component/simple_rotation) + var/datum/component/simple_rotation/rotcomp = GetComponent(/datum/component/simple_rotation) if(rotcomp) rotcomp.HandRot(null,usr,ROTATION_CLOCKWISE) @@ -151,7 +151,7 @@ set name = "Rotate Counter-Clockwise" set category = "Object" set src in oview(1) - GET_COMPONENT(rotcomp,/datum/component/simple_rotation) + var/datum/component/simple_rotation/rotcomp = GetComponent(/datum/component/simple_rotation) if(rotcomp) rotcomp.HandRot(null,usr,ROTATION_COUNTERCLOCKWISE) @@ -159,6 +159,6 @@ set name = "Flip" set category = "Object" set src in oview(1) - GET_COMPONENT(rotcomp,/datum/component/simple_rotation) + var/datum/component/simple_rotation/rotcomp = GetComponent(/datum/component/simple_rotation) if(rotcomp) rotcomp.HandRot(null,usr,ROTATION_FLIP) diff --git a/code/datums/components/storage/storage.dm b/code/datums/components/storage/storage.dm index 480b204e0c3..12de0708fa9 100644 --- a/code/datums/components/storage/storage.dm +++ b/code/datums/components/storage/storage.dm @@ -619,7 +619,7 @@ return FALSE if(isitem(host)) var/obj/item/IP = host - GET_COMPONENT_FROM(STR_I, /datum/component/storage, I) + var/datum/component/storage/STR_I = I.GetComponent(/datum/component/storage) if((I.w_class >= IP.w_class) && STR_I && !allow_big_nesting) if(!stop_messages) to_chat(M, "[IP] cannot hold [I] as it's a storage item of the same size!") diff --git a/code/datums/components/swarming.dm b/code/datums/components/swarming.dm index 17b2178df69..3818126c0eb 100644 --- a/code/datums/components/swarming.dm +++ b/code/datums/components/swarming.dm @@ -12,7 +12,7 @@ RegisterSignal(parent, COMSIG_MOVABLE_UNCROSSED, .proc/leave_swarm) /datum/component/swarming/proc/join_swarm(datum/source, atom/movable/AM) - GET_COMPONENT_FROM(other_swarm, /datum/component/swarming, AM) + var/datum/component/swarming/other_swarm = AM.GetComponent(/datum/component/swarming) if(!other_swarm) return swarm() @@ -21,7 +21,7 @@ other_swarm.swarm_members |= src /datum/component/swarming/proc/leave_swarm(datum/source, atom/movable/AM) - GET_COMPONENT_FROM(other_swarm, /datum/component/swarming, AM) + var/datum/component/swarming/other_swarm = AM.GetComponent(/datum/component/swarming) if(!other_swarm || !(other_swarm in swarm_members)) return swarm_members -= other_swarm @@ -41,4 +41,4 @@ var/atom/movable/owner = parent if(is_swarming) animate(owner, pixel_x = owner.pixel_x - offset_x, pixel_y = owner.pixel_y - offset_y, time = 2) - is_swarming = FALSE \ No newline at end of file + is_swarming = FALSE diff --git a/code/datums/traits/good.dm b/code/datums/traits/good.dm index ff1ccc15b60..0d82c615a51 100644 --- a/code/datums/traits/good.dm +++ b/code/datums/traits/good.dm @@ -18,13 +18,13 @@ medical_record_text = "Patient was administered the Apathy Evaluation Scale but did not bother to complete it." /datum/quirk/apathetic/add() - GET_COMPONENT_FROM(mood, /datum/component/mood, quirk_holder) + var/datum/component/mood/mood = quirk_holder.GetComponent(/datum/component/mood) if(mood) mood.mood_modifier -= 0.2 /datum/quirk/apathetic/remove() if(quirk_holder) - GET_COMPONENT_FROM(mood, /datum/component/mood, quirk_holder) + var/datum/component/mood/mood = quirk_holder.GetComponent(/datum/component/mood) if(mood) mood.mood_modifier += 0.2 diff --git a/code/datums/traits/negative.dm b/code/datums/traits/negative.dm index e6af7b9270b..58b9e843bdc 100644 --- a/code/datums/traits/negative.dm +++ b/code/datums/traits/negative.dm @@ -219,13 +219,13 @@ medical_record_text = "Patient demonstrates a high level of emotional volatility." /datum/quirk/hypersensitive/add() - GET_COMPONENT_FROM(mood, /datum/component/mood, quirk_holder) + var/datum/component/mood/mood = quirk_holder.GetComponent(/datum/component/mood) if(mood) mood.mood_modifier += 0.5 /datum/quirk/hypersensitive/remove() if(quirk_holder) - GET_COMPONENT_FROM(mood, /datum/component/mood, quirk_holder) + var/datum/component/mood/mood = quirk_holder.GetComponent(/datum/component/mood) if(mood) mood.mood_modifier -= 0.5 diff --git a/code/game/atoms.dm b/code/game/atoms.dm index b4155617795..ce174e39d13 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -423,7 +423,7 @@ /atom/proc/component_storage_contents_dump_act(datum/component/storage/src_object, mob/user) var/list/things = src_object.contents() var/datum/progressbar/progress = new(user, things.len, src) - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) while (do_after(user, 10, TRUE, src, FALSE, CALLBACK(STR, /datum/component/storage.proc/handle_mass_item_insertion, things, src_object, user, progress))) stoplag(1) qdel(progress) diff --git a/code/game/gamemodes/clown_ops/clown_weapons.dm b/code/game/gamemodes/clown_ops/clown_weapons.dm index b1a8b364d97..b2ff6777564 100644 --- a/code/game/gamemodes/clown_ops/clown_weapons.dm +++ b/code/game/gamemodes/clown_ops/clown_weapons.dm @@ -39,12 +39,12 @@ /obj/item/clothing/shoes/clown_shoes/banana_shoes/combat/Initialize() . = ..() - GET_COMPONENT(bananium, /datum/component/material_container) + var/datum/component/material_container/bananium = GetComponent(/datum/component/material_container) bananium.insert_amount(max_recharge, MAT_BANANIUM) START_PROCESSING(SSobj, src) /obj/item/clothing/shoes/clown_shoes/banana_shoes/combat/process() - GET_COMPONENT(bananium, /datum/component/material_container) + var/datum/component/material_container/bananium = GetComponent(/datum/component/material_container) var/bananium_amount = bananium.amount(MAT_BANANIUM) if(bananium_amount < max_recharge) bananium.insert_amount(min(recharge_rate, max_recharge - bananium_amount), MAT_BANANIUM) @@ -73,19 +73,19 @@ /obj/item/melee/transforming/energy/sword/bananium/ComponentInitialize() . = ..() AddComponent(/datum/component/slippery, 60, GALOSHES_DONT_HELP) - GET_COMPONENT(slipper, /datum/component/slippery) + var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery) slipper.signal_enabled = active /obj/item/melee/transforming/energy/sword/bananium/attack(mob/living/M, mob/living/user) ..() if(active) - GET_COMPONENT(slipper, /datum/component/slippery) + var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery) slipper.Slip(src, M) /obj/item/melee/transforming/energy/sword/bananium/throw_impact(atom/hit_atom, throwingdatum) . = ..() if(active) - GET_COMPONENT(slipper, /datum/component/slippery) + var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery) slipper.Slip(src, hit_atom) /obj/item/melee/transforming/energy/sword/bananium/attackby(obj/item/I, mob/living/user, params) @@ -98,7 +98,7 @@ /obj/item/melee/transforming/energy/sword/bananium/transform_weapon(mob/living/user, supress_message_text) ..() - GET_COMPONENT(slipper, /datum/component/slippery) + var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery) slipper.signal_enabled = active /obj/item/melee/transforming/energy/sword/bananium/ignition_effect(atom/A, mob/user) @@ -108,7 +108,7 @@ if(!active) transform_weapon(user, TRUE) user.visible_message("[user] is [pick("slitting [user.p_their()] stomach open with", "falling on")] [src]! It looks like [user.p_theyre()] trying to commit seppuku, but the blade slips off of [user.p_them()] harmlessly!") - GET_COMPONENT(slipper, /datum/component/slippery) + var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery) slipper.Slip(src, user) return SHAME @@ -130,12 +130,12 @@ /obj/item/shield/energy/bananium/ComponentInitialize() . = ..() AddComponent(/datum/component/slippery, 60, GALOSHES_DONT_HELP) - GET_COMPONENT(slipper, /datum/component/slippery) + var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery) slipper.signal_enabled = active /obj/item/shield/energy/bananium/attack_self(mob/living/carbon/human/user) ..() - GET_COMPONENT(slipper, /datum/component/slippery) + var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery) slipper.signal_enabled = active /obj/item/shield/energy/bananium/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback, force) @@ -149,7 +149,7 @@ if(active) var/caught = hit_atom.hitby(src, FALSE, FALSE, throwingdatum=throwingdatum) if(iscarbon(hit_atom) && !caught)//if they are a carbon and they didn't catch it - GET_COMPONENT(slipper, /datum/component/slippery) + var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery) slipper.Slip(src, hit_atom) if(thrownby && !caught) sleep(1) diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 4c4e4bb365e..3b4110ff3fe 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -82,7 +82,7 @@ popup.open() /obj/machinery/autolathe/on_deconstruction() - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) materials.retrieve_all() /obj/machinery/autolathe/attackby(obj/item/O, mob/user, params) @@ -166,7 +166,7 @@ var/power = max(2000, (metal_cost+glass_cost)*multiplier/5) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) if((materials.amount(MAT_METAL) >= metal_cost*multiplier*coeff) && (materials.amount(MAT_GLASS) >= glass_cost*multiplier*coeff)) busy = TRUE use_power(power) @@ -190,7 +190,7 @@ return /obj/machinery/autolathe/proc/make_item(power, metal_cost, glass_cost, multiplier, coeff, is_stack) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) var/atom/A = drop_location() use_power(power) var/list/materials_used = list(MAT_METAL=metal_cost*coeff*multiplier, MAT_GLASS=glass_cost*coeff*multiplier) @@ -215,7 +215,7 @@ var/T = 0 for(var/obj/item/stock_parts/matter_bin/MB in component_parts) T += MB.rating*75000 - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) materials.max_amount = T T=1.2 for(var/obj/item/stock_parts/manipulator/M in component_parts) @@ -224,7 +224,7 @@ /obj/machinery/autolathe/examine(mob/user) ..() - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) if(in_range(user, src) || isobserver(user)) to_chat(user, "The status display reads: Storing up to [materials.max_amount] material units.
Material consumption at [prod_coeff*100]%.") @@ -270,7 +270,7 @@ dat += "[D.name]" if(ispath(D.build_path, /obj/item/stack)) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) var/max_multiplier = min(D.maxstack, D.materials[MAT_METAL] ?round(materials.amount(MAT_METAL)/D.materials[MAT_METAL]):INFINITY,D.materials[MAT_GLASS]?round(materials.amount(MAT_GLASS)/D.materials[MAT_GLASS]):INFINITY) if (max_multiplier>10 && !disabled) dat += " x10" @@ -302,7 +302,7 @@ dat += "[D.name]" if(ispath(D.build_path, /obj/item/stack)) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) var/max_multiplier = min(D.maxstack, D.materials[MAT_METAL] ?round(materials.amount(MAT_METAL)/D.materials[MAT_METAL]):INFINITY,D.materials[MAT_GLASS]?round(materials.amount(MAT_GLASS)/D.materials[MAT_GLASS]):INFINITY) if (max_multiplier>10 && !disabled) dat += " x10" @@ -317,7 +317,7 @@ return dat /obj/machinery/autolathe/proc/materials_printout() - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) var/dat = "Total amount: [materials.total_amount] / [materials.max_amount] cm3
" for(var/mat_id in materials.materials) var/datum/material/M = materials.materials[mat_id] @@ -330,7 +330,7 @@ var/coeff = (ispath(D.build_path, /obj/item/stack) ? 1 : prod_coeff) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) if(D.materials[MAT_METAL] && (materials.amount(MAT_METAL) < (D.materials[MAT_METAL] * coeff * amount))) return FALSE if(D.materials[MAT_GLASS] && (materials.amount(MAT_GLASS) < (D.materials[MAT_GLASS] * coeff * amount))) diff --git a/code/game/machinery/droneDispenser.dm b/code/game/machinery/droneDispenser.dm index 116d786ced0..07239266111 100644 --- a/code/game/machinery/droneDispenser.dm +++ b/code/game/machinery/droneDispenser.dm @@ -146,7 +146,7 @@ if((stat & (NOPOWER|BROKEN)) || !anchored) return - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) if(!materials.has_materials(using_materials)) return // We require more minerals @@ -211,7 +211,7 @@ /obj/machinery/droneDispenser/attackby(obj/item/I, mob/living/user) if(I.tool_behaviour == TOOL_CROWBAR) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) materials.retrieve_all() I.play_tool_sound(src) to_chat(user, "You retrieve the materials from [src].") diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm index cefb6f8a0e7..eebe92f5f32 100644 --- a/code/game/machinery/recycler.dm +++ b/code/game/machinery/recycler.dm @@ -32,10 +32,10 @@ mat_mod *= 50000 for(var/obj/item/stock_parts/manipulator/M in component_parts) amt_made = 12.5 * M.rating //% of materials salvaged - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) materials.max_amount = mat_mod amount_produced = min(50, amt_made) + 50 - GET_COMPONENT(butchering, /datum/component/butchering) + var/datum/component/butchering/butchering = GetComponent(/datum/component/butchering) butchering.effectiveness = amount_produced butchering.bonus_modifier = amount_produced/5 @@ -142,7 +142,7 @@ qdel(L) return else - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) var/material_amount = materials.get_item_material_amount(I) if(!material_amount) qdel(I) @@ -193,7 +193,7 @@ L.Unconscious(100) L.adjustBruteLoss(crush_damage) if(L.stat == DEAD && (L.butcher_results || L.guaranteed_butcher_results)) - GET_COMPONENT(butchering, /datum/component/butchering) + var/datum/component/butchering/butchering = GetComponent(/datum/component/butchering) butchering.Butcher(src,L) /obj/machinery/recycler/deathtrap diff --git a/code/game/machinery/scan_gate.dm b/code/game/machinery/scan_gate.dm index 5a2ef113d02..eb385a1df4c 100644 --- a/code/game/machinery/scan_gate.dm +++ b/code/game/machinery/scan_gate.dm @@ -95,7 +95,7 @@ if(SCANGATE_NANITES) if(SEND_SIGNAL(M, COMSIG_HAS_NANITES)) if(nanite_cloud) - GET_COMPONENT_FROM(nanites, /datum/component/nanites, M) + var/datum/component/nanites/nanites = M.GetComponent(/datum/component/nanites) if(nanites && nanites.cloud_id == nanite_cloud) beep = TRUE else diff --git a/code/game/mecha/equipment/tools/mining_tools.dm b/code/game/mecha/equipment/tools/mining_tools.dm index de5100f76a2..9a33a596a07 100644 --- a/code/game/mecha/equipment/tools/mining_tools.dm +++ b/code/game/mecha/equipment/tools/mining_tools.dm @@ -98,12 +98,12 @@ /obj/item/mecha_parts/mecha_equipment/drill/attach(obj/mecha/M) ..() - GET_COMPONENT_FROM(butchering, /datum/component/butchering, src) + var/datum/component/butchering/butchering = src.GetComponent(/datum/component/butchering) butchering.butchering_enabled = TRUE /obj/item/mecha_parts/mecha_equipment/drill/detach(atom/moveto) ..() - GET_COMPONENT_FROM(butchering, /datum/component/butchering, src) + var/datum/component/butchering/butchering = src.GetComponent(/datum/component/butchering) butchering.butchering_enabled = FALSE /obj/item/mecha_parts/mecha_equipment/drill/proc/drill_mob(mob/living/target, mob/user) @@ -113,7 +113,7 @@ if(target.stat == DEAD && target.getBruteLoss() >= 200) log_combat(user, target, "gibbed", name) if(LAZYLEN(target.butcher_results) || LAZYLEN(target.guaranteed_butcher_results)) - GET_COMPONENT_FROM(butchering, /datum/component/butchering, src) + var/datum/component/butchering/butchering = src.GetComponent(/datum/component/butchering) butchering.Butcher(chassis, target) else target.gib() diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 3c99cd1a15d..bf160eb74ca 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -47,7 +47,7 @@ //maximum stocking amount (default 300000, 600000 at T4) for(var/obj/item/stock_parts/matter_bin/M in component_parts) T += M.rating - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) materials.max_amount = (200000 + (T*50000)) //resources adjustment coefficient (1 -> 0.85 -> 0.7 -> 0.55) @@ -64,7 +64,7 @@ /obj/machinery/mecha_part_fabricator/examine(mob/user) ..() - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) if(in_range(user, src) || isobserver(user)) to_chat(user, "The status display reads: Storing up to [materials.max_amount] material units.
Material consumption at [component_coeff*100]%.
Build time reduced by [100-time_coeff*100]%.") @@ -109,7 +109,7 @@ /obj/machinery/mecha_part_fabricator/proc/output_available_resources() var/output - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) for(var/mat_id in materials.materials) var/datum/material/M = materials.materials[mat_id] output += "[M.name]: [M.amount] cm³" @@ -130,7 +130,7 @@ /obj/machinery/mecha_part_fabricator/proc/check_resources(datum/design/D) if(D.reagents_list.len) // No reagents storage - no reagent designs. return FALSE - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) if(materials.has_materials(get_resources_w_coeff(D))) return TRUE return FALSE @@ -140,7 +140,7 @@ desc = "It's building \a [initial(D.name)]." var/list/res_coef = get_resources_w_coeff(D) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) materials.use_amount(res_coef) add_overlay("fab-active") use_power = ACTIVE_POWER_USE @@ -383,14 +383,14 @@ break if(href_list["remove_mat"] && href_list["material"]) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) materials.retrieve_sheets(text2num(href_list["remove_mat"]), href_list["material"]) updateUsrDialog() return /obj/machinery/mecha_part_fabricator/on_deconstruction() - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) materials.retrieve_all() ..() diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index 4eeea1f2014..b345ecd291c 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -53,7 +53,7 @@ /obj/mecha/working/ripley/update_icon() ..() - GET_COMPONENT(C,/datum/component/armor_plate) + var/datum/component/armor_plate/C = GetComponent(/datum/component/armor_plate) if (C.amount) cut_overlays() if(C.amount < 3) diff --git a/code/game/objects/effects/decals/cleanable/humans.dm b/code/game/objects/effects/decals/cleanable/humans.dm index 304a849385a..d4bae407202 100644 --- a/code/game/objects/effects/decals/cleanable/humans.dm +++ b/code/game/objects/effects/decals/cleanable/humans.dm @@ -84,7 +84,7 @@ sleep(2) if(i > 0) var/list/datum/disease/diseases - GET_COMPONENT(infective, /datum/component/infective) + var/datum/component/infective/infective = GetComponent(/datum/component/infective) if(infective) diseases = infective.diseases new /obj/effect/decal/cleanable/blood/splatter(loc, diseases) diff --git a/code/game/objects/items/control_wand.dm b/code/game/objects/items/control_wand.dm index fa4524528b5..be39bb69734 100644 --- a/code/game/objects/items/control_wand.dm +++ b/code/game/objects/items/control_wand.dm @@ -33,7 +33,7 @@ // Airlock remote works by sending NTNet packets to whatever it's pointed at. /obj/item/door_remote/afterattack(atom/A, mob/user) . = ..() - GET_COMPONENT_FROM(target_interface, /datum/component/ntnet_interface, A) + var/datum/component/ntnet_interface/target_interface = A.GetComponent(/datum/component/ntnet_interface) if(!target_interface) return @@ -100,4 +100,4 @@ #undef WAND_OPEN #undef WAND_BOLT -#undef WAND_EMERGENCY \ No newline at end of file +#undef WAND_EMERGENCY diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index 7e01903be20..2490bb1f01e 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -505,7 +505,7 @@ /obj/item/storage/crayons/Initialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 7 STR.set_holdable(list(/obj/item/toy/crayon)) diff --git a/code/game/objects/items/devices/PDA/virus_cart.dm b/code/game/objects/items/devices/PDA/virus_cart.dm index 80a5aceae1d..297926eb225 100644 --- a/code/game/objects/items/devices/PDA/virus_cart.dm +++ b/code/game/objects/items/devices/PDA/virus_cart.dm @@ -93,7 +93,7 @@ charges-- var/lock_code = "[rand(100,999)] [pick(GLOB.phonetic_alphabet)]" to_chat(U, "Virus Sent! The unlock code to the target is: [lock_code]") - GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, target) + var/datum/component/uplink/hidden_uplink = target.GetComponent(/datum/component/uplink) if(!hidden_uplink) hidden_uplink = target.AddComponent(/datum/component/uplink) hidden_uplink.unlock_code = lock_code diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm index 1e9b4959f76..dc17b71de49 100644 --- a/code/game/objects/items/devices/chameleonproj.dm +++ b/code/game/objects/items/devices/chameleonproj.dm @@ -116,7 +116,7 @@ appearance = saved_appearance if(istype(M.buckled, /obj/vehicle)) var/obj/vehicle/V = M.buckled - GET_COMPONENT_FROM(VRD, /datum/component/riding, V) + var/datum/component/riding/VRD = V.GetComponent(/datum/component/riding) if(VRD) VRD.force_dismount(M) else diff --git a/code/game/objects/items/implants/implant_storage.dm b/code/game/objects/items/implants/implant_storage.dm index 0e6490cdeab..d36ac43f001 100644 --- a/code/game/objects/items/implants/implant_storage.dm +++ b/code/game/objects/items/implants/implant_storage.dm @@ -25,7 +25,7 @@ for(var/X in target.implants) if(istype(X, type)) var/obj/item/implant/storage/imp_e = X - GET_COMPONENT_FROM(STR, /datum/component/storage, imp_e) + var/datum/component/storage/STR = imp_e.GetComponent(/datum/component/storage) if(!STR || (STR && STR.max_items < max_slot_stacking)) imp_e.AddComponent(/datum/component/storage/concrete/implant) qdel(src) diff --git a/code/game/objects/items/melee/transforming.dm b/code/game/objects/items/melee/transforming.dm index 0d39e6c8477..d7a6254f4a8 100644 --- a/code/game/objects/items/melee/transforming.dm +++ b/code/game/objects/items/melee/transforming.dm @@ -66,7 +66,7 @@ var/datum/component/butchering/BT = LoadComponent(/datum/component/butchering) BT.butchering_enabled = TRUE else - GET_COMPONENT(BT, /datum/component/butchering) + var/datum/component/butchering/BT = GetComponent(/datum/component/butchering) if(BT) BT.butchering_enabled = FALSE transform_messages(user, supress_message_text) diff --git a/code/game/objects/items/pneumaticCannon.dm b/code/game/objects/items/pneumaticCannon.dm index 7013824feb6..ea8ff9e0516 100644 --- a/code/game/objects/items/pneumaticCannon.dm +++ b/code/game/objects/items/pneumaticCannon.dm @@ -322,7 +322,7 @@ /obj/item/storage/backpack/magspear_quiver/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 20 STR.max_combined_w_class = 40 STR.display_numerical_stacking = TRUE diff --git a/code/game/objects/items/religion.dm b/code/game/objects/items/religion.dm index 30335817668..3c624c65a59 100644 --- a/code/game/objects/items/religion.dm +++ b/code/game/objects/items/religion.dm @@ -218,7 +218,7 @@ /obj/item/storage/backpack/bannerpack/Initialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 27 //6 more then normal, for the tradeoff of declaring yourself an antag at all times. /obj/item/storage/backpack/bannerpack/red diff --git a/code/game/objects/items/stacks/telecrystal.dm b/code/game/objects/items/stacks/telecrystal.dm index c1fb3965293..0ee7d6781ce 100644 --- a/code/game/objects/items/stacks/telecrystal.dm +++ b/code/game/objects/items/stacks/telecrystal.dm @@ -12,7 +12,7 @@ if(target == user) //You can't go around smacking people with crystals to find out if they have an uplink or not. for(var/obj/item/implant/uplink/I in target) if(I && I.imp_in) - GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, I) + var/datum/component/uplink/hidden_uplink = I.GetComponent(/datum/component/uplink) if(hidden_uplink) hidden_uplink.telecrystals += amount use(amount) diff --git a/code/game/objects/items/storage/backpack.dm b/code/game/objects/items/storage/backpack.dm index 9171fb12e2d..435f9dd57dd 100644 --- a/code/game/objects/items/storage/backpack.dm +++ b/code/game/objects/items/storage/backpack.dm @@ -23,7 +23,7 @@ /obj/item/storage/backpack/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 21 STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_items = 21 @@ -38,7 +38,7 @@ /obj/item/storage/backpack/old/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 12 /obj/item/storage/backpack/holding @@ -53,7 +53,7 @@ /obj/item/storage/backpack/holding/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.allow_big_nesting = TRUE STR.max_w_class = WEIGHT_CLASS_GIGANTIC STR.max_combined_w_class = 35 @@ -83,7 +83,7 @@ /obj/item/storage/backpack/santabag/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_combined_w_class = 60 @@ -98,7 +98,7 @@ if(!istype(M)) return if(HAS_TRAIT(M, TRAIT_CANNOT_OPEN_PRESENTS)) - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) var/turf/floor = get_turf(src) var/obj/item/I = new /obj/item/a_gift/anything(floor) if(STR.can_be_inserted(I, stop_messages=TRUE)) @@ -303,7 +303,7 @@ /obj/item/storage/backpack/satchel/flat/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 15 STR.set_holdable(null, list(/obj/item/storage/backpack/satchel/flat)) //muh recursive backpacks) @@ -343,7 +343,7 @@ /obj/item/storage/backpack/duffelbag/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 30 /obj/item/storage/backpack/duffelbag/captain @@ -439,7 +439,7 @@ /obj/item/storage/backpack/duffelbag/syndie/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.silent = TRUE /obj/item/storage/backpack/duffelbag/syndie/hitman @@ -578,7 +578,7 @@ // For ClownOps. /obj/item/storage/backpack/duffelbag/clown/syndie/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) slowdown = 0 STR.silent = TRUE diff --git a/code/game/objects/items/storage/bags.dm b/code/game/objects/items/storage/bags.dm index 18034960c5a..c927fe71ad0 100644 --- a/code/game/objects/items/storage/bags.dm +++ b/code/game/objects/items/storage/bags.dm @@ -21,7 +21,7 @@ /obj/item/storage/bag/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.allow_quick_gather = TRUE STR.allow_quick_empty = TRUE STR.display_numerical_stacking = TRUE @@ -44,7 +44,7 @@ /obj/item/storage/bag/trash/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_SMALL STR.max_combined_w_class = 30 STR.max_items = 30 @@ -84,7 +84,7 @@ /obj/item/storage/bag/trash/bluespace/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 60 STR.max_items = 60 @@ -108,7 +108,7 @@ /obj/item/storage/bag/ore/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage/concrete/stack) + var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack) STR.allow_quick_empty = TRUE STR.set_holdable(list(/obj/item/stack/ore)) STR.max_w_class = WEIGHT_CLASS_HUGE @@ -134,7 +134,7 @@ return if (istype(user.pulling, /obj/structure/ore_box)) box = user.pulling - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) if(STR) for(var/A in tile) if (!is_type_in_typecache(A, STR.can_hold)) @@ -169,7 +169,7 @@ /obj/item/storage/bag/ore/holding/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage/concrete/stack) + var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack) STR.max_items = INFINITY STR.max_combined_w_class = INFINITY STR.max_combined_stack_amount = INFINITY @@ -187,7 +187,7 @@ /obj/item/storage/bag/plants/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_combined_w_class = 100 STR.max_items = 100 @@ -226,7 +226,7 @@ /obj/item/storage/bag/sheetsnatcher/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage/concrete/stack) + var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack) STR.allow_quick_empty = TRUE STR.set_holdable(list(/obj/item/stack/sheet), list(/obj/item/stack/sheet/mineral/sandstone, /obj/item/stack/sheet/mineral/wood)) STR.max_combined_stack_amount = 300 @@ -242,7 +242,7 @@ /obj/item/storage/bag/sheetsnatcher/borg/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage/concrete/stack) + var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack) STR.max_combined_stack_amount = 500 // ----------------------------- @@ -259,7 +259,7 @@ /obj/item/storage/bag/books/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_combined_w_class = 21 STR.max_items = 7 @@ -284,14 +284,14 @@ /obj/item/storage/bag/tray/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.insert_preposition = "on" /obj/item/storage/bag/tray/attack(mob/living/M, mob/living/user) . = ..() // Drop all the things. All of them. var/list/obj/item/oldContents = contents.Copy() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.quick_empty() // Make each item scatter a bit for(var/obj/item/I in oldContents) @@ -338,7 +338,7 @@ /obj/item/storage/bag/chemistry/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 200 STR.max_items = 50 STR.insert_preposition = "in" @@ -358,7 +358,7 @@ /obj/item/storage/bag/bio/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 200 STR.max_items = 25 STR.insert_preposition = "in" diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index f31fad62f13..34b0b5cb1b7 100644 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -42,7 +42,7 @@ /obj/item/storage/belt/utility/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.set_holdable(list( /obj/item/crowbar, /obj/item/screwdriver, @@ -126,7 +126,7 @@ /obj/item/storage/belt/medical/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_BULKY STR.set_holdable(list( /obj/item/healthanalyzer, @@ -186,7 +186,7 @@ /obj/item/storage/belt/security/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 5 STR.max_w_class = WEIGHT_CLASS_NORMAL STR.set_holdable(list( @@ -227,7 +227,7 @@ /obj/item/storage/belt/security/webbing/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 /obj/item/storage/belt/mining @@ -239,7 +239,7 @@ /obj/item/storage/belt/mining/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 STR.max_w_class = WEIGHT_CLASS_BULKY STR.max_combined_w_class = 20 @@ -298,7 +298,7 @@ /obj/item/storage/belt/mining/primitive/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 5 /obj/item/storage/belt/soulstone @@ -309,7 +309,7 @@ /obj/item/storage/belt/soulstone/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 STR.set_holdable(list( /obj/item/soulstone @@ -332,7 +332,7 @@ /obj/item/storage/belt/champion/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 1 STR.set_holdable(list( /obj/item/clothing/mask/luchador @@ -347,7 +347,7 @@ /obj/item/storage/belt/military/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_SMALL /obj/item/storage/belt/military/snack @@ -360,7 +360,7 @@ /obj/item/storage/belt/military/snack/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 STR.max_w_class = WEIGHT_CLASS_SMALL STR.set_holdable(list( @@ -427,7 +427,7 @@ /obj/item/storage/belt/military/assault/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 /obj/item/storage/belt/grenade @@ -438,7 +438,7 @@ /obj/item/storage/belt/grenade/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 30 STR.display_numerical_stacking = TRUE STR.max_combined_w_class = 60 @@ -476,7 +476,7 @@ /obj/item/storage/belt/wands/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 STR.set_holdable(list( /obj/item/gun/magic/wand @@ -502,7 +502,7 @@ /obj/item/storage/belt/janitor/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 STR.max_w_class = WEIGHT_CLASS_BULKY // Set to this so the light replacer can fit. STR.set_holdable(list( @@ -534,7 +534,7 @@ /obj/item/storage/belt/bandolier/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 18 STR.display_numerical_stacking = TRUE STR.set_holdable(list( @@ -550,7 +550,7 @@ /obj/item/storage/belt/holster/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 3 STR.max_w_class = WEIGHT_CLASS_NORMAL STR.set_holdable(list( @@ -576,7 +576,7 @@ /obj/item/storage/belt/fannypack/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 3 STR.max_w_class = WEIGHT_CLASS_SMALL @@ -649,7 +649,7 @@ /obj/item/storage/belt/sabre/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 1 STR.rustle_sound = FALSE STR.max_w_class = WEIGHT_CLASS_BULKY diff --git a/code/game/objects/items/storage/book.dm b/code/game/objects/items/storage/book.dm index 08e14416838..09f011ade95 100644 --- a/code/game/objects/items/storage/book.dm +++ b/code/game/objects/items/storage/book.dm @@ -11,7 +11,7 @@ /obj/item/storage/book/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 1 /obj/item/storage/book/attack_self(mob/user) diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm index 29e62776046..2d73078ea54 100644 --- a/code/game/objects/items/storage/boxes.dm +++ b/code/game/objects/items/storage/boxes.dm @@ -401,7 +401,7 @@ /obj/item/storage/box/donkpockets/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.set_holdable(list(/obj/item/reagent_containers/food/snacks/donkpocket)) /obj/item/storage/box/donkpockets/PopulateContents() @@ -417,7 +417,7 @@ /obj/item/storage/box/monkeycubes/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 7 STR.set_holdable(list(/obj/item/reagent_containers/food/snacks/monkeycube)) @@ -437,7 +437,7 @@ /obj/item/storage/box/gorillacubes/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 3 STR.set_holdable(list(/obj/item/reagent_containers/food/snacks/monkeycube)) @@ -590,7 +590,7 @@ /obj/item/storage/box/snappops/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.set_holdable(list(/obj/item/toy/snappop)) STR.max_items = 8 @@ -608,7 +608,7 @@ /obj/item/storage/box/matches/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 10 STR.set_holdable(list(/obj/item/match)) @@ -631,7 +631,7 @@ /obj/item/storage/box/lights/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 21 STR.set_holdable(list(/obj/item/light/tube, /obj/item/light/bulb)) STR.max_combined_w_class = 21 diff --git a/code/game/objects/items/storage/briefcase.dm b/code/game/objects/items/storage/briefcase.dm index 7b957b92ab1..62d2227d791 100644 --- a/code/game/objects/items/storage/briefcase.dm +++ b/code/game/objects/items/storage/briefcase.dm @@ -17,7 +17,7 @@ /obj/item/storage/briefcase/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_combined_w_class = 21 diff --git a/code/game/objects/items/storage/fancy.dm b/code/game/objects/items/storage/fancy.dm index 52a20ea6462..a043529df57 100644 --- a/code/game/objects/items/storage/fancy.dm +++ b/code/game/objects/items/storage/fancy.dm @@ -25,7 +25,7 @@ var/fancy_open = FALSE /obj/item/storage/fancy/PopulateContents() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) for(var/i = 1 to STR.max_items) new spawn_type(src) @@ -72,7 +72,7 @@ /obj/item/storage/fancy/donut_box/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 STR.set_holdable(list(/obj/item/reagent_containers/food/snacks/donut)) @@ -93,7 +93,7 @@ /obj/item/storage/fancy/egg_box/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 12 STR.set_holdable(list(/obj/item/reagent_containers/food/snacks/egg)) @@ -115,7 +115,7 @@ /obj/item/storage/fancy/candle_box/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 5 /obj/item/storage/fancy/candle_box/attack_self(mob_user) @@ -138,7 +138,7 @@ /obj/item/storage/fancy/cigarettes/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 STR.set_holdable(list(/obj/item/clothing/mask/cigarette, /obj/item/lighter)) @@ -276,7 +276,7 @@ /obj/item/storage/fancy/rollingpapers/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 10 STR.set_holdable(list(/obj/item/rollingpaper)) @@ -300,7 +300,7 @@ /obj/item/storage/fancy/cigarettes/cigars/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 5 STR.set_holdable(list(/obj/item/clothing/mask/cigarette/cigar)) @@ -347,6 +347,6 @@ /obj/item/storage/fancy/heart_box/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 8 STR.set_holdable(list(/obj/item/reagent_containers/food/snacks/tinychocolate)) diff --git a/code/game/objects/items/storage/firstaid.dm b/code/game/objects/items/storage/firstaid.dm index ac35677e736..0fd3969a7cc 100644 --- a/code/game/objects/items/storage/firstaid.dm +++ b/code/game/objects/items/storage/firstaid.dm @@ -159,7 +159,7 @@ /obj/item/storage/firstaid/tactical/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL /obj/item/storage/firstaid/tactical/PopulateContents() @@ -216,7 +216,7 @@ /obj/item/storage/pill_bottle/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.allow_quick_gather = TRUE STR.click_gather = TRUE STR.set_holdable(list(/obj/item/reagent_containers/pill, /obj/item/dice)) diff --git a/code/game/objects/items/storage/lockbox.dm b/code/game/objects/items/storage/lockbox.dm index 33df3e40855..b6378f4d97b 100644 --- a/code/game/objects/items/storage/lockbox.dm +++ b/code/game/objects/items/storage/lockbox.dm @@ -15,7 +15,7 @@ /obj/item/storage/lockbox/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_combined_w_class = 14 STR.max_items = 4 @@ -99,7 +99,7 @@ /obj/item/storage/lockbox/medal/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_SMALL STR.max_items = 10 STR.max_combined_w_class = 20 diff --git a/code/game/objects/items/storage/secure.dm b/code/game/objects/items/storage/secure.dm index 7abbc3cc4df..ac730d9718c 100644 --- a/code/game/objects/items/storage/secure.dm +++ b/code/game/objects/items/storage/secure.dm @@ -26,7 +26,7 @@ /obj/item/storage/secure/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_SMALL STR.max_combined_w_class = 14 @@ -136,7 +136,7 @@ /obj/item/storage/secure/briefcase/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 21 STR.max_w_class = WEIGHT_CLASS_NORMAL @@ -146,7 +146,7 @@ /obj/item/storage/secure/briefcase/syndie/PopulateContents() ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) for(var/i = 0, i < STR.max_items - 2, i++) new /obj/item/stack/spacecash/c1000(src) @@ -170,7 +170,7 @@ /obj/item/storage/secure/safe/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.set_holdable(null, list(/obj/item/storage/secure/briefcase)) STR.max_w_class = 8 //?? diff --git a/code/game/objects/items/storage/storage.dm b/code/game/objects/items/storage/storage.dm index 42913ac7472..d39a58af8db 100644 --- a/code/game/objects/items/storage/storage.dm +++ b/code/game/objects/items/storage/storage.dm @@ -30,7 +30,7 @@ /obj/item/storage/doStrip(mob/who) if(HAS_TRAIT(src, TRAIT_NODROP) && rummage_if_nodrop) - GET_COMPONENT(CP, /datum/component/storage) + var/datum/component/storage/CP = GetComponent(/datum/component/storage) CP.do_quick_empty() return TRUE return ..() @@ -41,5 +41,5 @@ /obj/item/storage/proc/PopulateContents() /obj/item/storage/proc/emptyStorage() - GET_COMPONENT(ST, /datum/component/storage) + var/datum/component/storage/ST = GetComponent(/datum/component/storage) ST.do_quick_empty() diff --git a/code/game/objects/items/storage/toolbox.dm b/code/game/objects/items/storage/toolbox.dm index ccf3f40af4c..ada2f1074ac 100644 --- a/code/game/objects/items/storage/toolbox.dm +++ b/code/game/objects/items/storage/toolbox.dm @@ -147,7 +147,7 @@ /obj/item/storage/toolbox/syndicate/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.silent = TRUE /obj/item/storage/toolbox/syndicate/PopulateContents() @@ -187,7 +187,7 @@ /obj/item/storage/toolbox/brass/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_combined_w_class = 28 STR.max_items = 28 @@ -225,7 +225,7 @@ /obj/item/storage/toolbox/artistic/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 20 STR.max_items = 10 diff --git a/code/game/objects/items/storage/uplink_kits.dm b/code/game/objects/items/storage/uplink_kits.dm index b04977dbac6..7a3f262266d 100644 --- a/code/game/objects/items/storage/uplink_kits.dm +++ b/code/game/objects/items/storage/uplink_kits.dm @@ -255,7 +255,7 @@ /obj/item/storage/box/syndie_kit/space/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL STR.set_holdable(list(/obj/item/clothing/suit/space/syndicate, /obj/item/clothing/head/helmet/space/syndicate)) @@ -281,7 +281,7 @@ /obj/item/storage/box/syndie_kit/chemical/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 14 /obj/item/storage/box/syndie_kit/chemical/PopulateContents() diff --git a/code/game/objects/items/storage/wallets.dm b/code/game/objects/items/storage/wallets.dm index b765665f742..52f715850fa 100644 --- a/code/game/objects/items/storage/wallets.dm +++ b/code/game/objects/items/storage/wallets.dm @@ -11,7 +11,7 @@ /obj/item/storage/wallet/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 4 STR.set_holdable(list( /obj/item/stack/spacecash, diff --git a/code/game/objects/items/twohanded.dm b/code/game/objects/items/twohanded.dm index 2a8a875d076..cbab5675fc4 100644 --- a/code/game/objects/items/twohanded.dm +++ b/code/game/objects/items/twohanded.dm @@ -599,7 +599,7 @@ force = on ? force_on : initial(force) throwforce = on ? force_on : initial(force) icon_state = "chainsaw_[on ? "on" : "off"]" - GET_COMPONENT_FROM(butchering, /datum/component/butchering, src) + var/datum/component/butchering/butchering = src.GetComponent(/datum/component/butchering) butchering.butchering_enabled = on if(on) diff --git a/code/game/turfs/change_turf.dm b/code/game/turfs/change_turf.dm index 886dda23c74..96f4e03fe39 100644 --- a/code/game/turfs/change_turf.dm +++ b/code/game/turfs/change_turf.dm @@ -42,7 +42,7 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list( /turf/open/copyTurf(turf/T, copy_air = FALSE) . = ..() if (isopenturf(T)) - GET_COMPONENT(slip, /datum/component/wet_floor) + var/datum/component/wet_floor/slip = GetComponent(/datum/component/wet_floor) if(slip) var/datum/component/wet_floor/WF = T.AddComponent(/datum/component/wet_floor) WF.InheritComponent(slip) diff --git a/code/game/turfs/simulated/chasm.dm b/code/game/turfs/simulated/chasm.dm index 677fba29902..0a7b5074886 100644 --- a/code/game/turfs/simulated/chasm.dm +++ b/code/game/turfs/simulated/chasm.dm @@ -15,11 +15,11 @@ AddComponent(/datum/component/chasm, SSmapping.get_turf_below(src)) /turf/open/chasm/proc/set_target(turf/target) - GET_COMPONENT(chasm_component, /datum/component/chasm) + var/datum/component/chasm/chasm_component = GetComponent(/datum/component/chasm) chasm_component.target_turf = target /turf/open/chasm/proc/drop(atom/movable/AM) - GET_COMPONENT(chasm_component, /datum/component/chasm) + var/datum/component/chasm/chasm_component = GetComponent(/datum/component/chasm) chasm_component.drop(AM) /turf/open/chasm/MakeSlippery(wet_setting, min_wet_time, wet_time_to_add, max_wet_time, permanent) diff --git a/code/modules/NTNet/services/_service.dm b/code/modules/NTNet/services/_service.dm index 8611c2d25d4..3622dc38810 100644 --- a/code/modules/NTNet/services/_service.dm +++ b/code/modules/NTNet/services/_service.dm @@ -17,7 +17,7 @@ /datum/ntnet_service/proc/connect(datum/ntnet/net) if(!istype(net)) return FALSE - GET_COMPONENT(interface, /datum/component/ntnet_interface) + var/datum/component/ntnet_interface/interface = GetComponent(/datum/component/ntnet_interface) if(!interface.register_connection(net)) return FALSE if(!net.register_service(src)) @@ -29,7 +29,7 @@ /datum/ntnet_service/proc/disconnect(datum/ntnet/net, force = FALSE) if(!istype(net) || (!net.unregister_service(src) && !force)) return FALSE - GET_COMPONENT(interface, /datum/component/ntnet_interface) + var/datum/component/ntnet_interface/interface = GetComponent(/datum/component/ntnet_interface) interface.unregister_connection(net) networks_by_id -= net.network_id return TRUE diff --git a/code/modules/antagonists/wizard/equipment/artefact.dm b/code/modules/antagonists/wizard/equipment/artefact.dm index df19f69011a..528d3a6777b 100644 --- a/code/modules/antagonists/wizard/equipment/artefact.dm +++ b/code/modules/antagonists/wizard/equipment/artefact.dm @@ -122,7 +122,7 @@ /obj/singularity/wizard/attack_tk(mob/user) if(iscarbon(user)) var/mob/living/carbon/C = user - GET_COMPONENT_FROM(insaneinthemembrane, /datum/component/mood, C) + var/datum/component/mood/insaneinthemembrane = C.GetComponent(/datum/component/mood) if(insaneinthemembrane.sanity < 15) return //they've already seen it and are about to die, or are just too insane to care to_chat(C, "OH GOD! NONE OF IT IS REAL! NONE OF IT IS REEEEEEEEEEEEEEEEEEEEEEEEAL!") diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index c9a836a9578..1f773d1e36d 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -549,7 +549,7 @@ /obj/item/storage/belt/chameleon/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.silent = TRUE /obj/item/storage/belt/chameleon/emp_act(severity) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index d32d556abe2..b829e70cd2c 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -117,7 +117,7 @@ clothing_resistance_flag_examine_message(user) if(damaged_clothes) to_chat(user, "It looks damaged!") - GET_COMPONENT(pockets, /datum/component/storage) + var/datum/component/storage/pockets = GetComponent(/datum/component/storage) if(pockets) var/list/how_cool_are_your_threads = list("") if(pockets.attack_hand_interact) diff --git a/code/modules/clothing/shoes/bananashoes.dm b/code/modules/clothing/shoes/bananashoes.dm index 18b203a5e93..1ad03b50a67 100644 --- a/code/modules/clothing/shoes/bananashoes.dm +++ b/code/modules/clothing/shoes/bananashoes.dm @@ -17,7 +17,7 @@ /obj/item/clothing/shoes/clown_shoes/banana_shoes/step_action() . = ..() - GET_COMPONENT(bananium, /datum/component/material_container) + var/datum/component/material_container/bananium = GetComponent(/datum/component/material_container) if(on) if(bananium.amount(MAT_BANANIUM) < 100) on = !on @@ -30,7 +30,7 @@ bananium.use_amount_type(100, MAT_BANANIUM) /obj/item/clothing/shoes/clown_shoes/banana_shoes/attack_self(mob/user) - GET_COMPONENT(bananium, /datum/component/material_container) + var/datum/component/material_container/bananium = GetComponent(/datum/component/material_container) var/sheet_amount = bananium.retrieve_all() if(sheet_amount) to_chat(user, "You retrieve [sheet_amount] sheets of bananium from the prototype shoes.") @@ -42,7 +42,7 @@ to_chat(user, "The shoes are [on ? "enabled" : "disabled"].") /obj/item/clothing/shoes/clown_shoes/banana_shoes/ui_action_click(mob/user) - GET_COMPONENT(bananium, /datum/component/material_container) + var/datum/component/material_container/bananium = GetComponent(/datum/component/material_container) if(bananium.amount(MAT_BANANIUM)) on = !on update_icon() diff --git a/code/modules/clothing/under/accessories.dm b/code/modules/clothing/under/accessories.dm index cb295e40ba9..19cecdf0608 100755 --- a/code/modules/clothing/under/accessories.dm +++ b/code/modules/clothing/under/accessories.dm @@ -19,7 +19,7 @@ to_chat(user, "There doesn't seem to be anywhere to put [src]...") /obj/item/clothing/accessory/proc/attach(obj/item/clothing/under/U, user) - GET_COMPONENT(storage, /datum/component/storage) + var/datum/component/storage/storage = GetComponent(/datum/component/storage) if(storage) if(SEND_SIGNAL(U, COMSIG_CONTAINS_STORAGE)) return FALSE diff --git a/code/modules/detectivework/detective_work.dm b/code/modules/detectivework/detective_work.dm index a35e03f71a8..5d0fff78a69 100644 --- a/code/modules/detectivework/detective_work.dm +++ b/code/modules/detectivework/detective_work.dm @@ -1,27 +1,27 @@ //CONTAINS: Suit fibers and Detective's Scanning Computer /atom/proc/return_fingerprints() - GET_COMPONENT(D, /datum/component/forensics) + var/datum/component/forensics/D = GetComponent(/datum/component/forensics) if(D) . = D.fingerprints /atom/proc/return_hiddenprints() - GET_COMPONENT(D, /datum/component/forensics) + var/datum/component/forensics/D = GetComponent(/datum/component/forensics) if(D) . = D.hiddenprints /atom/proc/return_blood_DNA() - GET_COMPONENT(D, /datum/component/forensics) + var/datum/component/forensics/D = GetComponent(/datum/component/forensics) if(D) . = D.blood_DNA /atom/proc/blood_DNA_length() - GET_COMPONENT(D, /datum/component/forensics) + var/datum/component/forensics/D = GetComponent(/datum/component/forensics) if(D) . = length(D.blood_DNA) /atom/proc/return_fibers() - GET_COMPONENT(D, /datum/component/forensics) + var/datum/component/forensics/D = GetComponent(/datum/component/forensics) if(D) . = D.fibers diff --git a/code/modules/events/wizard/rpgloot.dm b/code/modules/events/wizard/rpgloot.dm index 0bc626ddf43..8c98ba1dd68 100644 --- a/code/modules/events/wizard/rpgloot.dm +++ b/code/modules/events/wizard/rpgloot.dm @@ -17,7 +17,7 @@ if(istype(I, /obj/item/storage)) var/obj/item/storage/S = I - GET_COMPONENT_FROM(STR, /datum/component/storage, S) + var/datum/component/storage/STR = S.GetComponent(/datum/component/storage) if(prob(upgrade_scroll_chance) && S.contents.len < STR.max_items && !S.invisibility) var/obj/item/upgradescroll/scroll = new(get_turf(S)) SEND_SIGNAL(S, COMSIG_TRY_STORAGE_INSERT, scroll, null, TRUE, TRUE) diff --git a/code/modules/food_and_drinks/food/snacks_pastry.dm b/code/modules/food_and_drinks/food/snacks_pastry.dm index 080c1c53b77..401e219ab2a 100644 --- a/code/modules/food_and_drinks/food/snacks_pastry.dm +++ b/code/modules/food_and_drinks/food/snacks_pastry.dm @@ -38,7 +38,7 @@ if(HAS_TRAIT(H, TRAIT_LAW_ENFORCEMENT_METABOLISM) && !HAS_TRAIT(H, TRAIT_AGEUSIA)) to_chat(H,"I love this taste!") H.adjust_disgust(-5 + -2.5 * fraction) - GET_COMPONENT_FROM(mood, /datum/component/mood, H) + var/datum/component/mood/mood = H.GetComponent(/datum/component/mood) if(mood) mood.add_event(null, "fav_food", /datum/mood_event/favorite_food) last_check_time = world.time diff --git a/code/modules/holiday/easter.dm b/code/modules/holiday/easter.dm index d8ed7fd8d3e..f45a4a44774 100644 --- a/code/modules/holiday/easter.dm +++ b/code/modules/holiday/easter.dm @@ -68,7 +68,7 @@ /obj/item/storage/bag/easterbasket/Initialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.set_holdable(list(/obj/item/reagent_containers/food/snacks/egg, /obj/item/reagent_containers/food/snacks/chocolateegg, /obj/item/reagent_containers/food/snacks/boiledegg)) /obj/item/storage/bag/easterbasket/proc/countEggs() diff --git a/code/modules/hydroponics/seed_extractor.dm b/code/modules/hydroponics/seed_extractor.dm index 8491c3baf7a..226b73c455e 100644 --- a/code/modules/hydroponics/seed_extractor.dm +++ b/code/modules/hydroponics/seed_extractor.dm @@ -179,7 +179,7 @@ to_chat(usr, "\The [src] is full.") return FALSE - GET_COMPONENT_FROM(STR, /datum/component/storage, O.loc) + var/datum/component/storage/STR = O.loc.GetComponent(/datum/component/storage) if(STR) if(!STR.remove_from_storage(O,src)) return FALSE diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index e84af50422a..2b743df445d 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -78,7 +78,7 @@ state = 0 if(2) - GET_COMPONENT_FROM(STR, /datum/component/storage, I) + var/datum/component/storage/STR = I.GetComponent(/datum/component/storage) if(is_type_in_list(I, allowed_books)) if(!user.transferItemToLoc(I, src)) return diff --git a/code/modules/mining/machine_processing.dm b/code/modules/mining/machine_processing.dm index 48c2f03d8c8..16e8b0b26c8 100644 --- a/code/modules/mining/machine_processing.dm +++ b/code/modules/mining/machine_processing.dm @@ -95,7 +95,7 @@ process_ore(AM) /obj/machinery/mineral/processing_unit/proc/process_ore(obj/item/stack/ore/O) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) var/material_amount = materials.get_item_material_amount(O) if(!materials.has_space(material_amount)) unload_mineral(O) @@ -107,7 +107,7 @@ /obj/machinery/mineral/processing_unit/proc/get_machine_data() var/dat = "Smelter control console

" - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) for(var/mat_id in materials.materials) var/datum/material/M = materials.materials[mat_id] dat += "[M.name]: [M.amount] cm³" @@ -152,7 +152,7 @@ CONSOLE.updateUsrDialog() /obj/machinery/mineral/processing_unit/proc/smelt_ore() - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) var/datum/material/mat = materials.materials[selected_material] if(mat) var/sheets_to_remove = (mat.amount >= (MINERAL_MATERIAL_AMOUNT * SMELT_AMOUNT) ) ? SMELT_AMOUNT : round(mat.amount / MINERAL_MATERIAL_AMOUNT) @@ -175,7 +175,7 @@ on = FALSE return - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) materials.use_amount(alloy.materials, amount) generate_mineral(alloy.build_path) @@ -186,7 +186,7 @@ var/build_amount = SMELT_AMOUNT - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) for(var/mat_id in D.materials) var/M = D.materials[mat_id] @@ -204,7 +204,7 @@ unload_mineral(O) /obj/machinery/mineral/processing_unit/on_deconstruction() - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) materials.retrieve_all() ..() diff --git a/code/modules/mining/machine_silo.dm b/code/modules/mining/machine_silo.dm index 465e384f297..633b0c535a1 100644 --- a/code/modules/mining/machine_silo.dm +++ b/code/modules/mining/machine_silo.dm @@ -34,13 +34,13 @@ GLOBAL_LIST_EMPTY(silo_access_logs) var/datum/component/remote_materials/mats = C mats.disconnect_from(src) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) materials.retrieve_all() return ..() /obj/machinery/ore_silo/proc/remote_attackby(obj/machinery/M, mob/user, obj/item/stack/I) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) // stolen from /datum/component/material_container/proc/OnAttackBy if(user.a_intent != INTENT_HELP) return @@ -71,7 +71,7 @@ GLOBAL_LIST_EMPTY(silo_access_logs) popup.open() /obj/machinery/ore_silo/proc/generate_ui() - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) var/list/ui = list("Ore Silo

Stored Material:

") var/any = FALSE for(var/M in materials.materials) @@ -149,7 +149,7 @@ GLOBAL_LIST_EMPTY(silo_access_logs) return TRUE else if(href_list["ejectsheet"]) var/eject_sheet = href_list["ejectsheet"] - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) var/count = materials.retrieve_sheets(text2num(href_list["eject_amt"]), eject_sheet, drop_location()) var/list/matlist = list() matlist[eject_sheet] = MINERAL_MATERIAL_AMOUNT diff --git a/code/modules/mining/mint.dm b/code/modules/mining/mint.dm index 6b03be610d7..8204977058d 100644 --- a/code/modules/mining/mint.dm +++ b/code/modules/mining/mint.dm @@ -22,7 +22,7 @@ if(!T) return - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) for(var/obj/item/stack/sheet/O in T) materials.insert_stack(O, O.amount) @@ -32,7 +32,7 @@ return var/dat = "Coin Press
" - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) for(var/mat_id in materials.materials) var/datum/material/M = materials.materials[mat_id] if(!M.amount && chosen != mat_id) @@ -65,7 +65,7 @@ if(processing==1) to_chat(usr, "The machine is processing.") return - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) if(href_list["choose"]) if(materials.materials[href_list["choose"]]) chosen = href_list["choose"] diff --git a/code/modules/mining/money_bag.dm b/code/modules/mining/money_bag.dm index 92a6d34c4b3..8a686baea35 100644 --- a/code/modules/mining/money_bag.dm +++ b/code/modules/mining/money_bag.dm @@ -11,7 +11,7 @@ /obj/item/storage/bag/money/Initialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_items = 40 STR.max_combined_w_class = 40 diff --git a/code/modules/mob/emote.dm b/code/modules/mob/emote.dm index 625a923fe17..41d3d4e1583 100644 --- a/code/modules/mob/emote.dm +++ b/code/modules/mob/emote.dm @@ -40,7 +40,7 @@ if(iscyborg(user) && user.has_buckled_mobs()) var/mob/living/silicon/robot/R = user - GET_COMPONENT_FROM(riding_datum, /datum/component/riding, R) + var/datum/component/riding/riding_datum = R.GetComponent(/datum/component/riding) if(riding_datum) for(var/mob/M in R.buckled_mobs) riding_datum.force_dismount(M) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index e25f4f37c4c..53cc56286f7 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -875,7 +875,7 @@ /mob/living/carbon/do_after_coefficent() . = ..() - GET_COMPONENT_FROM(mood, /datum/component/mood, src) //Currently, only carbons or higher use mood, move this once that changes. + var/datum/component/mood/mood = src.GetComponent(/datum/component/mood) //Currently, only carbons or higher use mood, move this once that changes. if(mood) switch(mood.sanity) //Alters do_after delay based on how sane you are if(SANITY_INSANE to SANITY_DISTURBED) @@ -916,7 +916,7 @@ return TRUE if(HAS_TRAIT(src, TRAIT_DUMB)) return TRUE - GET_COMPONENT_FROM(mood, /datum/component/mood, src) + var/datum/component/mood/mood = src.GetComponent(/datum/component/mood) if(mood) if(mood.sanity < SANITY_UNSTABLE) return TRUE diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index b4b836ea420..1c65d075a1b 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -280,7 +280,7 @@ "You hug [src] to make [p_them()] feel better!") SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "hug", /datum/mood_event/hug) if(HAS_TRAIT(M, TRAIT_FRIENDLY)) - GET_COMPONENT_FROM(mood, /datum/component/mood, M) + var/datum/component/mood/mood = M.GetComponent(/datum/component/mood) if (mood.sanity >= SANITY_GREAT) SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/besthug, M) else if (mood.sanity >= SANITY_DISTURBED) diff --git a/code/modules/mob/living/carbon/examine.dm b/code/modules/mob/living/carbon/examine.dm index 833a773b13c..96568ce3b41 100644 --- a/code/modules/mob/living/carbon/examine.dm +++ b/code/modules/mob/living/carbon/examine.dm @@ -92,7 +92,7 @@ msg += common_trait_examine() - GET_COMPONENT_FROM(mood, /datum/component/mood, src) + var/datum/component/mood/mood = src.GetComponent(/datum/component/mood) if(mood) switch(mood.shown_mood) if(-INFINITY to MOOD_LEVEL_SAD4) @@ -110,4 +110,4 @@ msg += "*---------*" to_chat(user, msg) - return msg \ No newline at end of file + return msg diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 85b260d8798..4bd8a8a5fec 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -46,7 +46,7 @@ if(!(I.item_flags & ABSTRACT)) msg += "[t_He] [t_is] holding [I.get_examine_string(user)] in [t_his] [get_held_index_name(get_held_index_of_item(I))].\n" - GET_COMPONENT(FR, /datum/component/forensics) + var/datum/component/forensics/FR = GetComponent(/datum/component/forensics) //gloves if(gloves && !(SLOT_GLOVES in obscured)) msg += "[t_He] [t_has] [gloves.get_examine_string(user)] on [t_his] hands.\n" @@ -261,7 +261,7 @@ msg += "[t_He] seem[p_s()] winded.\n" if (getToxLoss() >= 10) msg += "[t_He] seem[p_s()] sickly.\n" - GET_COMPONENT_FROM(mood, /datum/component/mood, src) + var/datum/component/mood/mood = src.GetComponent(/datum/component/mood) if(mood.sanity <= SANITY_DISTURBED) msg += "[t_He] seem[p_s()] distressed.\n" SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "empath", /datum/mood_event/sad_empath, src) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index b8a15478912..fd69e299852 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -991,7 +991,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) if (H.nutrition > 0 && H.stat != DEAD && !HAS_TRAIT(H, TRAIT_NOHUNGER)) // THEY HUNGER var/hunger_rate = HUNGER_FACTOR - GET_COMPONENT_FROM(mood, /datum/component/mood, H) + var/datum/component/mood/mood = H.GetComponent(/datum/component/mood) if(mood && mood.sanity > SANITY_DISTURBED) hunger_rate *= max(0.5, 1 - 0.002 * mood.sanity) //0.85 to 0.75 diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 01e1e782912..a29a2f97084 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -567,7 +567,7 @@ stuttering = 0 slurring = 0 jitteriness = 0 - GET_COMPONENT(mood, /datum/component/mood) + var/datum/component/mood/mood = GetComponent(/datum/component/mood) if (mood) mood.remove_temp_moods(admin_revive) update_mobility() diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 38d0de5c915..d5b8fd54dbe 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -1179,7 +1179,7 @@ /mob/living/silicon/robot/unbuckle_mob(mob/user, force=FALSE) if(iscarbon(user)) - GET_COMPONENT(riding_datum, /datum/component/riding) + var/datum/component/riding/riding_datum = GetComponent(/datum/component/riding) if(istype(riding_datum)) riding_datum.unequip_buckle_inhands(user) riding_datum.restore_position(user) diff --git a/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm b/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm index 836cec87e8f..040d1e17cd4 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm @@ -33,7 +33,7 @@ /mob/living/simple_animal/drone/syndrone/Initialize() . = ..() - GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, internal_storage) + var/datum/component/uplink/hidden_uplink = internal_storage.GetComponent(/datum/component/uplink) hidden_uplink.telecrystals = 10 /mob/living/simple_animal/drone/syndrone/Login() @@ -47,7 +47,7 @@ /mob/living/simple_animal/drone/syndrone/badass/Initialize() . = ..() - GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, internal_storage) + var/datum/component/uplink/hidden_uplink = internal_storage.GetComponent(/datum/component/uplink) hidden_uplink.telecrystals = 30 var/obj/item/implant/weapons_auth/W = new/obj/item/implant/weapons_auth(src) W.implant(src, force = TRUE) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index f64bbd2d00c..e37fc9df28a 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -544,7 +544,7 @@ //ANIMAL RIDING /mob/living/simple_animal/user_buckle_mob(mob/living/M, mob/user) - GET_COMPONENT(riding_datum, /datum/component/riding) + var/datum/component/riding/riding_datum = GetComponent(/datum/component/riding) if(riding_datum) if(user.incapacitated()) return @@ -555,7 +555,7 @@ return ..() /mob/living/simple_animal/relaymove(mob/user, direction) - GET_COMPONENT(riding_datum, /datum/component/riding) + var/datum/component/riding/riding_datum = GetComponent(/datum/component/riding) if(tame && riding_datum) riding_datum.handle_ride(user, direction) diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 568301154ac..52698bedca5 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -211,7 +211,7 @@ throwforce = 35 playsound(user, 'sound/weapons/saberon.ogg', 5, 1) to_chat(user, "[src] is now active.") - GET_COMPONENT_FROM(butchering, /datum/component/butchering, src) + var/datum/component/butchering/butchering = src.GetComponent(/datum/component/butchering) butchering.butchering_enabled = on update_icon() diff --git a/code/modules/photography/photos/album.dm b/code/modules/photography/photos/album.dm index ef2b803b9db..129c8371661 100644 --- a/code/modules/photography/photos/album.dm +++ b/code/modules/photography/photos/album.dm @@ -13,7 +13,7 @@ /obj/item/storage/photo_album/Initialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.set_holdable(list(/obj/item/photo)) STR.max_combined_w_class = 42 STR.max_items = 21 diff --git a/code/modules/projectiles/guns/energy/dueling.dm b/code/modules/projectiles/guns/energy/dueling.dm index 62eb77f0451..8708156d165 100644 --- a/code/modules/projectiles/guns/energy/dueling.dm +++ b/code/modules/projectiles/guns/energy/dueling.dm @@ -318,7 +318,7 @@ /obj/item/storage/lockbox/dueling/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_SMALL STR.max_items = 2 STR.set_holdable(list(/obj/item/gun/energy/dueling)) diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 4302dcc129f..a2153680f14 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -166,7 +166,7 @@ data["chosenPillStyle"] = chosenPillStyle data["isPillBottleLoaded"] = bottle ? 1 : 0 if(bottle) - GET_COMPONENT_FROM(STRB, /datum/component/storage, bottle) + var/datum/component/storage/STRB = bottle.GetComponent(/datum/component/storage) data["pillBotContent"] = bottle.contents.len data["pillBotMaxContent"] = STRB.max_items @@ -248,7 +248,7 @@ var/target_loc = drop_location() var/drop_threshold = INFINITY if(bottle) - GET_COMPONENT_FROM(STRB, /datum/component/storage, bottle) + var/datum/component/storage/STRB = bottle.GetComponent(/datum/component/storage) if(STRB) drop_threshold = STRB.max_items - bottle.contents.len diff --git a/code/modules/reagents/chemistry/reagents/drug_reagents.dm b/code/modules/reagents/chemistry/reagents/drug_reagents.dm index 7165086487b..25498e099a3 100644 --- a/code/modules/reagents/chemistry/reagents/drug_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/drug_reagents.dm @@ -405,7 +405,7 @@ . = 1 /datum/reagent/drug/happiness/addiction_act_stage1(mob/living/M)// all work and no play makes jack a dull boy - GET_COMPONENT_FROM(mood, /datum/component/mood, M) + var/datum/component/mood/mood = M.GetComponent(/datum/component/mood) mood.setSanity(min(mood.sanity, SANITY_DISTURBED)) M.Jitter(5) if(prob(20)) @@ -413,7 +413,7 @@ ..() /datum/reagent/drug/happiness/addiction_act_stage2(mob/living/M) - GET_COMPONENT_FROM(mood, /datum/component/mood, M) + var/datum/component/mood/mood = M.GetComponent(/datum/component/mood) mood.setSanity(min(mood.sanity, SANITY_UNSTABLE)) M.Jitter(10) if(prob(30)) @@ -421,7 +421,7 @@ ..() /datum/reagent/drug/happiness/addiction_act_stage3(mob/living/M) - GET_COMPONENT_FROM(mood, /datum/component/mood, M) + var/datum/component/mood/mood = M.GetComponent(/datum/component/mood) mood.setSanity(min(mood.sanity, SANITY_CRAZY)) M.Jitter(15) if(prob(40)) @@ -429,7 +429,7 @@ ..() /datum/reagent/drug/happiness/addiction_act_stage4(mob/living/carbon/human/M) - GET_COMPONENT_FROM(mood, /datum/component/mood, M) + var/datum/component/mood/mood = M.GetComponent(/datum/component/mood) mood.setSanity(SANITY_INSANE) M.Jitter(20) if(prob(50)) diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index b17ea67f9e3..886677f3b95 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -1289,7 +1289,7 @@ M.dizziness = max(0, M.dizziness-6) M.confused = max(0, M.confused-6) M.disgust = max(0, M.disgust-6) - GET_COMPONENT_FROM(mood, /datum/component/mood, M) + var/datum/component/mood/mood = M.GetComponent(/datum/component/mood) if(mood.sanity <= SANITY_NEUTRAL) // only take effect if in negative sanity and then... mood.setSanity(min(mood.sanity+5, SANITY_NEUTRAL)) // set minimum to prevent unwanted spiking over neutral ..() diff --git a/code/modules/recycling/disposal/bin.dm b/code/modules/recycling/disposal/bin.dm index 066edd265fe..34514de901f 100644 --- a/code/modules/recycling/disposal/bin.dm +++ b/code/modules/recycling/disposal/bin.dm @@ -274,7 +274,7 @@ /obj/machinery/disposal/bin/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/storage/bag/trash)) //Not doing component overrides because this is a specific type. var/obj/item/storage/bag/trash/T = I - GET_COMPONENT_FROM(STR, /datum/component/storage, T) + var/datum/component/storage/STR = T.GetComponent(/datum/component/storage) to_chat(user, "You empty the bag.") for(var/obj/item/O in T.contents) STR.remove_from_storage(O,src) diff --git a/code/modules/recycling/disposal/construction.dm b/code/modules/recycling/disposal/construction.dm index 624d5e0e05d..348e687e031 100644 --- a/code/modules/recycling/disposal/construction.dm +++ b/code/modules/recycling/disposal/construction.dm @@ -29,7 +29,7 @@ pipename = initial(pipe_type.name) if(flip) - GET_COMPONENT(rotcomp,/datum/component/simple_rotation) + var/datum/component/simple_rotation/rotcomp = GetComponent(/datum/component/simple_rotation) rotcomp.BaseRot(null,ROTATION_FLIP) update_icon() diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index 1b1e30d66ab..3af87382aef 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -439,7 +439,7 @@ if(exp == SCANTYPE_OBLITERATE) visible_message("[exp_on] activates the crushing mechanism, [exp_on] is destroyed!") if(linked_console.linked_lathe) - GET_COMPONENT_FROM(linked_materials, /datum/component/material_container, linked_console.linked_lathe) + var/datum/component/material_container/linked_materials = linked_console.linked_lathe.GetComponent(/datum/component/material_container) for(var/material in exp_on.materials) linked_materials.insert_amount( min((linked_materials.max_amount - linked_materials.total_amount), (exp_on.materials[material])), material) if(prob(EFFECT_PROB_LOW) && criticalReaction) diff --git a/code/modules/research/xenobiology/crossbreeding/_misc.dm b/code/modules/research/xenobiology/crossbreeding/_misc.dm index b4c2c536b67..6a249ec2058 100644 --- a/code/modules/research/xenobiology/crossbreeding/_misc.dm +++ b/code/modules/research/xenobiology/crossbreeding/_misc.dm @@ -235,7 +235,7 @@ Slimecrossing Items var/mob/living/carbon/human/H = M if(H.mind && !HAS_TRAIT(H, TRAIT_AGEUSIA)) to_chat(H,"That didn't taste very good...") //No disgust, though. It's just not good tasting. - GET_COMPONENT_FROM(mood, /datum/component/mood, H) + var/datum/component/mood/mood = H.GetComponent(/datum/component/mood) if(mood) mood.add_event(null,"gross_food", /datum/mood_event/gross_food) last_check_time = world.time diff --git a/code/modules/uplink/uplink_devices.dm b/code/modules/uplink/uplink_devices.dm index 93412e20032..44f713a92ed 100644 --- a/code/modules/uplink/uplink_devices.dm +++ b/code/modules/uplink/uplink_devices.dm @@ -28,12 +28,12 @@ /obj/item/uplink/debug/Initialize(mapload, owner, tc_amount = 9000) . = ..() - GET_COMPONENT(hidden_uplink, /datum/component/uplink) + var/datum/component/uplink/hidden_uplink = GetComponent(/datum/component/uplink) hidden_uplink.name = "debug uplink" /obj/item/uplink/nuclear/Initialize() . = ..() - GET_COMPONENT(hidden_uplink, /datum/component/uplink) + var/datum/component/uplink/hidden_uplink = GetComponent(/datum/component/uplink) hidden_uplink.set_gamemode(/datum/game_mode/nuclear) /obj/item/uplink/nuclear/debug @@ -41,19 +41,19 @@ /obj/item/uplink/nuclear/debug/Initialize(mapload, owner, tc_amount = 9000) . = ..() - GET_COMPONENT(hidden_uplink, /datum/component/uplink) + var/datum/component/uplink/hidden_uplink = GetComponent(/datum/component/uplink) hidden_uplink.set_gamemode(/datum/game_mode/nuclear) hidden_uplink.name = "debug nuclear uplink" /obj/item/uplink/nuclear_restricted/Initialize() . = ..() - GET_COMPONENT(hidden_uplink, /datum/component/uplink) + var/datum/component/uplink/hidden_uplink = GetComponent(/datum/component/uplink) hidden_uplink.allow_restricted = FALSE hidden_uplink.set_gamemode(/datum/game_mode/nuclear) /obj/item/uplink/clownop/Initialize() . = ..() - GET_COMPONENT(hidden_uplink, /datum/component/uplink) + var/datum/component/uplink/hidden_uplink = GetComponent(/datum/component/uplink) hidden_uplink.set_gamemode(/datum/game_mode/nuclear/clown_ops) /obj/item/uplink/old @@ -62,7 +62,7 @@ /obj/item/uplink/old/Initialize(mapload, owner, tc_amount = 10) . = ..() - GET_COMPONENT(hidden_uplink, /datum/component/uplink) + var/datum/component/uplink/hidden_uplink = GetComponent(/datum/component/uplink) hidden_uplink.name = "dusty radio" // Multitool uplink