Merge pull request #9589 from Ghommie/Ghommie-cit259

Porting GetComponent macros removal, and few other updates.
This commit is contained in:
kevinz000
2019-10-24 18:38:15 -07:00
committed by Dip
parent 23c4a9be17
commit 2c7c66fc89
87 changed files with 248 additions and 249 deletions
@@ -893,7 +893,7 @@
return FALSE
var/ignore_bags = get_pin_data(IC_INPUT, 1)
if(ignore_bags)
GET_COMPONENT_FROM(STR, /datum/component/storage, A)
var/datum/component/storage/STR = A.GetComponent(/datum/component/storage)
if(STR)
return FALSE
set_pin_data(IC_OUTPUT, 1, WEAKREF(A))
@@ -1104,7 +1104,7 @@
/obj/item/integrated_circuit/input/matscan/do_work()
var/atom/movable/H = get_pin_data_as_type(IC_INPUT, 1, /atom/movable)
var/turf/T = get_turf(src)
GET_COMPONENT_FROM(mt, /datum/component/material_container, H)
var/datum/component/material_container/mt = H.GetComponent(/datum/component/material_container)
if(!mt) //Invalid input
return
if(H in view(T)) // This is a camera. It can't examine thngs,that it can't see.
@@ -411,7 +411,7 @@
.=..()
/obj/item/integrated_circuit/manipulation/matman/proc/AfterMaterialInsert(type_inserted, id_inserted, amount_inserted)
GET_COMPONENT(materials, /datum/component/material_container)
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
set_pin_data(IC_OUTPUT, 2, materials.total_amount)
for(var/I in 1 to mtypes.len)
var/datum/material/M = materials.materials[mtypes[I]]
@@ -423,7 +423,7 @@
return TRUE
/obj/item/integrated_circuit/manipulation/matman/do_work(ord)
GET_COMPONENT(materials, /datum/component/material_container)
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
var/atom/movable/H = get_pin_data_as_type(IC_INPUT, 1, /atom/movable)
if(!check_target(H))
activate_pin(4)
@@ -441,7 +441,7 @@
else
activate_pin(4)
if(2)
GET_COMPONENT_FROM(mt, /datum/component/material_container, H)
var/datum/component/material_container/mt = H.GetComponent(/datum/component/material_container)
var/suc
for(var/I in 1 to mtypes.len)
var/datum/material/M = materials.materials[mtypes[I]]
@@ -467,7 +467,7 @@
activate_pin(6)
/obj/item/integrated_circuit/manipulation/matman/Destroy()
GET_COMPONENT(materials, /datum/component/material_container)
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
materials.retrieve_all()
.=..()
@@ -509,14 +509,14 @@
if(!container || !istype(container,/obj/item/storage) || !Adjacent(container))
return
GET_COMPONENT_FROM(STR, /datum/component/storage, container)
var/datum/component/storage/STR = container.GetComponent(/datum/component/storage)
if(!STR)
return
STR.attackby(src, target_obj)
else
GET_COMPONENT_FROM(STR, /datum/component/storage, target_obj.loc)
var/datum/component/storage/STR = target_obj.loc.GetComponent(/datum/component/storage)
if(!STR)
return