Admin teleport update, further admin message fixes

This commit is contained in:
Markolie
2015-08-18 00:54:25 +02:00
parent 23237582a9
commit 4e8bb6d301
34 changed files with 155 additions and 126 deletions
+47 -32
View File
@@ -1,30 +1,39 @@
/client/proc/Jump(var/area/A in return_sorted_areas())
/client/proc/Jump(area/A in return_sorted_areas())
set name = "Jump to Area"
set desc = "Area to jump to"
set category = "Admin"
if(!src.holder)
src << "Only administrators may use this command."
if(!check_rights(R_ADMIN))
return
var/list/area_turfs = get_area_turfs(A)
if(area_turfs && area_turfs.len)
usr.loc = pick(area_turfs)
else
src << "That area has no turfs to jump to!"
if(!A)
return
var/list/turfs = list()
for(var/turf/T in A)
if(T.density)
continue
turfs.Add(T)
var/turf/T = pick_n_take(turfs)
if(!T)
src << "Nowhere to jump to!"
return
admin_forcemove(usr, T)
log_admin("[key_name(usr)] jumped to [A]")
message_admins("[key_name_admin(usr)] jumped to [A]", 1)
message_admins("[key_name_admin(usr)] jumped to [A]")
feedback_add_details("admin_verb","JA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/jumptoturf(var/turf/T in world)
set name = "Jump to Turf"
set category = "Admin"
if(!src.holder)
src << "Only administrators may use this command."
if(!check_rights(R_ADMIN))
return
log_admin("[key_name(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
message_admins("[key_name_admin(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]", 1)
log_admin("[key_name(usr)] jumped to [T.x], [T.y], [T.z] in [T.loc]")
message_admins("[key_name_admin(usr)] jumped to [T.x], [T.y], [T.z] in [T.loc]", 1)
usr.loc = T
feedback_add_details("admin_verb","JT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
@@ -33,8 +42,7 @@
set category = "Admin"
set name = "Jump to Mob"
if(!src.holder)
src << "Only administrators may use this command."
if(!check_rights(R_ADMIN))
return
log_admin("[key_name(usr)] jumped to [key_name(M)]")
@@ -44,7 +52,7 @@
var/turf/T = get_turf(M)
if(T && isturf(T))
feedback_add_details("admin_verb","JM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
A.loc = T
admin_forcemove(A, M.loc)
else
A << "This mob is not located in the game world."
@@ -52,8 +60,7 @@
set category = "Admin"
set name = "Jump to Coordinate"
if (!holder)
src << "Only administrators may use this command."
if(!check_rights(R_ADMIN))
return
if(src.mob)
@@ -68,8 +75,7 @@
set category = "Admin"
set name = "Jump to Key"
if(!src.holder)
src << "Only administrators may use this command."
if(!check_rights(R_ADMIN))
return
var/list/keys = list()
@@ -82,20 +88,22 @@
var/mob/M = selection:mob
log_admin("[key_name(usr)] jumped to [key_name(M)]")
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
usr.loc = M.loc
admin_forcemove(usr, M.loc)
feedback_add_details("admin_verb","JK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/Getmob(var/mob/M in mob_list)
set category = "Admin"
set name = "Get Mob"
set desc = "Mob to teleport"
if(!src.holder)
src << "Only administrators may use this command."
if(!check_rights(R_ADMIN))
return
log_admin("[key_name(usr)] teleported [key_name(M)]")
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)]", 1)
M.loc = get_turf(usr)
admin_forcemove(M, get_turf(usr))
feedback_add_details("admin_verb","GM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/Getkey()
@@ -103,8 +111,7 @@
set name = "Get Key"
set desc = "Key to teleport"
if(!src.holder)
src << "Only administrators may use this command."
if(!check_rights(R_ADMIN))
return
var/list/keys = list()
@@ -120,19 +127,27 @@
log_admin("[key_name(usr)] teleported [key_name(M)]")
message_admins("[key_name_admin(usr)] teleported [key_name(M)]", 1)
if(M)
M.loc = get_turf(usr)
admin_forcemove(M, get_turf(usr))
usr.loc = M.loc
feedback_add_details("admin_verb","GK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/sendmob(var/mob/M in sortmobs())
set category = "Admin"
set name = "Send Mob"
if(!src.holder)
src << "Only administrators may use this command."
if(!check_rights(R_ADMIN))
return
var/area/A = input(usr, "Pick an area.", "Pick an area") in return_sorted_areas()
if(A)
M.loc = pick(get_area_turfs(A))
admin_forcemove(M, pick(get_area_turfs(A)))
feedback_add_details("admin_verb","SMOB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] teleported [key_name(M)] to [A]")
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)] to [A]", 1)
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)] to [A]", 1)
/proc/admin_forcemove(mob/mover, atom/newloc)
mover.loc = newloc
mover.on_forcemove(newloc)
/mob/proc/on_forcemove(atom/newloc)
return
+4 -4
View File
@@ -26,8 +26,8 @@ var/global/list/frozen_mob_list = list()
/mob/living/proc/admin_Freeze(var/client/admin)
if(istype(admin))
src << "<b><font color= red>You have been frozen by <a href='?priv_msg=\ref[admin]'>[admin.key]</a></b></font>"
message_admins("\blue [key_name_admin(admin)] froze [key_name(src)]")
src << "<b><font color= red>You have been frozen by [key_name(admin)]</b></font>"
message_admins("<span class='notice'>[key_name_admin(admin)]</span> froze [key_name_admin(src)]")
log_admin("[key_name(admin)] froze [key_name(src)]")
var/obj/effect/overlay/adminoverlay/AO = new
@@ -42,8 +42,8 @@ var/global/list/frozen_mob_list = list()
/mob/living/proc/admin_unFreeze(var/client/admin)
if(istype(admin))
src << "<b><font color= red>You have been unfrozen by <a href='?priv_msg=\ref[usr.client]'>[key]</a></b></font>"
message_admins("\blue [key_name_admin(admin)] unfroze [key_name(src)]")
src << "<b><font color= red>You have been unfrozen by [key_name(admin)]</b></font>"
message_admins("\blue [key_name_admin(admin)] unfroze [key_name_admin(src)]")
log_admin("[key_name(admin)] unfroze [key_name(src)]")
update_icons()
+2 -2
View File
@@ -11,10 +11,10 @@
if(T)
log_admin("[key_name(usr)] has possessed [O] ([O.type]) at ([T.x], [T.y], [T.z])")
message_admins("[key_name(usr)] has possessed [O] ([O.type]) at ([T.x], [T.y], [T.z])", 1)
message_admins("[key_name_admin(usr)] has possessed [O] ([O.type]) at ([T.x], [T.y], [T.z])", 1)
else
log_admin("[key_name(usr)] has possessed [O] ([O.type]) at an unknown location")
message_admins("[key_name(usr)] has possessed [O] ([O.type]) at an unknown location", 1)
message_admins("[key_name_admin(usr)] has possessed [O] ([O.type]) at an unknown location", 1)
if(!usr.control_object) //If you're not already possessing something...
usr.name_archive = usr.real_name
+6 -10
View File
@@ -107,7 +107,7 @@
return
world << "[msg]"
log_admin("GlobalNarrate: [key_name(usr)] : [msg]")
message_admins("\blue \bold GlobalNarrate: [key_name_admin(usr)] : [msg]<BR>", 1)
message_admins("\blue \bold GlobalNarrate: [key_name_admin(usr)]: [msg]<BR>", 1)
feedback_add_details("admin_verb","GLN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_direct_narrate(var/mob/M) // Targetted narrate -- TLE
@@ -128,8 +128,8 @@
return
M << msg
log_admin("DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]")
message_admins("\blue \bold DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]<BR>", 1)
log_admin("DirectNarrate: [key_name(usr)] to ([key_name(M)]): [msg]")
message_admins("\blue \bold DirectNarrate: [key_name_admin(usr)] to ([key_name_admin(M)]): [msg]<BR>", 1)
feedback_add_details("admin_verb","DIRN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_godmode(mob/M as mob in mob_list)
@@ -472,10 +472,6 @@ Traitors and the like can also be revived with the previous role mostly intact.
If they don't have a mind, they obviously don't have a special role.
*/
//Two variables to properly announce later on.
var/admin = key_name_admin(src)
var/player_key = G_found.key
//Now for special roles and equipment.
switch(new_character.mind.special_role)
if("traitor")
@@ -519,7 +515,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(alert(new_character,"Would you like an active AI to announce this character?",,"No","Yes")=="Yes")
call(/mob/new_player/proc/AnnounceArrival)(new_character, new_character.mind.assigned_role)
message_admins("\blue [admin] has respawned [player_key] as [new_character.real_name].", 1)
message_admins("\blue [key_name_admin(usr)] has respawned [key_name_admin(G_found)] as [new_character.real_name].", 1)
new_character << "You have been fully respawned. Enjoy the game."
@@ -728,8 +724,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
if (heavy || light)
empulse(O, heavy, light)
log_admin("[key_name(usr)] created an EM Pulse ([heavy],[light]) at ([O.x],[O.y],[O.z])")
message_admins("[key_name_admin(usr)] created an EM PUlse ([heavy],[light]) at ([O.x],[O.y],[O.z])", 1)
log_admin("[key_name(usr)] created an EM pulse ([heavy], [light]) at ([O.x],[O.y],[O.z])")
message_admins("[key_name_admin(usr)] created an EM pulse ([heavy], [light]) at ([O.x],[O.y],[O.z])", 1)
feedback_add_details("admin_verb","EMP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
+1 -1
View File
@@ -11,7 +11,7 @@
//I've used ticks of 2 before to help with serious singulo lags
if(newtick && newtick <= 2 && newtick > 0)
log_admin("[key_name(src)] has modified world.tick_lag to [newtick]", 0)
message_admins("[key_name(src)] has modified world.tick_lag to [newtick]", 0)
message_admins("[key_name_admin(src)] has modified world.tick_lag to [newtick]", 0)
world.tick_lag = newtick
feedback_add_details("admin_verb","TICKLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!