Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
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
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,12 @@ GLOBAL_VAR_INIT(ai_control_code, random_nukecode(6))
if(action == "clear_for_use")
var/code = text2num(params["control_code"])

if(!code)
return

if(!GLOB.ai_control_code)
return

var/length_of_number = round(log(10, code) + 1)
if(length_of_number < 6)
to_chat(usr, span_warning("Incorrect code. Too short"))
Expand All @@ -246,8 +252,6 @@ GLOBAL_VAR_INIT(ai_control_code, random_nukecode(6))
return


if(!GLOB.ai_control_code)
return

if(!is_station_level(z))
to_chat(usr, span_warning("Unable to connect to NT Servers. Please verify you are onboard the station."))
Expand Down Expand Up @@ -281,6 +285,12 @@ GLOBAL_VAR_INIT(ai_control_code, random_nukecode(6))
if(action == "log_in_control_code")
var/code = text2num(params["control_code"])

if(!code)
return

if(!GLOB.ai_control_code)
return

var/length_of_number = round(log(10, code) + 1)
if(length_of_number < 6)
to_chat(usr, span_warning("Incorrect code. Too short"))
Expand All @@ -290,8 +300,7 @@ GLOBAL_VAR_INIT(ai_control_code, random_nukecode(6))
to_chat(usr, span_warning("Incorrect code. Too long"))
return

if(!GLOB.ai_control_code)
return


if(code == text2num(GLOB.ai_control_code))
cleared_for_use = TRUE
Expand Down