From f12d96e057d31d19b084a6f8161cd017fbdc812a Mon Sep 17 00:00:00 2001 From: Verkister Date: Thu, 11 Feb 2021 13:41:42 +0200 Subject: [PATCH] Update turret_control.dm --- code/game/machinery/turret_control.dm | 79 +-------------------------- 1 file changed, 2 insertions(+), 77 deletions(-) diff --git a/code/game/machinery/turret_control.dm b/code/game/machinery/turret_control.dm index 02c077cb699..7f5a1d8e567 100644 --- a/code/game/machinery/turret_control.dm +++ b/code/game/machinery/turret_control.dm @@ -19,7 +19,6 @@ var/locked = TRUE var/area/control_area //can be area name, path or nothing. -<<<<<<< HEAD var/targetting_is_configurable = TRUE // if false, you cannot change who this turret attacks via its UI var/check_arrest = TRUE //checks if the perp is set to arrest var/check_records = TRUE //checks if a security record exists at all @@ -29,23 +28,12 @@ var/check_synth = FALSE //if active, will shoot at anything not an AI or cyborg var/check_all = FALSE //If active, will shoot at anything. var/check_down = TRUE //If active, won't shoot laying targets. + var/stay_up = FALSE //If active, the turret will not pop-down unless it loses power or is disabled. + var/fire_at_movement = FALSE //If active, the turret will prioritize objects or creatures that move in its range. var/ailock = FALSE //Silicons cannot use this var/syndicate = FALSE -======= - var/check_arrest = 1 //checks if the perp is set to arrest - var/check_records = 1 //checks if a security record exists at all - var/check_weapons = 0 //checks if it can shoot people that have a weapon they aren't authorized to have - var/check_access = 1 //if this is active, the turret shoots everything that does not meet the access requirements - var/check_anomalies = 1 //checks if it can shoot at unidentified lifeforms (ie xenos) - var/check_synth = 0 //if active, will shoot at anything not an AI or cyborg - var/check_all = 0 //If active, will shoot at anything. - var/check_down = 0 //If active, will shoot at prone individuals. - var/stay_up = 0 //If active, the turret will not pop-down unless it loses power or is disabled. - var/fire_at_movement = 0 //If active, the turret will prioritize objects or creatures that move in its range. - var/ailock = 0 //Silicons cannot use this ->>>>>>> 997b440... Merge pull request #7765 from Mechoid/PointDefense req_access = list(access_ai_upload) /obj/machinery/turretid/stun @@ -136,37 +124,8 @@ /obj/machinery/turretid/attack_hand(mob/user as mob) tgui_interact(user) -<<<<<<< HEAD /obj/machinery/turretid/tgui_interact(mob/user, datum/tgui/ui = null) ui = SStgui.try_update_ui(user, src, ui) -======= - ui_interact(user) - -/obj/machinery/turretid/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - var/data[0] - data["access"] = !isLocked(user) - data["locked"] = locked - data["enabled"] = enabled - data["is_lethal"] = 1 - data["lethal"] = lethal - - if(data["access"]) - var/settings[0] - settings[++settings.len] = list("category" = "Neutralize All Non-Synthetics", "setting" = "check_synth", "value" = check_synth) - settings[++settings.len] = list("category" = "Check Weapon Authorization", "setting" = "check_weapons", "value" = check_weapons) - settings[++settings.len] = list("category" = "Check Security Records", "setting" = "check_records", "value" = check_records) - settings[++settings.len] = list("category" = "Check Arrest Status", "setting" = "check_arrest", "value" = check_arrest) - settings[++settings.len] = list("category" = "Check Access Authorization", "setting" = "check_access", "value" = check_access) - settings[++settings.len] = list("category" = "Check misc. Lifeforms", "setting" = "check_anomalies", "value" = check_anomalies) - settings[++settings.len] = list("category" = "Neutralize All Entities", "setting" = "check_all", "value" = check_all) - settings[++settings.len] = list("category" = "Neutralize Downed Entities", "setting" = "check_down", "value" = check_down) - settings[++settings.len] = list("category" = "Remain Deployed", "setting" = "stay_up", "value" = stay_up) - settings[++settings.len] = list("category" = "Fire At Movement", "setting" = "fire_at_movement", "value" = fire_at_movement) - - data["settings"] = settings - - ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) ->>>>>>> 997b440... Merge pull request #7765 from Mechoid/PointDefense if(!ui) ui = new(user, src, "PortableTurret", name) // 500, 400 ui.open() @@ -194,40 +153,9 @@ /obj/machinery/turretid/tgui_act(action, params) if(..()) -<<<<<<< HEAD return if(isLocked(usr)) return -======= - return 1 - - if(href_list["command"] && href_list["value"]) - var/value = text2num(href_list["value"]) - if(href_list["command"] == "enable") - enabled = value - else if(href_list["command"] == "lethal") - lethal = value - else if(href_list["command"] == "check_synth") - check_synth = value - else if(href_list["command"] == "check_weapons") - check_weapons = value - else if(href_list["command"] == "check_records") - check_records = value - else if(href_list["command"] == "check_arrest") - check_arrest = value - else if(href_list["command"] == "check_access") - check_access = value - else if(href_list["command"] == "check_anomalies") - check_anomalies = value - else if(href_list["command"] == "check_all") - check_all = value - else if(href_list["command"] == "check_down") - check_down = value - else if(href_list["command"] == "stay_up") - stay_up = value - else if(href_list["command"] == "fire_at_movement") - fire_at_movement = value ->>>>>>> 997b440... Merge pull request #7765 from Mechoid/PointDefense . = TRUE switch(action) @@ -269,11 +197,8 @@ TC.check_anomalies = check_anomalies TC.check_all = check_all TC.check_down = check_down -<<<<<<< HEAD -======= TC.stay_up = stay_up TC.fire_at_movement = fire_at_movement ->>>>>>> 997b440... Merge pull request #7765 from Mechoid/PointDefense TC.ailock = ailock if(istype(control_area))