mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Merge pull request #1946 from Markolie/intercom
Remove radio free range
This commit is contained in:
@@ -87,8 +87,8 @@
|
||||
|
||||
if (href_list["freq"])
|
||||
var/new_frequency = (frequency + text2num(href_list["freq"]))
|
||||
if(new_frequency < 1441 || new_frequency > 1489)
|
||||
new_frequency = sanitize_frequency(new_frequency)
|
||||
if(new_frequency < RADIO_LOW_FREQ || new_frequency > RADIO_HIGH_FREQ)
|
||||
new_frequency = sanitize_frequency(new_frequency, RADIO_LOW_FREQ, RADIO_HIGH_FREQ)
|
||||
set_frequency(new_frequency)
|
||||
|
||||
if(href_list["code"])
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
|
||||
/obj/machinery/computer/account_database/proc/get_access_level(user as mob)
|
||||
if(isobserver(user) && check_rights(R_ADMIN, 0, user))
|
||||
/obj/machinery/computer/account_database/proc/get_access_level(var/mob/user)
|
||||
if(user.can_admin_interact())
|
||||
return 2
|
||||
if (!held_card)
|
||||
return 0
|
||||
|
||||
@@ -517,9 +517,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
src << "\blue Temperature: [round(environment.temperature-T0C,0.1)]°C"
|
||||
src << "\blue Heat Capacity: [round(environment.heat_capacity(),0.1)]"
|
||||
|
||||
|
||||
/mob/dead/observer/verb/view_manfiest()
|
||||
|
||||
/mob/dead/observer/verb/view_manifest()
|
||||
set name = "View Crew Manifest"
|
||||
set category = "Ghost"
|
||||
|
||||
@@ -638,4 +637,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
client.images |= ghost_darkness_images
|
||||
if (ghostimage)
|
||||
client.images -= ghostimage //remove ourself
|
||||
|
||||
|
||||
/mob/proc/can_admin_interact()
|
||||
return 0
|
||||
|
||||
/mob/dead/observer/can_admin_interact()
|
||||
return check_rights(R_ADMIN, 0, src)
|
||||
@@ -538,7 +538,7 @@
|
||||
|
||||
else if(href_list["freq"])
|
||||
var/new_frequency = (P.sradio.frequency + text2num(href_list["freq"]))
|
||||
if(new_frequency < 1200 || new_frequency > 1600)
|
||||
if(new_frequency < PUBLIC_LOW_FREQ || new_frequency > PUBLIC_HIGH_FREQ)
|
||||
new_frequency = sanitize_frequency(new_frequency)
|
||||
P.sradio.set_frequency(new_frequency)
|
||||
return 1
|
||||
|
||||
@@ -113,8 +113,6 @@
|
||||
loc_landmark = sloc
|
||||
|
||||
O.loc = loc_landmark.loc
|
||||
for (var/obj/item/device/radio/intercom/comm in O.loc)
|
||||
comm.ai += O
|
||||
|
||||
O.on_mob_init()
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
return STATUS_CLOSE // By default no mob can do anything with NanoUI
|
||||
|
||||
/mob/dead/observer/default_can_use_topic()
|
||||
if(check_rights(R_ADMIN, 0, src))
|
||||
if(can_admin_interact())
|
||||
return STATUS_INTERACTIVE // Admins are more equal
|
||||
return STATUS_UPDATE // Ghosts can view updates
|
||||
|
||||
|
||||
@@ -836,8 +836,8 @@
|
||||
return wires.IsIndexCut(wireIndex)
|
||||
|
||||
|
||||
/obj/machinery/power/apc/proc/can_use(mob/user as mob, var/loud = 0) //used by attack_hand() and Topic()
|
||||
if(isobserver(user) && check_rights(R_ADMIN, 0, user))
|
||||
/obj/machinery/power/apc/proc/can_use(var/mob/user, var/loud = 0) //used by attack_hand() and Topic()
|
||||
if(user.can_admin_interact())
|
||||
return 1
|
||||
|
||||
autoflag = 5
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
target_radio = null
|
||||
else if(href_list["freq"])
|
||||
var/new_frequency = (frequency + text2num(href_list["freq"]))
|
||||
if (frequency < 1200 || frequency > 1600)
|
||||
if (frequency < RADIO_LOW_FREQ || frequency > RADIO_HIGH_FREQ)
|
||||
new_frequency = sanitize_frequency(new_frequency, 1499)
|
||||
frequency = new_frequency
|
||||
|
||||
|
||||
@@ -62,14 +62,14 @@
|
||||
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("$service", 1349)
|
||||
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)
|
||||
interpreter.SetVar("$service", SRV_FREQ)
|
||||
|
||||
// Signal data
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
return
|
||||
|
||||
if(!allowed(user) && !isobserver(user))
|
||||
user << "<span class='warning'>Access Denied.</span>"
|
||||
user << "<span class='warning'>Access denied.</span>"
|
||||
return 1
|
||||
|
||||
ui_interact(user)
|
||||
|
||||
Reference in New Issue
Block a user