mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
Ghosting refactor (#32855)
Co-authored-by: kanef <kanef9x@protonmail.com>
This commit is contained in:
@@ -29,7 +29,6 @@ var/list/admin_verbs_admin = list(
|
||||
/datum/admins/proc/toggleguests, /*toggles whether guests can join the current game*/
|
||||
/datum/admins/proc/announce, /*priority announce something to all clients.*/
|
||||
/client/proc/colorooc, /*allows us to set a custom colour for everythign we say in ooc*/
|
||||
/client/proc/admin_ghost, /*allows us to ghost/reenter body at will*/
|
||||
/client/proc/toggle_view_range, /*changes how far we can see*/
|
||||
/datum/admins/proc/view_txt_log, /*shows the server log (diary) for today*/
|
||||
/datum/admins/proc/view_atk_log, /*shows the server combat-log, doesn't do anything presently*/
|
||||
@@ -237,7 +236,6 @@ var/list/admin_verbs_hideable = list(
|
||||
/datum/admins/proc/toggleguests,
|
||||
/datum/admins/proc/announce,
|
||||
/client/proc/colorooc,
|
||||
/client/proc/admin_ghost,
|
||||
/client/proc/toggle_view_range,
|
||||
/datum/admins/proc/view_txt_log,
|
||||
/datum/admins/proc/view_atk_log,
|
||||
@@ -300,7 +298,6 @@ var/list/admin_verbs_mod = list(
|
||||
/client/proc/cmd_admin_pm_panel, /*admin-pm list*/
|
||||
/client/proc/debug_variables, /*allows us to -see- the variables of any instance in the game.*/
|
||||
/datum/admins/proc/PlayerNotes,
|
||||
/client/proc/admin_ghost, /*allows us to ghost/reenter body at will*/
|
||||
/client/proc/cmd_mod_say,
|
||||
/client/proc/cmd_mod_window,
|
||||
/datum/admins/proc/show_player_info,
|
||||
@@ -438,30 +435,6 @@ var/list/admin_verbs_mod = list(
|
||||
to_chat(src, "<span class='interface'>All of your adminverbs are now visible.</span>")
|
||||
feedback_add_details("admin_verb","TAVVS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/admin_ghost()
|
||||
set category = "Admin"
|
||||
set name = "Aghost"
|
||||
if(!holder)
|
||||
return
|
||||
if(istype(mob,/mob/dead/observer))
|
||||
//re-enter
|
||||
var/mob/dead/observer/ghost = mob
|
||||
ghost.can_reenter_corpse = 1 //just in-case.
|
||||
ghost.reenter_corpse()
|
||||
feedback_add_details("admin_verb","P") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
else if(istype(mob,/mob/new_player))
|
||||
to_chat(src, "<span class='red'>Error: Aghost: Can't admin-ghost whilst in the lobby. Join or Observe first.</span>")
|
||||
else
|
||||
//ghostize
|
||||
var/mob/body = mob
|
||||
if(body.mind)
|
||||
body.mind.isScrying = 1
|
||||
body.ghostize(1)
|
||||
|
||||
if(body && !body.key)
|
||||
body.key = "@[key]" //Haaaaaaaack. But the people have spoken. If it breaks; blame adminbus
|
||||
feedback_add_details("admin_verb","O") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/proc/invisimin()
|
||||
set name = "Invisimin"
|
||||
|
||||
@@ -535,8 +535,9 @@
|
||||
to_chat(usr,"<span class='warning'>Mob is in nullspace!</span>")
|
||||
return
|
||||
var/client/C = usr.client
|
||||
if(!isobserver(usr))
|
||||
C.admin_ghost()
|
||||
if(!isobserver(usr) && isliving(usr))
|
||||
var/mob/living/U = usr
|
||||
U.ghost()
|
||||
sleep(2)
|
||||
if(!isobserver(C.mob))
|
||||
return
|
||||
@@ -567,8 +568,9 @@
|
||||
to_chat(usr,"<span class='warning'>Item is in nullspace!</span>")
|
||||
return
|
||||
var/client/C = usr.client
|
||||
if(!isobserver(usr))
|
||||
C.admin_ghost()
|
||||
if(!isobserver(usr) && isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
L.ghost()
|
||||
sleep(2)
|
||||
if(!isobserver(C.mob))
|
||||
return
|
||||
@@ -599,8 +601,9 @@
|
||||
to_chat(usr,"<span class='warning'>Dish is in nullspace!</span>")
|
||||
return
|
||||
var/client/C = usr.client
|
||||
if(!isobserver(usr))
|
||||
C.admin_ghost()
|
||||
if(!isobserver(usr) && isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
L.ghost()
|
||||
sleep(2)
|
||||
if(!isobserver(C.mob))
|
||||
return
|
||||
@@ -616,8 +619,9 @@
|
||||
var/turf/T = locate(href_list["artifactpanel_jumpto"])
|
||||
|
||||
var/client/C = usr.client
|
||||
if(!isobserver(usr))
|
||||
C.admin_ghost()
|
||||
if(!isobserver(usr) && isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
L.ghost()
|
||||
sleep(2)
|
||||
if(!isobserver(C.mob))
|
||||
return
|
||||
@@ -2593,8 +2597,9 @@
|
||||
var/mob/M = locate(href_list["adminplayerobservejump"])
|
||||
|
||||
var/client/C = usr.client
|
||||
if(!isobserver(usr))
|
||||
C.admin_ghost()
|
||||
if(!isobserver(usr) && isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
L.ghost()
|
||||
sleep(2)
|
||||
if(!isobserver(usr))
|
||||
return
|
||||
@@ -2654,8 +2659,9 @@
|
||||
var/z = text2num(href_list["Z"])
|
||||
|
||||
var/client/C = usr.client
|
||||
if(!isobserver(usr))
|
||||
C.admin_ghost()
|
||||
if(!isobserver(usr) && isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
L.ghost()
|
||||
sleep(2)
|
||||
C.jumptocoord(x,y,z)
|
||||
|
||||
|
||||
@@ -432,6 +432,12 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
ghostize(1)
|
||||
else if(stat == DEAD)
|
||||
ghostize(1)
|
||||
else if(check_rights(R_ADMIN))
|
||||
if(mind)
|
||||
mind.isScrying = 1
|
||||
ghostize(1)
|
||||
if(!key)
|
||||
key = "@[key]" //Haaaaaaaack. But the people have spoken. If it breaks; blame adminbus
|
||||
else
|
||||
var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost, you will not be able to re-enter your current body! You can't change your mind so choose wisely!)","Are you sure you want to ghost?","Ghost","Stay in body")
|
||||
if(response != "Ghost")
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
/mob/dead/observer/verb/ghost()
|
||||
set category = "OOC"
|
||||
set name = "Ghost"
|
||||
|
||||
reenter_corpse()
|
||||
|
||||
/mob/dead/observer/verb/reenter_corpse()
|
||||
set category = "Ghost"
|
||||
set name = "Re-enter Corpse"
|
||||
|
||||
var/mob/M = get_top_transmogrification()
|
||||
if(check_rights(R_ADMIN)) // admins
|
||||
can_reenter_corpse = 1 //just in-case.
|
||||
if(!M.client)
|
||||
return
|
||||
if(!(mind && mind.current && can_reenter_corpse))
|
||||
@@ -547,7 +555,7 @@
|
||||
var/response = alert(src, "Are you -sure- you want to become a space hobo?","Are you sure you want to ramble?","Yeah!","Nope!")
|
||||
if(response != "Yeah!" || !src.key)
|
||||
return //Hit the wrong key...again.
|
||||
|
||||
|
||||
var/mob/living/carbon/human/hobo = new(pick(hobostart))
|
||||
hobo.key = src.key
|
||||
hobo.set_species(pick(200;"Human",50;"Vox",50;"Insectoid",25;"Diona",25;"Grey",1;"Tajaran",10;"Unathi"))
|
||||
|
||||
@@ -125,7 +125,6 @@ For an exhaustive list please visit http://ss13.moe/wiki/index.php/Shortcuts
|
||||
|
||||
var/admin = {"<font color='purple'>
|
||||
Admin:
|
||||
\tF5 = Aghost (admin-ghost)
|
||||
\tF6 = player-panel-new
|
||||
\tF7 = admin-pm
|
||||
\tF8 = Invisimin
|
||||
|
||||
@@ -196,7 +196,7 @@ macro "macro"
|
||||
command = ".Me"
|
||||
elem "F5"
|
||||
name = "F5"
|
||||
command = "Aghost"
|
||||
command = "Ghost"
|
||||
elem "F6"
|
||||
name = "F6"
|
||||
command = "Player-Panel-New"
|
||||
@@ -495,7 +495,7 @@ macro "hotkeymode"
|
||||
command = ".Me"
|
||||
elem "F5"
|
||||
name = "F5"
|
||||
command = "Aghost"
|
||||
command = "Ghost"
|
||||
elem "F6"
|
||||
name = "F6"
|
||||
command = "Player-Panel-New"
|
||||
|
||||
@@ -196,7 +196,7 @@ macro "macro"
|
||||
command = "me"
|
||||
elem "F5"
|
||||
name = "F5"
|
||||
command = "Aghost"
|
||||
command = "Ghost"
|
||||
elem "F6"
|
||||
name = "F6"
|
||||
command = "Player-Panel-New"
|
||||
@@ -477,7 +477,7 @@ macro "hotkeymode"
|
||||
command = ".Me"
|
||||
elem "F5"
|
||||
name = "F5"
|
||||
command = "Aghost"
|
||||
command = "Ghost"
|
||||
elem "F6"
|
||||
name = "F6"
|
||||
command = "Player-Panel-New"
|
||||
|
||||
Reference in New Issue
Block a user