Merge pull request #623 from ArchieBeepBoop/numbertwo

Ports: GetComponent macros removal, and few other updates.
This commit is contained in:
Dahlular
2020-10-29 10:30:33 -06:00
committed by GitHub
87 changed files with 248 additions and 249 deletions

View File

@@ -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

View File

@@ -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, "<span class='notice'>You begin to butcher [src]...</span>")
playsound(loc, butchering.butcher_sound, 50, TRUE, -1)

View File

@@ -6,21 +6,28 @@
/datum/component/infective/Initialize(list/datum/disease/_diseases, expire_in)
if(islist(_diseases))
diseases = diseases
diseases = _diseases
else
diseases = list(_diseases)
if(expire_in)
expire_time = world.time + expire_in
QDEL_IN(src, expire_in)
if(!ismovableatom(parent))
return COMPONENT_INCOMPATIBLE
RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean)
RegisterSignal(parent, COMSIG_MOVABLE_BUCKLE, .proc/try_infect_buckle)
RegisterSignal(parent, COMSIG_MOVABLE_BUMP, .proc/try_infect_collide)
RegisterSignal(parent, COMSIG_MOVABLE_CROSSED, .proc/try_infect_crossed)
RegisterSignal(parent, COMSIG_ITEM_ATTACK_ZONE, .proc/try_infect_attack_zone)
RegisterSignal(parent, COMSIG_ITEM_ATTACK, .proc/try_infect_attack)
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/try_infect_equipped)
RegisterSignal(parent, COMSIG_MOVABLE_IMPACT_ZONE, .proc/try_infect_impact_zone)
RegisterSignal(parent, COMSIG_FOOD_EATEN, .proc/try_infect_eat)
RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean)
if(isitem(parent))
RegisterSignal(parent, COMSIG_ITEM_ATTACK_ZONE, .proc/try_infect_attack_zone)
RegisterSignal(parent, COMSIG_ITEM_ATTACK, .proc/try_infect_attack)
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/try_infect_equipped)
if(istype(parent, /obj/item/reagent_containers/food/snacks))
RegisterSignal(parent, COMSIG_FOOD_EATEN, .proc/try_infect_eat)
else if(istype(parent, /obj/effect/decal/cleanable/blood/gibs))
RegisterSignal(parent, COMSIG_GIBS_STREAK, .proc/try_infect_streak)
/datum/component/infective/proc/try_infect_eat(datum/source, mob/living/eater, mob/living/feeder)
for(var/V in diseases)
@@ -73,6 +80,9 @@
if(isliving(M))
try_infect(M, BODY_ZONE_PRECISE_L_FOOT)
/datum/component/infective/proc/try_infect_streak(datum/source, list/directions, list/output_diseases)
output_diseases |= diseases
/datum/component/infective/proc/try_infect(mob/living/L, target_zone)
for(var/V in diseases)
L.ContactContractDisease(V, target_zone)

View File

@@ -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)

View File

@@ -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(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(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(usr,ROTATION_FLIP)

View File

@@ -587,7 +587,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, "<span class='warning'>[IP] cannot hold [I] as it's a storage item of the same size!</span>")

View File

@@ -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

View File

@@ -16,13 +16,13 @@
mood_quirk = TRUE
/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.8
/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 = 1 //Change this once/if species get their own mood modifiers.

View File

@@ -554,7 +554,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)

View File

@@ -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/Initialize()
. = ..()
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(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(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("<span class='suicide'>[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!</span>")
GET_COMPONENT(slipper, /datum/component/slippery)
var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery)
slipper.Slip(user)
return SHAME
@@ -130,12 +130,12 @@
/obj/item/shield/energy/bananium/Initialize()
. = ..()
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)
@@ -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(hit_atom)
if(thrownby && !caught)
throw_at(thrownby, throw_range+2, throw_speed, null, 1)

View File

@@ -80,7 +80,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)
@@ -164,7 +164,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)
@@ -188,7 +188,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)
@@ -213,7 +213,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)
@@ -262,7 +262,7 @@
dat += "<a href='?src=[REF(src)];make=[D.id];multiplier=1'>[D.name]</a>"
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 += " <a href='?src=[REF(src)];make=[D.id];multiplier=10'>x10</a>"
@@ -294,7 +294,7 @@
dat += "<a href='?src=[REF(src)];make=[D.id];multiplier=1'>[D.name]</a>"
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 += " <a href='?src=[REF(src)];make=[D.id];multiplier=10'>x10</a>"
@@ -309,7 +309,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 = "<b>Total amount:</b> [materials.total_amount] / [materials.max_amount] cm<sup>3</sup><br>"
for(var/mat_id in materials.materials)
var/datum/material/M = materials.materials[mat_id]
@@ -322,7 +322,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)))
@@ -380,4 +380,4 @@
//Called when the object is constructed by an autolathe
//Has a reference to the autolathe so you can do !!FUN!! things with hacked lathes
/obj/item/proc/autolathe_crafted(obj/machinery/autolathe/A)
return
return

View File

@@ -33,7 +33,7 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
if(uplinkholder)
to_chat(user, "<span class='notice'>[src] already has an uplink in it.</span>")
return
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, I)
var/datum/component/uplink/hidden_uplink = I.GetComponent(/datum/component/uplink)
if(hidden_uplink)
if(!user.transferItemToLoc(I, src))
return
@@ -57,7 +57,7 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
/obj/machinery/computer/telecrystals/uplinker/proc/donateTC(amt, addLog = 1)
if(uplinkholder && linkedboss)
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, uplinkholder)
var/datum/component/uplink/hidden_uplink = uplinkholder.GetComponent(/datum/component/uplink)
if(amt < 0)
linkedboss.storedcrystals += hidden_uplink.telecrystals
if(addLog)
@@ -71,7 +71,7 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
/obj/machinery/computer/telecrystals/uplinker/proc/giveTC(amt, addLog = 1)
if(uplinkholder && linkedboss)
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, uplinkholder)
var/datum/component/uplink/hidden_uplink = uplinkholder.GetComponent(/datum/component/uplink)
if(amt < 0)
hidden_uplink.telecrystals += linkedboss.storedcrystals
if(addLog)
@@ -94,7 +94,7 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
dat += "No linked management consoles detected. Scan for uplink stations using the management console.<BR><BR>"
if(uplinkholder)
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, uplinkholder)
var/datum/component/uplink/hidden_uplink = uplinkholder.GetComponent(/datum/component/uplink)
dat += "[hidden_uplink.telecrystals] telecrystals remain in this uplink.<BR>"
if(linkedboss)
dat += "Donate TC: <a href='byond://?src=[REF(src)];donate=1'>1</a> | <a href='byond://?src=[REF(src)];donate=5'>5</a> | <a href='byond://?src=[REF(src)];donate=-1'>All</a>"
@@ -170,7 +170,7 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
for(var/obj/machinery/computer/telecrystals/uplinker/A in TCstations)
dat += "[A.name] | "
if(A.uplinkholder)
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, A.uplinkholder)
var/datum/component/uplink/hidden_uplink = A.uplinkholder.GetComponent(/datum/component/uplink)
dat += "[hidden_uplink.telecrystals] telecrystals."
if(storedcrystals)
dat+= "<BR>Add TC: <a href ='?src=[REF(src)];target=[REF(A)];give=1'>1</a> | <a href ='?src=[REF(src)];target=[REF(A)];give=5'>5</a> | <a href ='?src=[REF(src)];target=[REF(A)];give=10'>10</a> | <a href ='?src=[REF(src)];target=[REF(A)];give=-1'>All</a>"

View File

@@ -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(istype(I, /obj/item/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, "<span class='notice'>You retrieve the materials from [src].</span>")

View File

@@ -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

View File

@@ -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()

View File

@@ -454,4 +454,4 @@
return TRUE
/obj/machinery/mecha_part_fabricator/maint
link_on_init = FALSE
link_on_init = FALSE

View File

@@ -51,7 +51,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)

View File

@@ -26,15 +26,13 @@
add_overlay(flesh)
/obj/effect/decal/cleanable/blood/gibs/xeno/streak(list/directions)
set waitfor = 0
set waitfor = FALSE
var/list/diseases = list()
SEND_SIGNAL(src, COMSIG_GIBS_STREAK, directions, diseases)
var/direction = pick(directions)
for(var/i = 0, i < pick(1, 200; 2, 150; 3, 50), i++)
for(var/i in 0 to pick(0, 200; 1, 150; 2, 50))
sleep(2)
if(i > 0)
var/list/datum/disease/diseases
GET_COMPONENT(infective, /datum/component/infective)
if(infective)
diseases = infective.diseases
var/obj/effect/decal/cleanable/blood/splatter/xeno/splat = new /obj/effect/decal/cleanable/blood/splatter/xeno(loc, diseases)
splat.transfer_blood_dna(blood_DNA, diseases)
if(!step_to(src, get_step(src, direction), 0))

View File

@@ -41,15 +41,13 @@
. = ..()
/obj/effect/decal/cleanable/blood/gibs/proc/streak(list/directions)
set waitfor = 0
set waitfor = FALSE
var/list/diseases = list()
SEND_SIGNAL(src, COMSIG_GIBS_STREAK, directions, diseases)
var/direction = pick(directions)
for(var/i = 0, i < pick(1, 200; 2, 150; 3, 50), i++)
for(var/i in 0 to pick(0, 200; 1, 150; 2, 50))
sleep(2)
if(i > 0)
var/list/datum/disease/diseases
GET_COMPONENT(infective, /datum/component/infective)
if(infective)
diseases = infective.diseases
var/obj/effect/decal/cleanable/blood/splatter/splat = new /obj/effect/decal/cleanable/blood/splatter(loc, diseases)
splat.transfer_blood_dna(blood_DNA, diseases)
if(!step_to(src, get_step(src, direction), 0))

View File

@@ -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

View File

@@ -70,7 +70,7 @@
difficulty++ //if cartridge has manifest access it has extra snowflake difficulty
else
difficulty += 2
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, target)
var/datum/component/uplink/hidden_uplink = target.GetComponent(/datum/component/uplink)
if(!target.detonatable || prob(difficulty * 15) || (hidden_uplink))
U.show_message("<span class='danger'>An error flashes on your [src].</span>", 1)
else
@@ -95,7 +95,7 @@
charges--
var/lock_code = "[rand(100,999)] [pick(GLOB.phonetic_alphabet)]"
to_chat(U, "<span class='notice'>Virus Sent! The unlock code to the target is: [lock_code]</span>")
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

View File

@@ -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

View File

@@ -19,7 +19,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)

View File

@@ -69,7 +69,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)

View File

@@ -216,7 +216,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

View File

@@ -9,10 +9,11 @@
item_flags = NOBLUDGEON
/obj/item/stack/telecrystal/attack(mob/target, mob/user)
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)
if(target == user && isliving(user)) //You can't go around smacking people with crystals to find out if they have an uplink or not.
var/mob/living/L = user
for(var/obj/item/implant/uplink/I in L.implants)
if(I?.imp_in)
var/datum/component/uplink/hidden_uplink = I.GetComponent(/datum/component/uplink)
if(hidden_uplink)
hidden_uplink.telecrystals += amount
use(amount)

View File

@@ -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
@@ -34,7 +34,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
@@ -56,7 +56,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
@@ -84,7 +84,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
@@ -252,7 +252,7 @@
/obj/item/storage/backpack/satchel/bone/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 = 15
@@ -276,7 +276,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 = 6
STR.cant_hold = typecacheof(list(/obj/item/storage/backpack/satchel/flat)) //muh recursive backpacks
@@ -328,7 +328,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
@@ -430,7 +430,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
@@ -582,7 +582,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

View File

@@ -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.can_hold = typecacheof(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))
@@ -164,7 +164,7 @@
/obj/item/storage/bag/ore/cyborg/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.can_hold = typecacheof(list(/obj/item/stack/ore))
STR.max_w_class = WEIGHT_CLASS_HUGE
@@ -176,7 +176,7 @@
/obj/item/storage/bag/ore/large/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.can_hold = typecacheof(list(/obj/item/stack/ore))
STR.max_w_class = WEIGHT_CLASS_HUGE
@@ -189,7 +189,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
@@ -207,7 +207,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
@@ -247,7 +247,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.can_hold = typecacheof(list(/obj/item/stack/sheet))
STR.cant_hold = typecacheof(list(/obj/item/stack/sheet/mineral/sandstone, /obj/item/stack/sheet/mineral/wood))
@@ -264,7 +264,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
// -----------------------------
@@ -281,7 +281,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
@@ -306,14 +306,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)
@@ -360,7 +360,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"
@@ -380,7 +380,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"
@@ -394,7 +394,7 @@
/obj/item/storage/bag/bio/holding/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_combined_w_class = INFINITY
STR.max_items = 100
@@ -417,4 +417,4 @@
STR.max_items = 50
STR.max_w_class = WEIGHT_CLASS_SMALL
STR.insert_preposition = "in"
STR.can_hold = typecacheof(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))
STR.can_hold = typecacheof(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))

View File

@@ -43,7 +43,7 @@
/obj/item/storage/belt/utility/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
var/static/list/can_hold = typecacheof(list(
/obj/item/crowbar,
/obj/item/screwdriver,
@@ -127,7 +127,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.can_hold = typecacheof(list(
/obj/item/healthanalyzer,
@@ -200,7 +200,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.can_hold = typecacheof(list(
@@ -238,7 +238,7 @@
obj/item/storage/belt/slut/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.can_hold = typecacheof(list(
@@ -271,7 +271,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/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
@@ -328,7 +328,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/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
@@ -339,7 +339,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/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.can_hold = typecacheof(list(
/obj/item/soulstone
@@ -362,7 +362,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/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.can_hold = list(
/obj/item/clothing/mask/luchador
@@ -376,7 +376,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/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
@@ -389,7 +389,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/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.can_hold = typecacheof(list(
@@ -457,7 +457,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/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/durathread
@@ -571,7 +571,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/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
@@ -623,7 +623,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/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.can_hold = typecacheof(list(
/obj/item/gun/magic/wand
@@ -649,7 +649,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/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.can_hold = typecacheof(list(
@@ -676,7 +676,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/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.can_hold = typecacheof(list(
@@ -692,7 +692,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/obj/item/storage/belt/bandolier/durathread/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_items = 32
STR.display_numerical_stacking = TRUE
STR.can_hold = typecacheof(list(
@@ -707,7 +707,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/obj/item/storage/belt/medolier/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_items = 15
STR.display_numerical_stacking = FALSE
STR.can_hold = typecacheof(list(
@@ -727,7 +727,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/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.can_hold = typecacheof(list(
@@ -751,7 +751,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/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
@@ -818,7 +818,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/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
@@ -875,7 +875,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/obj/item/storage/belt/botany/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_items = 8
STR.max_w_class = WEIGHT_CLASS_NORMAL
STR.can_hold = typecacheof(list(

View File

@@ -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)

View File

@@ -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
@@ -48,7 +48,7 @@
/obj/item/storage/briefcase/lawyer/family/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

View File

@@ -13,7 +13,7 @@
/obj/item/storage/daki/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 = 21
STR.max_items = 3

View File

@@ -26,7 +26,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)
@@ -73,7 +73,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.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/donut))
@@ -94,7 +94,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.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/egg))
@@ -116,7 +116,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)
@@ -139,7 +139,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.can_hold = typecacheof(list(/obj/item/clothing/mask/cigarette, /obj/item/lighter))
@@ -277,7 +277,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.can_hold = typecacheof(list(/obj/item/rollingpaper))
@@ -301,7 +301,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.can_hold = typecacheof(list(/obj/item/clothing/mask/cigarette/cigar))
@@ -348,7 +348,7 @@
/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.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/tinychocolate))

View File

@@ -171,7 +171,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()
@@ -201,7 +201,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.can_hold = typecacheof(list(/obj/item/reagent_containers/pill, /obj/item/dice))
@@ -364,7 +364,7 @@
/obj/item/storage/belt/organbox/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_items = 16
STR.max_w_class = WEIGHT_CLASS_BULKY
STR.max_combined_w_class = 20

View File

@@ -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

View File

@@ -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.cant_hold = typecacheof(list(/obj/item/storage/secure/briefcase))
STR.max_w_class = 8 //??

View File

@@ -123,7 +123,7 @@ GLOBAL_LIST_EMPTY(rubber_toolbox_icons)
/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()
@@ -164,7 +164,7 @@ GLOBAL_LIST_EMPTY(rubber_toolbox_icons)
/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
@@ -219,7 +219,7 @@ GLOBAL_LIST_EMPTY(rubber_toolbox_icons)
/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
@@ -257,7 +257,7 @@ GLOBAL_LIST_EMPTY(rubber_toolbox_icons)
/obj/item/storage/toolbox/gold_real/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_combined_w_class = 40
STR.max_items = 12

View File

@@ -221,7 +221,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.can_hold = typecacheof(list(/obj/item/clothing/suit/space/syndicate, /obj/item/clothing/head/helmet/space/syndicate))
@@ -245,7 +245,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()

View File

@@ -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.cant_hold = typecacheof(list(/obj/item/screwdriver/power))
STR.can_hold = typecacheof(list(

View File

@@ -615,7 +615,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)

View File

@@ -41,7 +41,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)

View File

@@ -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

View File

@@ -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, "<span class='userdanger'>OH GOD! NONE OF IT IS REAL! NONE OF IT IS REEEEEEEEEEEEEEEEEEEEEEEEAL!</span>")

View File

@@ -561,7 +561,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)

View File

@@ -139,7 +139,7 @@
. = ..()
if(damaged_clothes)
. += "<span class='warning'>It looks damaged!</span>"
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("<span class='notice'>")
if(pockets.attack_hand_interact)

View File

@@ -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, "<span class='notice'>You retrieve [sheet_amount] sheets of bananium from the prototype shoes.</span>")
@@ -42,7 +42,7 @@
. += "<span class='notice'>The shoes are [on ? "enabled" : "disabled"].</span>"
/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()

View File

@@ -12,7 +12,7 @@
var/datum/component/storage/detached_pockets
/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

View File

@@ -13,7 +13,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
SEND_SIGNAL(S, COMSIG_TRY_STORAGE_INSERT, scroll, null, TRUE, TRUE)

View File

@@ -38,9 +38,7 @@
if(M.mind && HAS_TRAIT(M.mind, TRAIT_LAW_ENFORCEMENT_METABOLISM) && !HAS_TRAIT(H, TRAIT_AGEUSIA))
to_chat(H,"<span class='notice'>I love this taste!</span>")
H.adjust_disgust(-5 + -2.5 * fraction)
GET_COMPONENT_FROM(mood, /datum/component/mood, H)
if(mood)
mood.add_event(null, "fav_food", /datum/mood_event/favorite_food)
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "fav_food", /datum/mood_event/favorite_food)
last_check_time = world.time
return
..()

View File

@@ -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.can_hold = typecacheof(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()

View File

@@ -174,7 +174,7 @@
to_chat(usr, "<span class='notice'>\The [src] is full.</span>")
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

View File

@@ -893,7 +893,7 @@
return FALSE
var/ignore_bags = get_pin_data(IC_INPUT, 1)
if(ignore_bags)
GET_COMPONENT_FROM(STR, /datum/component/storage, A)
var/datum/component/storage/STR = A.GetComponent(/datum/component/storage)
if(STR)
return FALSE
set_pin_data(IC_OUTPUT, 1, WEAKREF(A))
@@ -1104,7 +1104,7 @@
/obj/item/integrated_circuit/input/matscan/do_work()
var/atom/movable/H = get_pin_data_as_type(IC_INPUT, 1, /atom/movable)
var/turf/T = get_turf(src)
GET_COMPONENT_FROM(mt, /datum/component/material_container, H)
var/datum/component/material_container/mt = H.GetComponent(/datum/component/material_container)
if(!mt) //Invalid input
return
if(H in view(T)) // This is a camera. It can't examine thngs,that it can't see.

View File

@@ -411,7 +411,7 @@
.=..()
/obj/item/integrated_circuit/manipulation/matman/proc/AfterMaterialInsert(type_inserted, id_inserted, amount_inserted)
GET_COMPONENT(materials, /datum/component/material_container)
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
set_pin_data(IC_OUTPUT, 2, materials.total_amount)
for(var/I in 1 to mtypes.len)
var/datum/material/M = materials.materials[mtypes[I]]
@@ -423,7 +423,7 @@
return TRUE
/obj/item/integrated_circuit/manipulation/matman/do_work(ord)
GET_COMPONENT(materials, /datum/component/material_container)
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
var/atom/movable/H = get_pin_data_as_type(IC_INPUT, 1, /atom/movable)
if(!check_target(H))
activate_pin(4)
@@ -441,7 +441,7 @@
else
activate_pin(4)
if(2)
GET_COMPONENT_FROM(mt, /datum/component/material_container, H)
var/datum/component/material_container/mt = H.GetComponent(/datum/component/material_container)
var/suc
for(var/I in 1 to mtypes.len)
var/datum/material/M = materials.materials[mtypes[I]]
@@ -467,7 +467,7 @@
activate_pin(6)
/obj/item/integrated_circuit/manipulation/matman/Destroy()
GET_COMPONENT(materials, /datum/component/material_container)
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
materials.retrieve_all()
.=..()
@@ -509,14 +509,14 @@
if(!container || !istype(container,/obj/item/storage) || !Adjacent(container))
return
GET_COMPONENT_FROM(STR, /datum/component/storage, container)
var/datum/component/storage/STR = container.GetComponent(/datum/component/storage)
if(!STR)
return
STR.attackby(src, target_obj)
else
GET_COMPONENT_FROM(STR, /datum/component/storage, target_obj.loc)
var/datum/component/storage/STR = target_obj.loc.GetComponent(/datum/component/storage)
if(!STR)
return

View File

@@ -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

View File

@@ -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 = "<b>Smelter control console</b><br><br>"
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 += "<span class=\"res_name\">[M.name]: </span>[M.amount] cm&sup3;"
@@ -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()
..()

View File

@@ -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("<head><title>Ore Silo</title></head><body><div class='statusDisplay'><h2>Stored Material:</h2>")
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

View File

@@ -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 = "<b>Coin Press</b><br>"
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, "<span class='notice'>The machine is processing.</span>")
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"]

View File

@@ -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

View File

@@ -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)
@@ -61,7 +61,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)
@@ -74,4 +74,4 @@
return
user.nextsoundemote = world.time + 7
playsound(user, 'modular_citadel/sound/voice/speen.ogg', 50, 1, -1)
. = ..()
. = ..()

View File

@@ -928,7 +928,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)
@@ -970,7 +970,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

View File

@@ -297,7 +297,7 @@
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "headpat", /datum/mood_event/headpat)
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)
@@ -366,7 +366,7 @@
"<span class='notice'>You hug [src] to make [p_them()] feel better!</span>")
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)

View File

@@ -94,7 +94,7 @@
if(combatmode)
. += "[t_He] [t_is] visibly tense[resting ? "." : ", and [t_is] standing in combative stance."]"
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)

View File

@@ -292,7 +292,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)

View File

@@ -1238,7 +1238,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
@@ -1396,7 +1396,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
var/grav_force = min(gravity - STANDARD_GRAVITY,3)
. += 1 + grav_force
GET_COMPONENT_FROM(mood, /datum/component/mood, H)
var/datum/component/mood/mood = H.GetComponent(/datum/component/mood)
if(mood && !flight) //How can depression slow you down if you can just fly away from your problems?
switch(mood.sanity)
if(SANITY_INSANE to SANITY_CRAZY)

View File

@@ -524,7 +524,7 @@
fire_stacks = 0
confused = 0
update_canmove()
GET_COMPONENT(mood, /datum/component/mood)
var/datum/component/mood/mood = GetComponent(/datum/component/mood)
if (mood)
QDEL_LIST_ASSOC_VAL(mood.mood_events)
mood.sanity = SANITY_GREAT

View File

@@ -1220,7 +1220,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)

View File

@@ -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)

View File

@@ -536,7 +536,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
@@ -547,7 +547,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)

View File

@@ -201,7 +201,7 @@
throwforce = 35
playsound(user, 'sound/weapons/saberon.ogg', 5, 1)
to_chat(user, "<span class='warning'>[src] is now active.</span>")
GET_COMPONENT_FROM(butchering, /datum/component/butchering, src)
var/datum/component/butchering/butchering = src.GetComponent(/datum/component/butchering)
butchering.butchering_enabled = on
update_icon()

View File

@@ -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.can_hold = typecacheof(list(/obj/item/photo))
STR.max_combined_w_class = 42
STR.max_items = 21

View File

@@ -175,7 +175,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
@@ -263,7 +263,7 @@
var/target_loc = bottle ? bottle : 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

View File

@@ -423,7 +423,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))
@@ -431,7 +431,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))
@@ -439,7 +439,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))
@@ -447,7 +447,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))

View File

@@ -1444,7 +1444,7 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
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
..()

View File

@@ -277,7 +277,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, "<span class='warning'>You empty the bag.</span>")
for(var/obj/item/O in T.contents)
STR.remove_from_storage(O,src)

View File

@@ -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()

View File

@@ -422,7 +422,7 @@
if(exp == SCANTYPE_OBLITERATE)
visible_message("<span class='warning'>[exp_on] activates the crushing mechanism, [exp_on] is destroyed!</span>")
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)

View File

@@ -58,9 +58,7 @@
var/mob/living/carbon/human/H = M
if(H.mind && !HAS_TRAIT(H, TRAIT_AGEUSIA))
to_chat(H,"<span class='notice'>That didn't taste very good...</span>") //No disgust, though. It's just not good tasting.
GET_COMPONENT_FROM(mood, /datum/component/mood, H)
if(mood)
mood.add_event(null,"gross_food", /datum/mood_event/gross_food)
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "gross_food", /datum/mood_event/gross_food)
last_check_time = world.time
return
..()

View File

@@ -290,7 +290,7 @@ All ShuttleMove procs go here
// ignores the movement of the shuttle from the staging area on CentCom to
// the station as it is loaded in.
if (oldT && !is_centcom_level(oldT.z))
GET_COMPONENT(STR, /datum/component/storage/concrete/emergency)
var/datum/component/storage/concrete/emergency/STR = GetComponent(/datum/component/storage/concrete/emergency)
STR?.unlock_me()
/************************************Mob move procs************************************/

View File

@@ -917,7 +917,7 @@
speaktrigger += "[(H.client?.prefs.lewdchem?"You are my whole world and all of my being belongs to you, ":"I cannot think of anything else but aiding your cause, ")] "//Redflags!!
//mood
GET_COMPONENT_FROM(mood, /datum/component/mood, H)
var/datum/component/mood/mood = H.GetComponent(/datum/component/mood)
switch(mood.sanity)
if(SANITY_GREAT to INFINITY)
speaktrigger += "I'm beyond elated!! " //did you mean byond elated? hohoho

View File

@@ -25,18 +25,18 @@
/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_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
@@ -45,7 +45,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

View File

@@ -190,7 +190,7 @@ GLOBAL_LIST_INIT(hyper_special_roles, list(
if(should_equip)
equip(silent)
for(var/obj/I in owner.current.GetAllContents())
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, I)
var/datum/component/uplink/hidden_uplink = I.GetComponent(/datum/component/uplink)
if(hidden_uplink)
lewd_uplink_list = get_custom_uplink_items(lewd_uplink_list_raw, /datum/game_mode/traitor/lewd, TRUE, FALSE)
hidden_uplink.uplink_items = lewd_uplink_list

View File

@@ -123,7 +123,7 @@
if(ishuman(C))
var/mob/living/carbon/human/H = C
GET_COMPONENT_FROM(mood, /datum/component/mood, H)
var/datum/component/mood/mood = H.GetComponent(/datum/component/mood)
if(emagged != 2) // EVERYONE GETS HUGS!
for(var/datum/mood_event/i in mood.mood_events)
if (i.description == "<span class='nicegreen'>Hugs are nice.</span>\n" )

View File

@@ -69,7 +69,7 @@
popup.open()
/obj/machinery/autoylathe/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/autoylathe/attackby(obj/item/O, mob/user, params)
@@ -157,7 +157,7 @@
var/plastic_cost = being_built.materials[MAT_PLASTIC]
var/power = max(2000, (metal_cost+glass_cost+plastic_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) && (materials.amount(MAT_PLASTIC) >= plastic_cost*multiplier*coeff))
busy = TRUE
use_power(power)
@@ -181,7 +181,7 @@
return
/obj/machinery/autoylathe/proc/make_item(power, metal_cost, glass_cost, plastic_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, MAT_PLASTIC=plastic_cost*coeff*multiplier)
@@ -205,7 +205,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)
@@ -254,7 +254,7 @@
dat += "<a href='?src=[REF(src)];make=[D.id];multiplier=1'>[D.name]</a>"
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,D.materials[MAT_PLASTIC] ?round(materials.amount(MAT_PLASTIC)/D.materials[MAT_PLASTIC]):INFINITY)
if (max_multiplier>10 && !disabled)
dat += " <a href='?src=[REF(src)];make=[D.id];multiplier=10'>x10</a>"
@@ -286,7 +286,7 @@
dat += "<a href='?src=[REF(src)];make=[D.id];multiplier=1'>[D.name]</a>"
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,D.materials[MAT_PLASTIC] ?round(materials.amount(MAT_PLASTIC)/D.materials[MAT_PLASTIC]):INFINITY)
if (max_multiplier>10 && !disabled)
dat += " <a href='?src=[REF(src)];make=[D.id];multiplier=10'>x10</a>"
@@ -301,7 +301,7 @@
return dat
/obj/machinery/autoylathe/proc/materials_printout()
GET_COMPONENT(materials, /datum/component/material_container)
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
var/dat = "<b>Total amount:</b> [materials.total_amount] / [materials.max_amount] cm<sup>3</sup><br>"
for(var/mat_id in materials.materials)
var/datum/material/M = materials.materials[mat_id]
@@ -314,7 +314,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)))

View File

@@ -49,7 +49,7 @@
/obj/item/storage/hypospraykit/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_items = 12
STR.can_hold = typecacheof(list(
/obj/item/hypospray/mkii,
@@ -151,7 +151,7 @@
/obj/item/storage/hypospraykit/cmo/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_items = 6
STR.can_hold = typecacheof(list(
/obj/item/hypospray/mkii,

View File

@@ -142,7 +142,7 @@ SLEEPER CODE IS IN game/objects/items/devices/dogborg_sleeper.dm !
/obj/item/storage/bag/borgdelivery/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_w_class = WEIGHT_CLASS_BULKY
STR.max_combined_w_class = 5
STR.max_items = 1

View File

@@ -182,7 +182,7 @@
/datum/reagent/fermi/nanite_b_gone/on_mob_life(mob/living/carbon/C)
//var/component/nanites/N = M.GetComponent(/datum/component/nanites)
GET_COMPONENT_FROM(N, /datum/component/nanites, C)
var/datum/component/nanites/N = C.GetComponent(/datum/component/nanites)
if(isnull(N))
return ..()
N.nanite_volume = -purity//0.5 seems to be the default to me, so it'll neuter them.
@@ -190,7 +190,7 @@
/datum/reagent/fermi/nanite_b_gone/overdose_process(mob/living/carbon/C)
//var/component/nanites/N = M.GetComponent(/datum/component/nanites)
GET_COMPONENT_FROM(N, /datum/component/nanites, C)
var/datum/component/nanites/N = C.GetComponent(/datum/component/nanites)
if(prob(5))
to_chat(C, "<span class='warning'>The residual voltage from the nanites causes you to seize up!</b></span>")
C.electrocute_act(10, (get_turf(C)), 1, FALSE, FALSE, FALSE, TRUE)

View File

@@ -24,7 +24,7 @@
if(H.sprinting && charge)
charge--
new_speed = chargespeed
GET_COMPONENT(D, /datum/component/riding)
var/datum/component/riding/D = GetComponent(/datum/component/riding)
D.vehicle_move_delay = new_speed
for(var/i in progressbars_by_rider)
var/datum/progressbar/B = progressbars_by_rider[i]