Skip to content

Commit

Permalink
If you are thirsty or dehydrated you can drink straight out of sinks
Browse files Browse the repository at this point in the history
  • Loading branch information
Muncher2112 committed Oct 28, 2020
1 parent 3e56f70 commit 19c4160
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion code/__defines/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@
#define THIRST_LEVEL_FILLED 400
#define THIRST_LEVEL_MEDIUM 300
#define THIRST_LEVEL_THIRSTY 150
#define THIRST_LEVEL_DEHYDRATED 100
#define THIRST_LEVEL_DEHYDRATED 50
#define THIRST_FACTOR 0.5

//Hygiene levels for humans
Expand Down
17 changes: 15 additions & 2 deletions code/game/objects/structures/watercloset.dm
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,21 @@
if(busy)
to_chat(user, "<span class='warning'>Someone's already washing here.</span>")
return

to_chat(usr, "<span class='notice'>You start washing your hands.</span>")
if (ishuman(user))
var/mob/living/carbon/human/H = user
if(H.thirst <= THIRST_LEVEL_THIRSTY)
var/datum/reagents/reagents = new/datum/reagents(3)
var/amount_per_transfer_from_this = 3
reagents.add_reagent(/datum/reagent/water, amount_per_transfer_from_this)
to_chat(usr, "<span class='notice'>You use your hands to gulp down water.</span>")
reagents.trans_to_mob(user, issmall(user) ? ceil(amount_per_transfer_from_this/2) : amount_per_transfer_from_this, CHEM_INGEST)
user.bladder += amount_per_transfer_from_this //For peeing
H.adjust_thirst(amount_per_transfer_from_this * 5)
playsound(user.loc, 'sound/items/drink.ogg', rand(10, 50), 1)
else
to_chat(usr, "<span class='notice'>You start washing your hands.</span>")
else
to_chat(usr, "<span class='notice'>You start washing your hands.</span>")

busy = 1
sleep(40)
Expand Down

0 comments on commit 19c4160

Please sign in to comment.