mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-28 10:43:23 +00:00
Some modularisation
This commit is contained in:
20
modular_splurt/code/game/machinery/cryopod.dm
Normal file
20
modular_splurt/code/game/machinery/cryopod.dm
Normal file
@@ -0,0 +1,20 @@
|
||||
GLOBAL_VAR_INIT(cryo_next_admin_warning, 0) // The last time we told admins about a mapping / coding error because no cryo computer was found
|
||||
|
||||
/proc/cryo_find_control_computer(obj/machinery/cryopod/pod = null, urgent = FALSE)
|
||||
|
||||
for(var/cryo_console as anything in GLOB.cryopod_computers)
|
||||
var/obj/machinery/computer/cryopod/console = cryo_console
|
||||
|
||||
if(!pod) // No cryopod passed in, we will try to find the standard crew cryo computer instead.
|
||||
var/turf/console_turf = get_turf(console)
|
||||
if((console_turf.z == 2) && (!istype(get_area(console), /area/security/prison))) // If station Z-level and NOT the prison cryo computer. Should get the standard crew cryo computer.
|
||||
return WEAKREF(console)
|
||||
else
|
||||
if(get_area(console) == get_area(pod))
|
||||
return WEAKREF(console)
|
||||
|
||||
// Don't send messages unless we *need* the computer, and less than five minutes have passed since last time we messaged
|
||||
if(urgent && (world.time > GLOB.cryo_next_admin_warning))
|
||||
log_admin("\The [pod] in [get_area(pod)] could not find control computer!")
|
||||
message_admins("\The [pod] in [get_area(pod)] could not find control computer!")
|
||||
GLOB.cryo_next_admin_warning = world.time + 5 MINUTES
|
||||
@@ -6,3 +6,43 @@
|
||||
var/obj/item/reagent_containers/food/snacks/store/book/funnyBook = new(get_turf(target))
|
||||
target.forceMove(funnyBook)
|
||||
funnyBook.name = "Book of " + target.name
|
||||
|
||||
/client/proc/cmd_admin_subtle_headset_message(mob/M, sender = null)
|
||||
if(!ismob(M))
|
||||
return
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if (!sender)
|
||||
var/list/subtle_message_options = list("Voice in head", RADIO_CHANNEL_CENTCOM, RADIO_CHANNEL_SYNDICATE)
|
||||
sender = tgui_input_list(usr, "Choose the method of subtle messaging", "Subtle Message", subtle_message_options)
|
||||
if (!sender)
|
||||
return
|
||||
|
||||
message_admins("[key_name_admin(src)] has started answering [ADMIN_LOOKUPFLW(M)]'s prayer / faction PM.")
|
||||
var/msg = input("Contents of the message", text("Subtle PM to [M.key]")) as text
|
||||
if (!msg)
|
||||
message_admins("[key_name_admin(src)] decided not to answer [ADMIN_LOOKUPFLW(M)]'s prayer / faction PM.")
|
||||
return
|
||||
|
||||
if (sender == "Voice in head")
|
||||
to_chat(M, "<i>You hear a voice in your head... <b>[msg]</i></b>")
|
||||
else
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(!istype(H))
|
||||
to_chat(usr, "The person you are trying to contact is not human. Unsent message: [msg]")
|
||||
return
|
||||
|
||||
if(!istype(H.ears, /obj/item/radio/headset))
|
||||
to_chat(usr, "The person you are trying to contact is not wearing a headset. Unsent message: [msg]")
|
||||
return
|
||||
|
||||
to_chat(H, "You hear something crackle in your ears for a moment before a voice speaks. \"Please stand by for a message from [sender == RADIO_CHANNEL_SYNDICATE ? "your benefactor" : "Central Command"]. Message as follows[sender == RADIO_CHANNEL_SYNDICATE ? ", agent." : ":"] <span class='bold'>[msg].</span> Message ends.\"")
|
||||
|
||||
|
||||
log_admin("SubtlePM ([sender]): [key_name(usr)] -> [key_name(M)] : [msg]")
|
||||
msg = "<span class='adminnotice'><b> SubtleMessage ([sender]): [key_name_admin(usr)] -> [key_name_admin(M)] :</b> [msg]</span>"
|
||||
message_admins(msg)
|
||||
admin_ticket_log(M, msg)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Subtle Message") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
/mob/Initialize()
|
||||
. = ..()
|
||||
create_player_panel()
|
||||
|
||||
/mob/Destroy()
|
||||
QDEL_NULL(mob_panel)
|
||||
. = ..()
|
||||
|
||||
/mob/verb/tilt_left()
|
||||
set hidden = TRUE
|
||||
if(!canface() || is_tilted < -45)
|
||||
|
||||
Reference in New Issue
Block a user