mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-14 12:13:06 +00:00
TG: - Department radio keys are now a global list and no longer a list that gets
created every single time 'say :X' is used - You can no longer whisper when stung by a changeling or had another thing make your 'silent' var get set. - Added a single empty toolbelt to robotics, added a wrench and screwdriver to toxins. - Power cells now always spawn full. The double use of the 'charge' variable was not good, as when creating the map it had a value of 0 - 100 to represent the percentage of the cell's power, while it was used as a numeric representation of the amper-hours that were still left in the cell. The problem this caused was that cells created mid-round (cells which spawned in closets or were spawned by admins) always started empty. They all start fully charged now. Additional obj/item/weapon/cell/X/empty types were added if we want empty cells. Revision: r3763 Author: baloh.matevz
This commit is contained in:
@@ -1,3 +1,59 @@
|
||||
|
||||
var/list/department_radio_keys = list(
|
||||
":r" = "right ear",
|
||||
":l" = "left ear",
|
||||
":i" = "intercom",
|
||||
":h" = "department",
|
||||
":c" = "Command",
|
||||
":n" = "Science",
|
||||
":m" = "Medical",
|
||||
":e" = "Engineering",
|
||||
":s" = "Security",
|
||||
":w" = "whisper",
|
||||
":b" = "binary",
|
||||
":a" = "alientalk",
|
||||
":t" = "Syndicate",
|
||||
":d" = "Mining",
|
||||
":q" = "Cargo",
|
||||
":g" = "changeling",
|
||||
|
||||
":R" = "right ear",
|
||||
":L" = "left ear",
|
||||
":I" = "intercom",
|
||||
":H" = "department",
|
||||
":C" = "Command",
|
||||
":N" = "Science",
|
||||
":M" = "Medical",
|
||||
":E" = "Engineering",
|
||||
":S" = "Security",
|
||||
":W" = "whisper",
|
||||
":B" = "binary",
|
||||
":A" = "alientalk",
|
||||
":T" = "Syndicate",
|
||||
":D" = "Mining",
|
||||
":Q" = "Cargo",
|
||||
":G" = "changeling",
|
||||
|
||||
//kinda localization -- rastaf0
|
||||
//same keys as above, but on russian keyboard layout. This file uses cp1251 as encoding.
|
||||
":<3A>" = "right hand",
|
||||
":<3A>" = "left hand",
|
||||
":<3A>" = "intercom",
|
||||
":<3A>" = "department",
|
||||
":<3A>" = "Command",
|
||||
":<3A>" = "Science",
|
||||
":<3A>" = "Medical",
|
||||
":<3A>" = "Engineering",
|
||||
":<3A>" = "Security",
|
||||
":<3A>" = "whisper",
|
||||
":<3A>" = "binary",
|
||||
":<3A>" = "alientalk",
|
||||
":<3A>" = "Syndicate",
|
||||
":<3A>" = "Mining",
|
||||
":<3A>" = "Cargo",
|
||||
":<3A>" = "changeling"
|
||||
)
|
||||
|
||||
/mob/living/proc/binarycheck()
|
||||
if (istype(src, /mob/living/silicon/pai))
|
||||
return
|
||||
@@ -53,7 +109,7 @@
|
||||
src << "You are muted."
|
||||
return
|
||||
|
||||
// wtf?
|
||||
// stat == 2 is handled above, so this stops transmission of uncontious messages
|
||||
if (stat)
|
||||
return
|
||||
|
||||
@@ -84,75 +140,20 @@
|
||||
else if (copytext(message, 1, 2) == ";")
|
||||
if (ishuman(src))
|
||||
message_mode = "headset"
|
||||
else if(istype(src, /mob/living/silicon/pai) || istype(src, /mob/living/silicon/robot))
|
||||
else if(ispAI(src) || isrobot(src))
|
||||
message_mode = "pAI"
|
||||
message = copytext(message, 2)
|
||||
|
||||
else if (length(message) >= 2)
|
||||
var/channel_prefix = copytext(message, 1, 3)
|
||||
|
||||
var/list/keys = list(
|
||||
":r" = "right ear",
|
||||
":l" = "left ear",
|
||||
":i" = "intercom",
|
||||
":h" = "department",
|
||||
":c" = "Command",
|
||||
":n" = "Science",
|
||||
":m" = "Medical",
|
||||
":e" = "Engineering",
|
||||
":s" = "Security",
|
||||
":w" = "whisper",
|
||||
":b" = "binary",
|
||||
":a" = "alientalk",
|
||||
":t" = "Syndicate",
|
||||
":d" = "Mining",
|
||||
":q" = "Cargo",
|
||||
":g" = "changeling",
|
||||
|
||||
":R" = "right ear",
|
||||
":L" = "left ear",
|
||||
":I" = "intercom",
|
||||
":H" = "department",
|
||||
":C" = "Command",
|
||||
":N" = "Science",
|
||||
":M" = "Medical",
|
||||
":E" = "Engineering",
|
||||
":S" = "Security",
|
||||
":W" = "whisper",
|
||||
":B" = "binary",
|
||||
":A" = "alientalk",
|
||||
":T" = "Syndicate",
|
||||
":D" = "Mining",
|
||||
":Q" = "Cargo",
|
||||
":G" = "changeling",
|
||||
|
||||
//kinda localization -- rastaf0
|
||||
//same keys as above, but on russian keyboard layout. This file uses cp1251 as encoding.
|
||||
":<3A>" = "right hand",
|
||||
":<3A>" = "left hand",
|
||||
":<3A>" = "intercom",
|
||||
":<3A>" = "department",
|
||||
":<3A>" = "Command",
|
||||
":<3A>" = "Science",
|
||||
":<3A>" = "Medical",
|
||||
":<3A>" = "Engineering",
|
||||
":<3A>" = "Security",
|
||||
":<3A>" = "whisper",
|
||||
":<3A>" = "binary",
|
||||
":<3A>" = "alientalk",
|
||||
":<3A>" = "Syndicate",
|
||||
":<3A>" = "Mining",
|
||||
":<3A>" = "Cargo",
|
||||
":<3A>" = "changeling",
|
||||
)
|
||||
|
||||
message_mode = keys[channel_prefix]
|
||||
message_mode = department_radio_keys[channel_prefix]
|
||||
//world << "channel_prefix=[channel_prefix]; message_mode=[message_mode]"
|
||||
if (message_mode)
|
||||
message = trim(copytext(message, 3))
|
||||
if (!(ishuman(src) || istype(src, /mob/living/simple_animal/parrot)) && (message_mode=="department" || (message_mode in radiochannels) || message_mode == "right ear" || message_mode == "left ear"))
|
||||
if (!(ishuman(src) || isanimal(src) && (message_mode=="department" || (message_mode in radiochannels) || message_mode == "right ear" || message_mode == "left ear")))
|
||||
message_mode = null //only humans can use headsets
|
||||
// Parrots can also use headsets!
|
||||
// Check removed so parrots can use headsets!
|
||||
|
||||
if (!message)
|
||||
return
|
||||
@@ -315,51 +316,7 @@
|
||||
/////SPECIAL HEADSETS END
|
||||
|
||||
var/list/listening
|
||||
/*
|
||||
if(istype(loc, /obj/item/device/aicard)) // -- TLE
|
||||
var/obj/O = loc
|
||||
if(istype(O.loc, /mob))
|
||||
var/mob/M = O.loc
|
||||
listening = hearers(message_range, M)
|
||||
else
|
||||
listening = hearers(message_range, O)
|
||||
else
|
||||
listening = hearers(message_range, src)
|
||||
|
||||
for (var/obj/O in view(message_range, src))
|
||||
for (var/mob/M in O)
|
||||
listening += M // maybe need to check if M can hear src
|
||||
spawn (0)
|
||||
if (O)
|
||||
O.hear_talk(src, message)
|
||||
|
||||
if (!(src in listening))
|
||||
listening += src
|
||||
|
||||
*/
|
||||
/* Handing this section over to get_mobs_in_view which was written with radiocode update
|
||||
var/turf/T = get_turf(src)
|
||||
listening = hearers(message_range, T)
|
||||
for (var/O in listening)
|
||||
world << O
|
||||
var/list/V = view(message_range, T)
|
||||
var/list/W = V
|
||||
//find mobs in lockers, cryo, intellicards, brains, MMIs, and so on.
|
||||
for (var/mob/M in world)
|
||||
if (!M.client)
|
||||
continue //skip monkeys and leavers
|
||||
if (istype(M, /mob/new_player))
|
||||
continue
|
||||
if (M.stat <2) //is alive
|
||||
if (isturf(M.loc))
|
||||
continue //if M can hear us it was already found by hearers()
|
||||
if (get_turf(M) in V) //this is slow, but I don't think we'd have a lot of wardrobewhores every round --rastaf0
|
||||
listening+=M
|
||||
else
|
||||
if (M.client && M.client.ghost_ears)
|
||||
listening|=M
|
||||
|
||||
*/
|
||||
listening = get_mobs_in_view(message_range, src)
|
||||
for(var/mob/M in world)
|
||||
if (!M.client)
|
||||
|
||||
Reference in New Issue
Block a user