mirror of
https://github.com/KabKebab/GS13.git
synced 2026-02-09 15:17:41 +00:00
Merge pull request #599 from ArchieBeepBoop/becomemodular
SHITCODE: BECOME MODULAR
This commit is contained in:
@@ -81,3 +81,21 @@ GLOBAL_VAR_INIT(cmp_field, "name")
|
||||
|
||||
/proc/cmp_advdisease_resistance_asc(datum/disease/advance/A, datum/disease/advance/B)
|
||||
return A.totalResistance() - B.totalResistance()
|
||||
|
||||
/proc/cmp_quirk_asc(datum/quirk/A, datum/quirk/B)
|
||||
var/a_sign = num2sign(initial(A.value) * -1)
|
||||
var/b_sign = num2sign(initial(B.value) * -1)
|
||||
|
||||
// Neutral traits go last
|
||||
if(a_sign == 0)
|
||||
a_sign = 2
|
||||
if(b_sign == 0)
|
||||
b_sign = 2
|
||||
|
||||
var/a_name = initial(A.name)
|
||||
var/b_name = initial(B.name)
|
||||
|
||||
if(a_sign != b_sign)
|
||||
return a_sign - b_sign
|
||||
else
|
||||
return sorttext(b_name, a_name)
|
||||
|
||||
@@ -1565,3 +1565,11 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
|
||||
for(var/i in L)
|
||||
if(condition.Invoke(i))
|
||||
. |= i
|
||||
|
||||
/proc/num2sign(numeric)
|
||||
if(numeric > 0)
|
||||
return 1
|
||||
else if(numeric < 0)
|
||||
return -1
|
||||
else
|
||||
return 0
|
||||
|
||||
@@ -19,7 +19,10 @@ PROCESSING_SUBSYSTEM_DEF(quirks)
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/processing/quirks/proc/SetupQuirks()
|
||||
for(var/V in subtypesof(/datum/quirk))
|
||||
// Sort by Positive, Negative, Neutral; and then by name
|
||||
var/list/quirk_list = sortList(subtypesof(/datum/quirk), /proc/cmp_quirk_asc)
|
||||
|
||||
for(var/V in quirk_list)
|
||||
var/datum/quirk/T = V
|
||||
quirks[initial(T.name)] = T
|
||||
quirk_points[initial(T.name)] = initial(T.value)
|
||||
|
||||
@@ -194,14 +194,6 @@
|
||||
allow_duplicates = FALSE
|
||||
cost = 10
|
||||
|
||||
/datum/map_template/ruin/lavaland/duohermit
|
||||
name = "Makeshift Big Shelter"
|
||||
id = "duohermitcave"
|
||||
description = "A place of shelter for a couple of stranded hermits, scraping by to live another day."
|
||||
suffix = "lavaland_surface_duohermit.dmm"
|
||||
allow_duplicates = FALSE
|
||||
cost = 5
|
||||
|
||||
/datum/map_template/ruin/lavaland/hermit
|
||||
name = "Makeshift Shelter"
|
||||
id = "hermitcave"
|
||||
|
||||
@@ -276,63 +276,3 @@
|
||||
/datum/quirk/slimespeaker/remove()
|
||||
var/mob/living/M = quirk_holder
|
||||
M.remove_language(/datum/language/slime)
|
||||
|
||||
/datum/quirk/narsianspeaker
|
||||
name = "Nar-Sian speaker"
|
||||
desc = "Obsessed with forbidden knowledge regarding the blood cult, you've learned how to speak their ancient language."
|
||||
value = 1
|
||||
gain_text = "<span class='notice'>Your mind feels sensitive to the slurred, ancient language of Nar'Sian cultists.</span>"
|
||||
lose_text = "<span class='notice'>You forget how to speak Nar'Sian!</span>"
|
||||
|
||||
/datum/quirk/narsianspeaker/add()
|
||||
var/mob/living/M = quirk_holder
|
||||
M.grant_language(/datum/language/narsie)
|
||||
|
||||
/datum/quirk/narsianspeaker/remove()
|
||||
var/mob/living/M = quirk_holder
|
||||
M.remove_language(/datum/language/narsie)
|
||||
|
||||
/datum/quirk/ratvarianspeaker
|
||||
name = "Ratvarian speaker"
|
||||
desc = "Obsessed with the inner workings of the clock cult, you've learned how to speak their language."
|
||||
value = 1
|
||||
gain_text = "<span class='notice'>Your mind feels sensitive to the ancient language of Ratvarian cultists.</span>"
|
||||
lose_text = "<span class='notice'>You forget how to speak Ratvarian!</span>"
|
||||
|
||||
/datum/quirk/ratvarianspeaker/add()
|
||||
var/mob/living/M = quirk_holder
|
||||
M.grant_language(/datum/language/ratvar)
|
||||
|
||||
/datum/quirk/ratvarianspeaker/remove()
|
||||
var/mob/living/M = quirk_holder
|
||||
M.remove_language(/datum/language/ratvar)
|
||||
|
||||
/datum/quirk/encodedspeaker
|
||||
name = "Encoded Audio speaker"
|
||||
desc = "You've been augmented with language encoders, allowing you to understand encoded audio."
|
||||
value = 1
|
||||
gain_text = "<span class='notice'>Your mouth feels a little weird for a moment as your language encoder kicks in.</span>"
|
||||
lose_text = "<span class='notice'>You feel your encoded audio chip malfunction. You can no longer speak or understand the language of fax machines.</span>"
|
||||
|
||||
/datum/quirk/encodedspeaker/add()
|
||||
var/mob/living/M = quirk_holder
|
||||
M.grant_language(/datum/language/machine)
|
||||
|
||||
/datum/quirk/encodedspeaker/remove()
|
||||
var/mob/living/M = quirk_holder
|
||||
M.remove_language(/datum/language/machine)
|
||||
|
||||
/datum/quirk/xenospeaker
|
||||
name = "Xenocommon speaker"
|
||||
desc = "Through time observing and interacting with xenos and xeno hybrids, you've learned the intricate hissing patterns of their language."
|
||||
value = 1
|
||||
gain_text = "<span class='notice'>You feel that you are now able to hiss in the same way xenomorphs do.</span>"
|
||||
lose_text = "<span class='notice'>You seem to no longer know how to speak xenocommon.</span>"
|
||||
|
||||
/datum/quirk/xenospeaker/add()
|
||||
var/mob/living/M = quirk_holder
|
||||
M.grant_language(/datum/language/xenocommon)
|
||||
|
||||
/datum/quirk/xenospeaker/remove()
|
||||
var/mob/living/M = quirk_holder
|
||||
M.remove_language(/datum/language/xenocommon)
|
||||
|
||||
@@ -109,22 +109,3 @@
|
||||
mob_trait = TRAIT_HEADPAT_SLUT
|
||||
value = 0
|
||||
medical_record_text = "Patient seems overly affectionate"
|
||||
|
||||
//Skyrat port start
|
||||
/datum/quirk/alcohol_lightweight
|
||||
name = "Alcoholic Lightweight"
|
||||
desc = "Alcohol really goes straight to your head, gotta be careful with what you drink."
|
||||
value = 0
|
||||
mob_trait = TRAIT_ALCOHOL_LIGHTWEIGHT
|
||||
gain_text = "<span class='notice'>You feel woozy thinking of alcohol.</span>"
|
||||
lose_text = "<span class='notice'>You regain your stomach for drinks.</span>"
|
||||
//Skyrat port stop
|
||||
|
||||
/datum/quirk/cursed_blood
|
||||
name = "Cursed Blood"
|
||||
desc = "Your lineage is cursed with the paleblood curse. Best to stay away from holy water... Hell water, on the other hand..."
|
||||
value = 0
|
||||
mob_trait = TRAIT_CURSED_BLOOD
|
||||
gain_text = "<span class='notice'>A curse from a land where men return as beasts runs deep in your blood. Best to stay away from holy water... Hell water, on the other hand...</span>"
|
||||
lose_text = "<span class='notice'>You feel the weight of the curse in your blood finally gone.</span>"
|
||||
medical_record_text = "Patient suffers from an unknown type of aversion to holy reagents. Keep them away from a chaplain."
|
||||
|
||||
@@ -251,112 +251,6 @@
|
||||
new/obj/structure/fluff/empty_cryostasis_sleeper(get_turf(src))
|
||||
return ..()
|
||||
|
||||
//Duo malfunctioning cryostasis sleepers: Spawns in big makeshift shelters in lavaland.
|
||||
/obj/effect/mob_spawn/human/duohermit
|
||||
name = "malfunctioning cryostasis sleeper"
|
||||
desc = "A humming sleeper with a silhouetted occupant inside. Its stasis function is broken and it's likely being used as a bed."
|
||||
mob_name = "a stranded hermit"
|
||||
job_description = "Lavaland Hermit"
|
||||
icon = 'icons/obj/lavaland/spawners.dmi'
|
||||
icon_state = "cryostasis_sleeper"
|
||||
roundstart = FALSE
|
||||
death = FALSE
|
||||
random = TRUE
|
||||
mob_species = /datum/species/human
|
||||
flavour_text = "<span class='big bold'>You and another have been stranded in this planet for quite some time now.</span><b> Each day you barely scrape by, and between the terrible \
|
||||
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 and your friend got here... "
|
||||
assignedrole = "Hermit"
|
||||
mirrorcanloadappearance = TRUE
|
||||
|
||||
/obj/effect/mob_spawn/human/duohermit/Initialize(mapload)
|
||||
. = ..()
|
||||
var/arrpee = rand(1,3)
|
||||
switch(arrpee)
|
||||
if(1)
|
||||
flavour_text += "you were an intern at a rather odd deep space facility. You weren't quite sure how things worked or what they were doing there, but it was your first day on the \
|
||||
job. A day that was abruptly interrupted by gunfire and alarms. Luckily enough, your handy crowbar skills managed to get you to an escape pod before it was too late.</b>"
|
||||
outfit.uniform = /obj/item/clothing/under/assistantformal
|
||||
outfit.shoes = /obj/item/clothing/shoes/sneakers/black
|
||||
outfit.back = /obj/item/storage/backpack
|
||||
if(2)
|
||||
flavour_text += "you were a volunteer test subject for a state of the art deep space facility. You didn't care much about who you were working with, but in the end, the paycheck \
|
||||
was really, really good. To this day, you're not quite sure which sort of prototype implants were used on you, as you seem to remember little but the headache that struck you once \
|
||||
the escape pod finally hit the ground and your seatbelt failed to keep you buckled.</b>"
|
||||
outfit.uniform = /obj/item/clothing/under/rank/scientist
|
||||
outfit.suit = /obj/item/clothing/suit/toggle/labcoat
|
||||
outfit.shoes = /obj/item/clothing/shoes/sneakers/black
|
||||
outfit.back = /obj/item/storage/backpack
|
||||
if(3)
|
||||
flavour_text += "you were a doctor at a state of the art deep space facility. For who exactly you were conducting research for, not even you are quite sure. Only that the paycheck \
|
||||
at the end of the month was good enough. In the end, when said facility was attacked by Nanotransen, you and another were the only ones to have made it out alive. Or so it seemed.</b>"
|
||||
outfit.uniform = /obj/item/clothing/under/rank/medical
|
||||
outfit.suit = /obj/item/clothing/suit/toggle/labcoat
|
||||
outfit.back = /obj/item/storage/backpack/medic
|
||||
outfit.shoes = /obj/item/clothing/shoes/sneakers/black
|
||||
|
||||
/obj/effect/mob_spawn/human/duohermit/Destroy()
|
||||
new/obj/structure/fluff/empty_cryostasis_sleeper(get_turf(src))
|
||||
return ..()
|
||||
|
||||
//Exiles: Stranded exiles that have been left in Snowdin. Can be easily adapted for other roles as well.
|
||||
/obj/effect/mob_spawn/human/exiled
|
||||
name = "used bed"
|
||||
desc = "Still warm."
|
||||
mob_name = "exiled"
|
||||
job_description = "Exiles"
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "bed"
|
||||
roundstart = FALSE
|
||||
death = FALSE
|
||||
random = TRUE
|
||||
mob_species = /datum/species/human
|
||||
flavour_text = "As the last escape shuttle left the sector, you were left for dead, stranded in a cold hell where you make do, until hopefully someone finds you. \
|
||||
Every day, you pause and recollect your memories from before it all happened... "
|
||||
assignedrole = "Arctic Exile"
|
||||
mirrorcanloadappearance = TRUE
|
||||
ghost_usable = FALSE
|
||||
|
||||
/obj/effect/mob_spawn/human/exiled/Initialize(mapload)
|
||||
. = ..()
|
||||
delayusability(9000, FALSE) //Probably should not show up on the menu? It gives it away that snowdin is the away mission.
|
||||
var/arrpee = rand(1,3)
|
||||
switch(arrpee)
|
||||
if(1)
|
||||
flavour_text += "You were a lowly engineer, hired by Kinaris to make sure the turbines from their mining operation remained functional. \
|
||||
You remember the day the mining team descended for the very last time into the depths of the shafts, only to never return. \
|
||||
The agonizing screams from whatever now haunts those mines still brings a shiver down your spine."
|
||||
outfit.uniform = /obj/item/clothing/under/rank/engineer
|
||||
outfit.suit = /obj/item/clothing/suit/hooded/wintercoat/engineering
|
||||
outfit.shoes = /obj/item/clothing/shoes/sneakers/black
|
||||
outfit.back = /obj/item/storage/backpack/industrial
|
||||
outfit.id = /obj/item/card/id/away/snowdin/eng
|
||||
outfit.implants = list(/obj/item/implant/exile) //Made it so they cannot simply exit through the gateway at will.
|
||||
if(2)
|
||||
flavour_text += "You were a plasma researcher, hired by Kinaris to oversee a small research division in a remote, isolated little icy planet, \
|
||||
you remember the day the mining team descended for the very last time into the depths of the shafts, only to never return. \
|
||||
While you haven't heard them yourself, reports say the sounds that were heard over radio were likely not of this world."
|
||||
outfit.uniform = /obj/item/clothing/under/rank/scientist
|
||||
outfit.suit = /obj/item/clothing/suit/hooded/wintercoat/science
|
||||
outfit.shoes = /obj/item/clothing/shoes/sneakers/black
|
||||
outfit.back = /obj/item/storage/backpack/science
|
||||
outfit.id = /obj/item/card/id/away/snowdin/sci
|
||||
outfit.implants = list(/obj/item/implant/exile) //Made it so they cannot simply exit through the gateway at will.
|
||||
if(3)
|
||||
flavour_text += "You were a junior doctor, hired by Kinaris to oversee the mental state of a plasma mining operation's miners. \
|
||||
Over and over you reported that the miners were having constant, similar types of hallucinations and that perhaps the whole operation should pause \
|
||||
until further investigation was concluded, but command shrugged it off as an episode of mass hallucination... Until the miners never came back."
|
||||
outfit.uniform = /obj/item/clothing/under/rank/medical
|
||||
outfit.suit = /obj/item/clothing/suit/hooded/wintercoat/medical
|
||||
outfit.shoes = /obj/item/clothing/shoes/sneakers/black
|
||||
outfit.back = /obj/item/storage/backpack/medic
|
||||
outfit.id = /obj/item/card/id/away/snowdin/med
|
||||
outfit.implants = list(/obj/item/implant/exile) //Made it so they cannot simply exit through the gateway at will.
|
||||
|
||||
/obj/effect/mob_spawn/human/exiled/Destroy()
|
||||
new/obj/structure/bed(get_turf(src))
|
||||
return ..()
|
||||
|
||||
//Broken rejuvenation pod: Spawns in animal hospitals in lavaland. Ghosts become disoriented interns and are advised to search for help.
|
||||
/obj/effect/mob_spawn/human/doctor/alive/lavaland
|
||||
name = "broken rejuvenation pod"
|
||||
|
||||
@@ -486,31 +486,3 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
|
||||
/mob/proc/can_hear()
|
||||
. = TRUE
|
||||
|
||||
mob/proc/checkloadappearance()
|
||||
var/mob/living/carbon/human/H = src
|
||||
//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)
|
||||
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))
|
||||
H.client.prefs.copy_to(H)
|
||||
if (H.custom_body_size) //Do they have a custom size set?
|
||||
H.resize(H.custom_body_size * 0.01)
|
||||
H.real_name = H.client.prefs.real_name
|
||||
H.mind.name = H.real_name //Makes sure to change their mind name to their real name.
|
||||
SSquirks.AssignQuirks(H, H.client, TRUE, FALSE, H.job, FALSE)//This Assigns the selected character's quirks
|
||||
H.dna.update_dna_identity() //This makes sure their DNA is updated.
|
||||
var/obj/item/card/id/idCard = H.get_idcard() //Time to change their ID card as well if they have one.
|
||||
if (idCard != null)
|
||||
idCard.update_label(H.real_name, idCard.assignment)
|
||||
idCard.registered_name = H.real_name
|
||||
H.mirrorcanloadappearance = FALSE //Prevents them from using the mirror again.
|
||||
SEND_SOUND(H, 'sound/magic/charge.ogg') //Fluff
|
||||
to_chat(H, "<span class='boldannounce'>Your head aches for a second. You feel like this is how things should have been.</span>")
|
||||
log_game("[key_name(H)] has loaded their default appearance for a ghost role.")
|
||||
message_admins("[ADMIN_LOOKUPFLW(H)] has loaded their default appearance for a ghost role.")
|
||||
return
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user