Adds a trait that makes you more likely to get shitty items in the mail (#16855)

* Adds a trait to turn off receiving mail

* Now reduces the weight of everything and removes anything below 0

* renamed trait
This commit is contained in:
Molti
2022-12-02 08:52:26 -06:00
committed by GitHub
parent 4d4a20f49c
commit 48ad0dc851
3 changed files with 16 additions and 0 deletions

View File

@@ -226,6 +226,7 @@
#define TRAIT_BOTTOMLESS_STOMACH "bottomless_stomach" // Can never be full
#define TRAIT_MESONS "mesons"
#define TRAIT_MAGBOOTS "magboots"
#define TRAIT_BADMAIL "badmail" //Your mail is going to be worse than average
/// This person is crying
#define TRAIT_CRYING "crying"

View File

@@ -854,3 +854,9 @@
/datum/quirk/monochromatic/remove()
if(quirk_holder)
quirk_holder.remove_client_colour(/datum/client_colour/monochrome)
/datum/quirk/nomail
name = "Loser"
desc = "You are a complete nobody, no one would ever send you anything worthwhile in the mail."
value = -1
mob_trait = TRAIT_BADMAIL

View File

@@ -166,6 +166,15 @@
else
goodies += job_goodies
if(recipient.current && HAS_TRAIT(recipient.current, TRAIT_BADMAIL)) //reduce the weight of every item by 10
for(var/item in goodies)
goodies[item] -= 10
if(goodies[item] <= 0) //remove everything with a weight below 0
goodies -= item
if(!goodies) //if everything was removed for some reason
return FALSE
for(var/iterator in 1 to goodie_count)
var/target_good = pickweight(goodies)
var/atom/movable/target_atom = new target_good(src)