Merge pull request #465 from ArchieBeepBoop/ghostrolecustom

Custom Ghost Role Appearance
This commit is contained in:
Dahlular
2020-09-17 08:39:35 -06:00
committed by GitHub
6 changed files with 38 additions and 1 deletions
@@ -210,6 +210,7 @@
conditions of your makeshift shelter, the hostile creatures, and the ash drakes swooping down from the cloudless skies, all you can wish for is the feel of soft grass between your toes and \
the fresh air of Earth. These thoughts are dispelled by yet another recollection of how you got here... "
assignedrole = "Hermit"
mirrorcanloadappearance = TRUE
/obj/effect/mob_spawn/human/hermit/Initialize(mapload)
. = ..()
@@ -258,6 +259,7 @@
everyone's gone. One of the cats scratched you just a few minutes ago. That's why you were in the pod - to heal the scratch. The scabs are still fresh; you see them right now. So where is \
everyone? Where did they go? What happened to the hospital? And is that <i>smoke</i> you smell? You need to find someone else. Maybe they can tell you what happened.</b>"
assignedrole = "Translocated Vet"
mirrorcanloadappearance = TRUE
/obj/effect/mob_spawn/human/doctor/alive/lavaland/Destroy()
var/obj/structure/fluff/empty_sleeper/S = new(drop_location())
@@ -318,6 +320,7 @@
flavour_text = "<span class='big bold'>You are a staff member of a top-of-the-line space hotel!</span><b> Cater to guests and <font size=6><b>DON'T</b></font> leave the hotel, lest the manager fire you for\
dereliction of duty!</b>"
assignedrole = "Hotel Staff"
mirrorcanloadappearance = TRUE
/datum/outfit/hotelstaff
name = "Hotel Staff"
@@ -335,6 +338,7 @@
flavour_text = "<span class='big bold'>You are a peacekeeper</span><b> assigned to this hotel to protect the interests of the company while keeping the peace between \
guests and the staff. Do <font size=6>NOT</font> leave the hotel, as that is grounds for contract termination.</b>"
objectives = "Do not leave your assigned hotel. Try and keep the peace between staff and guests, non-lethal force heavily advised if possible."
mirrorcanloadappearance = TRUE
/datum/outfit/hotelstaff/security
name = "Hotel Secuirty"
@@ -431,6 +435,7 @@
<br>\
<span class='danger'><b>The armory is not a candy store, and your role is not to assault the station directly, leave that work to the assault operatives.</b></span></font>"
outfit = /datum/outfit/syndicate_empty/SBC
mirrorcanloadappearance = TRUE
/datum/outfit/syndicate_empty/SBC
name = "Syndicate Battlecruiser Ship Operative"
@@ -444,6 +449,7 @@
<br>\
<span class='danger'><b>Work as a team with your fellow operatives and work out a plan of attack. If you are overwhelmed, escape back to your ship!</b></span></span>"
outfit = /datum/outfit/syndicate_empty/SBC/assault
mirrorcanloadappearance = TRUE
/datum/outfit/syndicate_empty/SBC/assault
name = "Syndicate Battlecruiser Assault Operative"
@@ -463,6 +469,7 @@
<span class='danger'><b>As the captain, this whole operation falls on your shoulders.</b></span> You do not need to nuke the station, causing sufficient damage and preventing your ship from being destroyed will be enough.</span>"
outfit = /datum/outfit/syndicate_empty/SBC/assault/captain
id_access_list = list(150,151)
mirrorcanloadappearance = TRUE
/datum/outfit/syndicate_empty/SBC/assault/captain
name = "Syndicate Battlecruiser Captain"
@@ -497,6 +504,7 @@
l_pocket = /obj/item/assembly/flash/handheld
job_description = "Oldstation Crew"
assignedrole = "Ancient Crew"
mirrorcanloadappearance = TRUE
/obj/effect/mob_spawn/human/oldsec/Destroy()
new/obj/structure/showcase/machinery/oldpod/used(drop_location())
@@ -523,6 +531,7 @@
gloves = /obj/item/clothing/gloves/color/fyellow/old
l_pocket = /obj/item/tank/internals/emergency_oxygen
assignedrole = "Ancient Crew"
mirrorcanloadappearance = TRUE
/obj/effect/mob_spawn/human/oldeng/Destroy()
new/obj/structure/showcase/machinery/oldpod/used(drop_location())
@@ -548,6 +557,7 @@
l_pocket = /obj/item/stack/medical/bruise_pack
assignedrole = "Ancient Crew"
job_description = "Oldstation Crew"
mirrorcanloadappearance = TRUE
/obj/effect/mob_spawn/human/oldsci/Destroy()
new/obj/structure/showcase/machinery/oldpod/used(drop_location())
+18 -1
View File
@@ -23,7 +23,24 @@
if(ishuman(user))
var/mob/living/carbon/human/H = user
//Jay's mirror code suggestion
//This will be where the person gets to select their appearance instead of the random character
if (world.time <= (user.time_initialized + 900) && user.mirrorcanloadappearance == TRUE)
to_chat(user, "<span class='boldannounce'>You peer into the mirror. Make sure you have your ID in your ID slot, if you have one.</span>")
if(alert(user, "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 <= (user.time_initialized + 900))
user.client.prefs.copy_to(user)
user.real_name = user.client.prefs.real_name
var/obj/item/card/id/idCard = user.get_idcard()
if (idCard != null)
idCard.update_label(user.real_name, idCard.assignment)
idCard.registered_name = user.real_name
user.mirrorcanloadappearance = FALSE
SEND_SOUND(user, 'sound/magic/charge.ogg')
to_chat(user, "<span class='boldannounce'>Your head aches for a second. You feel like this is how things should have been.</span>")
log_game("[key_name(user)] has loaded their default appearance for a ghost role.")
message_admins("[ADMIN_LOOKUPFLW(user)] has loaded their default appearance for a ghost role.")
return
else return
//see code/modules/mob/dead/new_player/preferences.dm at approx line 545 for comments!
//this is largely copypasted from there.
+3
View File
@@ -162,6 +162,7 @@
var/hair_style
var/facial_hair_style
var/skin_tone
var/mirrorcanloadappearance = FALSE
/obj/effect/mob_spawn/human/Initialize()
if(ispath(outfit))
@@ -228,6 +229,8 @@
W.assignment = id_job
W.registered_name = H.real_name
W.update_label()
if (mirrorcanloadappearance)
H.mirrorcanloadappearance = TRUE
//Instant version - use when spawning corpses during runtime
/obj/effect/mob_spawn/human/corpse
@@ -9,6 +9,7 @@
verbs += /mob/living/proc/mob_sleep
verbs += /mob/living/proc/lay_down
verbs += /mob/living/carbon/human/proc/underwear_toggle //fwee
time_initialized = world.time
//initialize limbs first
create_bodyparts()
+4
View File
@@ -119,3 +119,7 @@
var/registered_z
var/mob/audiovisual_redirect //Mob to redirect messages, speech, and sounds to
var/time_initialized = null
var/mirrorcanloadappearance = FALSE
+2
View File
@@ -117,6 +117,7 @@
flavour_text = "<span class='big bold'>You are a syndicate agent,</span><b> employed in a top secret research facility developing biological weapons. Unfortunately, your hated enemy, Nanotrasen, has begun mining in this sector. <b>Continue your research as best you can, and try to keep a low profile. <font size=6>DON'T</font> abandon the base without good cause.</b> The base is rigged with explosives should the worst happen, do not let the base fall into enemy hands!</b>"
outfit = /datum/outfit/lavaland_syndicate
assignedrole = "Lavaland Syndicate"
mirrorcanloadappearance = TRUE
/obj/effect/mob_spawn/human/lavaland_syndicate/special(mob/living/new_spawn)
new_spawn.grant_language(/datum/language/codespeak)
@@ -143,6 +144,7 @@
job_description = "Off-station Syndicate Comms Agent"
flavour_text = "<span class='big bold'>You are a syndicate agent,</span><b> employed in a top secret research facility developing biological weapons. Unfortunately, your hated enemy, Nanotrasen, has begun mining in this sector. <b>Monitor enemy activity as best you can, and try to keep a low profile. <font size=6>DON'T</font> abandon the base without good cause.</b> Use the communication equipment to provide support to any field agents, and sow disinformation to throw Nanotrasen off your trail. Do not let the base fall into enemy hands!</b>"
outfit = /datum/outfit/lavaland_syndicate/comms
mirrorcanloadappearance = TRUE
/obj/effect/mob_spawn/human/lavaland_syndicate/comms/space/Initialize()
. = ..()