ghost roles fix

This commit is contained in:
Metis
2024-10-14 23:57:52 -04:00
parent 007b5565ec
commit f348b44bef
7 changed files with 32 additions and 3 deletions
@@ -12,6 +12,7 @@
flavour_text = "After you've sold your soul to corporate overlords, your contract obliged you to enter cryostasis. \
Finally, after God knows how long, the cryopod system have awakened you with only a single sentence of information - welcome and lure in new guests into the freshly opened GATO restaurant!"
assignedrole = "Restaurant worker"
mirrorcanloadappearance = TRUE
/obj/effect/mob_spawn/human/fastfoodmanager
name = "Corporate cryostasis pod"
@@ -27,6 +28,7 @@
flavour_text = "After you've sold your soul to corporate overlords, your contract obliged you to enter cryostasis. \
Finally, after God knows how long, the cryopod system have awakened you with only a single sentence of information - make sure to keep the best care of GATO's restaurant, currently under your management! You have a higher say over your workers, but do not abuse this power."
assignedrole = "Restaurant manager"
mirrorcanloadappearance = TRUE
/obj/effect/mob_spawn/human/fastfood/Initialize(mapload)
. = ..()
@@ -108,6 +110,7 @@
death = FALSE
roundstart = FALSE
mob_species = /datum/species/human
mirrorcanloadappearance = TRUE
/datum/outfit/feeders_den/fanatic
name = "Feeder Fanatic"
@@ -152,6 +155,7 @@
death = FALSE
roundstart = FALSE
mob_species = /datum/species/human
mirrorcanloadappearance = TRUE
/datum/outfit/feeders_den/victim
name = "Den Victim"
+1
View File
@@ -21,6 +21,7 @@
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.checkloadappearance() // GS13 EDIT
//see code/modules/mob/dead/new_player/preferences.dm at approx line 545 for comments!
//this is largely copypasted from there.
@@ -56,6 +56,12 @@
if(send_to_spawnpoint)
move_to_spawnpoint()
//GS13 EDIT START
var/mob/living/carbon/human/H = owner.current
H.checkloadappearance()
//GS13 EDIT END
/datum/antagonist/nukeop/get_team()
return nuke_team
@@ -30,6 +30,11 @@
create_objectives()
if(move_to_lair)
send_to_lair()
//GS13 EDIT START
var/mob/living/carbon/human/H = owner.current
H.mirrorcanloadappearance = TRUE
H.checkloadappearance()
//GS13 EDIT END
. = ..()
if(allow_rename)
rename_wizard()
+6
View File
@@ -32,6 +32,7 @@
var/banType = "lavaland"
var/ghost_usable = TRUE
var/skip_reentry_check = FALSE //Skips the ghost role blacklist time for people who ghost/suicide/cryo
var/mirrorcanloadappearance = TRUE //GS13 EDIT
///override this to add special spawn conditions to a ghost role
/obj/effect/mob_spawn/proc/allow_spawn(mob/user, silent = FALSE)
@@ -139,6 +140,7 @@
M.mind.assigned_role = assignedrole
special(M, name)
MM.name = M.real_name
M.checkloadappearance() // GS13 EDIT
if(uses > 0)
uses--
if(!permanent && !uses)
@@ -251,6 +253,10 @@
W.assignment = id_job
W.registered_name = H.real_name
W.update_label()
//GS13 EDIT START
if (mirrorcanloadappearance)
H.mirrorcanloadappearance = TRUE
//GS13 EDIT END
//Instant version - use when spawning corpses during runtime
/obj/effect/mob_spawn/human/corpse
+9 -3
View File
@@ -1,11 +1,14 @@
mob/proc/checkloadappearance()
var/mob/living/carbon/human/H = src
if(!istype(H))
return FALSE
//This will be where the person gets to select their appearance instead of the random character
if (world.time <= (H.time_initialized + 900) && H.mirrorcanloadappearance == TRUE)
if (H.mirrorcanloadappearance == TRUE)
SEND_SOUND(H, 'sound/misc/server-ready.ogg')
to_chat(H, "<span class='boldannounce'>This ghost role allows you to select your loaded character's appearance. Make sure you have your ID in your ID slot, if you have one.</span>")
if(alert(H, "Would you like to load your currently loaded character's appearance?", "This can only be done up until 90s after you spawn.", "Yes", "No") == "Yes" && world.time <= (H.time_initialized + 900))
if(alert(H, "You should only load a character that has not currently died in the round. Do you accept this?", "Warning", "Yes", "No") == "Yes" && world.time <= (H.time_initialized + 900))
if(alert(H, "Would you like to load your currently loaded character's appearance?", "This can only be done up until 90s after you spawn.", "Yes", "No") == "Yes")
if(alert(H, "You should only load a character that has not currently died in the round. Do you accept this?", "Warning", "Yes", "No") == "Yes")
H.client?.prefs?.copy_to(H)
if (H.custom_body_size) //Do they have a custom size set?
H.resize(H.custom_body_size)
@@ -27,3 +30,6 @@ mob/proc/checkloadappearance()
else
to_chat(H, "<span class='boldannounce'>You either took too long or chose not to change. Alrighty. Remember, you have 90 seconds from spawn to get to a mirror and still do it if you wish.</span>")
return
/mob/living/carbon/human
var/mirrorcanloadappearance = FALSE //Can the mob load their true appearance with a mirror?
+1
View File
@@ -4060,6 +4060,7 @@
#include "hyperstation\code\modules\arousal\arousalhud.dm"
#include "hyperstation\code\modules\clothing\sizeaccessories.dm"
#include "hyperstation\code\modules\food_and_drinks\recipes\drinks_recipes.dm"
#include "hyperstation\code\modules\mob\mob_helpers.dm"
#include "hyperstation\code\modules\mob\living\status_indicators.dm"
#include "hyperstation\code\modules\reagents\chemistry\reagents\drink_reagents.dm"
#include "hyperstation\code\modules\reagents\chemistry\reagents\food_reagents.dm"