mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 10:11:09 +00:00
Admin action to send play in cryo (#16022)
* barebuh * oh.. my parents.. * oki doki. * src remove and some text mistakes Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> * remake with paper. add JMP to log. * thats done Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
This commit is contained in:
@@ -142,6 +142,7 @@
|
|||||||
#define VV_HK_MOD_QUIRKS "quirkmod"
|
#define VV_HK_MOD_QUIRKS "quirkmod"
|
||||||
#define VV_HK_SET_SPECIES "setspecies"
|
#define VV_HK_SET_SPECIES "setspecies"
|
||||||
#define VV_HK_PURRBATION "purrbation"
|
#define VV_HK_PURRBATION "purrbation"
|
||||||
|
#define VV_HK_SEND_CRYO "send_to_cryo" //SKYRAT EDIT ADDITION - CRYO SEND
|
||||||
|
|
||||||
// misc
|
// misc
|
||||||
#define VV_HK_SPACEVINE_PURGE "spacevine_purge"
|
#define VV_HK_SPACEVINE_PURGE "spacevine_purge"
|
||||||
|
|||||||
@@ -1235,6 +1235,7 @@
|
|||||||
VV_DROPDOWN_OPTION(VV_HK_DIRECT_CONTROL, "Assume Direct Control")
|
VV_DROPDOWN_OPTION(VV_HK_DIRECT_CONTROL, "Assume Direct Control")
|
||||||
VV_DROPDOWN_OPTION(VV_HK_GIVE_DIRECT_CONTROL, "Give Direct Control")
|
VV_DROPDOWN_OPTION(VV_HK_GIVE_DIRECT_CONTROL, "Give Direct Control")
|
||||||
VV_DROPDOWN_OPTION(VV_HK_OFFER_GHOSTS, "Offer Control to Ghosts")
|
VV_DROPDOWN_OPTION(VV_HK_OFFER_GHOSTS, "Offer Control to Ghosts")
|
||||||
|
VV_DROPDOWN_OPTION(VV_HK_SEND_CRYO, "Send to Cryogenic Storage") //SKYRAT EDIT ADDITION - CRYO SEND
|
||||||
|
|
||||||
/mob/vv_do_topic(list/href_list)
|
/mob/vv_do_topic(list/href_list)
|
||||||
. = ..()
|
. = ..()
|
||||||
@@ -1286,6 +1287,25 @@
|
|||||||
if(!check_rights(NONE))
|
if(!check_rights(NONE))
|
||||||
return
|
return
|
||||||
offer_control(src)
|
offer_control(src)
|
||||||
|
//SKYRAT EDIT ADDITION BEGIN - CRYO SEND
|
||||||
|
if(href_list[VV_HK_SEND_CRYO])
|
||||||
|
if(!check_rights(R_SPAWN))
|
||||||
|
return
|
||||||
|
var/send_notice = tgui_alert(usr, "Add a paper notice about sending [name] into a cryopod?", "Leave a paper?", list("Yes", "No", "Cancel"))
|
||||||
|
if(send_notice != "Yes" && send_notice != "No")
|
||||||
|
return
|
||||||
|
|
||||||
|
//log/message
|
||||||
|
to_chat(usr, "Put [src] in cryopod.")
|
||||||
|
log_admin("[key_name(usr)] has put [key_name(src)] into a cryopod.")
|
||||||
|
var/msg = span_notice("[key_name_admin(usr)] has put [key_name(src)] into a cryopod from [ADMIN_VERBOSEJMP(src)].")
|
||||||
|
message_admins(msg)
|
||||||
|
admin_ticket_log(src, msg)
|
||||||
|
|
||||||
|
send_notice = send_notice == "Yes"
|
||||||
|
send_to_cryo(send_notice)
|
||||||
|
|
||||||
|
//SKYRAT EDIT ADDITION END
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* extra var handling for the logging var
|
* extra var handling for the logging var
|
||||||
|
|||||||
22
modular_skyrat/modules/cryosleep/code/admin.dm
Normal file
22
modular_skyrat/modules/cryosleep/code/admin.dm
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
/// Send player in not-quiet cryopod. If with_paper = TRUE, place a paper with notification under player.
|
||||||
|
/mob/proc/send_to_cryo(with_paper = FALSE)
|
||||||
|
//effect
|
||||||
|
playsound(loc, 'sound/magic/Repulse.ogg', 100, 1)
|
||||||
|
var/datum/effect_system/spark_spread/quantum/sparks = new
|
||||||
|
sparks.set_up(10, 1, loc)
|
||||||
|
sparks.attach(loc)
|
||||||
|
sparks.start()
|
||||||
|
|
||||||
|
//make a paper if need
|
||||||
|
if(with_paper)
|
||||||
|
var/obj/item/paper/cryo_paper = new /obj/item/paper(loc)
|
||||||
|
cryo_paper.name = "Notification - [name]"
|
||||||
|
cryo_paper.add_raw_text("Our sincerest apologies, [name][job ? ", [job]," : ""] had to be sent back in Cryogenic Storage for reasons that cannot be elaborated on at the moment.<br><br>Sincerely,<br><i>NanoTrasen Anti-Sudden Sleep Disorder Agency</i>")
|
||||||
|
cryo_paper.update_appearance()
|
||||||
|
//find cryopod
|
||||||
|
for(var/obj/machinery/cryopod/cryo in GLOB.valid_cryopods)
|
||||||
|
if(!cryo.occupant)//free?
|
||||||
|
cryo.close_machine(src)//put player
|
||||||
|
break
|
||||||
|
|
||||||
|
|
||||||
@@ -11,6 +11,9 @@ GLOBAL_LIST_EMPTY(cryopod_computers)
|
|||||||
|
|
||||||
GLOBAL_LIST_EMPTY(ghost_records)
|
GLOBAL_LIST_EMPTY(ghost_records)
|
||||||
|
|
||||||
|
/// A list of all cryopods that aren't quiet, to be used by the "Send to Cryogenic Storage" VV action.
|
||||||
|
GLOBAL_LIST_EMPTY(valid_cryopods)
|
||||||
|
|
||||||
//Main cryopod console.
|
//Main cryopod console.
|
||||||
|
|
||||||
/obj/machinery/computer/cryopod
|
/obj/machinery/computer/cryopod
|
||||||
@@ -160,6 +163,8 @@ GLOBAL_LIST_EMPTY(ghost_records)
|
|||||||
|
|
||||||
/obj/machinery/cryopod/Initialize(mapload)
|
/obj/machinery/cryopod/Initialize(mapload)
|
||||||
..()
|
..()
|
||||||
|
if(!quiet)
|
||||||
|
GLOB.valid_cryopods += src
|
||||||
return INITIALIZE_HINT_LATELOAD //Gotta populate the cryopod computer GLOB first
|
return INITIALIZE_HINT_LATELOAD //Gotta populate the cryopod computer GLOB first
|
||||||
|
|
||||||
/obj/machinery/cryopod/LateInitialize()
|
/obj/machinery/cryopod/LateInitialize()
|
||||||
@@ -168,6 +173,7 @@ GLOBAL_LIST_EMPTY(ghost_records)
|
|||||||
|
|
||||||
// This is not a good situation
|
// This is not a good situation
|
||||||
/obj/machinery/cryopod/Destroy()
|
/obj/machinery/cryopod/Destroy()
|
||||||
|
GLOB.valid_cryopods -= src
|
||||||
control_computer_weakref = null
|
control_computer_weakref = null
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
|
|||||||
@@ -5282,6 +5282,7 @@
|
|||||||
#include "modular_skyrat\modules\cortical_borer\code\focus_datum.dm"
|
#include "modular_skyrat\modules\cortical_borer\code\focus_datum.dm"
|
||||||
#include "modular_skyrat\modules\cortical_borer\code\status_effects.dm"
|
#include "modular_skyrat\modules\cortical_borer\code\status_effects.dm"
|
||||||
#include "modular_skyrat\modules\crafting\crafting_skyrat.dm"
|
#include "modular_skyrat\modules\crafting\crafting_skyrat.dm"
|
||||||
|
#include "modular_skyrat\modules\cryosleep\code\admin.dm"
|
||||||
#include "modular_skyrat\modules\cryosleep\code\ai.dm"
|
#include "modular_skyrat\modules\cryosleep\code\ai.dm"
|
||||||
#include "modular_skyrat\modules\cryosleep\code\config.dm"
|
#include "modular_skyrat\modules\cryosleep\code\config.dm"
|
||||||
#include "modular_skyrat\modules\cryosleep\code\cryopod.dm"
|
#include "modular_skyrat\modules\cryosleep\code\cryopod.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user