mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
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:
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user