mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
[SEMI-MODULAR] SR specific escape menu options (#19291)
* add SR items to escape menu * Delete leave_body.dm * Update code/modules/escape_menu/escape_menu.dm Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com> * restore leave_body.dm * let's get modular, modularrr * respawn * tick leave body * remove suicide proc again --------- Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
This commit is contained in:
@@ -80,8 +80,8 @@ GLOBAL_LIST_EMPTY(escape_menus)
|
||||
switch (menu_page)
|
||||
if (PAGE_HOME)
|
||||
show_home_page()
|
||||
if (PAGE_LEAVE_BODY)
|
||||
show_leave_body_page()
|
||||
//if (PAGE_LEAVE_BODY) //SKYRAT EDIT REMOVAL
|
||||
//show_leave_body_page() //SKYRAT EDIT REMOVAL
|
||||
else
|
||||
CRASH("Unknown escape menu page: [menu_page]")
|
||||
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
/* offset = */ 2,
|
||||
)
|
||||
)
|
||||
|
||||
//SKYRAT EDIT REMOVAL BEGIN
|
||||
/*
|
||||
page_holder.give_screen_object(
|
||||
new /atom/movable/screen/escape_menu/home_button/leave_body(
|
||||
null,
|
||||
@@ -37,6 +38,8 @@
|
||||
CALLBACK(src, PROC_REF(open_leave_body)),
|
||||
)
|
||||
)
|
||||
*/
|
||||
// SKYRAT EDIT REMOVAL END
|
||||
|
||||
/datum/escape_menu/proc/home_resume()
|
||||
qdel(src)
|
||||
|
||||
@@ -8,18 +8,14 @@
|
||||
else
|
||||
stack_trace("The leave body menu was opened before the atoms SS. This shouldn't be possible, as the leave body menu should only be accessible when you have a body.")
|
||||
|
||||
//SKYRAT EDIT REMOVAL BEGIN - Suicide Disabled
|
||||
/*
|
||||
page_holder.give_screen_object(new /atom/movable/screen/escape_menu/leave_body_button(
|
||||
src,
|
||||
"Suicide",
|
||||
"Perform a dramatic suicide in game",
|
||||
/* pixel_offset = */ -105,
|
||||
CALLBACK(src, PROC_REF(leave_suicide)),
|
||||
// CALLBACK(src, PROC_REF(leave_suicide)), // SKYRAT EDIT REMOVAL
|
||||
/* button_overlay = */ dead_clown,
|
||||
))
|
||||
*/
|
||||
//SKYRAT EDIT REMOVAL END
|
||||
|
||||
page_holder.give_screen_object(
|
||||
new /atom/movable/screen/escape_menu/leave_body_button(
|
||||
@@ -68,7 +64,7 @@
|
||||
var/mob/living/living_user = client?.mob
|
||||
living_user?.ghost()
|
||||
|
||||
//SKYRAT EDIT REMOVAL BEGIN - Suicide Disabled
|
||||
//SKYRAT EDIT REMOVAL BEGIN
|
||||
/*
|
||||
/datum/escape_menu/proc/leave_suicide()
|
||||
PRIVATE_PROC(TRUE)
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
/datum/escape_menu/show_home_page()
|
||||
. = ..()
|
||||
page_holder.give_screen_object(
|
||||
new /atom/movable/screen/escape_menu/home_button/opfor(
|
||||
null,
|
||||
src,
|
||||
"OPFOR",
|
||||
/* offset = */ 3,
|
||||
CALLBACK(src, PROC_REF(home_opfor)),
|
||||
)
|
||||
)
|
||||
|
||||
page_holder.give_screen_object(
|
||||
new /atom/movable/screen/escape_menu/home_button/leave_body(
|
||||
null,
|
||||
src,
|
||||
"Ghost",
|
||||
/* offset = */ 4,
|
||||
CALLBACK(src, PROC_REF(home_ghost)),
|
||||
)
|
||||
)
|
||||
|
||||
page_holder.give_screen_object(
|
||||
new /atom/movable/screen/escape_menu/home_button/respawn(
|
||||
null,
|
||||
src,
|
||||
"Respawn",
|
||||
/* offset = */ 5,
|
||||
CALLBACK(src, PROC_REF(home_respawn)),
|
||||
)
|
||||
)
|
||||
|
||||
/datum/escape_menu/proc/home_respawn()
|
||||
PRIVATE_PROC(TRUE)
|
||||
client?.mob.abandon_mob()
|
||||
qdel(src)
|
||||
|
||||
/datum/escape_menu/proc/home_ghost()
|
||||
PRIVATE_PROC(TRUE)
|
||||
|
||||
// Not guaranteed to be living. Everything defines verb/ghost separately. Fuck you.
|
||||
var/mob/living/living_user = client?.mob
|
||||
living_user?.ghost()
|
||||
qdel(src)
|
||||
|
||||
/datum/escape_menu/proc/home_opfor()
|
||||
PRIVATE_PROC(TRUE)
|
||||
|
||||
// Not guaranteed to be living. Everything defines verb/ghost separately. Fuck you.
|
||||
var/mob/living/living_user = client?.mob
|
||||
living_user?.opposing_force()
|
||||
qdel(src)
|
||||
|
||||
/atom/movable/screen/escape_menu/home_button/respawn
|
||||
|
||||
/datum/escape_menu/proc/respawn()
|
||||
PRIVATE_PROC(TRUE)
|
||||
|
||||
var/mob/living/client_mob = client?.mob
|
||||
client_mob?.abandon_mob()
|
||||
|
||||
/atom/movable/screen/escape_menu/home_button/respawn/Initialize(
|
||||
mapload,
|
||||
datum/escape_menu/escape_menu,
|
||||
button_text,
|
||||
offset,
|
||||
on_click_callback,
|
||||
)
|
||||
. = ..()
|
||||
|
||||
/atom/movable/screen/escape_menu/home_button/respawn/enabled()
|
||||
if (!..())
|
||||
return FALSE
|
||||
|
||||
return !isliving(escape_menu.client?.mob)
|
||||
|
||||
/atom/movable/screen/escape_menu/home_button/opfor
|
||||
|
||||
/atom/movable/screen/escape_menu/home_button/opfor/Initialize(
|
||||
mapload,
|
||||
datum/escape_menu/escape_menu,
|
||||
button_text,
|
||||
offset,
|
||||
on_click_callback,
|
||||
)
|
||||
. = ..()
|
||||
|
||||
/atom/movable/screen/escape_menu/home_button/opfor/enabled()
|
||||
if (!..())
|
||||
return FALSE
|
||||
|
||||
return isliving(escape_menu.client?.mob)
|
||||
@@ -0,0 +1,18 @@
|
||||
https://github.com/Skyrat-SS13/Skyrat-tg/pull/19291
|
||||
|
||||
## Title:
|
||||
SR escape menu customisation
|
||||
MODULE ID: ESCAPE_MENU
|
||||
|
||||
### Description:
|
||||
Adds SR specific functionality to the escape menu
|
||||
|
||||
### TG Proc/File Changes:
|
||||
code/modules/escape_menu/home_page.dm
|
||||
code/modules/escape_menu/escape_menu.dm
|
||||
|
||||
### Defines:
|
||||
N/A
|
||||
|
||||
### Credits:
|
||||
LT3
|
||||
@@ -5978,6 +5978,7 @@
|
||||
#include "modular_skyrat\modules\encounters\code\nri_raiders.dm"
|
||||
#include "modular_skyrat\modules\energy_axe\code\energy_fireaxe.dm"
|
||||
#include "modular_skyrat\modules\energy_axe\code\energy_fireaxe_case.dm"
|
||||
#include "modular_skyrat\modules\escape_menu\code\escape_menu_skyrat.dm"
|
||||
#include "modular_skyrat\modules\event_vote\code\event_chaos_system.dm"
|
||||
#include "modular_skyrat\modules\event_vote\code\event_vote.dm"
|
||||
#include "modular_skyrat\modules\events\code\_event_globalvars.dm"
|
||||
|
||||
Reference in New Issue
Block a user