From cf3826f3bfd9f7e2415664e9f5b37df9f9def0ca Mon Sep 17 00:00:00 2001 From: vuonojenmustaturska Date: Sun, 1 Apr 2018 16:19:57 +0300 Subject: [PATCH] Merge pull request #36864 from robbym/master Cleaned up tile pointer circuit and converted to absolute coordinates --- .../integrated_electronics/subtypes/input.dm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/code/modules/integrated_electronics/subtypes/input.dm b/code/modules/integrated_electronics/subtypes/input.dm index 6ad3fc9797..dd58aae211 100644 --- a/code/modules/integrated_electronics/subtypes/input.dm +++ b/code/modules/integrated_electronics/subtypes/input.dm @@ -345,15 +345,15 @@ activate_pin(3) /obj/item/integrated_circuit/input/turfpoint - name = "Tile pointer" - desc = "This circuit will get tile ref with given relative coorinates." - extended_desc = "If the machine cannot see the target, it will not be able to calculate the correct direction.\ - This circuit is working only in assembly." + name = "tile pointer" + desc = "This circuit will get tile ref with given absolute coorinates." + extended_desc = "If the machine cannot see the target, it will not be able to scan it.\ + This circuit will only work in an assembly." icon_state = "numberpad" complexity = 5 inputs = list("X" = IC_PINTYPE_NUMBER,"Y" = IC_PINTYPE_NUMBER) outputs = list("tile" = IC_PINTYPE_REF) - activators = list("calculate dir" = IC_PINTYPE_PULSE_IN, "on calculated" = IC_PINTYPE_PULSE_OUT,"not calculated" = IC_PINTYPE_PULSE_OUT) + activators = list("scan" = IC_PINTYPE_PULSE_IN, "on scanned" = IC_PINTYPE_PULSE_OUT,"not scanned" = IC_PINTYPE_PULSE_OUT) spawn_flags = IC_SPAWN_RESEARCH power_draw_per_use = 40 @@ -362,11 +362,11 @@ activate_pin(3) return var/turf/T = get_turf(assembly) - var/target_x = CLAMP(get_pin_data(IC_INPUT, 1) - assembly.x, 0, world.maxx) - var/target_y = CLAMP(get_pin_data(IC_INPUT, 2) - assembly.y, 0, world.maxy) + var/target_x = CLAMP(get_pin_data(IC_INPUT, 1), 0, world.maxx) + var/target_y = CLAMP(get_pin_data(IC_INPUT, 2), 0, world.maxy) var/turf/A = locate(target_x, target_y, T.z) set_pin_data(IC_OUTPUT, 1, null) - if(!A||!(A in view(T))) + if(!A || !(A in view(T))) activate_pin(3) return else