mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
powder that makes you say yes
This commit is contained in:
@@ -25,7 +25,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/pointdefense)
|
||||
. = ..()
|
||||
if(id_tag)
|
||||
//No more than 1 controller please.
|
||||
for(var/obj/machinery/pointdefense_control/PC as anything in pointdefense_controllers)
|
||||
for(var/obj/machinery/pointdefense_control/PC as anything in GLOB.pointdefense_controllers)
|
||||
if(PC != src && PC.id_tag == id_tag)
|
||||
warning("Two [src] with the same id_tag of [id_tag]")
|
||||
id_tag = null
|
||||
@@ -100,7 +100,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/pointdefense)
|
||||
var/new_ident = input(user, "Enter a new ident tag.", "[src]", id_tag) as null|text
|
||||
if(new_ident && new_ident != id_tag && user.Adjacent(src) && CanInteract(user, GLOB.tgui_physical_state))
|
||||
// Check for duplicate controllers with this ID
|
||||
for(var/obj/machinery/pointdefense_control/PC as anything in pointdefense_controllers)
|
||||
for(var/obj/machinery/pointdefense_control/PC as anything in GLOB.pointdefense_controllers)
|
||||
if(PC != src && PC.id_tag == id_tag)
|
||||
to_chat(user, "<span class='warning'>The [new_ident] network already has a controller.</span>")
|
||||
return
|
||||
@@ -206,7 +206,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/pointdefense)
|
||||
if(!id_tag)
|
||||
return null
|
||||
var/list/connected_z_levels = GetConnectedZlevels(get_z(src))
|
||||
for(var/obj/machinery/pointdefense_control/PDC as anything in pointdefense_controllers)
|
||||
for(var/obj/machinery/pointdefense_control/PDC as anything in GLOB.pointdefense_controllers)
|
||||
if(PDC.id_tag == id_tag && (get_z(PDC) in connected_z_levels))
|
||||
return PDC
|
||||
|
||||
|
||||
Reference in New Issue
Block a user