From 86295e45dd2834559d9d28d1eb4ff3ffc87871b3 Mon Sep 17 00:00:00 2001 From: dj-34 Date: Sun, 26 Nov 2023 20:19:56 +0500 Subject: [PATCH] Feat: Respawn return --- modular_ss220/modular_ss220.dme | 1 + modular_ss220/verbs/_verbs.dm | 4 ++++ modular_ss220/verbs/_verbs.dme | 3 +++ modular_ss220/verbs/code/verbs.dm | 38 +++++++++++++++++++++++++++++++ 4 files changed, 46 insertions(+) create mode 100644 modular_ss220/verbs/_verbs.dm create mode 100644 modular_ss220/verbs/_verbs.dme create mode 100644 modular_ss220/verbs/code/verbs.dm diff --git a/modular_ss220/modular_ss220.dme b/modular_ss220/modular_ss220.dme index 556f59fe8c45..55018b78a458 100644 --- a/modular_ss220/modular_ss220.dme +++ b/modular_ss220/modular_ss220.dme @@ -69,6 +69,7 @@ #include "sm_space_drop/sm_space_drop.dme" #include "text_to_speech/_tts.dme" #include "title_screen/_title_screen.dme" +#include "verbs/_verbs.dme" #include "whitelist/_whitelist.dme" #include "outfits/_outfits.dme" #include "world_view_bigger/_world_view_bigger.dme" diff --git a/modular_ss220/verbs/_verbs.dm b/modular_ss220/verbs/_verbs.dm new file mode 100644 index 000000000000..ea9851a79b53 --- /dev/null +++ b/modular_ss220/verbs/_verbs.dm @@ -0,0 +1,4 @@ +/datum/modpack/verbs + name = "Verbs" + desc = "Кастомные вербы, а также возвращение некоторых вырезанных." + author = "dj-34" diff --git a/modular_ss220/verbs/_verbs.dme b/modular_ss220/verbs/_verbs.dme new file mode 100644 index 000000000000..6769c12e0a80 --- /dev/null +++ b/modular_ss220/verbs/_verbs.dme @@ -0,0 +1,3 @@ +#include "_verbs.dm" + +#include "code/verbs.dm" diff --git a/modular_ss220/verbs/code/verbs.dm b/modular_ss220/verbs/code/verbs.dm new file mode 100644 index 000000000000..96951343c0a1 --- /dev/null +++ b/modular_ss220/verbs/code/verbs.dm @@ -0,0 +1,38 @@ +/* + Respawn to OOC + May be returned in the future by offs (because it's commented in code\modules\mob) +*/ +/mob/verb/abandon_mob() + set name = "Respawn" + set category = "OOC" + + if(!GLOB.configuration.general.respawn_enabled) + to_chat(usr, "Respawning is disabled.") + return + + if(stat != DEAD || !SSticker) + to_chat(usr, "You must be dead to use this!") + return + + log_game("[key_name(usr)] has respawned.") + + to_chat(usr, "Make sure to play a different character, and please roleplay correctly!") + + if(!client) + log_game("[key_name(usr)] respawn failed due to disconnect.") + return + client.screen.Cut() + client.screen += client.void + + if(!client) + log_game("[key_name(usr)] respawn failed due to disconnect.") + return + + var/mob/new_player/M = new /mob/new_player() + if(!client) + log_game("[key_name(usr)] respawn failed due to disconnect.") + qdel(M) + return + + M.key = key + return