* Admins can now bypass the vote creation cooldown.

* Messages in a mob's say_log var are now timestamped and include the coordinates of the mob at the time.
* Fix oil slime extract explosion reaction not being logged.
* Fixes lack of log for reagent explosion.
* Mob's attack_log now show when the mob was electrocuted. Doors get an electrification log when electrified (including via an EMP).
* Fixes gibself admin log showing null instead of the key.
This commit is contained in:
phil235
2016-04-29 18:21:53 +02:00
parent f1737eed34
commit 4efb343d77
12 changed files with 45 additions and 19 deletions
+1 -1
View File
@@ -147,7 +147,7 @@ var/datum/subsystem/vote/SSvote
if(!mode)
if(started_time != null)
var/next_allowed_time = (started_time + config.vote_delay)
if(next_allowed_time > world.time)
if(next_allowed_time > world.time && !check_rights_for(usr.client,R_ADMIN))
return 0
reset()
+1 -1
View File
@@ -155,7 +155,7 @@ var/list/diseases = subtypesof(/datum/disease)
if(disease_flags & CAN_RESIST)
if(!(type in affected_mob.resistances))
affected_mob.resistances += type
remove_virus()
remove_virus()
qdel(src)
@@ -163,6 +163,7 @@
AL.close()
AL.bolt() //Bolt it!
AL.secondsElectrified = -1 //Shock it!
AL.shockedby += "\[[time_stamp()]\][src](ckey:[src.ckey])"
else if(!D.stat) //So that only powered doors are closed.
D.close() //Close ALL the doors!
-1
View File
@@ -4,7 +4,6 @@
/obj/machinery/door/airlock
var/id_tag
var/frequency
var/shockedby = list()
var/datum/radio_frequency/radio_connection
+3 -3
View File
@@ -724,8 +724,8 @@ var/list/airlock_overlays = list()
else if(src.secondsElectrified!=0)
usr << text("The door is already electrified. You can't re-electrify it while it's already electrified.<br>\n")
else
shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])")
add_logs(usr, src, "electrified", addition="at [x],[y],[z]")
shockedby += "\[[time_stamp()]\][usr](ckey:[usr.ckey])"
add_logs(usr, src, "electrified")
src.secondsElectrified = 30
spawn(10)
while (src.secondsElectrified>0)
@@ -744,7 +744,7 @@ var/list/airlock_overlays = list()
usr << text("The door is already electrified. You can't re-electrify it while it's already electrified.<br>\n")
else
shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])")
add_logs(usr, src, "electrified", addition="at [x],[y],[z]")
add_logs(usr, src, "electrified")
src.secondsElectrified = -1
if (8) // Not in order >.>
+2
View File
@@ -10,6 +10,7 @@
power_channel = ENVIRON
var/secondsElectrified = 0
var/shockedby = list()
var/visible = 1
var/operating = 0
var/glass = 0
@@ -191,6 +192,7 @@ obj/machinery/door/proc/try_to_crowbar(obj/item/I, mob/user)
if(prob(40/severity))
if(secondsElectrified == 0)
secondsElectrified = -1
shockedby += "\[[time_stamp()]\]EM Pulse"
spawn(300)
secondsElectrified = 0
..()
+1 -5
View File
@@ -608,14 +608,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
if(confirm == "Yes")
if (istype(mob, /mob/dead/observer)) // so they don't spam gibs everywhere
return
else
mob.gib(no_brain = 1)
log_admin("[key_name(usr)] used gibself.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] used gibself.</span>")
feedback_add_details("admin_verb","GIBS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
mob.gib(no_brain = 1)
/client/proc/cmd_admin_check_contents(mob/living/M in mob_list)
set category = "Special Verbs"
+6 -1
View File
@@ -60,7 +60,12 @@
D.locked = !D.locked
D.update_icon()
if(specialfunctions & SHOCK)
D.secondsElectrified = D.secondsElectrified ? 0 : -1
if(D.secondsElectrified)
D.secondsElectrified = -1
D.shockedby += "\[[time_stamp()]\][usr](ckey:[usr.ckey])"
add_logs(usr, D, "electrified")
else
D.secondsElectrified = 0
if(specialfunctions & SAFE)
D.safe = !D.safe
sleep(10)
+6 -2
View File
@@ -98,8 +98,13 @@ var/list/crit_allowed_modes = list(MODE_WHISPER,MODE_CHANGELING,MODE_ALIEN)
if(!message)
return
var/turf/T = get_turf(src)
var/logged_msg = "\[[time_stamp()]\] [message]"
if(T)
logged_msg += " ([T.x], [T.y], [T.z])"
//Log of what we've said, plain message, no spans or junk
say_log += message
say_log += logged_msg
var/message_range = 7
var/radio_return = radio(message, message_mode, spans)
@@ -111,7 +116,6 @@ var/list/crit_allowed_modes = list(MODE_WHISPER,MODE_CHANGELING,MODE_ALIEN)
message_range = 1
//No screams in space, unless you're next to someone.
var/turf/T = get_turf(src)
var/datum/gas_mixture/environment = T.return_air()
var/pressure = (environment)? environment.return_pressure() : 0
if(pressure < SOUND_MINIMUM_PRESSURE)
+2
View File
@@ -327,6 +327,8 @@
power_source = cell
shock_damage = cell_damage
var/drained_hp = M.electrocute_act(shock_damage, source, siemens_coeff) //zzzzzzap!
add_logs(source, M, "electrocuted")
var/drained_energy = drained_hp*20
if (source_area)
@@ -6,9 +6,20 @@
var/modifier = 0
/datum/chemical_reaction/reagent_explosion/on_reaction(datum/reagents/holder, created_volume)
var/location = get_turf(holder.my_atom)
var/turf/T = get_turf(holder.my_atom)
var/inside_msg
if(ismob(holder.my_atom))
var/mob/M = holder.my_atom
inside_msg = " inside [key_name_admin(M)]"
var/lastkey = holder.my_atom.fingerprintslast
var/touch_msg = "N/A"
if(lastkey)
var/mob/toucher = get_mob_by_key(lastkey)
touch_msg = "[key_name_admin(lastkey)]<A HREF='?_src_=holder;adminmoreinfo=\ref[toucher]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[toucher]'>FLW</A>)"
message_admins("Reagent explosion reaction occured at <a href='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>[T.loc.name] (JMP)</a>[inside_msg]. Last Fingerprint: [touch_msg].")
log_game("Reagent explosion reaction occured at [T.loc.name] ([T.x],[T.y],[T.z]). Last Fingerprint: [lastkey ? lastkey : "N/A"]." )
var/datum/effect_system/reagents_explosion/e = new()
e.set_up(modifier + round(created_volume/strengthdiv, 1), location, 0, 0)
e.set_up(modifier + round(created_volume/strengthdiv, 1), T, 0, 0)
e.start()
holder.clear_reagents()
@@ -66,9 +77,8 @@
C.Weaken(2)
C.adjust_fire_stacks(5)
C.IgniteMob()
..()
else
..()
..()
/datum/chemical_reaction/blackpowder
name = "Black Powder"
@@ -494,6 +494,13 @@
/datum/chemical_reaction/slimeexplosion/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/turf/T = get_turf(holder.my_atom)
var/lastkey = holder.my_atom.fingerprintslast
var/touch_msg = "N/A"
if(lastkey)
var/mob/toucher = get_mob_by_key(lastkey)
touch_msg = "[key_name_admin(lastkey)]<A HREF='?_src_=holder;adminmoreinfo=\ref[toucher]'>?</A>(<A HREF='?_src_=holder;adminplayerobservefollow=\ref[toucher]'>FLW</A>)."
message_admins("Slime Explosion reaction started at <a href='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>[T.loc.name] (JMP)</a>. Last Fingerprint: [touch_msg]")
log_game("Slime Explosion reaction started at [T.loc.name] ([T.x],[T.y],[T.z]). Last Fingerprint: [lastkey ? lastkey : "N/A"].")
T.visible_message("<span class='danger'>The slime extract begins to vibrate violently !</span>")
spawn(50)
if(holder && holder.my_atom)