New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[READY]Humans now have hygiene (DOES NOT AFFECT MOOD GO AWAY MOODPOSTERS) #41986
Changes from 8 commits
8aedd13
c5015a0
0d93cc7
a562ba7
af8be2e
658d7fa
d3bfefd
e633d1c
8b468e4
84424af
eed7040
350748e
68ff5a0
cbf032d
03935be
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I suppose that technically, people who haven't showered that are hanging out in COFFINS won't create bad smells. But you could just make a subtype of the Rot component, which would save the repeated gas code. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. then id have to keep adding/killing the component which seems ass There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. More or less ass than duplicating a bunch of code that doesn't need to be duplicated. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure, the code isnt the same anyways. |
||
|
||
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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So all I need to do to stay clean is just wash my mouth out with soap, 20 times? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if you are that autistic, sure. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. E獭A蜐蜌蜄苔滩蛿蜌蛪T 獭瘫蛵蛥虦苔蜋T蜔蜁H蛵E袒滩虧坦蜌 蜖S蜐蛥虠O坦苔坛虧蛪蛥A台太P蜔坍瘫虧酞蛽虪虩 |
||
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 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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((H.wear_suit && !(H.wear_suit.clothing_flags & SHOWEROKAY))|| (H.w_uniform && !(H.w_uniform.clothing_flags & SHOWEROKAY)) || (H.shoes && !(H.shoes.clothing_flags & SHOWEROKAY)) || (H.ears && !(H.ears.clothing_flags & SHOWEROKAY)) || (H.gloves && !(H.gloves.clothing_flags & SHOWEROKAY)) || (H.wear_mask && !(H.wear_mask.clothing_flags & SHOWEROKAY)) || (H.head && !(H.head.clothing_flags & SHOWEROKAY))) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. okay what the fuck is this shit, make it readable There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. its just repeated for each type of clothing how can i make it more readable There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
THEN IF YOU THINK ABOUT IT, YOU CAN TURN IT INTO A PROC SO YOU DON'T COPYPASTE THE SAME CODE THREE TIMES There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 馃ぃ |
||
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((H.wear_suit && !(H.wear_suit.clothing_flags & SHOWEROKAY))|| (H.w_uniform && !(H.w_uniform.clothing_flags & SHOWEROKAY)) || (H.shoes && !(H.shoes.clothing_flags & SHOWEROKAY)) || (H.ears && !(H.ears.clothing_flags & SHOWEROKAY)) || (H.gloves && !(H.gloves.clothing_flags & SHOWEROKAY)) || (H.wear_mask && !(H.wear_mask.clothing_flags & SHOWEROKAY)) || (H.head && !(H.head.clothing_flags & SHOWEROKAY))) | ||
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((H.wear_suit && !(H.wear_suit.clothing_flags & SHOWEROKAY))|| (H.w_uniform && !(H.w_uniform.clothing_flags & SHOWEROKAY)) || (H.shoes && !(H.shoes.clothing_flags & SHOWEROKAY)) || (H.ears && !(H.ears.clothing_flags & SHOWEROKAY)) || (H.gloves && !(H.gloves.clothing_flags & SHOWEROKAY)) || (H.wear_mask && !(H.wear_mask.clothing_flags & SHOWEROKAY)) || (H.head && !(H.head.clothing_flags & SHOWEROKAY))) | ||
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) | ||
M.set_hygiene(HYGIENE_LEVEL_CLEAN) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make showering with clothes clean you too (like in real life I think), bad mood is already a fair enough punishment |
||
|
||
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) | ||
|
@@ -493,9 +508,11 @@ | |
H.lip_color = initial(H.lip_color) | ||
H.wash_cream() | ||
H.regenerate_icons() | ||
user.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) | ||
user.adjust_hygiene(20) | ||
|
||
/obj/structure/sink/attackby(obj/item/O, mob/living/user, params) | ||
if(busy) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
var/list/bank_cards = list() | ||
var/add_to_accounts = TRUE | ||
var/account_id | ||
var/welfare = FALSE | ||
|
||
/datum/bank_account/New(newname, job) | ||
if(add_to_accounts) | ||
|
@@ -42,14 +43,25 @@ | |
/datum/bank_account/proc/payday(amt_of_paychecks, free = FALSE) | ||
if(free) | ||
adjust_money(account_job.paycheck * amt_of_paychecks) | ||
if(welfare) | ||
adjust_money(PAYCHECK_WELFARE * amt_of_paychecks) | ||
else | ||
var/datum/bank_account/D = SSeconomy.get_dep_account(account_job.paycheck_department) | ||
if(D) | ||
if(!transfer_money(D, account_job.paycheck * amt_of_paychecks)) | ||
bank_card_talk("ERROR: Payday aborted, departmental funds insufficient.") | ||
return FALSE | ||
if(!welfare) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NO, do a total adjustment calculation ONCE and apply it everywhere what the fuck is this garbage, you know better |
||
if(!transfer_money(D, account_job.paycheck * amt_of_paychecks)) | ||
bank_card_talk("ERROR: Payday aborted, departmental funds insufficient.") | ||
return FALSE | ||
else | ||
bank_card_talk("Payday processed, account now holds $[account_balance].") | ||
|
||
else | ||
bank_card_talk("Payday processed, account now holds $[account_balance].") | ||
if(!transfer_money(D, account_job.paycheck * amt_of_paychecks + PAYCHECK_WELFARE * amt_of_paychecks)) | ||
bank_card_talk("ERROR: Payday aborted, departmental funds insufficient.") | ||
return FALSE | ||
else | ||
bank_card_talk("Payday processed, account now holds $[account_balance]. $[PAYCHECK_WELFARE] extra was received as social welfare.") | ||
|
||
return TRUE | ||
bank_card_talk("ERROR: Payday aborted, unable to contact departmental account.") | ||
return FALSE | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stupid ass trait system, shoudl be datums so you can register signals to the trait to generate the mood events
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yell at the traits guy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The traits guy is gone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i said traits not quirks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
traits do their job, sometimes they're not the best choice though
in this case you could probably make the quirk register a shower or wet signal on the mob to react properly like oranges said