- 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.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3763 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
baloh.matevz
2012-06-08 07:45:16 +00:00
parent 39a775c78c
commit a14a9aac27
7 changed files with 91 additions and 175 deletions
@@ -113,62 +113,7 @@
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 hand",
":L" = "left hand",
":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.
":ê" = "right hand",
":ä" = "left hand",
":ø" = "intercom",
":ð" = "department",
":ñ" = "Command",
":ò" = "Science",
":ü" = "Medical",
":ó" = "Engineering",
":û" = "Security",
":ö" = "whisper",
":è" = "binary",
":ô" = "alientalk",
":å" = "Syndicate",
":â" = "Mining",
":é" = "Cargo",
":ï" = "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))
@@ -5,6 +5,9 @@
if (!message)
return
if (silent)
return
log_whisper("[src.name]/[src.key] : [message]")
if (src.client && (src.client.muted || src.client.muted_complete))
@@ -5,6 +5,9 @@
if (!message)
return
if (silent)
return
log_whisper("[src.name]/[src.key] : [message]")
if (src.client && (src.client.muted || src.client.muted_complete))
+60 -106
View File
@@ -1,3 +1,59 @@
var/list/department_radio_keys = list(
":r" = "right hand",
":l" = "left hand",
":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 hand",
":L" = "left hand",
":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.
":ê" = "right hand",
":ä" = "left hand",
":ø" = "intercom",
":ð" = "department",
":ñ" = "Command",
":ò" = "Science",
":ü" = "Medical",
":ó" = "Engineering",
":û" = "Security",
":ö" = "whisper",
":è" = "binary",
":ô" = "alientalk",
":å" = "Syndicate",
":â" = "Mining",
":é" = "Cargo",
":ï" = "changeling"
)
/mob/living/proc/binarycheck()
if (istype(src, /mob/living/silicon/pai))
return
@@ -40,7 +96,7 @@
src << "You are muted."
return
// wtf?
// stat == 2 is handled above, so this stops transmission of uncontious messages
if (stat)
return
@@ -70,73 +126,18 @@
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 hand",
":l" = "left hand",
":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 hand",
":L" = "left hand",
":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.
":ê" = "right hand",
":ä" = "left hand",
":ø" = "intercom",
":ð" = "department",
":ñ" = "Command",
":ò" = "Science",
":ü" = "Medical",
":ó" = "Engineering",
":û" = "Security",
":ö" = "whisper",
":è" = "binary",
":ô" = "alientalk",
":å" = "Syndicate",
":â" = "Mining",
":é" = "Cargo",
":ï" = "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)) && (message_mode=="department" || (message_mode in radiochannels)))
if (!(ishuman(src) || isanimal(src) && (message_mode=="department" || (message_mode in radiochannels))))
message_mode = null //only humans can use headsets
// Check removed so parrots can use headsets!
@@ -263,50 +264,6 @@
/////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)
//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)
@@ -321,9 +278,6 @@
var/list/V = view(message_range, T)
var/list/W = V
for (var/obj/O in ((W | contents)-used_radios))
W |= O
+1 -10
View File
@@ -4,21 +4,12 @@
/obj/item/weapon/cell/New()
..()
charge = charge * maxcharge/100.0 // map obj has charge as percentage, convert to real value here
charge = maxcharge
spawn(5)
updateicon()
/obj/item/weapon/cell/proc/updateicon()
/*if(maxcharge < 10000)
icon_state = "cell"
if(maxcharge >= 10000 && maxcharge < 20000)
icon_state = "hcell"
if(maxcharge >= 20000 && maxcharge < 30000)
icon_state = "scell"
else
icon_state = "hpcell"*/
overlays = null