Added sanitize() to verb/me().

Enabled adminlogging of using robotic console.
Some admin messages are duplicated to log file now.
Fixed bug with ghosts sometimes not hearing people.
WIP stuff from Nikie:
a sprite for detective's armor
an alternative sprite for SWAT armor


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1391 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
rastaf.zero@gmail.com
2011-04-06 08:47:51 +00:00
parent e45b13ebd7
commit e074166845
18 changed files with 46 additions and 28 deletions
+2
View File
@@ -177,6 +177,7 @@
if (!src.state && stage == 2 && !crit_fail)
user << "\red You prime the grenade! 3 seconds!"
message_admins("[key_name_admin(user)] used a chemistry grenade ([src.name]).")
log_game("[key_name_admin(user)] used a chemistry grenade ([src.name]).")
src.state = 1
src.icon_state = initial(icon_state)+"_armed"
playsound(src.loc, 'armbomb.ogg', 75, 1, -3)
@@ -192,6 +193,7 @@
if (!src.state && stage == 2 && !crit_fail)
user << "\red You prime the grenade! 3 seconds!"
message_admins("[key_name_admin(user)] used a chemistry grenade ([src.name]).")
log_game("[key_name_admin(user)] used a chemistry grenade ([src.name]).")
src.state = 1
src.icon_state = initial(icon_state)+"_armed"
playsound(src.loc, 'armbomb.ogg', 75, 1, -3)
@@ -204,4 +204,5 @@
if(blobstart.len > 0)
var/obj/D = new /obj/item/weapon/disk/nuclear(pick(blobstart))
message_admins("[src] has been destroyed. Spawning [D] at ([D.x], [D.y], [D.z]).")
log_game("[src] has been destroyed. Spawning [D] at ([D.x], [D.y], [D.z]).")
..()
@@ -38,7 +38,7 @@
if(!input)
return
captain_announce(input)
log_admin("[key_name(usr)] has made a captain announcement: [input]")
log_say("[key_name(usr)] has made a captain announcement: [input]")
message_admins("[key_name_admin(usr)] has made a captain announcement.", 1)
if("call-prison")
call_prison_shuttle(usr)
@@ -424,7 +424,7 @@
// These modes are no longer used so I am commenting them out. N
emergency_shuttle.incall()
log_admin("[key_name(user)] has called the shuttle.")
log_game("[key_name(user)] has called the shuttle.")
message_admins("[key_name_admin(user)] has called the shuttle.", 1)
world << "\blue <B>Alert: The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.</B>"
world << sound('shuttlecalled.ogg')
@@ -438,7 +438,7 @@
return
emergency_shuttle.recall()
log_admin("[key_name(user)] has uncalled the shuttle.")
log_game("[key_name(user)] has uncalled the shuttle.")
message_admins("[key_name_admin(user)] has uncalled the shuttle.", 1)
return
@@ -120,6 +120,7 @@
if(prob(95))
R.gib()
message_admins("\blue [key_name_admin(usr)] killswitched [R.name]")
log_game("[key_name(usr)] killswitched [R.name]")
else
R << "\blue you hear a click as the implant fails to detonate and disintegrates."
+6 -1
View File
@@ -147,6 +147,7 @@
if(src.check_access(I))
if (!status)
message_admins("\blue [key_name_admin(usr)] has initiated the global cyborg killswitch!")
log_game("\blue [key_name(usr)] has initiated the global cyborg killswitch!")
src.status = 1
src.start_sequence()
src.temp = null
@@ -186,6 +187,7 @@
if(choice == "Confirm")
if(R)
message_admins("\blue [key_name_admin(usr)] detonated [R.name]!")
log_game("\blue [key_name_admin(usr)] detonated [R.name]!")
R.self_destruct()
else
usr << "\red Access Denied."
@@ -197,7 +199,8 @@
var/choice = input("Are you certain you wish to [R.canmove ? "lock down" : "release"] [R.name]?") in list("Confirm", "Abort")
if(choice == "Confirm")
if(R)
// message_admins("\blue [key_name_admin(usr)] [R.canmove ? "locked down" : "released"] [R.name]!")
message_admins("\blue [key_name_admin(usr)] [R.canmove ? "locked down" : "released"] [R.name]!")
log_game("[key_name(usr)] [R.canmove ? "locked down" : "released"] [R.name]!")
R.canmove = !R.canmove
if (R.lockcharge)
// R.cell.charge = R.lockcharge
@@ -218,6 +221,8 @@
var/choice = input("Are you certain you wish to hack [R.name]?") in list("Confirm", "Abort")
if(choice == "Confirm")
if(R)
message_admins("\blue [key_name_admin(usr)] emagged [R.name] using robotic console!")
log_game("[key_name(usr)] emagged [R.name] using robotic console!")
R.emagged = 1
src.add_fingerprint(usr)
+1
View File
@@ -117,6 +117,7 @@ var/list/cultists = list()
S.pixel_x = -89
S.pixel_y = -85
message_admins("<h1><font color=\"purple\"><b><u>[key_name_admin(usr)] has summoned a Tear in the Fabric of Reality!", 1)
log_game("[key_name_admin(usr)] has summoned a Tear in the Fabric of Reality!")
return
else
return fizzle()
+5 -4
View File
@@ -43,6 +43,7 @@
bombers += "[key_name(user)] attached a [item] to a transfer valve."
message_admins("[key_name_admin(user)] attached a [item] to a transfer valve.")
log_game("[key_name_admin(user)] attached a [item] to a transfer valve.")
attacher = key_name(user)
@@ -163,10 +164,10 @@
valve_open = 1
var/turf/bombturf = get_turf(src)
var/bombarea = bombturf.loc.name
bombers += "Bomb valve opened in [bombarea] with device attacher: [attacher]. Last touched by: [src.fingerprintslast]"
message_admins("Bomb valve opened in [bombarea] with device attacher: [attacher]. Last touched by: [src.fingerprintslast]")
var/log_str = "Bomb valve opened in [bombarea] with device attacher: [attacher]. Last touched by: [src.fingerprintslast]"
bombers += log_str
message_admins(log_str)
log_game(log_str)
merge_gases()
spawn(20) // In case one tank bursts
for (var/i=0,i<5,i++)
+1
View File
@@ -2,6 +2,7 @@ proc/empulse(turf/epicenter, heavy_range, light_range, nolog=0)
if(!epicenter) return
if (!nolog)
message_admins("EMP with size ([heavy_range], [light_range]) in area [epicenter.loc.name] ")
log_game("EMP with size ([heavy_range], [light_range]) in area [epicenter.loc.name] ")
if (!istype(epicenter, /turf))
epicenter = get_turf(epicenter.loc)
+6
View File
@@ -76,10 +76,13 @@ DNA INJECTOR
if (dnatype == "se")
if (isblockon(getblock(dna, 14,3),14) && istype(M, /mob/living/carbon/human))
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [src.name] \red(MONKEY)")
log_game("[key_name(user)] injected [key_name(M)] with the [src.name] (MONKEY)")
else
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [src.name]")
log_game("[key_name(user)] injected [key_name(M)] with the [src.name]")
else
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [src.name]")
log_game("[key_name(user)] injected [key_name(M)] with the [src.name]")
spawn( 0 )
O.process()
@@ -95,9 +98,12 @@ DNA INJECTOR
if (dnatype == "se")
if (isblockon(getblock(dna, 14,3),14) && istype(M, /mob/living/carbon/human))
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [src.name] \red(MONKEY)")
log_game("[key_name(user)] injected [key_name(M)] with the [src.name] (MONKEY)")
else
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [src.name]")
log_game("[key_name(user)] injected [key_name(M)] with the [src.name]")
else
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [src.name]")
log_game("[key_name(user)] injected [key_name(M)] with the [src.name]")
user.show_message(text("\red You inject [M]"))
return
+1
View File
@@ -175,6 +175,7 @@ WELDINGTOOOL
return
else if (istype(O, /obj/reagent_dispensers/fueltank) && get_dist(src,O) <= 1 && src.welding)
message_admins("[key_name_admin(user)] triggered a fueltank explosion.")
log_game("[key_name(user)] triggered a fueltank explosion.")
user << "\red That was stupid of you."
explosion(O.loc,-1,0,2)
if(O)
+1
View File
@@ -108,6 +108,7 @@
if(pressure > TANK_FRAGMENT_PRESSURE)
if(!istype(src.loc,/obj/item/device/transfer_valve))
message_admins("Explosive tank rupture! last key to touch the tank was [src.fingerprintslast].")
log_game("Explosive tank rupture! last key to touch the tank was [src.fingerprintslast].")
//world << "\blue[x],[y] tank is exploding: [pressure] kPa"
//Give the gas a chance to build up more pressure through reacting
air_contents.react()
@@ -67,6 +67,7 @@
//Traitor's dead! Oh no!
if (ticker.mode.name == "traitor" && src.mind && src.mind.special_role == "traitor")
message_admins("\red Traitor [key_name_admin(src)] has died.")
log_game("Traitor [key_name(src)] has died.")
var/cancel
for (var/mob/M in world)
+11 -20
View File
@@ -245,13 +245,19 @@
var/list/V = view(message_range, T)
//find mobs in lockers, cryo and intellycards
for (var/mob/M in world)
if (isturf(M.loc))
continue //if M can hear us it was already found by hearers()
if (!M.client)
continue //skip monkeys and leavers
if (get_turf(M) in V) //this slow, but I don't think we'd have a lot of wardrobewhores every round --rastaf0
listening+=M
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.ghost_ears && !(M in listening))
listening+=M
for (var/obj/O in ((V | src.contents)-used_radios)) //radio in pocket could work, radio in backpack wouldn't --rastaf0
spawn (0)
if (O)
@@ -305,19 +311,4 @@
for (var/mob/M in heard_b)
M.show_message(rendered, 2)
message = src.say_quote(message)
if (italics)
message = "<i>[message]</i>"
if (!istype(src, /mob/living/carbon/human) || istype(src.wear_mask, /obj/item/clothing/mask/gas/voice))
rendered = "<span class='game say'><span class='name'>[src.name]</span> <span class='message'>[message]</span></span>"
else
rendered = "<span class='game say'><span class='name'>[src.real_name]</span>[alt_name] <span class='message'>[message]</span></span>"
for (var/mob/M in world)
if (istype(M, /mob/new_player))
continue
if (M.stat >= 2 && !(M in heard_a) && M.ghost_ears)
M.show_message(rendered, 2)
log_say("[src.name]/[src.key] : [message]")
@@ -467,6 +467,7 @@
connected_ai = null
user << "You emag [src]'s interface."
message_admins("[key_name_admin(user)] emagged cyborg [key_name_admin(src)]. Laws overridden.")
log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.")
clear_supplied_laws()
clear_inherent_laws()
src.laws = new /datum/ai_laws/syndicate_override
+4
View File
@@ -1365,6 +1365,10 @@
set category = "OOC"
set desc = "Hear talks from everywhere"
src.ghost_ears = !src.ghost_ears
if (ghost_ears)
usr << "Now you hear all speech in world"
else
usr << "Now you hear speech only from nearest creatures."
/mob/verb/observe()
set name = "Observe"
+1
View File
@@ -14,6 +14,7 @@
/mob/verb/me_verb(message as text)
set name = "Me"
set category = "IC"
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
usr.emote("me",1,message)
/mob/proc/say_dead(var/message)