mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-14 12:12:37 +00:00
Cleans up radio frequency numbers.
Replaces magic numbers across the code base with proper constants. Prepares for the ability to have more than one antag channel in the future. Corrects a lie.
This commit is contained in:
@@ -122,7 +122,7 @@ client/verb/tcsrun()
|
||||
if(Server.freq_listening.len > 0)
|
||||
signal.frequency = Server.freq_listening[1]
|
||||
else
|
||||
signal.frequency = 1459
|
||||
signal.frequency = PUB_FREQ
|
||||
signal.data["name"] = ""
|
||||
signal.data["job"] = ""
|
||||
signal.data["reject"] = 0
|
||||
|
||||
@@ -62,13 +62,13 @@
|
||||
interpreter.SetVar("WEST" , WEST) // WEST (8)
|
||||
|
||||
// Channel macros
|
||||
interpreter.SetVar("$common", 1459)
|
||||
interpreter.SetVar("$science", 1351)
|
||||
interpreter.SetVar("$command", 1353)
|
||||
interpreter.SetVar("$medical", 1355)
|
||||
interpreter.SetVar("$engineering",1357)
|
||||
interpreter.SetVar("$security", 1359)
|
||||
interpreter.SetVar("$supply", 1347)
|
||||
interpreter.SetVar("$common", PUB_FREQ)
|
||||
interpreter.SetVar("$science", SCI_FREQ)
|
||||
interpreter.SetVar("$command", COMM_FREQ)
|
||||
interpreter.SetVar("$medical", MED_FREQ)
|
||||
interpreter.SetVar("$engineering",ENG_FREQ)
|
||||
interpreter.SetVar("$security", SEC_FREQ)
|
||||
interpreter.SetVar("$supply", SUP_FREQ)
|
||||
|
||||
// Signal data
|
||||
|
||||
@@ -236,7 +236,7 @@ datum/signal
|
||||
source = "[html_encode(uppertext(S.id))]"
|
||||
hradio = new // sets the hradio as a radio intercom
|
||||
if(!freq)
|
||||
freq = 1459
|
||||
freq = PUB_FREQ
|
||||
if(findtext(num2text(freq), ".")) // if the frequency has been set as a decimal
|
||||
freq *= 10 // shift the decimal one place
|
||||
|
||||
|
||||
Reference in New Issue
Block a user