mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +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:
@@ -115,62 +115,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.
|
||||
":<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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -1356,12 +1356,20 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
|
||||
maxcharge = 500
|
||||
g_amt = 40
|
||||
|
||||
/obj/item/weapon/cell/crap/empty/New()
|
||||
..()
|
||||
charge = 0
|
||||
|
||||
/obj/item/weapon/cell/secborg
|
||||
name = "\improper Security borg rechargable D battery"
|
||||
origin_tech = "powerstorage=0"
|
||||
maxcharge = 600 //600 max charge / 100 charge per shot = six shots
|
||||
g_amt = 40
|
||||
|
||||
/obj/item/weapon/cell/secborg/empty/New()
|
||||
..()
|
||||
charge = 0
|
||||
|
||||
/obj/item/weapon/cell/high
|
||||
name = "high-capacity power cell"
|
||||
origin_tech = "powerstorage=2"
|
||||
@@ -1369,6 +1377,10 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
|
||||
maxcharge = 10000
|
||||
g_amt = 60
|
||||
|
||||
/obj/item/weapon/cell/high/empty/New()
|
||||
..()
|
||||
charge = 0
|
||||
|
||||
/obj/item/weapon/cell/super
|
||||
name = "super-capacity power cell"
|
||||
origin_tech = "powerstorage=5"
|
||||
@@ -1377,6 +1389,10 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
|
||||
g_amt = 70
|
||||
construction_cost = list("metal"=750,"glass"=100)
|
||||
|
||||
/obj/item/weapon/cell/super/empty/New()
|
||||
..()
|
||||
charge = 0
|
||||
|
||||
/obj/item/weapon/cell/hyper
|
||||
name = "hyper-capacity power cell"
|
||||
origin_tech = "powerstorage=6"
|
||||
@@ -1385,6 +1401,10 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
|
||||
g_amt = 80
|
||||
construction_cost = list("metal"=500,"glass"=150,"gold"=200,"silver"=200)
|
||||
|
||||
/obj/item/weapon/cell/hyper/empty/New()
|
||||
..()
|
||||
charge = 0
|
||||
|
||||
/obj/item/weapon/cell/infinite
|
||||
name = "infinite-capacity power cell!"
|
||||
icon_state = "icell"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user