Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixs point defense registering #6727

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions code/game/machinery/pointdefense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/power/pointdefense)
// Check for duplicate controllers with this ID
for(var/thing in GLOB.pointdefense_controllers)
var/obj/machinery/pointdefense_control/PC = thing
if(PC != src && PC.id_tag == id_tag)
if(PC != src && PC.id_tag == new_ident)
to_chat(user, "<span class='warning'>The [new_ident] network already has a controller.</span>")
return
to_chat(user, "<span class='notice'>You register [src] with the [new_ident] network.</span>")
Expand Down Expand Up @@ -208,11 +208,6 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/power/pointdefense)
if(W?.is_multitool())
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.physical_state))
// Check for duplicate controllers with this ID
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_WARNING("\The [new_ident] network already has a controller!"))
return
to_chat(user, SPAN_NOTICE("You register [src] with \the [new_ident] network."))
id_tag = new_ident
return
Expand Down
Loading