Skip to content

Commit

Permalink
Adds a command for admins to easily end the shift (calls shuttle) + m…
Browse files Browse the repository at this point in the history
…isc stuff (SPLURT-Station#222)
  • Loading branch information
SandPoot committed Jan 31, 2022
1 parent 6053dbf commit ef1e5ba
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 6 deletions.
5 changes: 3 additions & 2 deletions code/__HELPERS/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,9 @@ GLOBAL_LIST_EMPTY(species_datums)
override = TRUE
if(HAS_TRAIT(M, TRAIT_SIXTHSENSE))
override = TRUE
if(SSticker.current_state == GAME_STATE_FINISHED)
override = TRUE
if(CONFIG_GET(flag/reveal_everything))
if(SSticker.current_state == GAME_STATE_FINISHED)
override = TRUE
if(isnewplayer(M) && !override)
continue
if(M.stat != DEAD && !override)
Expand Down
6 changes: 2 additions & 4 deletions code/__HELPERS/roundend.dm
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,7 @@
for(var/m in GLOB.player_list)
var/mob/M = m
H.add_hud_to(M)

CHECK_TICK
CHECK_TICK

//Set news report and mode result
mode.set_round_result()
Expand All @@ -274,8 +273,7 @@
// handle_hearts()
if(CONFIG_GET(flag/reveal_everything))
set_observer_default_invisibility(0, "<span class='warning'>The round is over! You are now visible to the living.</span>")

CHECK_TICK
CHECK_TICK

//These need update to actually reflect the real antagonists
//Print a list of antagonists to the server log
Expand Down
2 changes: 2 additions & 0 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ GLOBAL_PROTECT(admin_verbs_admin)
/client/proc/jumptokey, /*allows us to jump to the location of a mob with a certain ckey*/
/client/proc/jumptomob, /*allows us to jump to a specific mob*/
/client/proc/jumptoturf, /*allows us to jump to a specific turf*/
/client/proc/admin_end_shift, /*allows us to end the shift properly, also logs it*/
/client/proc/admin_call_shuttle, /*allows us to call the emergency shuttle*/
/client/proc/admin_cancel_shuttle, /*allows us to cancel the emergency shuttle, sending it back to centcom*/
// /client/proc/admin_disable_shuttle, /*allows us to disable the emergency shuttle admin-wise so that it cannot be called*/
Expand Down Expand Up @@ -228,6 +229,7 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list(
/client/proc/cmd_admin_headset_message,
/client/proc/cmd_admin_check_contents,
/datum/admins/proc/access_news_network,
/client/proc/admin_end_shift,
/client/proc/admin_call_shuttle,
/client/proc/admin_cancel_shuttle,
/client/proc/cmd_admin_direct_narrate,
Expand Down
20 changes: 20 additions & 0 deletions modular_sand/code/modules/admin/verbs/randomverbs.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/client/proc/admin_end_shift()
set category = "Admin.Events"
set name = "End shift"
set desc = "Calls the shuttle as if a roundend vote passed."

if(EMERGENCY_AT_LEAST_DOCKED)
return

if(!check_rights(R_ADMIN))
return

var/confirm = alert(src, "End the shift?", "Confirm", "Yes", "No")
if(confirm != "Yes")
return

SSshuttle.autoEnd()
SSblackbox.record_feedback("tally", "admin_verb", 1, "End Shift") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] ended the shift.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] ended the shift.</span>")
return
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -3948,6 +3948,7 @@
#include "modular_sand\code\game\turfs\simulated\floor\plating.dm"
#include "modular_sand\code\game\turfs\simulated\floor\titanium_floor.dm"
#include "modular_sand\code\modules\admin\verbs\fix_air.dm"
#include "modular_sand\code\modules\admin\verbs\randomverbs.dm"
#include "modular_sand\code\modules\arousal\arousal.dm"
#include "modular_sand\code\modules\arousal\creampie.dm"
#include "modular_sand\code\modules\arousal\organs\breasts.dm"
Expand Down

0 comments on commit ef1e5ba

Please sign in to comment.