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
-4
View File
@@ -2,10 +2,6 @@
#define SEND_GLOBAL_SIGNAL(sigtype, arguments...) ( SEND_SIGNAL(SSdcs, sigtype, ##arguments) ) #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_INCOMPATIBLE 1
#define COMPONENT_NOTRANSFER 2 #define COMPONENT_NOTRANSFER 2
+1 -1
View File
@@ -40,7 +40,7 @@
return TRUE return TRUE
user.changeNext_move(CLICK_CD_MELEE) user.changeNext_move(CLICK_CD_MELEE)
if(user.a_intent == INTENT_HARM && stat == DEAD && (butcher_results || guaranteed_butcher_results)) //can we butcher it? 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) if(butchering && butchering.butchering_enabled)
to_chat(user, "<span class='notice'>You begin to butcher [src]...</span>") to_chat(user, "<span class='notice'>You begin to butcher [src]...</span>")
playsound(loc, butchering.butcher_sound, 50, TRUE, -1) playsound(loc, butchering.butcher_sound, 50, TRUE, -1)
+16 -6
View File
@@ -6,21 +6,28 @@
/datum/component/infective/Initialize(list/datum/disease/_diseases, expire_in) /datum/component/infective/Initialize(list/datum/disease/_diseases, expire_in)
if(islist(_diseases)) if(islist(_diseases))
diseases = diseases diseases = _diseases
else else
diseases = list(_diseases) diseases = list(_diseases)
if(expire_in) if(expire_in)
expire_time = world.time + expire_in expire_time = world.time + expire_in
QDEL_IN(src, 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_BUCKLE, .proc/try_infect_buckle)
RegisterSignal(parent, COMSIG_MOVABLE_BUMP, .proc/try_infect_collide) RegisterSignal(parent, COMSIG_MOVABLE_BUMP, .proc/try_infect_collide)
RegisterSignal(parent, COMSIG_MOVABLE_CROSSED, .proc/try_infect_crossed) 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_MOVABLE_IMPACT_ZONE, .proc/try_infect_impact_zone)
RegisterSignal(parent, COMSIG_FOOD_EATEN, .proc/try_infect_eat) if(isitem(parent))
RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean) 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) /datum/component/infective/proc/try_infect_eat(datum/source, mob/living/eater, mob/living/feeder)
for(var/V in diseases) for(var/V in diseases)
@@ -73,6 +80,9 @@
if(isliving(M)) if(isliving(M))
try_infect(M, BODY_ZONE_PRECISE_L_FOOT) 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) /datum/component/infective/proc/try_infect(mob/living/L, target_zone)
for(var/V in diseases) for(var/V in diseases)
L.ContactContractDisease(V, target_zone) L.ContactContractDisease(V, target_zone)
+1 -1
View File
@@ -6,7 +6,7 @@
return return
/datum/proc/ntnet_send(datum/netdata/data, netid) /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) if(!NIC)
return FALSE return FALSE
return NIC.__network_send(data, netid) return NIC.__network_send(data, netid)
+3 -3
View File
@@ -143,7 +143,7 @@
set name = "Rotate Clockwise" set name = "Rotate Clockwise"
set category = "Object" set category = "Object"
set src in oview(1) 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) if(rotcomp)
rotcomp.HandRot(usr,ROTATION_CLOCKWISE) rotcomp.HandRot(usr,ROTATION_CLOCKWISE)
@@ -151,7 +151,7 @@
set name = "Rotate Counter-Clockwise" set name = "Rotate Counter-Clockwise"
set category = "Object" set category = "Object"
set src in oview(1) 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) if(rotcomp)
rotcomp.HandRot(usr,ROTATION_COUNTERCLOCKWISE) rotcomp.HandRot(usr,ROTATION_COUNTERCLOCKWISE)
@@ -159,6 +159,6 @@
set name = "Flip" set name = "Flip"
set category = "Object" set category = "Object"
set src in oview(1) 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) if(rotcomp)
rotcomp.HandRot(usr,ROTATION_FLIP) rotcomp.HandRot(usr,ROTATION_FLIP)
+1 -1
View File
@@ -587,7 +587,7 @@
return FALSE return FALSE
if(isitem(host)) if(isitem(host))
var/obj/item/IP = 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((I.w_class >= IP.w_class) && STR_I && !allow_big_nesting)
if(!stop_messages) if(!stop_messages)
to_chat(M, "<span class='warning'>[IP] cannot hold [I] as it's a storage item of the same size!</span>") to_chat(M, "<span class='warning'>[IP] cannot hold [I] as it's a storage item of the same size!</span>")
+2 -2
View File
@@ -12,7 +12,7 @@
RegisterSignal(parent, COMSIG_MOVABLE_UNCROSSED, .proc/leave_swarm) RegisterSignal(parent, COMSIG_MOVABLE_UNCROSSED, .proc/leave_swarm)
/datum/component/swarming/proc/join_swarm(datum/source, atom/movable/AM) /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) if(!other_swarm)
return return
swarm() swarm()
@@ -21,7 +21,7 @@
other_swarm.swarm_members |= src other_swarm.swarm_members |= src
/datum/component/swarming/proc/leave_swarm(datum/source, atom/movable/AM) /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)) if(!other_swarm || !(other_swarm in swarm_members))
return return
swarm_members -= other_swarm swarm_members -= other_swarm
+2 -2
View File
@@ -16,13 +16,13 @@
mood_quirk = TRUE mood_quirk = TRUE
/datum/quirk/apathetic/add() /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) if(mood)
mood.mood_modifier = 0.8 mood.mood_modifier = 0.8
/datum/quirk/apathetic/remove() /datum/quirk/apathetic/remove()
if(quirk_holder) 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) if(mood)
mood.mood_modifier = 1 //Change this once/if species get their own mood modifiers. mood.mood_modifier = 1 //Change this once/if species get their own mood modifiers.
+1 -1
View File
@@ -554,7 +554,7 @@
/atom/proc/component_storage_contents_dump_act(datum/component/storage/src_object, mob/user) /atom/proc/component_storage_contents_dump_act(datum/component/storage/src_object, mob/user)
var/list/things = src_object.contents() var/list/things = src_object.contents()
var/datum/progressbar/progress = new(user, things.len, src) 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))) 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) stoplag(1)
qdel(progress) qdel(progress)
+10 -10
View File
@@ -39,12 +39,12 @@
/obj/item/clothing/shoes/clown_shoes/banana_shoes/combat/Initialize() /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) bananium.insert_amount(max_recharge, MAT_BANANIUM)
START_PROCESSING(SSobj, src) START_PROCESSING(SSobj, src)
/obj/item/clothing/shoes/clown_shoes/banana_shoes/combat/process() /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) var/bananium_amount = bananium.amount(MAT_BANANIUM)
if(bananium_amount < max_recharge) if(bananium_amount < max_recharge)
bananium.insert_amount(min(recharge_rate, max_recharge - bananium_amount), MAT_BANANIUM) bananium.insert_amount(min(recharge_rate, max_recharge - bananium_amount), MAT_BANANIUM)
@@ -73,19 +73,19 @@
/obj/item/melee/transforming/energy/sword/bananium/Initialize() /obj/item/melee/transforming/energy/sword/bananium/Initialize()
. = ..() . = ..()
AddComponent(/datum/component/slippery, 60, GALOSHES_DONT_HELP) 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 slipper.signal_enabled = active
/obj/item/melee/transforming/energy/sword/bananium/attack(mob/living/M, mob/living/user) /obj/item/melee/transforming/energy/sword/bananium/attack(mob/living/M, mob/living/user)
..() ..()
if(active) if(active)
GET_COMPONENT(slipper, /datum/component/slippery) var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery)
slipper.Slip(M) slipper.Slip(M)
/obj/item/melee/transforming/energy/sword/bananium/throw_impact(atom/hit_atom, throwingdatum) /obj/item/melee/transforming/energy/sword/bananium/throw_impact(atom/hit_atom, throwingdatum)
. = ..() . = ..()
if(active) if(active)
GET_COMPONENT(slipper, /datum/component/slippery) var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery)
slipper.Slip(hit_atom) slipper.Slip(hit_atom)
/obj/item/melee/transforming/energy/sword/bananium/attackby(obj/item/I, mob/living/user, params) /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) /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 slipper.signal_enabled = active
/obj/item/melee/transforming/energy/sword/bananium/ignition_effect(atom/A, mob/user) /obj/item/melee/transforming/energy/sword/bananium/ignition_effect(atom/A, mob/user)
@@ -108,7 +108,7 @@
if(!active) if(!active)
transform_weapon(user, TRUE) 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>") 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) slipper.Slip(user)
return SHAME return SHAME
@@ -130,12 +130,12 @@
/obj/item/shield/energy/bananium/Initialize() /obj/item/shield/energy/bananium/Initialize()
. = ..() . = ..()
AddComponent(/datum/component/slippery, 60, GALOSHES_DONT_HELP) 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 slipper.signal_enabled = active
/obj/item/shield/energy/bananium/attack_self(mob/living/carbon/human/user) /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 slipper.signal_enabled = active
/obj/item/shield/energy/bananium/throw_at(atom/target, range, speed, mob/thrower, spin=1) /obj/item/shield/energy/bananium/throw_at(atom/target, range, speed, mob/thrower, spin=1)
@@ -149,7 +149,7 @@
if(active) if(active)
var/caught = hit_atom.hitby(src, FALSE, FALSE, throwingdatum=throwingdatum) 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 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) slipper.Slip(hit_atom)
if(thrownby && !caught) if(thrownby && !caught)
throw_at(thrownby, throw_range+2, throw_speed, null, 1) throw_at(thrownby, throw_range+2, throw_speed, null, 1)
+9 -9
View File
@@ -80,7 +80,7 @@
popup.open() popup.open()
/obj/machinery/autolathe/on_deconstruction() /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() materials.retrieve_all()
/obj/machinery/autolathe/attackby(obj/item/O, mob/user, params) /obj/machinery/autolathe/attackby(obj/item/O, mob/user, params)
@@ -164,7 +164,7 @@
var/power = max(2000, (metal_cost+glass_cost)*multiplier/5) 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)) if((materials.amount(MAT_METAL) >= metal_cost*multiplier*coeff) && (materials.amount(MAT_GLASS) >= glass_cost*multiplier*coeff))
busy = TRUE busy = TRUE
use_power(power) use_power(power)
@@ -188,7 +188,7 @@
return return
/obj/machinery/autolathe/proc/make_item(power, metal_cost, glass_cost, multiplier, coeff, is_stack) /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() var/atom/A = drop_location()
use_power(power) use_power(power)
var/list/materials_used = list(MAT_METAL=metal_cost*coeff*multiplier, MAT_GLASS=glass_cost*coeff*multiplier) var/list/materials_used = list(MAT_METAL=metal_cost*coeff*multiplier, MAT_GLASS=glass_cost*coeff*multiplier)
@@ -213,7 +213,7 @@
var/T = 0 var/T = 0
for(var/obj/item/stock_parts/matter_bin/MB in component_parts) for(var/obj/item/stock_parts/matter_bin/MB in component_parts)
T += MB.rating*75000 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 materials.max_amount = T
T=1.2 T=1.2
for(var/obj/item/stock_parts/manipulator/M in component_parts) 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>" dat += "<a href='?src=[REF(src)];make=[D.id];multiplier=1'>[D.name]</a>"
if(ispath(D.build_path, /obj/item/stack)) 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) 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) if (max_multiplier>10 && !disabled)
dat += " <a href='?src=[REF(src)];make=[D.id];multiplier=10'>x10</a>" 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>" dat += "<a href='?src=[REF(src)];make=[D.id];multiplier=1'>[D.name]</a>"
if(ispath(D.build_path, /obj/item/stack)) 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) 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) if (max_multiplier>10 && !disabled)
dat += " <a href='?src=[REF(src)];make=[D.id];multiplier=10'>x10</a>" dat += " <a href='?src=[REF(src)];make=[D.id];multiplier=10'>x10</a>"
@@ -309,7 +309,7 @@
return dat return dat
/obj/machinery/autolathe/proc/materials_printout() /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>" var/dat = "<b>Total amount:</b> [materials.total_amount] / [materials.max_amount] cm<sup>3</sup><br>"
for(var/mat_id in materials.materials) for(var/mat_id in materials.materials)
var/datum/material/M = materials.materials[mat_id] var/datum/material/M = materials.materials[mat_id]
@@ -322,7 +322,7 @@
var/coeff = (ispath(D.build_path, /obj/item/stack) ? 1 : prod_coeff) 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))) if(D.materials[MAT_METAL] && (materials.amount(MAT_METAL) < (D.materials[MAT_METAL] * coeff * amount)))
return FALSE return FALSE
if(D.materials[MAT_GLASS] && (materials.amount(MAT_GLASS) < (D.materials[MAT_GLASS] * coeff * amount))) 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 //Called when the object is constructed by an autolathe
//Has a reference to the autolathe so you can do !!FUN!! things with hacked lathes //Has a reference to the autolathe so you can do !!FUN!! things with hacked lathes
/obj/item/proc/autolathe_crafted(obj/machinery/autolathe/A) /obj/item/proc/autolathe_crafted(obj/machinery/autolathe/A)
return return
@@ -33,7 +33,7 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
if(uplinkholder) if(uplinkholder)
to_chat(user, "<span class='notice'>[src] already has an uplink in it.</span>") to_chat(user, "<span class='notice'>[src] already has an uplink in it.</span>")
return 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(hidden_uplink)
if(!user.transferItemToLoc(I, src)) if(!user.transferItemToLoc(I, src))
return 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) /obj/machinery/computer/telecrystals/uplinker/proc/donateTC(amt, addLog = 1)
if(uplinkholder && linkedboss) 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) if(amt < 0)
linkedboss.storedcrystals += hidden_uplink.telecrystals linkedboss.storedcrystals += hidden_uplink.telecrystals
if(addLog) 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) /obj/machinery/computer/telecrystals/uplinker/proc/giveTC(amt, addLog = 1)
if(uplinkholder && linkedboss) 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) if(amt < 0)
hidden_uplink.telecrystals += linkedboss.storedcrystals hidden_uplink.telecrystals += linkedboss.storedcrystals
if(addLog) 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>" dat += "No linked management consoles detected. Scan for uplink stations using the management console.<BR><BR>"
if(uplinkholder) 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>" dat += "[hidden_uplink.telecrystals] telecrystals remain in this uplink.<BR>"
if(linkedboss) 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>" 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) for(var/obj/machinery/computer/telecrystals/uplinker/A in TCstations)
dat += "[A.name] | " dat += "[A.name] | "
if(A.uplinkholder) 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." dat += "[hidden_uplink.telecrystals] telecrystals."
if(storedcrystals) 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>" 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>"
+2 -2
View File
@@ -146,7 +146,7 @@
if((stat & (NOPOWER|BROKEN)) || !anchored) if((stat & (NOPOWER|BROKEN)) || !anchored)
return 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)) if(!materials.has_materials(using_materials))
return // We require more minerals return // We require more minerals
@@ -211,7 +211,7 @@
/obj/machinery/droneDispenser/attackby(obj/item/I, mob/living/user) /obj/machinery/droneDispenser/attackby(obj/item/I, mob/living/user)
if(istype(I, /obj/item/crowbar)) 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() materials.retrieve_all()
I.play_tool_sound(src) I.play_tool_sound(src)
to_chat(user, "<span class='notice'>You retrieve the materials from [src].</span>") to_chat(user, "<span class='notice'>You retrieve the materials from [src].</span>")
+4 -4
View File
@@ -32,10 +32,10 @@
mat_mod *= 50000 mat_mod *= 50000
for(var/obj/item/stock_parts/manipulator/M in component_parts) for(var/obj/item/stock_parts/manipulator/M in component_parts)
amt_made = 12.5 * M.rating //% of materials salvaged 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 materials.max_amount = mat_mod
amount_produced = min(50, amt_made) + 50 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.effectiveness = amount_produced
butchering.bonus_modifier = amount_produced/5 butchering.bonus_modifier = amount_produced/5
@@ -142,7 +142,7 @@
qdel(L) qdel(L)
return return
else 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) var/material_amount = materials.get_item_material_amount(I)
if(!material_amount) if(!material_amount)
qdel(I) qdel(I)
@@ -193,7 +193,7 @@
L.Unconscious(100) L.Unconscious(100)
L.adjustBruteLoss(crush_damage) L.adjustBruteLoss(crush_damage)
if(L.stat == DEAD && (L.butcher_results || L.guaranteed_butcher_results)) 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) butchering.Butcher(src,L)
/obj/machinery/recycler/deathtrap /obj/machinery/recycler/deathtrap
@@ -98,12 +98,12 @@
/obj/item/mecha_parts/mecha_equipment/drill/attach(obj/mecha/M) /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 butchering.butchering_enabled = TRUE
/obj/item/mecha_parts/mecha_equipment/drill/detach(atom/moveto) /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 butchering.butchering_enabled = FALSE
/obj/item/mecha_parts/mecha_equipment/drill/proc/drill_mob(mob/living/target, mob/user) /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) if(target.stat == DEAD && target.getBruteLoss() >= 200)
log_combat(user, target, "gibbed", name) log_combat(user, target, "gibbed", name)
if(LAZYLEN(target.butcher_results) || LAZYLEN(target.guaranteed_butcher_results)) 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) butchering.Butcher(chassis, target)
else else
target.gib() target.gib()
+1 -1
View File
@@ -454,4 +454,4 @@
return TRUE return TRUE
/obj/machinery/mecha_part_fabricator/maint /obj/machinery/mecha_part_fabricator/maint
link_on_init = FALSE link_on_init = FALSE
+1 -1
View File
@@ -51,7 +51,7 @@
/obj/mecha/working/ripley/update_icon() /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) if (C.amount)
cut_overlays() cut_overlays()
if(C.amount < 3) if(C.amount < 3)
@@ -26,15 +26,13 @@
add_overlay(flesh) add_overlay(flesh)
/obj/effect/decal/cleanable/blood/gibs/xeno/streak(list/directions) /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) 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) sleep(2)
if(i > 0) 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) 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) splat.transfer_blood_dna(blood_DNA, diseases)
if(!step_to(src, get_step(src, direction), 0)) if(!step_to(src, get_step(src, direction), 0))
@@ -41,15 +41,13 @@
. = ..() . = ..()
/obj/effect/decal/cleanable/blood/gibs/proc/streak(list/directions) /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) 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) sleep(2)
if(i > 0) 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) var/obj/effect/decal/cleanable/blood/splatter/splat = new /obj/effect/decal/cleanable/blood/splatter(loc, diseases)
splat.transfer_blood_dna(blood_DNA, diseases) splat.transfer_blood_dna(blood_DNA, diseases)
if(!step_to(src, get_step(src, direction), 0)) if(!step_to(src, get_step(src, direction), 0))
+1 -1
View File
@@ -33,7 +33,7 @@
// Airlock remote works by sending NTNet packets to whatever it's pointed at. // Airlock remote works by sending NTNet packets to whatever it's pointed at.
/obj/item/door_remote/afterattack(atom/A, mob/user) /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) if(!target_interface)
return return
@@ -70,7 +70,7 @@
difficulty++ //if cartridge has manifest access it has extra snowflake difficulty difficulty++ //if cartridge has manifest access it has extra snowflake difficulty
else else
difficulty += 2 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)) if(!target.detonatable || prob(difficulty * 15) || (hidden_uplink))
U.show_message("<span class='danger'>An error flashes on your [src].</span>", 1) U.show_message("<span class='danger'>An error flashes on your [src].</span>", 1)
else else
@@ -95,7 +95,7 @@
charges-- charges--
var/lock_code = "[rand(100,999)] [pick(GLOB.phonetic_alphabet)]" 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>") 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) if(!hidden_uplink)
hidden_uplink = target.AddComponent(/datum/component/uplink) hidden_uplink = target.AddComponent(/datum/component/uplink)
hidden_uplink.unlock_code = lock_code hidden_uplink.unlock_code = lock_code
@@ -116,7 +116,7 @@
appearance = saved_appearance appearance = saved_appearance
if(istype(M.buckled, /obj/vehicle)) if(istype(M.buckled, /obj/vehicle))
var/obj/vehicle/V = M.buckled 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) if(VRD)
VRD.force_dismount(M) VRD.force_dismount(M)
else else
@@ -19,7 +19,7 @@
for(var/X in target.implants) for(var/X in target.implants)
if(istype(X, type)) if(istype(X, type))
var/obj/item/implant/storage/imp_e = X 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)) if(!STR || (STR && STR.max_items < max_slot_stacking))
imp_e.AddComponent(/datum/component/storage/concrete/implant) imp_e.AddComponent(/datum/component/storage/concrete/implant)
qdel(src) qdel(src)
@@ -69,7 +69,7 @@
var/datum/component/butchering/BT = LoadComponent(/datum/component/butchering) var/datum/component/butchering/BT = LoadComponent(/datum/component/butchering)
BT.butchering_enabled = TRUE BT.butchering_enabled = TRUE
else else
GET_COMPONENT(BT, /datum/component/butchering) var/datum/component/butchering/BT = GetComponent(/datum/component/butchering)
if(BT) if(BT)
BT.butchering_enabled = FALSE BT.butchering_enabled = FALSE
transform_messages(user, supress_message_text) transform_messages(user, supress_message_text)
+1 -1
View File
@@ -216,7 +216,7 @@
/obj/item/storage/backpack/bannerpack/Initialize() /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. 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 /obj/item/storage/backpack/bannerpack/red
@@ -9,10 +9,11 @@
item_flags = NOBLUDGEON item_flags = NOBLUDGEON
/obj/item/stack/telecrystal/attack(mob/target, mob/user) /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. if(target == user && isliving(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) var/mob/living/L = user
if(I && I.imp_in) for(var/obj/item/implant/uplink/I in L.implants)
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, I) if(I?.imp_in)
var/datum/component/uplink/hidden_uplink = I.GetComponent(/datum/component/uplink)
if(hidden_uplink) if(hidden_uplink)
hidden_uplink.telecrystals += amount hidden_uplink.telecrystals += amount
use(amount) use(amount)
+9 -9
View File
@@ -23,7 +23,7 @@
/obj/item/storage/backpack/ComponentInitialize() /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_combined_w_class = 21
STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_w_class = WEIGHT_CLASS_NORMAL
STR.max_items = 21 STR.max_items = 21
@@ -34,7 +34,7 @@
/obj/item/storage/backpack/old/ComponentInitialize() /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 STR.max_combined_w_class = 12
/obj/item/storage/backpack/holding /obj/item/storage/backpack/holding
@@ -56,7 +56,7 @@
/obj/item/storage/backpack/holding/ComponentInitialize() /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.allow_big_nesting = TRUE
STR.max_w_class = WEIGHT_CLASS_GIGANTIC STR.max_w_class = WEIGHT_CLASS_GIGANTIC
STR.max_combined_w_class = 35 STR.max_combined_w_class = 35
@@ -84,7 +84,7 @@
/obj/item/storage/backpack/santabag/ComponentInitialize() /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_w_class = WEIGHT_CLASS_NORMAL
STR.max_combined_w_class = 60 STR.max_combined_w_class = 60
@@ -252,7 +252,7 @@
/obj/item/storage/backpack/satchel/bone/ComponentInitialize() /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_combined_w_class = 20
STR.max_items = 15 STR.max_items = 15
@@ -276,7 +276,7 @@
/obj/item/storage/backpack/satchel/flat/ComponentInitialize() /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.max_combined_w_class = 6
STR.cant_hold = typecacheof(list(/obj/item/storage/backpack/satchel/flat)) //muh recursive backpacks STR.cant_hold = typecacheof(list(/obj/item/storage/backpack/satchel/flat)) //muh recursive backpacks
@@ -328,7 +328,7 @@
/obj/item/storage/backpack/duffelbag/ComponentInitialize() /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 STR.max_combined_w_class = 30
/obj/item/storage/backpack/duffelbag/captain /obj/item/storage/backpack/duffelbag/captain
@@ -430,7 +430,7 @@
/obj/item/storage/backpack/duffelbag/syndie/ComponentInitialize() /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 STR.silent = TRUE
/obj/item/storage/backpack/duffelbag/syndie/hitman /obj/item/storage/backpack/duffelbag/syndie/hitman
@@ -582,7 +582,7 @@
// For ClownOps. // For ClownOps.
/obj/item/storage/backpack/duffelbag/clown/syndie/ComponentInitialize() /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 slowdown = 0
STR.silent = TRUE STR.silent = TRUE
+18 -18
View File
@@ -21,7 +21,7 @@
/obj/item/storage/bag/ComponentInitialize() /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_gather = TRUE
STR.allow_quick_empty = TRUE STR.allow_quick_empty = TRUE
STR.display_numerical_stacking = TRUE STR.display_numerical_stacking = TRUE
@@ -44,7 +44,7 @@
/obj/item/storage/bag/trash/ComponentInitialize() /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_w_class = WEIGHT_CLASS_SMALL
STR.max_combined_w_class = 30 STR.max_combined_w_class = 30
STR.max_items = 30 STR.max_items = 30
@@ -84,7 +84,7 @@
/obj/item/storage/bag/trash/bluespace/ComponentInitialize() /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_combined_w_class = 60
STR.max_items = 60 STR.max_items = 60
@@ -108,7 +108,7 @@
/obj/item/storage/bag/ore/ComponentInitialize() /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.allow_quick_empty = TRUE
STR.can_hold = typecacheof(list(/obj/item/stack/ore)) STR.can_hold = typecacheof(list(/obj/item/stack/ore))
STR.max_w_class = WEIGHT_CLASS_HUGE STR.max_w_class = WEIGHT_CLASS_HUGE
@@ -134,7 +134,7 @@
return return
if (istype(user.pulling, /obj/structure/ore_box)) if (istype(user.pulling, /obj/structure/ore_box))
box = user.pulling box = user.pulling
GET_COMPONENT(STR, /datum/component/storage) var/datum/component/storage/STR = GetComponent(/datum/component/storage)
if(STR) if(STR)
for(var/A in tile) for(var/A in tile)
if (!is_type_in_typecache(A, STR.can_hold)) if (!is_type_in_typecache(A, STR.can_hold))
@@ -164,7 +164,7 @@
/obj/item/storage/bag/ore/cyborg/ComponentInitialize() /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.allow_quick_empty = TRUE
STR.can_hold = typecacheof(list(/obj/item/stack/ore)) STR.can_hold = typecacheof(list(/obj/item/stack/ore))
STR.max_w_class = WEIGHT_CLASS_HUGE STR.max_w_class = WEIGHT_CLASS_HUGE
@@ -176,7 +176,7 @@
/obj/item/storage/bag/ore/large/ComponentInitialize() /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.allow_quick_empty = TRUE
STR.can_hold = typecacheof(list(/obj/item/stack/ore)) STR.can_hold = typecacheof(list(/obj/item/stack/ore))
STR.max_w_class = WEIGHT_CLASS_HUGE STR.max_w_class = WEIGHT_CLASS_HUGE
@@ -189,7 +189,7 @@
/obj/item/storage/bag/ore/holding/ComponentInitialize() /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_items = INFINITY
STR.max_combined_w_class = INFINITY STR.max_combined_w_class = INFINITY
STR.max_combined_stack_amount = INFINITY STR.max_combined_stack_amount = INFINITY
@@ -207,7 +207,7 @@
/obj/item/storage/bag/plants/ComponentInitialize() /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_w_class = WEIGHT_CLASS_NORMAL
STR.max_combined_w_class = 100 STR.max_combined_w_class = 100
STR.max_items = 100 STR.max_items = 100
@@ -247,7 +247,7 @@
/obj/item/storage/bag/sheetsnatcher/ComponentInitialize() /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.allow_quick_empty = TRUE
STR.can_hold = typecacheof(list(/obj/item/stack/sheet)) 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)) 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() /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 STR.max_combined_stack_amount = 500
// ----------------------------- // -----------------------------
@@ -281,7 +281,7 @@
/obj/item/storage/bag/books/ComponentInitialize() /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_w_class = WEIGHT_CLASS_NORMAL
STR.max_combined_w_class = 21 STR.max_combined_w_class = 21
STR.max_items = 7 STR.max_items = 7
@@ -306,14 +306,14 @@
/obj/item/storage/bag/tray/ComponentInitialize() /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" STR.insert_preposition = "on"
/obj/item/storage/bag/tray/attack(mob/living/M, mob/living/user) /obj/item/storage/bag/tray/attack(mob/living/M, mob/living/user)
. = ..() . = ..()
// Drop all the things. All of them. // Drop all the things. All of them.
var/list/obj/item/oldContents = contents.Copy() 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() STR.quick_empty()
// Make each item scatter a bit // Make each item scatter a bit
for(var/obj/item/I in oldContents) for(var/obj/item/I in oldContents)
@@ -360,7 +360,7 @@
/obj/item/storage/bag/chemistry/ComponentInitialize() /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_combined_w_class = 200
STR.max_items = 50 STR.max_items = 50
STR.insert_preposition = "in" STR.insert_preposition = "in"
@@ -380,7 +380,7 @@
/obj/item/storage/bag/bio/ComponentInitialize() /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_combined_w_class = 200
STR.max_items = 25 STR.max_items = 25
STR.insert_preposition = "in" STR.insert_preposition = "in"
@@ -394,7 +394,7 @@
/obj/item/storage/bag/bio/holding/ComponentInitialize() /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_combined_w_class = INFINITY
STR.max_items = 100 STR.max_items = 100
@@ -417,4 +417,4 @@
STR.max_items = 50 STR.max_items = 50
STR.max_w_class = WEIGHT_CLASS_SMALL STR.max_w_class = WEIGHT_CLASS_SMALL
STR.insert_preposition = "in" 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))
+21 -21
View File
@@ -43,7 +43,7 @@
/obj/item/storage/belt/utility/ComponentInitialize() /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( var/static/list/can_hold = typecacheof(list(
/obj/item/crowbar, /obj/item/crowbar,
/obj/item/screwdriver, /obj/item/screwdriver,
@@ -127,7 +127,7 @@
/obj/item/storage/belt/medical/ComponentInitialize() /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.max_w_class = WEIGHT_CLASS_BULKY
STR.can_hold = typecacheof(list( STR.can_hold = typecacheof(list(
/obj/item/healthanalyzer, /obj/item/healthanalyzer,
@@ -200,7 +200,7 @@
/obj/item/storage/belt/security/ComponentInitialize() /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_items = 5
STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_w_class = WEIGHT_CLASS_NORMAL
STR.can_hold = typecacheof(list( STR.can_hold = typecacheof(list(
@@ -238,7 +238,7 @@
obj/item/storage/belt/slut/ComponentInitialize() 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_items = 5
STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_w_class = WEIGHT_CLASS_NORMAL
STR.can_hold = typecacheof(list( STR.can_hold = typecacheof(list(
@@ -271,7 +271,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/obj/item/storage/belt/mining/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_items = 6
STR.max_w_class = WEIGHT_CLASS_BULKY STR.max_w_class = WEIGHT_CLASS_BULKY
STR.max_combined_w_class = 20 STR.max_combined_w_class = 20
@@ -328,7 +328,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/obj/item/storage/belt/mining/primitive/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 STR.max_items = 5
/obj/item/storage/belt/soulstone /obj/item/storage/belt/soulstone
@@ -339,7 +339,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/obj/item/storage/belt/soulstone/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.max_items = 6
STR.can_hold = typecacheof(list( STR.can_hold = typecacheof(list(
/obj/item/soulstone /obj/item/soulstone
@@ -362,7 +362,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/obj/item/storage/belt/champion/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.max_items = 1
STR.can_hold = list( STR.can_hold = list(
/obj/item/clothing/mask/luchador /obj/item/clothing/mask/luchador
@@ -376,7 +376,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/obj/item/storage/belt/military/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 STR.max_w_class = WEIGHT_CLASS_SMALL
/obj/item/storage/belt/military/snack /obj/item/storage/belt/military/snack
@@ -389,7 +389,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/obj/item/storage/belt/military/snack/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_items = 6
STR.max_w_class = WEIGHT_CLASS_SMALL STR.max_w_class = WEIGHT_CLASS_SMALL
STR.can_hold = typecacheof(list( STR.can_hold = typecacheof(list(
@@ -457,7 +457,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/obj/item/storage/belt/military/assault/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 STR.max_items = 6
/obj/item/storage/belt/durathread /obj/item/storage/belt/durathread
@@ -571,7 +571,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/obj/item/storage/belt/grenade/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.max_items = 30
STR.display_numerical_stacking = TRUE STR.display_numerical_stacking = TRUE
STR.max_combined_w_class = 60 STR.max_combined_w_class = 60
@@ -623,7 +623,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/obj/item/storage/belt/wands/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.max_items = 6
STR.can_hold = typecacheof(list( STR.can_hold = typecacheof(list(
/obj/item/gun/magic/wand /obj/item/gun/magic/wand
@@ -649,7 +649,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/obj/item/storage/belt/janitor/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_items = 6
STR.max_w_class = WEIGHT_CLASS_BULKY // Set to this so the light replacer can fit. STR.max_w_class = WEIGHT_CLASS_BULKY // Set to this so the light replacer can fit.
STR.can_hold = typecacheof(list( STR.can_hold = typecacheof(list(
@@ -676,7 +676,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/obj/item/storage/belt/bandolier/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.max_items = 18
STR.display_numerical_stacking = TRUE STR.display_numerical_stacking = TRUE
STR.can_hold = typecacheof(list( STR.can_hold = typecacheof(list(
@@ -692,7 +692,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/obj/item/storage/belt/bandolier/durathread/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.max_items = 32
STR.display_numerical_stacking = TRUE STR.display_numerical_stacking = TRUE
STR.can_hold = typecacheof(list( STR.can_hold = typecacheof(list(
@@ -707,7 +707,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/obj/item/storage/belt/medolier/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.max_items = 15
STR.display_numerical_stacking = FALSE STR.display_numerical_stacking = FALSE
STR.can_hold = typecacheof(list( STR.can_hold = typecacheof(list(
@@ -727,7 +727,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/obj/item/storage/belt/holster/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_items = 3
STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_w_class = WEIGHT_CLASS_NORMAL
STR.can_hold = typecacheof(list( STR.can_hold = typecacheof(list(
@@ -751,7 +751,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/obj/item/storage/belt/fannypack/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_items = 3
STR.max_w_class = WEIGHT_CLASS_SMALL STR.max_w_class = WEIGHT_CLASS_SMALL
@@ -818,7 +818,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/obj/item/storage/belt/sabre/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.max_items = 1
STR.rustle_sound = FALSE STR.rustle_sound = FALSE
STR.max_w_class = WEIGHT_CLASS_BULKY STR.max_w_class = WEIGHT_CLASS_BULKY
@@ -875,7 +875,7 @@ obj/item/storage/belt/slut/ComponentInitialize()
/obj/item/storage/belt/botany/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_items = 8
STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_w_class = WEIGHT_CLASS_NORMAL
STR.can_hold = typecacheof(list( STR.can_hold = typecacheof(list(
+1 -1
View File
@@ -11,7 +11,7 @@
/obj/item/storage/book/ComponentInitialize() /obj/item/storage/book/ComponentInitialize()
. = ..() . = ..()
GET_COMPONENT(STR, /datum/component/storage) var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_items = 1 STR.max_items = 1
/obj/item/storage/book/attack_self(mob/user) /obj/item/storage/book/attack_self(mob/user)
+2 -2
View File
@@ -17,7 +17,7 @@
/obj/item/storage/briefcase/ComponentInitialize() /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_w_class = WEIGHT_CLASS_NORMAL
STR.max_combined_w_class = 21 STR.max_combined_w_class = 21
@@ -48,7 +48,7 @@
/obj/item/storage/briefcase/lawyer/family/ComponentInitialize() /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_w_class = WEIGHT_CLASS_NORMAL
STR.max_combined_w_class = 14 STR.max_combined_w_class = 14
+1 -1
View File
@@ -13,7 +13,7 @@
/obj/item/storage/daki/ComponentInitialize() /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_w_class = WEIGHT_CLASS_SMALL
STR.max_combined_w_class = 21 STR.max_combined_w_class = 21
STR.max_items = 3 STR.max_items = 3
+8 -8
View File
@@ -26,7 +26,7 @@
var/fancy_open = FALSE var/fancy_open = FALSE
/obj/item/storage/fancy/PopulateContents() /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) for(var/i = 1 to STR.max_items)
new spawn_type(src) new spawn_type(src)
@@ -73,7 +73,7 @@
/obj/item/storage/fancy/donut_box/ComponentInitialize() /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.max_items = 6
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/donut)) STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/donut))
@@ -94,7 +94,7 @@
/obj/item/storage/fancy/egg_box/ComponentInitialize() /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.max_items = 12
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/egg)) STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/egg))
@@ -116,7 +116,7 @@
/obj/item/storage/fancy/candle_box/ComponentInitialize() /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 STR.max_items = 5
/obj/item/storage/fancy/candle_box/attack_self(mob_user) /obj/item/storage/fancy/candle_box/attack_self(mob_user)
@@ -139,7 +139,7 @@
/obj/item/storage/fancy/cigarettes/ComponentInitialize() /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.max_items = 6
STR.can_hold = typecacheof(list(/obj/item/clothing/mask/cigarette, /obj/item/lighter)) STR.can_hold = typecacheof(list(/obj/item/clothing/mask/cigarette, /obj/item/lighter))
@@ -277,7 +277,7 @@
/obj/item/storage/fancy/rollingpapers/ComponentInitialize() /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.max_items = 10
STR.can_hold = typecacheof(list(/obj/item/rollingpaper)) STR.can_hold = typecacheof(list(/obj/item/rollingpaper))
@@ -301,7 +301,7 @@
/obj/item/storage/fancy/cigarettes/cigars/ComponentInitialize() /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.max_items = 5
STR.can_hold = typecacheof(list(/obj/item/clothing/mask/cigarette/cigar)) STR.can_hold = typecacheof(list(/obj/item/clothing/mask/cigarette/cigar))
@@ -348,7 +348,7 @@
/obj/item/storage/fancy/heart_box/ComponentInitialize() /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.max_items = 8
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/tinychocolate)) STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/tinychocolate))
+3 -3
View File
@@ -171,7 +171,7 @@
/obj/item/storage/firstaid/tactical/ComponentInitialize() /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 STR.max_w_class = WEIGHT_CLASS_NORMAL
/obj/item/storage/firstaid/tactical/PopulateContents() /obj/item/storage/firstaid/tactical/PopulateContents()
@@ -201,7 +201,7 @@
/obj/item/storage/pill_bottle/ComponentInitialize() /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.allow_quick_gather = TRUE
STR.click_gather = TRUE STR.click_gather = TRUE
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/pill, /obj/item/dice)) STR.can_hold = typecacheof(list(/obj/item/reagent_containers/pill, /obj/item/dice))
@@ -364,7 +364,7 @@
/obj/item/storage/belt/organbox/ComponentInitialize() /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_items = 16
STR.max_w_class = WEIGHT_CLASS_BULKY STR.max_w_class = WEIGHT_CLASS_BULKY
STR.max_combined_w_class = 20 STR.max_combined_w_class = 20
+2 -2
View File
@@ -15,7 +15,7 @@
/obj/item/storage/lockbox/ComponentInitialize() /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_w_class = WEIGHT_CLASS_NORMAL
STR.max_combined_w_class = 14 STR.max_combined_w_class = 14
STR.max_items = 4 STR.max_items = 4
@@ -99,7 +99,7 @@
/obj/item/storage/lockbox/medal/ComponentInitialize() /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_w_class = WEIGHT_CLASS_SMALL
STR.max_items = 10 STR.max_items = 10
STR.max_combined_w_class = 20 STR.max_combined_w_class = 20
+4 -4
View File
@@ -26,7 +26,7 @@
/obj/item/storage/secure/ComponentInitialize() /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_w_class = WEIGHT_CLASS_SMALL
STR.max_combined_w_class = 14 STR.max_combined_w_class = 14
@@ -136,7 +136,7 @@
/obj/item/storage/secure/briefcase/ComponentInitialize() /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_combined_w_class = 21
STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_w_class = WEIGHT_CLASS_NORMAL
@@ -146,7 +146,7 @@
/obj/item/storage/secure/briefcase/syndie/PopulateContents() /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++) for(var/i = 0, i < STR.max_items - 2, i++)
new /obj/item/stack/spacecash/c1000(src) new /obj/item/stack/spacecash/c1000(src)
@@ -170,7 +170,7 @@
/obj/item/storage/secure/safe/ComponentInitialize() /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.cant_hold = typecacheof(list(/obj/item/storage/secure/briefcase))
STR.max_w_class = 8 //?? STR.max_w_class = 8 //??
+4 -4
View File
@@ -123,7 +123,7 @@ GLOBAL_LIST_EMPTY(rubber_toolbox_icons)
/obj/item/storage/toolbox/syndicate/ComponentInitialize() /obj/item/storage/toolbox/syndicate/ComponentInitialize()
. = ..() . = ..()
GET_COMPONENT(STR, /datum/component/storage) var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.silent = TRUE STR.silent = TRUE
/obj/item/storage/toolbox/syndicate/PopulateContents() /obj/item/storage/toolbox/syndicate/PopulateContents()
@@ -164,7 +164,7 @@ GLOBAL_LIST_EMPTY(rubber_toolbox_icons)
/obj/item/storage/toolbox/brass/ComponentInitialize() /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_w_class = WEIGHT_CLASS_NORMAL
STR.max_combined_w_class = 28 STR.max_combined_w_class = 28
STR.max_items = 28 STR.max_items = 28
@@ -219,7 +219,7 @@ GLOBAL_LIST_EMPTY(rubber_toolbox_icons)
/obj/item/storage/toolbox/artistic/ComponentInitialize() /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_combined_w_class = 20
STR.max_items = 10 STR.max_items = 10
@@ -257,7 +257,7 @@ GLOBAL_LIST_EMPTY(rubber_toolbox_icons)
/obj/item/storage/toolbox/gold_real/ComponentInitialize() /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_combined_w_class = 40
STR.max_items = 12 STR.max_items = 12
@@ -221,7 +221,7 @@
/obj/item/storage/box/syndie_kit/space/ComponentInitialize() /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.max_w_class = WEIGHT_CLASS_NORMAL
STR.can_hold = typecacheof(list(/obj/item/clothing/suit/space/syndicate, /obj/item/clothing/head/helmet/space/syndicate)) 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() /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 STR.max_items = 14
/obj/item/storage/box/syndie_kit/chemical/PopulateContents() /obj/item/storage/box/syndie_kit/chemical/PopulateContents()
+1 -1
View File
@@ -11,7 +11,7 @@
/obj/item/storage/wallet/ComponentInitialize() /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.max_items = 4
STR.cant_hold = typecacheof(list(/obj/item/screwdriver/power)) STR.cant_hold = typecacheof(list(/obj/item/screwdriver/power))
STR.can_hold = typecacheof(list( STR.can_hold = typecacheof(list(
+1 -1
View File
@@ -615,7 +615,7 @@
force = on ? force_on : initial(force) force = on ? force_on : initial(force)
throwforce = on ? force_on : initial(force) throwforce = on ? force_on : initial(force)
icon_state = "chainsaw_[on ? "on" : "off"]" 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 butchering.butchering_enabled = on
if(on) if(on)
+1 -1
View File
@@ -41,7 +41,7 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
/turf/open/copyTurf(turf/T, copy_air = FALSE) /turf/open/copyTurf(turf/T, copy_air = FALSE)
. = ..() . = ..()
if (isopenturf(T)) if (isopenturf(T))
GET_COMPONENT(slip, /datum/component/wet_floor) var/datum/component/wet_floor/slip = GetComponent(/datum/component/wet_floor)
if(slip) if(slip)
var/datum/component/wet_floor/WF = T.AddComponent(/datum/component/wet_floor) var/datum/component/wet_floor/WF = T.AddComponent(/datum/component/wet_floor)
WF.InheritComponent(slip) WF.InheritComponent(slip)
+2 -2
View File
@@ -17,7 +17,7 @@
/datum/ntnet_service/proc/connect(datum/ntnet/net) /datum/ntnet_service/proc/connect(datum/ntnet/net)
if(!istype(net)) if(!istype(net))
return FALSE 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)) if(!interface.register_connection(net))
return FALSE return FALSE
if(!net.register_service(src)) if(!net.register_service(src))
@@ -29,7 +29,7 @@
/datum/ntnet_service/proc/disconnect(datum/ntnet/net, force = FALSE) /datum/ntnet_service/proc/disconnect(datum/ntnet/net, force = FALSE)
if(!istype(net) || (!net.unregister_service(src) && !force)) if(!istype(net) || (!net.unregister_service(src) && !force))
return FALSE return FALSE
GET_COMPONENT(interface, /datum/component/ntnet_interface) var/datum/component/ntnet_interface/interface = GetComponent(/datum/component/ntnet_interface)
interface.unregister_connection(net) interface.unregister_connection(net)
networks_by_id -= net.network_id networks_by_id -= net.network_id
return TRUE return TRUE
@@ -122,7 +122,7 @@
/obj/singularity/wizard/attack_tk(mob/user) /obj/singularity/wizard/attack_tk(mob/user)
if(iscarbon(user)) if(iscarbon(user))
var/mob/living/carbon/C = 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) if(insaneinthemembrane.sanity < 15)
return //they've already seen it and are about to die, or are just too insane to care 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>") to_chat(C, "<span class='userdanger'>OH GOD! NONE OF IT IS REAL! NONE OF IT IS REEEEEEEEEEEEEEEEEEEEEEEEAL!</span>")
+1 -1
View File
@@ -561,7 +561,7 @@
/obj/item/storage/belt/chameleon/ComponentInitialize() /obj/item/storage/belt/chameleon/ComponentInitialize()
. = ..() . = ..()
GET_COMPONENT(STR, /datum/component/storage) var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.silent = TRUE STR.silent = TRUE
/obj/item/storage/belt/chameleon/emp_act(severity) /obj/item/storage/belt/chameleon/emp_act(severity)
+1 -1
View File
@@ -139,7 +139,7 @@
. = ..() . = ..()
if(damaged_clothes) if(damaged_clothes)
. += "<span class='warning'>It looks damaged!</span>" . += "<span class='warning'>It looks damaged!</span>"
GET_COMPONENT(pockets, /datum/component/storage) var/datum/component/storage/pockets = GetComponent(/datum/component/storage)
if(pockets) if(pockets)
var/list/how_cool_are_your_threads = list("<span class='notice'>") var/list/how_cool_are_your_threads = list("<span class='notice'>")
if(pockets.attack_hand_interact) if(pockets.attack_hand_interact)
+3 -3
View File
@@ -17,7 +17,7 @@
/obj/item/clothing/shoes/clown_shoes/banana_shoes/step_action() /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(on)
if(bananium.amount(MAT_BANANIUM) < 100) if(bananium.amount(MAT_BANANIUM) < 100)
on = !on on = !on
@@ -30,7 +30,7 @@
bananium.use_amount_type(100, MAT_BANANIUM) bananium.use_amount_type(100, MAT_BANANIUM)
/obj/item/clothing/shoes/clown_shoes/banana_shoes/attack_self(mob/user) /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() var/sheet_amount = bananium.retrieve_all()
if(sheet_amount) if(sheet_amount)
to_chat(user, "<span class='notice'>You retrieve [sheet_amount] sheets of bananium from the prototype shoes.</span>") 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>" . += "<span class='notice'>The shoes are [on ? "enabled" : "disabled"].</span>"
/obj/item/clothing/shoes/clown_shoes/banana_shoes/ui_action_click(mob/user) /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)) if(bananium.amount(MAT_BANANIUM))
on = !on on = !on
update_icon() update_icon()
+1 -1
View File
@@ -12,7 +12,7 @@
var/datum/component/storage/detached_pockets var/datum/component/storage/detached_pockets
/obj/item/clothing/accessory/proc/attach(obj/item/clothing/under/U, user) /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(storage)
if(SEND_SIGNAL(U, COMSIG_CONTAINS_STORAGE)) if(SEND_SIGNAL(U, COMSIG_CONTAINS_STORAGE))
return FALSE return FALSE
+1 -1
View File
@@ -13,7 +13,7 @@
if(istype(I, /obj/item/storage)) if(istype(I, /obj/item/storage))
var/obj/item/storage/S = I 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) if(prob(upgrade_scroll_chance) && S.contents.len < STR.max_items && !S.invisibility)
var/obj/item/upgradescroll/scroll = new var/obj/item/upgradescroll/scroll = new
SEND_SIGNAL(S, COMSIG_TRY_STORAGE_INSERT, scroll, null, TRUE, TRUE) SEND_SIGNAL(S, COMSIG_TRY_STORAGE_INSERT, scroll, null, TRUE, TRUE)
@@ -38,9 +38,7 @@
if(M.mind && HAS_TRAIT(M.mind, TRAIT_LAW_ENFORCEMENT_METABOLISM) && !HAS_TRAIT(H, TRAIT_AGEUSIA)) 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>") to_chat(H,"<span class='notice'>I love this taste!</span>")
H.adjust_disgust(-5 + -2.5 * fraction) H.adjust_disgust(-5 + -2.5 * fraction)
GET_COMPONENT_FROM(mood, /datum/component/mood, H) SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "fav_food", /datum/mood_event/favorite_food)
if(mood)
mood.add_event(null, "fav_food", /datum/mood_event/favorite_food)
last_check_time = world.time last_check_time = world.time
return return
..() ..()
+1 -1
View File
@@ -68,7 +68,7 @@
/obj/item/storage/bag/easterbasket/Initialize() /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)) 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() /obj/item/storage/bag/easterbasket/proc/countEggs()
+1 -1
View File
@@ -174,7 +174,7 @@
to_chat(usr, "<span class='notice'>\The [src] is full.</span>") to_chat(usr, "<span class='notice'>\The [src] is full.</span>")
return FALSE 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)
if(!STR.remove_from_storage(O,src)) if(!STR.remove_from_storage(O,src))
return FALSE return FALSE
@@ -893,7 +893,7 @@
return FALSE return FALSE
var/ignore_bags = get_pin_data(IC_INPUT, 1) var/ignore_bags = get_pin_data(IC_INPUT, 1)
if(ignore_bags) if(ignore_bags)
GET_COMPONENT_FROM(STR, /datum/component/storage, A) var/datum/component/storage/STR = A.GetComponent(/datum/component/storage)
if(STR) if(STR)
return FALSE return FALSE
set_pin_data(IC_OUTPUT, 1, WEAKREF(A)) set_pin_data(IC_OUTPUT, 1, WEAKREF(A))
@@ -1104,7 +1104,7 @@
/obj/item/integrated_circuit/input/matscan/do_work() /obj/item/integrated_circuit/input/matscan/do_work()
var/atom/movable/H = get_pin_data_as_type(IC_INPUT, 1, /atom/movable) var/atom/movable/H = get_pin_data_as_type(IC_INPUT, 1, /atom/movable)
var/turf/T = get_turf(src) 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 if(!mt) //Invalid input
return return
if(H in view(T)) // This is a camera. It can't examine thngs,that it can't see. if(H in view(T)) // This is a camera. It can't examine thngs,that it can't see.
@@ -411,7 +411,7 @@
.=..() .=..()
/obj/item/integrated_circuit/manipulation/matman/proc/AfterMaterialInsert(type_inserted, id_inserted, amount_inserted) /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) set_pin_data(IC_OUTPUT, 2, materials.total_amount)
for(var/I in 1 to mtypes.len) for(var/I in 1 to mtypes.len)
var/datum/material/M = materials.materials[mtypes[I]] var/datum/material/M = materials.materials[mtypes[I]]
@@ -423,7 +423,7 @@
return TRUE return TRUE
/obj/item/integrated_circuit/manipulation/matman/do_work(ord) /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) var/atom/movable/H = get_pin_data_as_type(IC_INPUT, 1, /atom/movable)
if(!check_target(H)) if(!check_target(H))
activate_pin(4) activate_pin(4)
@@ -441,7 +441,7 @@
else else
activate_pin(4) activate_pin(4)
if(2) 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 var/suc
for(var/I in 1 to mtypes.len) for(var/I in 1 to mtypes.len)
var/datum/material/M = materials.materials[mtypes[I]] var/datum/material/M = materials.materials[mtypes[I]]
@@ -467,7 +467,7 @@
activate_pin(6) activate_pin(6)
/obj/item/integrated_circuit/manipulation/matman/Destroy() /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() materials.retrieve_all()
.=..() .=..()
@@ -509,14 +509,14 @@
if(!container || !istype(container,/obj/item/storage) || !Adjacent(container)) if(!container || !istype(container,/obj/item/storage) || !Adjacent(container))
return return
GET_COMPONENT_FROM(STR, /datum/component/storage, container) var/datum/component/storage/STR = container.GetComponent(/datum/component/storage)
if(!STR) if(!STR)
return return
STR.attackby(src, target_obj) STR.attackby(src, target_obj)
else 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) if(!STR)
return return
+1 -1
View File
@@ -78,7 +78,7 @@
state = 0 state = 0
if(2) 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(is_type_in_list(I, allowed_books))
if(!user.transferItemToLoc(I, src)) if(!user.transferItemToLoc(I, src))
return return
+6 -6
View File
@@ -95,7 +95,7 @@
process_ore(AM) process_ore(AM)
/obj/machinery/mineral/processing_unit/proc/process_ore(obj/item/stack/ore/O) /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) var/material_amount = materials.get_item_material_amount(O)
if(!materials.has_space(material_amount)) if(!materials.has_space(material_amount))
unload_mineral(O) unload_mineral(O)
@@ -107,7 +107,7 @@
/obj/machinery/mineral/processing_unit/proc/get_machine_data() /obj/machinery/mineral/processing_unit/proc/get_machine_data()
var/dat = "<b>Smelter control console</b><br><br>" 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) for(var/mat_id in materials.materials)
var/datum/material/M = materials.materials[mat_id] var/datum/material/M = materials.materials[mat_id]
dat += "<span class=\"res_name\">[M.name]: </span>[M.amount] cm&sup3;" dat += "<span class=\"res_name\">[M.name]: </span>[M.amount] cm&sup3;"
@@ -152,7 +152,7 @@
CONSOLE.updateUsrDialog() CONSOLE.updateUsrDialog()
/obj/machinery/mineral/processing_unit/proc/smelt_ore() /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] var/datum/material/mat = materials.materials[selected_material]
if(mat) if(mat)
var/sheets_to_remove = (mat.amount >= (MINERAL_MATERIAL_AMOUNT * SMELT_AMOUNT) ) ? SMELT_AMOUNT : round(mat.amount / MINERAL_MATERIAL_AMOUNT) 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 on = FALSE
return 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) materials.use_amount(alloy.materials, amount)
generate_mineral(alloy.build_path) generate_mineral(alloy.build_path)
@@ -186,7 +186,7 @@
var/build_amount = SMELT_AMOUNT 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) for(var/mat_id in D.materials)
var/M = D.materials[mat_id] var/M = D.materials[mat_id]
@@ -204,7 +204,7 @@
unload_mineral(O) unload_mineral(O)
/obj/machinery/mineral/processing_unit/on_deconstruction() /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() materials.retrieve_all()
..() ..()
+4 -4
View File
@@ -34,13 +34,13 @@ GLOBAL_LIST_EMPTY(silo_access_logs)
var/datum/component/remote_materials/mats = C var/datum/component/remote_materials/mats = C
mats.disconnect_from(src) 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() materials.retrieve_all()
return ..() return ..()
/obj/machinery/ore_silo/proc/remote_attackby(obj/machinery/M, mob/user, obj/item/stack/I) /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 // stolen from /datum/component/material_container/proc/OnAttackBy
if(user.a_intent != INTENT_HELP) if(user.a_intent != INTENT_HELP)
return return
@@ -71,7 +71,7 @@ GLOBAL_LIST_EMPTY(silo_access_logs)
popup.open() popup.open()
/obj/machinery/ore_silo/proc/generate_ui() /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/list/ui = list("<head><title>Ore Silo</title></head><body><div class='statusDisplay'><h2>Stored Material:</h2>")
var/any = FALSE var/any = FALSE
for(var/M in materials.materials) for(var/M in materials.materials)
@@ -149,7 +149,7 @@ GLOBAL_LIST_EMPTY(silo_access_logs)
return TRUE return TRUE
else if(href_list["ejectsheet"]) else if(href_list["ejectsheet"])
var/eject_sheet = 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/count = materials.retrieve_sheets(text2num(href_list["eject_amt"]), eject_sheet, drop_location())
var/list/matlist = list() var/list/matlist = list()
matlist[eject_sheet] = MINERAL_MATERIAL_AMOUNT matlist[eject_sheet] = MINERAL_MATERIAL_AMOUNT
+3 -3
View File
@@ -22,7 +22,7 @@
if(!T) if(!T)
return 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) for(var/obj/item/stack/sheet/O in T)
materials.insert_stack(O, O.amount) materials.insert_stack(O, O.amount)
@@ -32,7 +32,7 @@
return return
var/dat = "<b>Coin Press</b><br>" 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) for(var/mat_id in materials.materials)
var/datum/material/M = materials.materials[mat_id] var/datum/material/M = materials.materials[mat_id]
if(!M.amount && chosen != mat_id) if(!M.amount && chosen != mat_id)
@@ -65,7 +65,7 @@
if(processing==1) if(processing==1)
to_chat(usr, "<span class='notice'>The machine is processing.</span>") to_chat(usr, "<span class='notice'>The machine is processing.</span>")
return return
GET_COMPONENT(materials, /datum/component/material_container) var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
if(href_list["choose"]) if(href_list["choose"])
if(materials.materials[href_list["choose"]]) if(materials.materials[href_list["choose"]])
chosen = href_list["choose"] chosen = href_list["choose"]
+1 -1
View File
@@ -11,7 +11,7 @@
/obj/item/storage/bag/money/Initialize() /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_w_class = WEIGHT_CLASS_NORMAL
STR.max_items = 40 STR.max_items = 40
STR.max_combined_w_class = 40 STR.max_combined_w_class = 40
+3 -3
View File
@@ -40,7 +40,7 @@
if(iscyborg(user) && user.has_buckled_mobs()) if(iscyborg(user) && user.has_buckled_mobs())
var/mob/living/silicon/robot/R = user 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) if(riding_datum)
for(var/mob/M in R.buckled_mobs) for(var/mob/M in R.buckled_mobs)
riding_datum.force_dismount(M) riding_datum.force_dismount(M)
@@ -61,7 +61,7 @@
if(iscyborg(user) && user.has_buckled_mobs()) if(iscyborg(user) && user.has_buckled_mobs())
var/mob/living/silicon/robot/R = user 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) if(riding_datum)
for(var/mob/M in R.buckled_mobs) for(var/mob/M in R.buckled_mobs)
riding_datum.force_dismount(M) riding_datum.force_dismount(M)
@@ -74,4 +74,4 @@
return return
user.nextsoundemote = world.time + 7 user.nextsoundemote = world.time + 7
playsound(user, 'modular_citadel/sound/voice/speen.ogg', 50, 1, -1) playsound(user, 'modular_citadel/sound/voice/speen.ogg', 50, 1, -1)
. = ..() . = ..()
+2 -2
View File
@@ -928,7 +928,7 @@
/mob/living/carbon/do_after_coefficent() /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) if(mood)
switch(mood.sanity) //Alters do_after delay based on how sane you are switch(mood.sanity) //Alters do_after delay based on how sane you are
if(SANITY_INSANE to SANITY_DISTURBED) if(SANITY_INSANE to SANITY_DISTURBED)
@@ -970,7 +970,7 @@
return TRUE return TRUE
if(HAS_TRAIT(src, TRAIT_DUMB)) if(HAS_TRAIT(src, TRAIT_DUMB))
return TRUE return TRUE
GET_COMPONENT_FROM(mood, /datum/component/mood, src) var/datum/component/mood/mood = src.GetComponent(/datum/component/mood)
if(mood) if(mood)
if(mood.sanity < SANITY_UNSTABLE) if(mood.sanity < SANITY_UNSTABLE)
return TRUE return TRUE
@@ -297,7 +297,7 @@
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "headpat", /datum/mood_event/headpat) SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "headpat", /datum/mood_event/headpat)
if(HAS_TRAIT(M, TRAIT_FRIENDLY)) 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) if (mood.sanity >= SANITY_GREAT)
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/besthug, M) SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/besthug, M)
else if (mood.sanity >= SANITY_DISTURBED) else if (mood.sanity >= SANITY_DISTURBED)
@@ -366,7 +366,7 @@
"<span class='notice'>You hug [src] to make [p_them()] feel better!</span>") "<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) SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "hug", /datum/mood_event/hug)
if(HAS_TRAIT(M, TRAIT_FRIENDLY)) 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) if (mood.sanity >= SANITY_GREAT)
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/besthug, M) SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/besthug, M)
else if (mood.sanity >= SANITY_DISTURBED) else if (mood.sanity >= SANITY_DISTURBED)
+1 -1
View File
@@ -94,7 +94,7 @@
if(combatmode) if(combatmode)
. += "[t_He] [t_is] visibly tense[resting ? "." : ", and [t_is] standing in combative stance."]" . += "[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) if(mood)
switch(mood.shown_mood) switch(mood.shown_mood)
if(-INFINITY to MOOD_LEVEL_SAD4) if(-INFINITY to MOOD_LEVEL_SAD4)
@@ -292,7 +292,7 @@
msg += "[t_He] seem[p_s()] winded.\n" msg += "[t_He] seem[p_s()] winded.\n"
if (getToxLoss() >= 10) if (getToxLoss() >= 10)
msg += "[t_He] seem[p_s()] sickly.\n" 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) if(mood.sanity <= SANITY_DISTURBED)
msg += "[t_He] seem[p_s()] distressed.\n" msg += "[t_He] seem[p_s()] distressed.\n"
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "empath", /datum/mood_event/sad_empath, src) SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "empath", /datum/mood_event/sad_empath, src)
@@ -1238,7 +1238,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if (H.nutrition > 0 && H.stat != DEAD && !HAS_TRAIT(H, TRAIT_NOHUNGER)) if (H.nutrition > 0 && H.stat != DEAD && !HAS_TRAIT(H, TRAIT_NOHUNGER))
// THEY HUNGER // THEY HUNGER
var/hunger_rate = HUNGER_FACTOR 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) if(mood && mood.sanity > SANITY_DISTURBED)
hunger_rate *= max(0.5, 1 - 0.002 * mood.sanity) //0.85 to 0.75 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) var/grav_force = min(gravity - STANDARD_GRAVITY,3)
. += 1 + grav_force . += 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? if(mood && !flight) //How can depression slow you down if you can just fly away from your problems?
switch(mood.sanity) switch(mood.sanity)
if(SANITY_INSANE to SANITY_CRAZY) if(SANITY_INSANE to SANITY_CRAZY)
+1 -1
View File
@@ -524,7 +524,7 @@
fire_stacks = 0 fire_stacks = 0
confused = 0 confused = 0
update_canmove() update_canmove()
GET_COMPONENT(mood, /datum/component/mood) var/datum/component/mood/mood = GetComponent(/datum/component/mood)
if (mood) if (mood)
QDEL_LIST_ASSOC_VAL(mood.mood_events) QDEL_LIST_ASSOC_VAL(mood.mood_events)
mood.sanity = SANITY_GREAT mood.sanity = SANITY_GREAT
@@ -1220,7 +1220,7 @@
/mob/living/silicon/robot/unbuckle_mob(mob/user, force=FALSE) /mob/living/silicon/robot/unbuckle_mob(mob/user, force=FALSE)
if(iscarbon(user)) if(iscarbon(user))
GET_COMPONENT(riding_datum, /datum/component/riding) var/datum/component/riding/riding_datum = GetComponent(/datum/component/riding)
if(istype(riding_datum)) if(istype(riding_datum))
riding_datum.unequip_buckle_inhands(user) riding_datum.unequip_buckle_inhands(user)
riding_datum.restore_position(user) riding_datum.restore_position(user)
@@ -33,7 +33,7 @@
/mob/living/simple_animal/drone/syndrone/Initialize() /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 hidden_uplink.telecrystals = 10
/mob/living/simple_animal/drone/syndrone/Login() /mob/living/simple_animal/drone/syndrone/Login()
@@ -47,7 +47,7 @@
/mob/living/simple_animal/drone/syndrone/badass/Initialize() /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 hidden_uplink.telecrystals = 30
var/obj/item/implant/weapons_auth/W = new/obj/item/implant/weapons_auth(src) var/obj/item/implant/weapons_auth/W = new/obj/item/implant/weapons_auth(src)
W.implant(src) W.implant(src)
@@ -536,7 +536,7 @@
//ANIMAL RIDING //ANIMAL RIDING
/mob/living/simple_animal/user_buckle_mob(mob/living/M, mob/user) /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(riding_datum)
if(user.incapacitated()) if(user.incapacitated())
return return
@@ -547,7 +547,7 @@
return ..() return ..()
/mob/living/simple_animal/relaymove(mob/user, direction) /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) if(tame && riding_datum)
riding_datum.handle_ride(user, direction) riding_datum.handle_ride(user, direction)
+1 -1
View File
@@ -201,7 +201,7 @@
throwforce = 35 throwforce = 35
playsound(user, 'sound/weapons/saberon.ogg', 5, 1) playsound(user, 'sound/weapons/saberon.ogg', 5, 1)
to_chat(user, "<span class='warning'>[src] is now active.</span>") 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 butchering.butchering_enabled = on
update_icon() update_icon()
+1 -1
View File
@@ -13,7 +13,7 @@
/obj/item/storage/photo_album/Initialize() /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.can_hold = typecacheof(list(/obj/item/photo))
STR.max_combined_w_class = 42 STR.max_combined_w_class = 42
STR.max_items = 21 STR.max_items = 21
@@ -175,7 +175,7 @@
data["chosenPillStyle"] = chosenPillStyle data["chosenPillStyle"] = chosenPillStyle
data["isPillBottleLoaded"] = bottle ? 1 : 0 data["isPillBottleLoaded"] = bottle ? 1 : 0
if(bottle) 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["pillBotContent"] = bottle.contents.len
data["pillBotMaxContent"] = STRB.max_items data["pillBotMaxContent"] = STRB.max_items
@@ -263,7 +263,7 @@
var/target_loc = bottle ? bottle : drop_location() var/target_loc = bottle ? bottle : drop_location()
var/drop_threshold = INFINITY var/drop_threshold = INFINITY
if(bottle) if(bottle)
GET_COMPONENT_FROM(STRB, /datum/component/storage, bottle) var/datum/component/storage/STRB = bottle.GetComponent(/datum/component/storage)
if(STRB) if(STRB)
drop_threshold = STRB.max_items - bottle.contents.len drop_threshold = STRB.max_items - bottle.contents.len
@@ -423,7 +423,7 @@
. = 1 . = 1
/datum/reagent/drug/happiness/addiction_act_stage1(mob/living/M)// all work and no play makes jack a dull boy /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)) mood.setSanity(min(mood.sanity, SANITY_DISTURBED))
M.Jitter(5) M.Jitter(5)
if(prob(20)) if(prob(20))
@@ -431,7 +431,7 @@
..() ..()
/datum/reagent/drug/happiness/addiction_act_stage2(mob/living/M) /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)) mood.setSanity(min(mood.sanity, SANITY_UNSTABLE))
M.Jitter(10) M.Jitter(10)
if(prob(30)) if(prob(30))
@@ -439,7 +439,7 @@
..() ..()
/datum/reagent/drug/happiness/addiction_act_stage3(mob/living/M) /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)) mood.setSanity(min(mood.sanity, SANITY_CRAZY))
M.Jitter(15) M.Jitter(15)
if(prob(40)) if(prob(40))
@@ -447,7 +447,7 @@
..() ..()
/datum/reagent/drug/happiness/addiction_act_stage4(mob/living/carbon/human/M) /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) mood.setSanity(SANITY_INSANE)
M.Jitter(20) M.Jitter(20)
if(prob(50)) if(prob(50))
@@ -1444,7 +1444,7 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
M.dizziness = max(0, M.dizziness-6) M.dizziness = max(0, M.dizziness-6)
M.confused = max(0, M.confused-6) M.confused = max(0, M.confused-6)
M.disgust = max(0, M.disgust-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... 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 mood.setSanity(min(mood.sanity+5, SANITY_NEUTRAL)) // set minimum to prevent unwanted spiking over neutral
..() ..()
+1 -1
View File
@@ -277,7 +277,7 @@
/obj/machinery/disposal/bin/attackby(obj/item/I, mob/user, params) /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. 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 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>") to_chat(user, "<span class='warning'>You empty the bag.</span>")
for(var/obj/item/O in T.contents) for(var/obj/item/O in T.contents)
STR.remove_from_storage(O,src) STR.remove_from_storage(O,src)
@@ -29,7 +29,7 @@
pipename = initial(pipe_type.name) pipename = initial(pipe_type.name)
if(flip) 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) rotcomp.BaseRot(null,ROTATION_FLIP)
update_icon() update_icon()
+1 -1
View File
@@ -422,7 +422,7 @@
if(exp == SCANTYPE_OBLITERATE) if(exp == SCANTYPE_OBLITERATE)
visible_message("<span class='warning'>[exp_on] activates the crushing mechanism, [exp_on] is destroyed!</span>") visible_message("<span class='warning'>[exp_on] activates the crushing mechanism, [exp_on] is destroyed!</span>")
if(linked_console.linked_lathe) 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) 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) linked_materials.insert_amount( min((linked_materials.max_amount - linked_materials.total_amount), (exp_on.materials[material])), material)
if(prob(EFFECT_PROB_LOW) && criticalReaction) if(prob(EFFECT_PROB_LOW) && criticalReaction)
@@ -58,9 +58,7 @@
var/mob/living/carbon/human/H = M var/mob/living/carbon/human/H = M
if(H.mind && !HAS_TRAIT(H, TRAIT_AGEUSIA)) 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. 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) SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "gross_food", /datum/mood_event/gross_food)
if(mood)
mood.add_event(null,"gross_food", /datum/mood_event/gross_food)
last_check_time = world.time last_check_time = world.time
return return
..() ..()
+1 -1
View File
@@ -290,7 +290,7 @@ All ShuttleMove procs go here
// ignores the movement of the shuttle from the staging area on CentCom to // ignores the movement of the shuttle from the staging area on CentCom to
// the station as it is loaded in. // the station as it is loaded in.
if (oldT && !is_centcom_level(oldT.z)) 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() STR?.unlock_me()
/************************************Mob move procs************************************/ /************************************Mob move procs************************************/
+1 -1
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!! 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 //mood
GET_COMPONENT_FROM(mood, /datum/component/mood, H) var/datum/component/mood/mood = H.GetComponent(/datum/component/mood)
switch(mood.sanity) switch(mood.sanity)
if(SANITY_GREAT to INFINITY) if(SANITY_GREAT to INFINITY)
speaktrigger += "I'm beyond elated!! " //did you mean byond elated? hohoho speaktrigger += "I'm beyond elated!! " //did you mean byond elated? hohoho
+4 -4
View File
@@ -25,18 +25,18 @@
/obj/item/uplink/nuclear/Initialize() /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) hidden_uplink.set_gamemode(/datum/game_mode/nuclear)
/obj/item/uplink/nuclear_restricted/Initialize() /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.allow_restricted = FALSE
hidden_uplink.set_gamemode(/datum/game_mode/nuclear) hidden_uplink.set_gamemode(/datum/game_mode/nuclear)
/obj/item/uplink/clownop/Initialize() /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) hidden_uplink.set_gamemode(/datum/game_mode/nuclear/clown_ops)
/obj/item/uplink/old /obj/item/uplink/old
@@ -45,7 +45,7 @@
/obj/item/uplink/old/Initialize(mapload, owner, tc_amount = 10) /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" hidden_uplink.name = "dusty radio"
// Multitool uplink // Multitool uplink
+1 -1
View File
@@ -190,7 +190,7 @@ GLOBAL_LIST_INIT(hyper_special_roles, list(
if(should_equip) if(should_equip)
equip(silent) equip(silent)
for(var/obj/I in owner.current.GetAllContents()) 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) if(hidden_uplink)
lewd_uplink_list = get_custom_uplink_items(lewd_uplink_list_raw, /datum/game_mode/traitor/lewd, TRUE, FALSE) 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 hidden_uplink.uplink_items = lewd_uplink_list
+1 -1
View File
@@ -123,7 +123,7 @@
if(ishuman(C)) if(ishuman(C))
var/mob/living/carbon/human/H = 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! if(emagged != 2) // EVERYONE GETS HUGS!
for(var/datum/mood_event/i in mood.mood_events) for(var/datum/mood_event/i in mood.mood_events)
if (i.description == "<span class='nicegreen'>Hugs are nice.</span>\n" ) if (i.description == "<span class='nicegreen'>Hugs are nice.</span>\n" )
@@ -69,7 +69,7 @@
popup.open() popup.open()
/obj/machinery/autoylathe/on_deconstruction() /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() materials.retrieve_all()
/obj/machinery/autoylathe/attackby(obj/item/O, mob/user, params) /obj/machinery/autoylathe/attackby(obj/item/O, mob/user, params)
@@ -157,7 +157,7 @@
var/plastic_cost = being_built.materials[MAT_PLASTIC] var/plastic_cost = being_built.materials[MAT_PLASTIC]
var/power = max(2000, (metal_cost+glass_cost+plastic_cost)*multiplier/5) 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)) 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 busy = TRUE
use_power(power) use_power(power)
@@ -181,7 +181,7 @@
return return
/obj/machinery/autoylathe/proc/make_item(power, metal_cost, glass_cost, plastic_cost, multiplier, coeff, is_stack) /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() var/atom/A = drop_location()
use_power(power) 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) 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 var/T = 0
for(var/obj/item/stock_parts/matter_bin/MB in component_parts) for(var/obj/item/stock_parts/matter_bin/MB in component_parts)
T += MB.rating*75000 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 materials.max_amount = T
T=1.2 T=1.2
for(var/obj/item/stock_parts/manipulator/M in component_parts) 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>" dat += "<a href='?src=[REF(src)];make=[D.id];multiplier=1'>[D.name]</a>"
if(ispath(D.build_path, /obj/item/stack)) 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) 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) if (max_multiplier>10 && !disabled)
dat += " <a href='?src=[REF(src)];make=[D.id];multiplier=10'>x10</a>" 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>" dat += "<a href='?src=[REF(src)];make=[D.id];multiplier=1'>[D.name]</a>"
if(ispath(D.build_path, /obj/item/stack)) 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) 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) if (max_multiplier>10 && !disabled)
dat += " <a href='?src=[REF(src)];make=[D.id];multiplier=10'>x10</a>" dat += " <a href='?src=[REF(src)];make=[D.id];multiplier=10'>x10</a>"
@@ -301,7 +301,7 @@
return dat return dat
/obj/machinery/autoylathe/proc/materials_printout() /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>" var/dat = "<b>Total amount:</b> [materials.total_amount] / [materials.max_amount] cm<sup>3</sup><br>"
for(var/mat_id in materials.materials) for(var/mat_id in materials.materials)
var/datum/material/M = materials.materials[mat_id] var/datum/material/M = materials.materials[mat_id]
@@ -314,7 +314,7 @@
var/coeff = (ispath(D.build_path, /obj/item/stack) ? 1 : prod_coeff) 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))) if(D.materials[MAT_METAL] && (materials.amount(MAT_METAL) < (D.materials[MAT_METAL] * coeff * amount)))
return FALSE return FALSE
if(D.materials[MAT_GLASS] && (materials.amount(MAT_GLASS) < (D.materials[MAT_GLASS] * coeff * amount))) if(D.materials[MAT_GLASS] && (materials.amount(MAT_GLASS) < (D.materials[MAT_GLASS] * coeff * amount)))
@@ -49,7 +49,7 @@
/obj/item/storage/hypospraykit/ComponentInitialize() /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.max_items = 12
STR.can_hold = typecacheof(list( STR.can_hold = typecacheof(list(
/obj/item/hypospray/mkii, /obj/item/hypospray/mkii,
@@ -151,7 +151,7 @@
/obj/item/storage/hypospraykit/cmo/ComponentInitialize() /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.max_items = 6
STR.can_hold = typecacheof(list( STR.can_hold = typecacheof(list(
/obj/item/hypospray/mkii, /obj/item/hypospray/mkii,
@@ -142,7 +142,7 @@ SLEEPER CODE IS IN game/objects/items/devices/dogborg_sleeper.dm !
/obj/item/storage/bag/borgdelivery/ComponentInitialize() /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_w_class = WEIGHT_CLASS_BULKY
STR.max_combined_w_class = 5 STR.max_combined_w_class = 5
STR.max_items = 1 STR.max_items = 1
@@ -182,7 +182,7 @@
/datum/reagent/fermi/nanite_b_gone/on_mob_life(mob/living/carbon/C) /datum/reagent/fermi/nanite_b_gone/on_mob_life(mob/living/carbon/C)
//var/component/nanites/N = M.GetComponent(/datum/component/nanites) //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)) if(isnull(N))
return ..() return ..()
N.nanite_volume = -purity//0.5 seems to be the default to me, so it'll neuter them. 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) /datum/reagent/fermi/nanite_b_gone/overdose_process(mob/living/carbon/C)
//var/component/nanites/N = M.GetComponent(/datum/component/nanites) //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)) if(prob(5))
to_chat(C, "<span class='warning'>The residual voltage from the nanites causes you to seize up!</b></span>") 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) C.electrocute_act(10, (get_turf(C)), 1, FALSE, FALSE, FALSE, TRUE)
@@ -24,7 +24,7 @@
if(H.sprinting && charge) if(H.sprinting && charge)
charge-- charge--
new_speed = chargespeed new_speed = chargespeed
GET_COMPONENT(D, /datum/component/riding) var/datum/component/riding/D = GetComponent(/datum/component/riding)
D.vehicle_move_delay = new_speed D.vehicle_move_delay = new_speed
for(var/i in progressbars_by_rider) for(var/i in progressbars_by_rider)
var/datum/progressbar/B = progressbars_by_rider[i] var/datum/progressbar/B = progressbars_by_rider[i]