forked from tgstation/tgstation
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ros_Sample
committed
Aug 19, 2024
1 parent
5e50d8f
commit e74d1d4
Showing
13 changed files
with
730 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/datum/modpack/cryosleep | ||
name = "Капсулы криосна" | ||
desc = "Добавляет капсулы для криосна." | ||
author = "Azarak (автор, NovaSector), Ros_Sample (порт)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include "_cryosleep.dm" | ||
|
||
#include "code/admin.dm" | ||
#include "code/ai.dm" | ||
#include "code/config.dm" | ||
#include "code/cryo_console_return.dm" | ||
#include "code/cryopod.dm" | ||
#include "code/job.dm" | ||
#include "code/jobs.dm" | ||
#include "code/mind.dm" | ||
#include "code/mood.dm" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/// 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 && cryo.state_open && !cryo.panel_open) //free, opened, and panel closed? | ||
if(buckled) | ||
buckled.unbuckle_mob(src, TRUE) | ||
if(buckled_mobs) | ||
for(var/mob/buckled_mob in buckled_mobs) | ||
unbuckle_mob(buckled_mob) | ||
cryo.close_machine(src) //put player | ||
break | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/mob/living/silicon/ai/verb/ai_cryo() | ||
set name = "AI Cryogenic Stasis" | ||
set desc = "Puts the current AI personality into cryogenic stasis, freeing the space for another." | ||
set category = "AI Commands" | ||
|
||
if(incapacitated()) | ||
return | ||
if(tgui_alert(usr, "Войти в криосон? Вы станете призраком. Не забывайте Ахелпать при вхождении в криосон на важных ролях.", "Войти в криогенный стазис", list("Да", "Нет")) == "Да") | ||
src.ghostize(FALSE) | ||
minor_announce("Станционный ИИ был отключён от внутренних систем и был перемещён на хранение. Подготовка к загрузке нового ИИ.", "Станционный ИИ") | ||
new /obj/structure/ai_core/latejoin_inactive(loc) | ||
if(src.mind) | ||
//Handle job slot/tater cleanup. | ||
if(src.mind.assigned_role.title == JOB_AI) | ||
SSjob.FreeRole(JOB_AI) | ||
src.mind.special_role = null | ||
qdel(src) | ||
else | ||
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/datum/config_entry/number/cryo_min_ssd_time | ||
config_entry_value = 15 |
23 changes: 23 additions & 0 deletions
23
modular_bandastation/cryosleep/code/cryo_console_return.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/// Returns any items inside of the `items_to_send` list to a cryo console on station. | ||
/mob/living/carbon/human/proc/return_items_to_console(list/items_to_send) | ||
var/list/held_contents = get_contents() | ||
if(!held_contents || !items_to_send) | ||
return FALSE | ||
|
||
var/obj/machinery/computer/cryopod/target_console | ||
for(var/obj/machinery/computer/cryopod/cryo_console in GLOB.cryopod_computers) | ||
target_console = cryo_console | ||
var/turf/target_turf = get_turf(target_console) | ||
if(is_station_level(target_turf.z)) //If we find a cryo console on station, send items to it first and foremost. | ||
break | ||
|
||
if(!target_console) | ||
return FALSE | ||
|
||
for(var/obj/item/found_item in held_contents) | ||
if(!is_type_in_list(found_item, items_to_send)) | ||
continue | ||
transferItemToLoc(found_item, target_console, force = TRUE, silent = TRUE) | ||
target_console.frozen_item += found_item | ||
|
||
return TRUE |
Oops, something went wrong.