[READY]Humans now have hygiene (DOES NOT AFFECT MOOD GO AWAY MOODPOSTERS) (#41986)

cl Floyd / Qustinnus
tweak: You now have to be naked to get the nice shower moodlet, if you shower with clothes you get a bad moodie
add: Hygiene, you slowly become dirty over time, the more covered in blood you are the faster you will lose hygiene. When you are too dirty you will have a stink overlay. (Hygiene doesn't affect mood currently) It also spawns miasma slowly if you smell like shit.
add: adds NEET and neat traits. NEET's get 20 bucks social welfare extra and like being unhygienic, while neat people dislike being unhygienic and like being hygienic
/cl

This doesn't affect mood so plssss dont strawman in this PR about how I'm forcing you to shower or die or whatever

This PR is mostly visual and will allow for people to judge others for literaly being smelly as hell.

also NEET and neat traits which interact with being smelly. (neat likes hygiene, dislikes lack of it. NEETs like lack of hygiene and get some social welfare (20 bucks))
This commit is contained in:
Qustinnus
2019-01-01 13:04:51 +01:00
committed by oranges
parent cc0d02ee44
commit 0de28b726a
29 changed files with 231 additions and 49 deletions

View File

@@ -303,3 +303,4 @@ GLOBAL_LIST_INIT(pipe_paint_colors, list(
#define MIASMA_CORPSE_MOLES 0.02
#define MIASMA_GIBS_MOLES 0.005
#define MIASMA_HYGIENE_MOLES 0.01

View File

@@ -7,6 +7,8 @@
#define PAYCHECK_HARD 100
#define PAYCHECK_COMMAND 200
#define PAYCHECK_WELFARE 20 //NEETbucks
#define ACCOUNT_CIV "CIV"
#define ACCOUNT_CIV_NAME "Civil Budget"
#define ACCOUNT_ENG "ENG"

View File

@@ -24,34 +24,35 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s
//define THIS_PROC_TYPE_WEIRD_STR_WITH_ARGS "[THIS_PROC_TYPE_WEIRD]([args.Join(",")])" //Ditto
//Human Overlays Indexes/////////
#define MUTATIONS_LAYER 26 //mutations. Tk headglows, cold resistance glow, etc
#define BODY_BEHIND_LAYER 25 //certain mutantrace features (tail when looking south) that must appear behind the body parts
#define BODYPARTS_LAYER 24 //Initially "AUGMENTS", this was repurposed to be a catch-all bodyparts flag
#define BODY_ADJ_LAYER 23 //certain mutantrace features (snout, body markings) that must appear above the body parts
#define BODY_LAYER 22 //underwear, undershirts, socks, eyes, lips(makeup)
#define FRONT_MUTATIONS_LAYER 21 //mutations that should appear above body, body_adj and bodyparts layer (e.g. laser eyes)
#define DAMAGE_LAYER 20 //damage indicators (cuts and burns)
#define UNIFORM_LAYER 19
#define ID_LAYER 18
#define HANDS_PART_LAYER 18
#define GLOVES_LAYER 17
#define SHOES_LAYER 16
#define EARS_LAYER 15
#define SUIT_LAYER 14
#define GLASSES_LAYER 13
#define BELT_LAYER 12 //Possible make this an overlay of somethign required to wear a belt?
#define SUIT_STORE_LAYER 11
#define NECK_LAYER 10
#define BACK_LAYER 9
#define HAIR_LAYER 8 //TODO: make part of head layer?
#define FACEMASK_LAYER 7
#define HEAD_LAYER 6
#define HANDCUFF_LAYER 5
#define LEGCUFF_LAYER 4
#define HANDS_LAYER 3
#define BODY_FRONT_LAYER 2
#define MUTATIONS_LAYER 28 //mutations. Tk headglows, cold resistance glow, etc
#define BODY_BEHIND_LAYER 27 //certain mutantrace features (tail when looking south) that must appear behind the body parts
#define BODYPARTS_LAYER 26 //Initially "AUGMENTS", this was repurposed to be a catch-all bodyparts flag
#define BODY_ADJ_LAYER 25 //certain mutantrace features (snout, body markings) that must appear above the body parts
#define BODY_LAYER 24 //underwear, undershirts, socks, eyes, lips(makeup)
#define FRONT_MUTATIONS_LAYER 23 //mutations that should appear above body, body_adj and bodyparts layer (e.g. laser eyes)
#define DAMAGE_LAYER 22 //damage indicators (cuts and burns)
#define UNIFORM_LAYER 21
#define ID_LAYER 20 //lmao at the idiot who put both ids and hands on the same layer
#define HANDS_PART_LAYER 19
#define GLOVES_LAYER 18
#define SHOES_LAYER 17
#define EARS_LAYER 16
#define SUIT_LAYER 15
#define GLASSES_LAYER 14
#define BELT_LAYER 13 //Possible make this an overlay of somethign required to wear a belt?
#define SUIT_STORE_LAYER 12
#define NECK_LAYER 11
#define BACK_LAYER 10
#define HAIR_LAYER 9 //TODO: make part of head layer?
#define FACEMASK_LAYER 8
#define HEAD_LAYER 7
#define HANDCUFF_LAYER 6
#define LEGCUFF_LAYER 5
#define HANDS_LAYER 4
#define BODY_FRONT_LAYER 3
#define SMELL_LAYER 2
#define FIRE_LAYER 1 //If you're on fire
#define TOTAL_LAYERS 26 //KEEP THIS UP-TO-DATE OR SHIT WILL BREAK ;_;
#define TOTAL_LAYERS 28 //KEEP THIS UP-TO-DATE OR SHIT WILL BREAK ;_;
//Human Overlay Index Shortcuts for alternate_worn_layer, layers
//Because I *KNOW* somebody will think layer+1 means "above"

View File

@@ -144,6 +144,11 @@
#define SANITY_CRAZY 25
#define SANITY_INSANE 0
//Hygiene levels for humans
#define HYGIENE_LEVEL_CLEAN 250
#define HYGIENE_LEVEL_NORMAL 200
#define HYGIENE_LEVEL_DIRTY 75
//Nutrition levels for humans
#define NUTRITION_LEVEL_FAT 600
#define NUTRITION_LEVEL_FULL 550
@@ -262,6 +267,7 @@
#define HUNGER_FACTOR 0.1 //factor at which mob nutrition decreases
#define ETHEREAL_CHARGE_FACTOR 0.12 //factor at which ethereal's charge decreases
#define HYGIENE_FACTOR 0.1 //factor at which mob hygiene decreases
#define REAGENTS_METABOLISM 0.4 //How many units of reagent are consumed per tick, by default.
#define REAGENTS_EFFECT_MULTIPLIER (REAGENTS_METABOLISM / 0.4) // By defining the effect multiplier this way, it'll exactly adjust all effects according to how they originally were with the 0.4 metabolism

View File

@@ -35,3 +35,4 @@
#define MASKINTERNALS (1<<3) // mask allows internals
#define NOSLIP (1<<4) //prevents from slipping on wet floors, in space etc
#define THICKMATERIAL (1<<5) //prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body.
#define SHOWEROKAY (1<<6) //prevents you from being stupid if you shower in them

View File

@@ -82,6 +82,8 @@
#define TRAIT_SKITTISH "skittish"
#define TRAIT_POOR_AIM "poor_aim"
#define TRAIT_PROSOPAGNOSIA "prosopagnosia"
#define TRAIT_NEET "NEET"
#define TRAIT_NEAT "neat"
#define TRAIT_DRUNK_HEALING "drunk_healing"
#define TRAIT_TAGGER "tagger"
#define TRAIT_PHOTOGRAPHER "photographer"

View File

@@ -138,6 +138,7 @@ GLOBAL_LIST_INIT(bitfields, list(
"MASKINTERNALS" = MASKINTERNALS,
"NOSLIP" = NOSLIP,
"THICKMATERIAL" = THICKMATERIAL,
"SHOWEROKAY" = SHOWEROKAY,
),
"tesla_flags" = list(
"TESLA_MOB_DAMAGE" = TESLA_MOB_DAMAGE,

View File

@@ -110,6 +110,9 @@
add_splatter_floor(location)
if(get_dist(user, src) <= 1) //people with TK won't get smeared with blood
user.add_mob_blood(src)
if(ishuman(user))
var/mob/living/carbon/human/dirtyboy
dirtyboy.adjust_hygiene(-10)
return TRUE //successful attack
/mob/living/simple_animal/attacked_by(obj/item/I, mob/living/user)

View File

@@ -16,7 +16,8 @@ PROCESSING_SUBSYSTEM_DEF(quirks)
/datum/controller/subsystem/processing/quirks/Initialize(timeofday)
if(!quirks.len)
SetupQuirks()
quirk_blacklist = list(list("Blind","Nearsighted"),list("Jolly","Depression","Apathetic","Hypersensitive"),list("Ageusia","Vegetarian","Deviant Tastes"),list("Ananas Affinity","Ananas Aversion"),list("Alcohol Tolerance","Light Drinker"))
quirk_blacklist = list(list("Blind","Nearsighted"),list("Jolly","Depression","Apathetic","Hypersensitive"),list("Ageusia","Vegetarian","Deviant Tastes"),list("Ananas Affinity","Ananas Aversion"),list("Alcohol Tolerance","Light Drinker"),list(list("Neat","NEET")))
return ..()
/datum/controller/subsystem/processing/quirks/proc/SetupQuirks()

View File

@@ -156,6 +156,7 @@
clear_event(null, "depression")
HandleNutrition(owner)
HandleHygiene(owner)
/datum/component/mood/proc/setSanity(amount, minimum=SANITY_INSANE, maximum=SANITY_NEUTRAL)
if(amount == sanity)
@@ -301,5 +302,38 @@
if(ETHEREAL_CHARGE_ALMOSTFULL to ETHEREAL_CHARGE_FULL)
add_event(null, "charge", /datum/mood_event/charged)
/datum/component/mood/proc/HandleHygiene(mob/living/carbon/human/H)
switch(H.hygiene)
if(0 to HYGIENE_LEVEL_DIRTY)
if(has_trait(TRAIT_NEAT))
add_event(null, "neat", /datum/mood_event/dirty)
if(has_trait(TRAIT_NEET))
add_event(null, "NEET", /datum/mood_event/happy_neet)
HygieneMiasma(H)
if(HYGIENE_LEVEL_DIRTY to HYGIENE_LEVEL_NORMAL)
if(has_trait(TRAIT_NEAT))
clear_event(null, "neat")
if(has_trait(TRAIT_NEET))
clear_event(null, "NEET")
if(HYGIENE_LEVEL_NORMAL to HYGIENE_LEVEL_CLEAN)
if(has_trait(TRAIT_NEAT))
add_event(null, "neat", /datum/mood_event/neat)
if(has_trait(TRAIT_NEET))
clear_event(null, "NEET")
/datum/component/mood/proc/HygieneMiasma(mob/living/carbon/human/H)
// Properly stored humans shouldn't create miasma
if(istype(H.loc, /obj/structure/closet/crate/coffin)|| istype(H.loc, /obj/structure/closet/body_bag) || istype(H.loc, /obj/structure/bodycontainer))
return
var/turf/T = get_turf(H)
var/datum/gas_mixture/air = T.return_air()
var/list/cached_gases = air.gases
ASSERT_GAS(/datum/gas/miasma, air)
cached_gases[/datum/gas/miasma][MOLES] += MIASMA_HYGIENE_MOLES
T.air_update_turf()
#undef MINOR_INSANITY_PEN
#undef MAJOR_INSANITY_PEN

View File

@@ -137,11 +137,12 @@
mood_change = -5
timeout = 600
//These are unused so far but I want to remember them to use them later
/datum/mood_event/cloned_corpse
description = "<span class='boldwarning'>I recently saw my own corpse...</span>\n"
mood_change = -6
/datum/mood_event/idiot_shower
description = "<span class='warning'>I showered with my clothes on, I'm a fucking idiot.</span>\n"
mood_change = -3
timeout = 900
//These are unused so far but I want to remember them to use them later
/datum/mood_event/surgery
description = "<span class='boldwarning'>HE'S CUTTING ME OPEN!!</span>\n"
mood_change = -8

View File

@@ -53,6 +53,19 @@
description = "<span class='warning'>The stench of rotting carcasses is unbearable!</span>\n"
mood_change = -7
//Hygiene Events
/datum/mood_event/neat
description = "<span class='nicegreen'>I'm so clean, I love it.</span>\n"
mood_change = 3
/datum/mood_event/dirty
description = "<span class='warning'>I smell horrid.</span>\n"
mood_change = -5
/datum/mood_event/happy_neet
description = "<span class='nicegreen'>I smell horrid.</span>\n"
mood_change = 2
//Generic needs events
/datum/mood_event/favorite_food
description = "<span class='nicegreen'>I really enjoyed eating that.</span>\n"

View File

@@ -145,3 +145,17 @@
mob_trait = TRAIT_VORACIOUS
gain_text = "<span class='notice'>You feel HONGRY.</span>"
lose_text = "<span class='danger'>You no longer feel HONGRY.</span>"
/datum/quirk/neet
name = "NEET"
desc = "For some reason you qualified for social welfare and you don't really care about your own personal hygiene."
value = 1
mob_trait = TRAIT_NEET
gain_text = "<span class='notice'>You feel useless to society.</span>"
lose_text = "<span class='danger'>You no longer feel useless to society.</span>"
/datum/quirk/neet/on_spawn()
var/mob/living/carbon/human/H = quirk_holder
var/datum/bank_account/D = H.get_bank_account()
D.welfare = TRUE
D.add_neetbux()

View File

@@ -89,6 +89,13 @@
species.liked_food = initial(species.liked_food)
species.disliked_food = initial(species.disliked_food)
/datum/quirk/neat
name = "Neat"
desc = "You really don't like being unhygienic, and will get sad if you are."
mob_trait = TRAIT_NEAT
gain_text = "<span class='notice'>You feel like you have to stay clean.</span>"
lose_text = "<span class='danger'>You no longer feel the need to always be clean.</span>"
/datum/quirk/monochromatic
name = "Monochromacy"
desc = "You suffer from full colorblindness, and perceive nearly the entire world in blacks and whites."

View File

@@ -436,6 +436,8 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
return
if(modify.registered_account)
modify.registered_account.account_job = jobdatum // this is a terrible idea and people will grief but sure whatever
if(modify.registered_account.welfare)
modify.registered_account.add_neetbux()
modify.access = ( istype(src, /obj/machinery/computer/card/centcom) ? get_centcom_access(t1) : jobdatum.get_access() )
if (modify)

View File

@@ -102,8 +102,13 @@
else if(ishuman(target) && user.zone_selected == BODY_ZONE_PRECISE_MOUTH)
var/mob/living/carbon/human/H = user
user.visible_message("<span class='warning'>\the [user] washes \the [target]'s mouth out with [src.name]!</span>", "<span class='notice'>You wash \the [target]'s mouth out with [src.name]!</span>") //washes mouth out with soap sounds better than 'the soap' here
H.lip_style = null //removes lipstick
if(user.zone_selected == "mouth")
user.visible_message("<span class='warning'>\the [user] washes \the [target]'s mouth out with [src.name]!</span>", "<span class='notice'>You wash \the [target]'s mouth out with [src.name]!</span>") //washes mouth out with soap sounds better than 'the soap' here
H.lip_style = null //removes lipstick
H.adjust_hygiene(5) //it kinda works i guess
else
user.visible_message("<span class='warning'>\the [user] washes \the [target] with [src.name]!</span>", "<span class='notice'>You wash \the [target] with [src.name]!</span>")
H.adjust_hygiene(20)
H.update_body()
decreaseUses(user)
return

View File

@@ -249,6 +249,10 @@
if(isliving(G))
var/mob/living/L = G
wash_mob(L)
if(ishuman(L))
var/mob/living/carbon/human/H = L
if(check_clothes(H))
to_chat(H, "<span class='warning'>You step into the shower with your clothes on and feel like an idiot.</span>")
else if(isobj(G)) // Skip the light objects
wash_obj(G)
else
@@ -313,6 +317,10 @@
if(wash_mob(L)) //it's a carbon mob.
var/mob/living/carbon/C = L
C.slip(80,null,NO_SLIP_WHEN_WALKING)
if(ishuman(C))
var/mob/living/carbon/human/H = C
if(check_clothes(H))
to_chat(H, "<span class='warning'>You step into the shower with your clothes on and feel like an idiot.</span>")
else if(isobj(AM))
wash_obj(AM)
@@ -342,7 +350,6 @@
L.ExtinguishMob()
L.adjust_fire_stacks(-20) //Douse ourselves with water to avoid fire more easily
L.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
SEND_SIGNAL(L, COMSIG_ADD_MOOD_EVENT, "shower", /datum/mood_event/nice_shower)
if(iscarbon(L))
var/mob/living/carbon/M = L
. = TRUE
@@ -385,6 +392,12 @@
else if(H.w_uniform && wash_obj(H.w_uniform))
H.update_inv_w_uniform()
if(check_clothes(H))
SEND_SIGNAL(L, COMSIG_ADD_MOOD_EVENT, "badshower", /datum/mood_event/idiot_shower)
else
SEND_SIGNAL(L, COMSIG_ADD_MOOD_EVENT, "shower", /datum/mood_event/nice_shower)
H.set_hygiene(HYGIENE_LEVEL_CLEAN)
if(washgloves)
SEND_SIGNAL(H, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
@@ -396,8 +409,10 @@
H.update_inv_belt()
else
SEND_SIGNAL(M, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
SEND_SIGNAL(L, COMSIG_ADD_MOOD_EVENT, "shower", /datum/mood_event/nice_shower)
else
SEND_SIGNAL(L, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
SEND_SIGNAL(L, COMSIG_ADD_MOOD_EVENT, "shower", /datum/mood_event/nice_shower)
/obj/machinery/shower/proc/contamination_cleanse(atom/movable/thing)
var/datum/component/radioactive/healthy_green_glow = thing.GetComponent(/datum/component/radioactive)
@@ -434,6 +449,18 @@
C.adjustFireLoss(5)
to_chat(C, "<span class='danger'>The water is searing!</span>")
/obj/machinery/shower/proc/check_clothes(mob/living/carbon/human/H)
var/result
if(H.wear_suit && (H.wear_suit.clothing_flags & SHOWEROKAY))
return FALSE
result &= (H.wear_suit && !(H.wear_suit.clothing_flags & SHOWEROKAY))
result &= (H.w_uniform && !(H.w_uniform.clothing_flags & SHOWEROKAY))
result &= (H.shoes && !(H.shoes.clothing_flags & SHOWEROKAY))
result &= (H.ears && !(H.ears.clothing_flags & SHOWEROKAY))
result &= (H.gloves && !(H.gloves.clothing_flags & SHOWEROKAY))
result &= (H.wear_mask && !(H.wear_mask.clothing_flags & SHOWEROKAY))
result &= (H.head && !(H.head.clothing_flags & SHOWEROKAY))
return result
@@ -493,9 +520,13 @@
H.lip_color = initial(H.lip_color)
H.wash_cream()
H.regenerate_icons()
H.adjust_hygiene(10)
user.drowsyness = max(user.drowsyness - rand(2,3), 0) //Washing your face wakes you up if you're falling asleep
else
SEND_SIGNAL(user, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
if(ishuman(user))
var/mob/living/carbon/human/dirtyboy
dirtyboy.adjust_hygiene(10)
/obj/structure/sink/attackby(obj/item/O, mob/living/user, params)
if(busy)

View File

@@ -120,7 +120,7 @@
name = "radiation hood"
icon_state = "rad"
desc = "A hood with radiation protective properties. The label reads, 'Made with lead. Please do not consume insulation.'"
clothing_flags = THICKMATERIAL
clothing_flags = THICKMATERIAL|SHOWEROKAY
flags_inv = HIDEMASK|HIDEEARS|HIDEFACE|HIDEEYES|HIDEHAIR|HIDEFACIALHAIR
armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 60, "rad" = 100, "fire" = 30, "acid" = 30)
strip_delay = 60
@@ -137,7 +137,7 @@
w_class = WEIGHT_CLASS_BULKY
gas_transfer_coefficient = 0.9
permeability_coefficient = 0.5
clothing_flags = THICKMATERIAL
clothing_flags = THICKMATERIAL|SHOWEROKAY
body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
allowed = list(/obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/geiger_counter)
slowdown = 1.5

View File

@@ -5,6 +5,7 @@
var/list/bank_cards = list()
var/add_to_accounts = TRUE
var/account_id
var/welfare = TRUE
/datum/bank_account/New(newname, job)
if(add_to_accounts)
@@ -49,11 +50,15 @@
bank_card_talk("ERROR: Payday aborted, departmental funds insufficient.")
return FALSE
else
bank_card_talk("Payday processed, account now holds $[account_balance].")
bank_card_talk("Payday processed, account now holds $[account_balance].")
return TRUE
bank_card_talk("ERROR: Payday aborted, unable to contact departmental account.")
return FALSE
/datum/bank_account/proc/add_neetbux()
account_job.paycheck += PAYCHECK_WELFARE
/datum/bank_account/proc/bank_card_talk(message)
if(!message || !bank_cards.len)
return

View File

@@ -93,7 +93,9 @@
add_splatter_floor(location)
if(get_dist(user, src) <= 1) //people with TK won't get smeared with blood
user.add_mob_blood(src)
if(ishuman(user))
var/mob/living/carbon/human/dirtyboy
dirtyboy.adjust_hygiene(-10)
if(affecting.body_zone == BODY_ZONE_HEAD)
if(wear_mask)
wear_mask.add_mob_blood(src)

View File

@@ -21,12 +21,12 @@
var/obj/item/clothing/mask/wear_mask = null
var/obj/item/clothing/neck/wear_neck = null
var/obj/item/tank/internal = null
var/obj/item/head = null
var/obj/item/clothing/head = null
var/obj/item/gloves = null //only used by humans
var/obj/item/shoes = null //only used by humans.
var/obj/item/clothing/gloves = null //only used by humans
var/obj/item/clothing/shoes = null //only used by humans.
var/obj/item/clothing/glasses/glasses = null //only used by humans.
var/obj/item/ears = null //only used by humans.
var/obj/item/clothing/ears = null //only used by humans.
var/datum/dna/dna = null//Carbon
var/datum/mind/last_mind = null //last mind to control this mob, for blood-based cloning

View File

@@ -774,6 +774,7 @@
remove_all_embedded_objects()
set_heartattack(FALSE)
drunkenness = 0
set_hygiene(HYGIENE_LEVEL_NORMAL)
for(var/datum/mutation/human/HM in dna.mutations)
if(HM.quality != POSITIVE)
dna.remove_mutation(HM.name)

View File

@@ -30,14 +30,16 @@
var/backbag = DBACKPACK //Which backpack type the player has chosen.
//Equipment slots
var/obj/item/wear_suit = null
var/obj/item/w_uniform = null
var/obj/item/clothing/wear_suit = null
var/obj/item/clothing/w_uniform = null
var/obj/item/belt = null
var/obj/item/wear_id = null
var/obj/item/r_store = null
var/obj/item/l_store = null
var/obj/item/s_store = null
var/hygiene = HYGIENE_LEVEL_NORMAL
var/special_voice = "" // For changing our voice. Used by a symptom.
var/bleed_rate = 0 //how much are we bleeding

View File

@@ -39,6 +39,8 @@
//Stuff jammed in your limbs hurts
handle_embedded_objects()
handle_hygiene()
//Update our name based on whether our face is obscured/disfigured
name = get_visible_name()
@@ -322,8 +324,37 @@
// Tissues die without blood circulation
adjustBruteLoss(2)
/mob/living/carbon/human/proc/handle_hygiene()
var/hygiene_loss = -HYGIENE_FACTOR
//If you're covered in blood, you'll start smelling like shit faster.
var/obj/item/head = get_item_by_slot(SLOT_HEAD)
if(head)
IF_HAS_BLOOD_DNA(head)
hygiene_loss -= 2 * HYGIENE_FACTOR
var/obj/item/mask = get_item_by_slot(SLOT_HEAD)
if(mask)
IF_HAS_BLOOD_DNA(mask)
hygiene_loss -= 2 * HYGIENE_FACTOR
var/obj/item/uniform = get_item_by_slot(SLOT_W_UNIFORM)
if(uniform)
IF_HAS_BLOOD_DNA(uniform)
hygiene_loss -= 4 * HYGIENE_FACTOR
var/obj/item/suit = get_item_by_slot(SLOT_WEAR_SUIT)
if(suit)
IF_HAS_BLOOD_DNA(suit)
hygiene_loss -= 3 * HYGIENE_FACTOR
var/obj/item/feet = get_item_by_slot(SLOT_SHOES)
if(feet)
IF_HAS_BLOOD_DNA(feet)
hygiene_loss -= 2 * HYGIENE_FACTOR
adjust_hygiene(hygiene_loss)
#undef THERMAL_PROTECTION_HEAD
#undef THERMAL_PROTECTION_CHEST

View File

@@ -1351,6 +1351,9 @@ GLOBAL_LIST_EMPTY(roundstart_races)
H.add_splatter_floor(location)
if(get_dist(user, H) <= 1) //people with TK won't get smeared with blood
user.add_mob_blood(H)
if(ishuman(user))
var/mob/living/carbon/human/dirtyboy
dirtyboy.adjust_hygiene(-10)
switch(hit_area)
if(BODY_ZONE_HEAD)

View File

@@ -51,3 +51,13 @@
grant_language(/datum/language/beachbum)
else
remove_language(/datum/language/beachbum)
/mob/living/carbon/human/proc/adjust_hygiene(amount)
. = ..()
hygiene = CLAMP(hygiene+amount, 0, HYGIENE_LEVEL_CLEAN)
update_smell()
/mob/living/carbon/human/proc/set_hygiene(amount)
. = ..()
hygiene = CLAMP(amount, 0, HYGIENE_LEVEL_CLEAN)
update_smell()

View File

@@ -479,8 +479,13 @@ There are several things that need to be remembered:
client.screen += I
update_observer_view(I)
//Update whether we smell
/mob/living/carbon/human/proc/update_smell(var/smelly_icon = "generic_mob_smell")
remove_overlay(SMELL_LAYER)
if(hygiene <= HYGIENE_LEVEL_DIRTY)
var/mutable_appearance/new_smell_overlay = mutable_appearance('icons/mob/smelly.dmi', smelly_icon, -SMELL_LAYER)
overlays_standing[SMELL_LAYER] = new_smell_overlay
apply_overlay(SMELL_LAYER)
/*
Does everything in relation to building the /mutable_appearance used in the mob's overlays list

View File

@@ -92,8 +92,6 @@
apply_overlay(FIRE_LAYER)
/mob/living/carbon/update_damage_overlays()
remove_overlay(DAMAGE_LAYER)

BIN
icons/mob/smelly.dmi Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB