mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-09 16:12:17 +00:00
[MIRROR] jobs, access and radio to defines (#11546)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
b3ad80a7f9
commit
89704592dd
@@ -68,7 +68,7 @@
|
||||
|
||||
switch(action)
|
||||
if("wipe")
|
||||
msg_admin_attack("[key_name_admin(ui.user)] wiped [key_name_admin(AI)] with \the [src].")
|
||||
msg_admin_attack("[key_name_admin(ui.user)] wiped [key_name_admin(AI_DEPT)] with \the [src].")
|
||||
add_attack_logs(ui.user,carded_ai,"Purged from AI Card")
|
||||
INVOKE_ASYNC(src, PROC_REF(wipe_ai))
|
||||
if("radio")
|
||||
@@ -170,15 +170,15 @@
|
||||
rig.forced_move(direction, user)
|
||||
|
||||
/obj/item/aicard/proc/wipe_ai()
|
||||
var/mob/living/silicon/ai/AI = carded_ai
|
||||
var/mob/living/silicon/ai/our_ai = carded_ai
|
||||
flush = TRUE
|
||||
AI.suiciding = TRUE
|
||||
to_chat(AI, "Your power has been disabled!")
|
||||
while(AI && AI.stat != DEAD)
|
||||
our_ai.suiciding = TRUE
|
||||
to_chat(our_ai, "Your power has been disabled!")
|
||||
while(our_ai && our_ai.stat != DEAD)
|
||||
// This is absolutely evil and I love it.
|
||||
if(AI.deployed_shell && prob(AI.oxyloss)) //You feel it creeping? Eventually will reach 100, resulting in the second half of the AI's remaining life being lonely.
|
||||
AI.disconnect_shell("Disconnecting from remote shell due to insufficent power.")
|
||||
AI.adjustOxyLoss(2)
|
||||
AI.updatehealth()
|
||||
if(our_ai.deployed_shell && prob(our_ai.oxyloss)) //You feel it creeping? Eventually will reach 100, resulting in the second half of the AI's remaining life being lonely.
|
||||
our_ai.disconnect_shell("Disconnecting from remote shell due to insufficent power.")
|
||||
our_ai.adjustOxyLoss(2)
|
||||
our_ai.updatehealth()
|
||||
sleep(10)
|
||||
flush = FALSE
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
/obj/item/holowarrant/attackby(obj/item/W, mob/user)
|
||||
if(active)
|
||||
var/obj/item/card/id/I = W.GetIdCard()
|
||||
if(access_hos in I.GetAccess()) // VOREStation edit
|
||||
if(ACCESS_HOS in I.GetAccess()) // VOREStation edit
|
||||
var/choice = tgui_alert(user, "Would you like to authorize this warrant?","Warrant authorization",list("Yes","No"))
|
||||
if(choice == "Yes")
|
||||
active.fields["auth"] = "[I.registered_name] - [I.assignment ? I.assignment : "(Unknown)"]"
|
||||
|
||||
@@ -504,7 +504,7 @@
|
||||
if(has_channel_access(card.pai, internal_chan))
|
||||
channels += ch_name
|
||||
channels[ch_name] = 1
|
||||
secure_radio_connections[ch_name] = SSradio.add_object(src, radiochannels[ch_name], RADIO_CHAT)
|
||||
secure_radio_connections[ch_name] = SSradio.add_object(src, GLOB.radiochannels[ch_name], RADIO_CHAT)
|
||||
|
||||
/obj/item/paicard/typeb
|
||||
name = "personal AI device"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
slot_r_hand_str = 'icons/mob/items/righthand_storage.dmi',
|
||||
)
|
||||
item_state = "electropack"
|
||||
frequency = 1449
|
||||
frequency = AMAG_ELE_FREQ
|
||||
slot_flags = SLOT_BACK
|
||||
w_class = ITEMSIZE_HUGE
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
|
||||
for(var/ch_name in channels)
|
||||
SSradio.remove_object(src, radiochannels[ch_name])
|
||||
SSradio.remove_object(src, GLOB.radiochannels[ch_name])
|
||||
secure_radio_connections[ch_name] = null
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
return
|
||||
|
||||
for (var/ch_name in channels)
|
||||
secure_radio_connections[ch_name] = SSradio.add_object(src, radiochannels[ch_name], RADIO_CHAT)
|
||||
secure_radio_connections[ch_name] = SSradio.add_object(src, GLOB.radiochannels[ch_name], RADIO_CHAT)
|
||||
|
||||
if(setDescription)
|
||||
setupRadioDescription()
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
/obj/item/radio/intercom/omni
|
||||
name = "global announcer"
|
||||
/obj/item/radio/intercom/omni/Initialize(mapload)
|
||||
channels = radiochannels.Copy()
|
||||
channels = GLOB.radiochannels.Copy()
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/intercom/Initialize(mapload)
|
||||
@@ -100,7 +100,7 @@
|
||||
. = ..()
|
||||
internal_channels = list(
|
||||
num2text(PUB_FREQ) = list(),
|
||||
num2text(SEC_I_FREQ) = list(access_security)
|
||||
num2text(SEC_I_FREQ) = list(ACCESS_SECURITY)
|
||||
)
|
||||
|
||||
/obj/item/radio/intercom/entertainment/Initialize(mapload)
|
||||
@@ -119,7 +119,7 @@
|
||||
|
||||
/obj/item/radio/intercom/syndicate/Initialize(mapload)
|
||||
. = ..()
|
||||
internal_channels[num2text(SYND_FREQ)] = list(access_syndicate)
|
||||
internal_channels[num2text(SYND_FREQ)] = list(ACCESS_SYNDICATE)
|
||||
|
||||
/obj/item/radio/intercom/raider
|
||||
name = "illicit intercom"
|
||||
@@ -130,7 +130,7 @@
|
||||
|
||||
/obj/item/radio/intercom/raider/Initialize(mapload)
|
||||
. = ..()
|
||||
internal_channels[num2text(RAID_FREQ)] = list(access_syndicate)
|
||||
internal_channels[num2text(RAID_FREQ)] = list(ACCESS_SYNDICATE)
|
||||
|
||||
/obj/item/radio/intercom/attack_ai(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
@@ -239,4 +239,4 @@
|
||||
|
||||
/obj/item/radio/intercom/locked/confessional
|
||||
name = "confessional intercom"
|
||||
frequency = 1481
|
||||
frequency = LOCKED_COM_FREQ
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
set_frequency(frequency)
|
||||
|
||||
for (var/ch_name in channels)
|
||||
secure_radio_connections[ch_name] = SSradio.add_object(src, radiochannels[ch_name], RADIO_CHAT)
|
||||
secure_radio_connections[ch_name] = SSradio.add_object(src, GLOB.radiochannels[ch_name], RADIO_CHAT)
|
||||
|
||||
wires = new(src)
|
||||
internal_channels = GLOB.default_internal_channels.Copy()
|
||||
@@ -109,7 +109,7 @@
|
||||
if(SSradio)
|
||||
SSradio.remove_object(src, frequency)
|
||||
for (var/ch_name in channels)
|
||||
SSradio.remove_object(src, radiochannels[ch_name])
|
||||
SSradio.remove_object(src, GLOB.radiochannels[ch_name])
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/proc/recalculateChannels()
|
||||
@@ -171,7 +171,7 @@
|
||||
var/chan_stat = channels[ch_name]
|
||||
var/listening = !!(chan_stat & FREQ_LISTENING) != 0
|
||||
|
||||
dat.Add(list(list("chan" = ch_name, "display_name" = ch_name, "secure_channel" = 1, "sec_channel_listen" = !listening, "freq" = radiochannels[ch_name])))
|
||||
dat.Add(list(list("chan" = ch_name, "display_name" = ch_name, "secure_channel" = 1, "sec_channel_listen" = !listening, "freq" = GLOB.radiochannels[ch_name])))
|
||||
|
||||
return dat
|
||||
|
||||
@@ -649,7 +649,7 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
|
||||
|
||||
|
||||
for(var/ch_name in channels)
|
||||
SSradio.remove_object(src, radiochannels[ch_name])
|
||||
SSradio.remove_object(src, GLOB.radiochannels[ch_name])
|
||||
secure_radio_connections[ch_name] = null
|
||||
|
||||
|
||||
@@ -714,17 +714,17 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
|
||||
name = "broken radio headset"
|
||||
return
|
||||
for (var/ch_name in channels)
|
||||
secure_radio_connections[ch_name] = SSradio.add_object(src, radiochannels[ch_name], RADIO_CHAT)
|
||||
secure_radio_connections[ch_name] = SSradio.add_object(src, GLOB.radiochannels[ch_name], RADIO_CHAT)
|
||||
|
||||
/obj/item/radio/proc/config(op)
|
||||
if(SSradio)
|
||||
for (var/ch_name in channels)
|
||||
SSradio.remove_object(src, radiochannels[ch_name])
|
||||
SSradio.remove_object(src, GLOB.radiochannels[ch_name])
|
||||
secure_radio_connections = new
|
||||
channels = op
|
||||
if(SSradio)
|
||||
for (var/ch_name in op)
|
||||
secure_radio_connections[ch_name] = SSradio.add_object(src, radiochannels[ch_name], RADIO_CHAT)
|
||||
secure_radio_connections[ch_name] = SSradio.add_object(src, GLOB.radiochannels[ch_name], RADIO_CHAT)
|
||||
return
|
||||
|
||||
/obj/item/radio/off
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
var/obj/item/card/id/ourid = user?.GetIdCard()
|
||||
if(!ourid)
|
||||
return
|
||||
if(access_change_ids in ourid.GetAccess())
|
||||
if(ACCESS_CHANGE_IDS in ourid.GetAccess())
|
||||
playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
return
|
||||
if(access_medical in ourid.GetAccess())
|
||||
if(ACCESS_MEDICAL in ourid.GetAccess())
|
||||
playsound(src, 'sound/effects/pop.ogg', 50, FALSE)
|
||||
else
|
||||
playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
|
||||
@@ -269,7 +269,7 @@
|
||||
/* //These were originally supposed to have radios in them. Doesn't work.
|
||||
/obj/item/radio/bug
|
||||
listening = 0 //turn it on first
|
||||
frequency = 1359 //sec comms
|
||||
frequency = SEC_FREQ //sec comms
|
||||
broadcasting = 0
|
||||
canhear_range = 1
|
||||
name = "camera bug device"
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
hidden_uplink.trigger(user)
|
||||
|
||||
/obj/item/radio/headset/uplink
|
||||
traitor_frequency = 1445
|
||||
traitor_frequency = BEACON_FREQ
|
||||
|
||||
/obj/item/radio/headset/uplink/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user