diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm
index 4238c756ac..f683c47e06 100644
--- a/code/__HELPERS/global_lists.dm
+++ b/code/__HELPERS/global_lists.dm
@@ -20,7 +20,6 @@ var/global/list/landmarks_list = list() //list of all landmarks created
//////////////////////////
/////Initial Building/////
//////////////////////////
-//Realistically, these should never be run, but ideally, they should only be run once at round-start
/proc/make_datum_references_lists()
var/list/paths
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index 440a2c7034..c1b65ae68d 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -408,11 +408,13 @@ var/global/floorIsLava = 0
dat += {"
'Random' Events
+ Toggle station artificial gravity
Spawn a wave of meteors (aka lagocolyptic shower)
Spawn a gravitational anomaly (aka lagitational anomolag)
Spawn wormholes
Spawn blob
Trigger an Alien infestation
+ Spawn an Alien silently
Send in a space ninja
Trigger an Carp migration
Irradiate the station
@@ -428,7 +430,6 @@ var/global/floorIsLava = 0
Remove 'internal' clothing
Remove ALL clothing
- Toxic Air (WARNING: dangerous)
Turn all humans into monkeys
Remove firesuits, grilles, and pods
Make all areas powered
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 5fb5d8d861..02bbd6884e 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -71,15 +71,12 @@ var/list/admin_verbs_fun = list(
/client/proc/cmd_admin_dress,
/client/proc/cmd_admin_gib_self,
/client/proc/drop_bomb,
- /client/proc/toggle_gravity_on,
- /client/proc/toggle_gravity_off,
/client/proc/strike_team,
/client/proc/cinematic,
/client/proc/triple_ai,
/client/proc/one_click_antag,
/datum/admins/proc/toggle_aliens,
/datum/admins/proc/toggle_space_ninja,
- /client/proc/spawn_xeno,
/client/proc/only_one,
/client/proc/send_space_ninja,
/client/proc/cmd_admin_add_freeform_ai_law,
@@ -171,14 +168,11 @@ var/list/admin_verbs_hideable = list(
/client/proc/cmd_admin_dress,
/client/proc/cmd_admin_gib_self,
/client/proc/drop_bomb,
- /client/proc/toggle_gravity_on,
- /client/proc/toggle_gravity_off,
/client/proc/strike_team,
/client/proc/cinematic,
/client/proc/triple_ai,
/datum/admins/proc/toggle_aliens,
/datum/admins/proc/toggle_space_ninja,
- /client/proc/spawn_xeno,
/client/proc/only_one,
/client/proc/send_space_ninja,
/client/proc/cmd_admin_add_freeform_ai_law,
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index c83130bb89..ec8f72c875 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -1169,6 +1169,8 @@
usr.client.debug_variables(M)
else if(href_list["adminplayerobservejump"])
+ if(!check_rights(R_ADMIN)) return
+
var/mob/M = locate(href_list["adminplayerobservejump"])
var/client/C = usr.client
@@ -1177,6 +1179,8 @@
C.jumptomob(M)
else if(href_list["adminplayerobservecoodjump"])
+ if(!check_rights(R_ADMIN)) return
+
var/x = text2num(href_list["X"])
var/y = text2num(href_list["Y"])
var/z = text2num(href_list["Z"])
@@ -1240,6 +1244,8 @@
src.owner << "(PM) (PP) (VV) (SM) (JMP) (CA)"
else if(href_list["adminspawncookie"])
+ if(!check_rights(R_ADMIN|R_FUN)) return
+
var/mob/living/carbon/human/H = locate(href_list["adminspawncookie"])
if(!ishuman(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
@@ -1262,6 +1268,8 @@
H << "\blue Your prayers have been answered!! You received the best cookie!"
else if(href_list["BlueSpaceArtillery"])
+ if(!check_rights(R_ADMIN|R_FUN)) return
+
var/mob/living/M = locate(href_list["BlueSpaceArtillery"])
if(!isliving(M))
usr << "This can only be used on instances of type /mob/living"
@@ -1587,6 +1595,23 @@
spawn(0)
H.corgize()
ok = 1
+ if("gravity")
+ if(!(ticker && ticker.mode))
+ usr << "Please wait until the game starts! Not sure how it will work otherwise."
+ return
+ gravity_is_on = !gravity_is_on
+ for(var/area/A in world)
+ A.gravitychange(gravity_is_on,A)
+ feedback_inc("admin_secrets_fun_used",1)
+ feedback_add_details("admin_secrets_fun_used","Grav")
+ if(gravity_is_on)
+ log_admin("[key_name(usr)] toggled gravity on.", 1)
+ message_admins("\blue [key_name_admin(usr)] toggled gravity on.", 1)
+ command_alert("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.")
+ else
+ log_admin("[key_name(usr)] toggled gravity off.", 1)
+ message_admins("\blue [key_name_admin(usr)] toggled gravity off.", 1)
+ command_alert("Feedback surge detected in mass-distributions systems. Artifical gravity has been disabled whilst the system reinitializes. Further failures may result in a gravitational collapse and formation of blackholes. Have a nice day.")
if("power")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","P")
@@ -1856,6 +1881,11 @@
if(aliens_allowed)
alien_infestation()
message_admins("[key_name_admin(usr)] has spawned aliens", 1)
+ if("alien_silent") //replaces the spawn_xeno verb
+ feedback_inc("admin_secrets_fun_used",1)
+ feedback_add_details("admin_secrets_fun_used","ALS")
+ if(aliens_allowed)
+ create_xeno()
if("comms_blackout")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","CB")
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index ba95ab8b18..84dce75f9e 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -193,69 +193,37 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
IonStorm(0)
feedback_add_details("admin_verb","ION") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
- /*
- Stealth spawns xenos
- Changed to accomodate specific spawning. It was annoying before. /N
- */
-/client/proc/spawn_xeno()
- set category = "Fun"
- set name = "Spawn Xeno"
- set desc = "Spawns a xenomorph for all those boring rounds, without having you to do so manually."
- set popup_menu = 0
-
- if(!holder)
- src << "Only administrators may use this command."
- return
- var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
- if(confirm != "Yes") return
-
- if(create_xeno())
- feedback_add_details("admin_verb","X") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
- log_admin("[key_name(usr)] spawned a xeno.")
- message_admins("\blue [key_name_admin(usr)] spawned a xeno.", 1)
- return
-
-
//I use this proc for respawn character too. /N
-/proc/create_xeno(mob/dead/observer/G)
- var/alien_caste = alert(src, "Please choose which caste to spawn.",,"Hunter","Sentinel","Drone")
-
- var/obj/effect/landmark/spawn_here = xeno_spawn.len ? pick(xeno_spawn) : pick(latejoin)
-
- var/mob/living/carbon/alien/humanoid/new_xeno
- switch(alien_caste)
- if("Hunter")
- new_xeno = new /mob/living/carbon/alien/humanoid/hunter(spawn_here)
- if("Sentinel")
- new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(spawn_here)
- if("Drone")
- new_xeno = new /mob/living/carbon/alien/humanoid/drone(spawn_here)
- else
- return 0
-
- var/selected_key
- if(G && G.key)
- selected_key = G.key
- else
- var/list/candidates = list() //List of candidate KEYS to assume control of the new larva ~Carn
- for(G in player_list)
- if(G.client.be_alien)
- if(((G.client.inactivity/10)/60) <= 5)
- if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
- candidates += G.key
+/proc/create_xeno(ckey)
+ if(!ckey)
+ var/list/candidates = list()
+ for(var/mob/M in player_list)
+ if(M.stat != DEAD) continue //we are not dead!
+ if(!M.client.be_alien) continue //we don't want to be an alium
+ if(M.client.is_afk()) continue //we are afk
+ if(M.mind && M.mind.current && M.mind.current.stat != DEAD) continue //we have a live body we are tied to
+ candidates += M.ckey
if(candidates.len)
- selected_key = input("Pick the client you want to respawn as a xeno.", "Suitable Candidates") as null|anything in candidates
+ ckey = input("Pick the player you want to respawn as a xeno.", "Suitable Candidates") as null|anything in candidates
+ else
+ usr << "Error: create_xeno(): no suitable candidates."
+ if(!istext(ckey)) return 0
- if(selected_key)
- new_xeno.key = selected_key
- message_admins("\blue [key_name_admin(usr)] has spawned [selected_key] as a filthy xeno.", 1)
- return 1
- else
- //we couldn't find a candidate
- usr << "Error: create_xeno(): no suitable players."
- del(new_xeno)
- return 0
+ var/alien_caste = input(usr, "Please choose which caste to spawn.","Pick a caste",null) as null|anything in list("Queen","Hunter","Sentinel","Drone","Larva")
+ var/obj/effect/landmark/spawn_here = xeno_spawn.len ? pick(xeno_spawn) : pick(latejoin)
+ var/mob/living/carbon/alien/new_xeno
+ switch(alien_caste)
+ if("Queen") new_xeno = new /mob/living/carbon/alien/humanoid/queen(spawn_here)
+ if("Hunter") new_xeno = new /mob/living/carbon/alien/humanoid/hunter(spawn_here)
+ if("Sentinel") new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(spawn_here)
+ if("Drone") new_xeno = new /mob/living/carbon/alien/humanoid/drone(spawn_here)
+ if("Larva") new_xeno = new /mob/living/carbon/alien/larva(spawn_here)
+ else return 0
+
+ new_xeno.ckey = ckey
+ message_admins("\blue [key_name_admin(usr)] has spawned [ckey] as a filthy xeno [alien_caste].", 1)
+ return 1
/*
If a guy was gibbed and you want to revive him, this is a good way to do so.
@@ -298,7 +266,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if("Drone") new_xeno = new /mob/living/carbon/alien/humanoid/drone(T)
if("Queen") new_xeno = new /mob/living/carbon/alien/humanoid/queen(T)
else//If we don't know what special role they have, for whatever reason, or they're a larva.
- create_xeno(G_found)
+ create_xeno(G_found.ckey)
return
//Now to give them their mind back.
@@ -843,38 +811,6 @@ Traitors and the like can also be revived with the previous role mostly intact.
ticker.random_players = 1
feedback_add_details("admin_verb","MER") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-/client/proc/toggle_gravity_on()
- set category = "Debug"
- set name = "Toggle station gravity on"
- set desc = "Toggles all gravity to active on the station."
-
- if (!(ticker && ticker.mode))
- usr << "Please wait until the game starts! Not sure how it will work otherwise."
- return
-
-
- for(var/area/A in world)
- A.gravitychange(1,A)
-
- command_alert("CentComm is now beaming gravitons to your station. We appoligize for any inconvience.")
- feedback_add_details("admin_verb","TSGON") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
-/client/proc/toggle_gravity_off()
- set category = "Debug"
- set name = "Toggle station gravity off"
- set desc = "Toggles all gravity to inactive on the station."
-
- if (!(ticker && ticker.mode))
- usr << "Please wait until the game starts! Not sure how it will work otherwise."
- return
-
-
- for(var/area/A in world)
- A.gravitychange(0,A)
-
- command_alert("For budget reasons, Centcomm is no longer beaming gravitons to your station. We appoligize for any inconvience.")
- feedback_add_details("admin_verb","TSGOFF") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
/client/proc/toggle_random_events()
set category = "Server"
diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm
index a9abb43046..3d0085baf9 100644
--- a/code/modules/client/client procs.dm
+++ b/code/modules/client/client procs.dm
@@ -176,3 +176,9 @@
#undef TOPIC_SPAM_DELAY
#undef UPLOAD_LIMIT
#undef MIN_CLIENT_VERSION
+
+//checks if a client is afk
+//3000 frames = 5 minutes
+/client/proc/is_afk(duration=3000)
+ if(inactivity > duration) return inactivity
+ return 0
\ No newline at end of file