Skip to content

Commit

Permalink
Feat: Respawn return
Browse files Browse the repository at this point in the history
  • Loading branch information
dj-34 committed Nov 26, 2023
1 parent 4ea5ae7 commit 86295e4
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 0 deletions.
1 change: 1 addition & 0 deletions modular_ss220/modular_ss220.dme
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions modular_ss220/verbs/_verbs.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/datum/modpack/verbs
name = "Verbs"
desc = "Кастомные вербы, а также возвращение некоторых вырезанных."
author = "dj-34"
3 changes: 3 additions & 0 deletions modular_ss220/verbs/_verbs.dme
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include "_verbs.dm"

#include "code/verbs.dm"
38 changes: 38 additions & 0 deletions modular_ss220/verbs/code/verbs.dm
Original file line number Diff line number Diff line change
@@ -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, "<span class='warning'>Respawning is disabled.</span>")
return

if(stat != DEAD || !SSticker)
to_chat(usr, "<span class='boldnotice'>You must be dead to use this!</span>")
return

log_game("[key_name(usr)] has respawned.")

to_chat(usr, "<span class='boldnotice'>Make sure to play a different character, and please roleplay correctly!</span>")

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

0 comments on commit 86295e4

Please sign in to comment.