holiday and quirk support
This commit is contained in:
@@ -1,20 +1,33 @@
|
||||
//every quirk in this folder should be coded around being applied on spawn
|
||||
//these are NOT "mob quirks" like GOTTAGOFAST, but exist as a medium to apply them and other different effects
|
||||
/datum/quirk
|
||||
/// The name of the quirk
|
||||
var/name = "Test Quirk"
|
||||
/// The description of the quirk
|
||||
var/desc = "This is a test quirk."
|
||||
/// What the quirk is worth in preferences, zero = neutral / free
|
||||
var/value = 0
|
||||
var/human_only = TRUE
|
||||
/// Text displayed when this quirk is assigned to a mob (and not transferred)
|
||||
var/gain_text
|
||||
/// Text displayed when this quirk is removed from a mob (and not transferred)
|
||||
var/lose_text
|
||||
var/medical_record_text //This text will appear on medical records for the trait. Not yet implemented
|
||||
var/antag_removal_text // Text will be given to the quirk holder if they get an antag that has it blacklisted.
|
||||
/// This text will appear on medical records for the trait.
|
||||
var/medical_record_text
|
||||
/// Text will be given to the quirk holder if they get an antag that has it blacklisted.
|
||||
var/antag_removal_text
|
||||
var/mood_quirk = FALSE //if true, this quirk affects mood and is unavailable if moodlets are disabled
|
||||
var/mob_trait //if applicable, apply and remove this mob trait
|
||||
/// if applicable, apply and remove this mob trait
|
||||
var/mob_trait
|
||||
/// should we immediately call on_spawn or add a timer to trigger
|
||||
var/on_spawn_immediate = TRUE
|
||||
/// Reference to the mob currently tied to this quirk datum. Quirks are not singletons.
|
||||
var/mob/living/quirk_holder
|
||||
var/processing_quirk = FALSE
|
||||
/// A lazylist of items people can receive from mail who have this quirk enabled
|
||||
/// The base weight for the each quirk's mail goodies list to be selected is 5
|
||||
/// then the item selected is determined by pick(selected_quirk.mail_goodies)
|
||||
var/list/mail_goodies
|
||||
|
||||
/datum/quirk/New(mob/living/quirk_mob, spawn_effects)
|
||||
if(!quirk_mob || (human_only && !ishuman(quirk_mob)) || quirk_mob.has_quirk(type))
|
||||
|
||||
@@ -9,6 +9,12 @@
|
||||
antag_removal_text = "Your antagonistic nature has removed your blood deficiency."
|
||||
medical_record_text = "Patient requires regular treatment for blood loss due to low production of blood."
|
||||
|
||||
/datum/quirk/blooddeficiency/add()
|
||||
RegisterSignal(quirk_holder, COMSIG_SPECIES_GAIN, PROC_REF(update_mail))
|
||||
|
||||
var/mob/living/carbon/human/human_holder = quirk_holder
|
||||
update_mail(new_species = human_holder.dna.species)
|
||||
|
||||
/datum/quirk/blooddeficiency/on_process()
|
||||
var/mob/living/carbon/human/H = quirk_holder
|
||||
if(NOBLOOD in H.dna.species.species_traits) //can't lose blood if your species doesn't have any
|
||||
@@ -16,6 +22,24 @@
|
||||
else
|
||||
quirk_holder.blood_volume -= 0.2
|
||||
|
||||
/datum/quirk/blooddeficiency/proc/update_mail(datum/source, datum/species/new_species, datum/species/old_species)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
mail_goodies.Cut()
|
||||
|
||||
if(isnull(new_species.exotic_blood)) // && isnull(new_species.exotic_bloodtype)) // We don't really support your blood yet :(
|
||||
if(NOBLOOD in new_species.inherent_traits)
|
||||
return
|
||||
|
||||
mail_goodies += /obj/item/reagent_containers/blood/OMinus
|
||||
return
|
||||
|
||||
for(var/obj/item/reagent_containers/blood/blood_bag as anything in typesof(/obj/item/reagent_containers/blood))
|
||||
var/right_blood_type = !isnull(new_species.exotic_bloodtype) && initial(blood_bag.blood_type) == new_species.exotic_bloodtype
|
||||
// var/right_blood_reagent = !isnull(new_species.exotic_blood) && initial(blood_bag.unique_blood) == new_species.exotic_blood
|
||||
if(right_blood_type) // || right_blood_reagent)
|
||||
mail_goodies += blood_bag
|
||||
|
||||
/datum/quirk/depression
|
||||
name = "Depression"
|
||||
desc = "You sometimes just hate life."
|
||||
|
||||
Reference in New Issue
Block a user