Merge pull request #8912 from Ghommie/Ghommie-cit146

Ports "Headset Channel Descriptions Are No Longer Hardcoded"
This commit is contained in:
kevinz000
2019-08-04 22:41:49 -07:00
committed by GitHub
37 changed files with 291 additions and 190 deletions
+2 -2
View File
@@ -1882,14 +1882,14 @@
return
var/mob/M = locate(href_list["CentComReply"])
usr.client.admin_headset_message(M, "CentCom")
usr.client.admin_headset_message(M, RADIO_CHANNEL_CENTCOM)
else if(href_list["SyndicateReply"])
if(!check_rights(R_ADMIN))
return
var/mob/M = locate(href_list["SyndicateReply"])
usr.client.admin_headset_message(M, "Syndicate")
usr.client.admin_headset_message(M, RADIO_CHANNEL_SYNDICATE)
else if(href_list["HeadsetMessage"])
if(!check_rights(R_ADMIN))
+7 -7
View File
@@ -62,7 +62,7 @@
.["laws"] = borg.laws ? borg.laws.get_law_list(include_zeroth = TRUE) : list()
.["channels"] = list()
for (var/k in GLOB.radiochannels)
if (k == "Common")
if (k == RADIO_CHANNEL_COMMON)
continue
.["channels"] += list(list("name" = k, "installed" = (k in borg.radio.channels)))
.["cell"] = borg.cell ? list("missing" = FALSE, "maxcharge" = borg.cell.maxcharge, "charge" = borg.cell.charge) : list("missing" = TRUE, "maxcharge" = 1, "charge" = 0)
@@ -164,15 +164,15 @@
if (channel in borg.radio.channels) // We're removing a channel
if (!borg.radio.keyslot) // There's no encryption key. This shouldn't happen but we can cope
borg.radio.channels -= channel
if (channel == "Syndicate")
if (channel == RADIO_CHANNEL_SYNDICATE)
borg.radio.syndie = FALSE
else if (channel == "CentCom")
else if (channel == RADIO_CHANNEL_CENTCOM)
borg.radio.independent = FALSE
else
borg.radio.keyslot.channels -= channel
if (channel == "Syndicate")
if (channel == RADIO_CHANNEL_SYNDICATE)
borg.radio.keyslot.syndie = FALSE
else if (channel == "CentCom")
else if (channel == RADIO_CHANNEL_CENTCOM)
borg.radio.keyslot.independent = FALSE
message_admins("[key_name_admin(user)] removed the [channel] radio channel from [ADMIN_LOOKUPFLW(borg)].")
log_admin("[key_name(user)] removed the [channel] radio channel from [key_name(borg)].")
@@ -180,9 +180,9 @@
if (!borg.radio.keyslot) // Assert that an encryption key exists
borg.radio.keyslot = new (borg.radio)
borg.radio.keyslot.channels[channel] = 1
if (channel == "Syndicate")
if (channel == RADIO_CHANNEL_SYNDICATE)
borg.radio.keyslot.syndie = TRUE
else if (channel == "CentCom")
else if (channel == RADIO_CHANNEL_CENTCOM)
borg.radio.keyslot.independent = TRUE
message_admins("[key_name_admin(user)] added the [channel] radio channel to [ADMIN_LOOKUPFLW(borg)].")
log_admin("[key_name(user)] added the [channel] radio channel to [key_name(borg)].")
+1 -1
View File
@@ -65,7 +65,7 @@
return
if (!sender)
sender = input("Who is the message from?", "Sender") as null|anything in list("CentCom","Syndicate")
sender = input("Who is the message from?", "Sender") as null|anything in list(RADIO_CHANNEL_CENTCOM,RADIO_CHANNEL_SYNDICATE)
if(!sender)
return
@@ -353,7 +353,7 @@
/datum/antagonist/changeling/greet()
if (you_are_greet)
to_chat(owner.current, "<span class='boldannounce'>You are [changelingID], a changeling! You have absorbed and taken the form of a human.</span>")
to_chat(owner.current, "<span class='boldannounce'>Use say \":g message\" to communicate with your fellow changelings.</span>")
to_chat(owner.current, "<span class='boldannounce'>Use say \"[MODE_TOKEN_CHANGELING] message\" to communicate with your fellow changelings.</span>")
to_chat(owner.current, "<b>You must complete the following tasks:</b>")
owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/ling_aler.ogg', 100, FALSE, pressure_affected = FALSE)
@@ -1,8 +1,8 @@
//HIVEMIND COMMUNICATION (:g)
//HIVEMIND COMMUNICATION //MODE_TOKEN_CHANGELING / :g
/obj/effect/proc_holder/changeling/hivemind_comms
name = "Hivemind Communication"
desc = "We tune our senses to the airwaves to allow us to discreetly communicate and exchange DNA with other changelings."
helptext = "We will be able to talk with other changelings with :g. Exchanged DNA do not count towards absorb objectives."
helptext = "We will be able to talk with other changelings with :g. Exchanged DNA do not count towards absorb objectives." //MODE_TOKEN_CHANGELING needs to be manually updated here.
dna_cost = 1
chemical_cost = -1
action_icon = 'icons/mob/actions/actions_xeno.dmi'
@@ -20,7 +20,7 @@
..()
var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling)
changeling.changeling_speak = 1
to_chat(user, "<i><font color=#800080>Use say \":g message\" to communicate with the other changelings.</font></i>")
to_chat(user, "<i><font color=#800080>Use say \"[MODE_TOKEN_CHANGELING] message\" to communicate with the other changelings.</font></i>")
var/obj/effect/proc_holder/changeling/hivemind_upload/S1 = new
if(!changeling.has_sting(S1))
changeling.purchasedpowers+=S1
@@ -56,8 +56,8 @@
if(M.lingcheck() == LINGHIVE_LING)
to_chat(M, "<i><font color=#800080>We can sense a foreign presence in the hivemind...</font></i>")
target.mind.linglink = 1
target.say(":g AAAAARRRRGGGGGHHHHH!!")
to_chat(target, "<font color=#800040><span class='boldannounce'>You can now communicate in the changeling hivemind, say \":g message\" to communicate!</span>")
target.say("[MODE_TOKEN_CHANGELING] AAAAARRRRGGGGGHHHHH!!")
to_chat(target, "<font color=#800040><span class='boldannounce'>You can now communicate in the changeling hivemind, say \"[MODE_TOKEN_CHANGELING] message\" to communicate!</span>")
target.reagents.add_reagent("salbutamol", 40) // So they don't choke to death while you interrogate them
sleep(1800)
SSblackbox.record_feedback("nested tally", "changeling_powers", 1, list("[name]", "[i]"))
@@ -27,7 +27,7 @@
var/obj/item/radio/radio
var/radio_key = /obj/item/encryptionkey/headset_med
var/radio_channel = "Medical"
var/radio_channel = RADIO_CHANNEL_MEDICAL
var/running_anim = FALSE
+1 -1
View File
@@ -67,7 +67,7 @@ Head of Personnel
flag = HOP
department_head = list("Captain")
department_flag = CIVILIAN
head_announce = list("Supply", "Service")
head_announce = list(RADIO_CHANNEL_SERVICE)
faction = "Station"
total_positions = 1
spawn_positions = 1
@@ -6,6 +6,7 @@ Quartermaster
flag = QUARTERMASTER
department_head = list("Head of Personnel")
department_flag = CIVILIAN
head_announce = list(RADIO_CHANNEL_SUPPLY)
faction = "Station"
total_positions = 1
spawn_positions = 1
+1 -1
View File
@@ -6,7 +6,7 @@ Chief Engineer
flag = CHIEF
department_head = list("Captain")
department_flag = ENGSEC
head_announce = list("Engineering")
head_announce = list(RADIO_CHANNEL_ENGINEERING)
faction = "Station"
total_positions = 1
spawn_positions = 1
+1 -1
View File
@@ -6,7 +6,7 @@ Chief Medical Officer
flag = CMO_JF
department_head = list("Captain")
department_flag = MEDSCI
head_announce = list("Medical")
head_announce = list(RADIO_CHANNEL_MEDICAL)
faction = "Station"
total_positions = 1
spawn_positions = 1
+1 -1
View File
@@ -6,7 +6,7 @@ Research Director
flag = RD_JF
department_head = list("Captain")
department_flag = MEDSCI
head_announce = list("Science")
head_announce = list(RADIO_CHANNEL_SCIENCE)
faction = "Station"
total_positions = 1
spawn_positions = 1
+1 -1
View File
@@ -12,7 +12,7 @@ Head of Security
flag = HOS
department_head = list("Captain")
department_flag = ENGSEC
head_announce = list("Security")
head_announce = list(RADIO_CHANNEL_SECURITY)
faction = "Station"
total_positions = 1
spawn_positions = 1
+3 -3
View File
@@ -4,14 +4,14 @@
return
var/message_mode = get_message_mode(message)
if(client && (message_mode == "admin" || message_mode == "deadmin"))
if(client && (message_mode == MODE_ADMIN || message_mode == MODE_DEADMIN))
message = copytext(message, 3)
if(findtext(message, " ", 1, 2))
message = copytext(message, 2)
if(message_mode == "admin")
if(message_mode == MODE_ADMIN)
client.cmd_admin_say(message)
else if(message_mode == "deadmin")
else if(message_mode == MODE_DEADMIN)
client.dsay(message)
return
+4 -4
View File
@@ -53,14 +53,14 @@
if(ears)
var/obj/item/radio/headset/dongle = ears
if(!istype(dongle))
return 0
return FALSE
if(dongle.translate_binary)
return 1
return TRUE
/mob/living/carbon/human/radio(message, message_mode, list/spans, language)
. = ..()
if(. != 0)
return .
if(.)
return
switch(message_mode)
if(MODE_HEADSET)
+36 -36
View File
@@ -2,61 +2,61 @@ GLOBAL_LIST_INIT(department_radio_prefixes, list(":", "."))
GLOBAL_LIST_INIT(department_radio_keys, list(
// Location
"r" = "right hand",
"l" = "left hand",
"i" = "intercom",
MODE_KEY_R_HAND = MODE_R_HAND,
MODE_KEY_L_HAND = MODE_L_HAND,
MODE_KEY_INTERCOM = MODE_INTERCOM,
// Department
"h" = "department",
"c" = "Command",
"n" = "Science",
"m" = "Medical",
"e" = "Engineering",
"s" = "Security",
"u" = "Supply",
"v" = "Service",
MODE_KEY_DEPARTMENT = MODE_DEPARTMENT,
RADIO_KEY_COMMAND = RADIO_CHANNEL_COMMAND,
RADIO_KEY_SCIENCE = RADIO_CHANNEL_SCIENCE,
RADIO_KEY_MEDICAL = RADIO_CHANNEL_MEDICAL,
RADIO_KEY_ENGINEERING = RADIO_CHANNEL_ENGINEERING,
RADIO_KEY_SECURITY = RADIO_CHANNEL_SECURITY,
RADIO_KEY_SUPPLY = RADIO_CHANNEL_SUPPLY,
RADIO_KEY_SERVICE = RADIO_CHANNEL_SERVICE,
// Faction
"t" = "Syndicate",
"y" = "CentCom",
RADIO_KEY_SYNDICATE = RADIO_CHANNEL_SYNDICATE,
RADIO_KEY_CENTCOM = RADIO_CHANNEL_CENTCOM,
// Admin
"p" = "admin",
"d" = "deadmin",
MODE_KEY_ADMIN = MODE_ADMIN,
MODE_KEY_DEADMIN = MODE_DEADMIN,
// Misc
"o" = "AI Private", // AI Upload channel
"x" = "cords", // vocal cords, used by Voice of God
RADIO_KEY_AI_PRIVATE = RADIO_CHANNEL_AI_PRIVATE, // AI Upload channel
MODE_KEY_VOCALCORDS = MODE_VOCALCORDS, // vocal cords, used by Voice of God
//kinda localization -- rastaf0
//same keys as above, but on russian keyboard layout. This file uses cp1251 as encoding.
// Location
"ê" = "right hand",
"ä" = "left hand",
"ø" = "intercom",
"ê" = MODE_R_HAND,
"ä" = MODE_L_HAND,
"ø" = MODE_INTERCOM,
// Department
"ð" = "department",
"ñ" = "Command",
"ò" = "Science",
"ü" = "Medical",
"ó" = "Engineering",
"û" = "Security",
"ã" = "Supply",
"ì" = "Service",
"ð" = MODE_DEPARTMENT,
"ñ" = RADIO_CHANNEL_COMMAND,
"ò" = RADIO_CHANNEL_SCIENCE,
"ü" = RADIO_CHANNEL_MEDICAL,
"ó" = RADIO_CHANNEL_ENGINEERING,
"û" = RADIO_CHANNEL_SECURITY,
"ã" = RADIO_CHANNEL_SUPPLY,
"ì" = RADIO_CHANNEL_SERVICE,
// Faction
"å" = "Syndicate",
"í" = "CentCom",
"å" = RADIO_CHANNEL_SYNDICATE,
"í" = RADIO_CHANNEL_CENTCOM,
// Admin
"ç" = "admin",
"â" = "deadmin",
"ç" = MODE_ADMIN,
"â" = MODE_ADMIN,
// Misc
"ù" = "AI Private",
"÷" = "cords"
"ù" = RADIO_CHANNEL_AI_PRIVATE,
"÷" = MODE_VOCALCORDS
))
/mob/living/proc/Ellipsis(original_msg, chance = 50, keep_words)
@@ -105,12 +105,12 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
if(findtext(message, " ", 1, 2))
message = copytext(message, 2)
if(message_mode == "admin")
if(message_mode == MODE_ADMIN)
if(client)
client.cmd_admin_say(message)
return
if(message_mode == "deadmin")
if(message_mode == MODE_DEADMIN)
if(client)
client.dsay(message)
return
@@ -61,7 +61,7 @@
var/mob/living/silicon/ai/calling_ai //Links a bot to the AI calling it.
var/obj/item/radio/Radio //The bot's radio, for speaking to people.
var/radio_key = null //which channels can the bot listen to
var/radio_channel = "Common" //The bot's default radio channel
var/radio_channel = RADIO_CHANNEL_COMMON //The bot's default radio channel
var/auto_patrol = 0// set to make bot automatically patrol
var/turf/patrol_target // this is turf to navigate to (location of beacon)
var/turf/summon_target // The turf of a user summoning a bot.
@@ -9,7 +9,7 @@
health = 25
maxHealth = 25
radio_key = /obj/item/encryptionkey/headset_service
radio_channel = "Service" //Service
radio_channel = RADIO_CHANNEL_SERVICE //Service
bot_type = CLEAN_BOT
model = "Cleanbot"
bot_core_type = /obj/machinery/bot_core/cleanbot
@@ -155,7 +155,7 @@
else
shuffle = TRUE //Shuffle the list the next time we scan so we dont both go the same way.
path = list()
if(!path || path.len == 0) //No path, need a new one
//Try to produce a path to the target, and ignore airlocks to which it has access.
path = get_path_to(src, target.loc, /turf/proc/Distance_cardinal, 0, 30, id=access_card)
@@ -13,7 +13,7 @@
mob_size = MOB_SIZE_LARGE
radio_key = /obj/item/encryptionkey/headset_sec
radio_channel = "Security"
radio_channel = RADIO_CHANNEL_SECURITY
bot_type = SEC_BOT
model = "ED-209"
bot_core = /obj/machinery/bot_core/secbot
@@ -16,7 +16,7 @@
spacewalk = TRUE
radio_key = /obj/item/encryptionkey/headset_eng
radio_channel = "Engineering"
radio_channel = RADIO_CHANNEL_ENGINEERING
bot_type = FIRE_BOT
model = "Firebot"
bot_core = /obj/machinery/bot_core/firebot
@@ -11,7 +11,7 @@
spacewalk = TRUE
radio_key = /obj/item/encryptionkey/headset_eng
radio_channel = "Engineering"
radio_channel = RADIO_CHANNEL_ENGINEERING
bot_type = FLOOR_BOT
model = "Floorbot"
bot_core = /obj/machinery/bot_core/floorbot
@@ -11,7 +11,6 @@
pass_flags = PASSMOB
radio_key = /obj/item/encryptionkey/headset_service //doesn't have security key
radio_channel = "Service" //Doesn't even use the radio anyway.
bot_type = HONK_BOT
model = "Honkbot"
bot_core_type = /obj/machinery/bot_core/honkbot
@@ -17,7 +17,7 @@
status_flags = (CANPUSH | CANSTUN)
radio_key = /obj/item/encryptionkey/headset_med
radio_channel = "Medical"
radio_channel = RADIO_CHANNEL_MEDICAL
bot_type = MED_BOT
model = "Medibot"
@@ -23,7 +23,7 @@
mob_size = MOB_SIZE_LARGE
radio_key = /obj/item/encryptionkey/headset_cargo
radio_channel = "Supply"
radio_channel = RADIO_CHANNEL_SUPPLY
bot_type = MULE_BOT
model = "MULE"
@@ -11,7 +11,7 @@
pass_flags = PASSMOB
radio_key = /obj/item/encryptionkey/secbot //AI Priv + Security
radio_channel = "Security" //Security channel
radio_channel = RADIO_CHANNEL_SECURITY //Security channel
bot_type = SEC_BOT
model = "Securitron"
bot_core_type = /obj/machinery/bot_core/secbot
@@ -61,7 +61,7 @@
/mob/living/simple_animal/bot/secbot/pingsky
name = "Officer Pingsky"
desc = "It's Officer Pingsky! Delegated to satellite guard duty for harbouring anti-human sentiment."
radio_channel = "AI Private"
radio_channel = RADIO_CHANNEL_AI_PRIVATE
/mob/living/simple_animal/bot/secbot/Initialize()
. = ..()
+15 -15
View File
@@ -241,23 +241,23 @@
clearlist(available_channels)
for(var/ch in headset_to_add.channels)
switch(ch)
if("Engineering")
available_channels.Add(":e")
if("Command")
available_channels.Add(":c")
if("Security")
available_channels.Add(":s")
if("Science")
available_channels.Add(":n")
if("Medical")
available_channels.Add(":m")
if("Supply")
available_channels.Add(":u")
if("Service")
available_channels.Add(":v")
if(RADIO_CHANNEL_ENGINEERING)
available_channels.Add(RADIO_TOKEN_ENGINEERING)
if(RADIO_CHANNEL_COMMAND)
available_channels.Add(RADIO_TOKEN_COMMAND)
if(RADIO_CHANNEL_SECURITY)
available_channels.Add(RADIO_TOKEN_SECURITY)
if(RADIO_CHANNEL_SCIENCE)
available_channels.Add(RADIO_TOKEN_SCIENCE)
if(RADIO_CHANNEL_MEDICAL)
available_channels.Add(RADIO_TOKEN_MEDICAL)
if(RADIO_CHANNEL_SUPPLY)
available_channels.Add(RADIO_TOKEN_SUPPLY)
if(RADIO_CHANNEL_SERVICE)
available_channels.Add(RADIO_TOKEN_SERVICE)
if(headset_to_add.translate_binary)
available_channels.Add(":b")
available_channels.Add(MODE_TOKEN_BINARY)
else
return ..()
+1 -1
View File
@@ -3,7 +3,7 @@
#define COOLDOWN_MEME 300
#define COOLDOWN_NONE 100
/obj/item/organ/vocal_cords //organs that are activated through speech with the :x channel
/obj/item/organ/vocal_cords //organs that are activated through speech with the :x/MODE_KEY_VOCALCORDS channel
name = "vocal cords"
icon_state = "appendix"
zone = BODY_ZONE_PRECISE_MOUTH