From a6a284f5c4b64dca7235d83b6891cf1a9012279e Mon Sep 17 00:00:00 2001 From: Sharkmare <34294231+Sharkmare@users.noreply.github.com> Date: Thu, 2 Mar 2023 16:00:19 +0100 Subject: [PATCH 1/2] Resize circuit Resize circuit --- .../subtypes/manipulation.dm | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/code/modules/integrated_electronics/subtypes/manipulation.dm b/code/modules/integrated_electronics/subtypes/manipulation.dm index d64f9a8645..8c7c6a70a9 100644 --- a/code/modules/integrated_electronics/subtypes/manipulation.dm +++ b/code/modules/integrated_electronics/subtypes/manipulation.dm @@ -203,4 +203,33 @@ /obj/item/integrated_circuit/manipulation/grenade/frag pre_attached_grenade_type = /obj/item/weapon/grenade/explosive origin_tech = list(TECH_ENGINEERING = 3, TECH_DATA = 3, TECH_COMBAT = 10) - spawn_flags = null // Used for world initializing, see the #defines above. \ No newline at end of file + spawn_flags = null // Used for world initializing, see the #defines above. + +//CHOMPADDITION: Size Circuit +/obj/item/integrated_circuit/manipulation/Size + name = "size circuit" + desc = "This allows a given target to be resized." + icon_state = "locomotion" + extended_desc = "The Circuit accepts a reference to a creature and the size toset them to." + w_class = ITEMSIZE_NORMAL + complexity = 20 + inputs = list( "target ref", + "size" = IC_PINTYPE_NUMBER) + outputs = list() + activators = list("set size" = IC_PINTYPE_PULSE_IN,"size set" = IC_PINTYPE_PULSE_OUT) + spawn_flags = IC_SPAWN_RESEARCH + power_draw_per_use = 100 + +/obj/item/integrated_circuit/manipulation/Size/do_work() + pull_data() + var/mob/living/target = get_pin_data(IC_INPUT, 1) + var/size = get_pin_data(IC_INPUT, 2) + var/turf/tt = get_turf(target) + var/turf/st = get_turf(src) + + var/distance = sqrt((st.x - tt.x)**2 + (st.y - tt.y)**2) + if (distance >= 6) + return + if(target && istype(target,/mob/living/)) + target.resize(size/100) + activate_pin(2) From 927816c74fdd956425e852f91ede0280679a54ac Mon Sep 17 00:00:00 2001 From: Sharkmare <34294231+Sharkmare@users.noreply.github.com> Date: Thu, 2 Mar 2023 19:34:19 +0100 Subject: [PATCH 2/2] Update manipulation.dm --- code/modules/integrated_electronics/subtypes/manipulation.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/integrated_electronics/subtypes/manipulation.dm b/code/modules/integrated_electronics/subtypes/manipulation.dm index 8c7c6a70a9..320866301e 100644 --- a/code/modules/integrated_electronics/subtypes/manipulation.dm +++ b/code/modules/integrated_electronics/subtypes/manipulation.dm @@ -216,11 +216,11 @@ inputs = list( "target ref", "size" = IC_PINTYPE_NUMBER) outputs = list() - activators = list("set size" = IC_PINTYPE_PULSE_IN,"size set" = IC_PINTYPE_PULSE_OUT) + activators = list("set size" = IC_PINTYPE_PULSE_IN,"on size set" = IC_PINTYPE_PULSE_OUT) spawn_flags = IC_SPAWN_RESEARCH power_draw_per_use = 100 -/obj/item/integrated_circuit/manipulation/Size/do_work() +/obj/item/integrated_circuit/manipulation/size/do_work() pull_data() var/mob/living/target = get_pin_data(IC_INPUT, 1) var/size = get_pin_data(IC_INPUT, 2)