From be0e290f941b4f0004d258216ba3df0682cdb2b5 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sat, 1 Apr 2023 22:11:46 +0200 Subject: [PATCH] [MIRROR] Adds pillow bonus for sleeping. [MDB IGNORE] (#20241) * Adds pillow bonus for sleeping. (#74349) ## About The Pull Request There is bedsheet bonus, but no pillow bonus. ## Why It's Good For The Game Healthy sleep. ## Changelog :cl: add: Sleeping with a pillow restores more health. /:cl: --------- Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com> * Adds pillow bonus for sleeping. --------- Co-authored-by: Helg2 <93882977+Helg2@users.noreply.github.com> Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com> --- code/datums/status_effects/debuffs/debuffs.dm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/datums/status_effects/debuffs/debuffs.dm b/code/datums/status_effects/debuffs/debuffs.dm index c1814772f1d..c93ceb4c18f 100644 --- a/code/datums/status_effects/debuffs/debuffs.dm +++ b/code/datums/status_effects/debuffs/debuffs.dm @@ -195,11 +195,12 @@ healing += 0.1 // don't forget the bedsheet - for(var/obj/item/bedsheet/bedsheet in range(owner.loc,0)) - if(bedsheet.loc != owner.loc) //bedsheets in your backpack/neck don't give you comfort - continue + if(locate(/obj/item/bedsheet) in owner.loc) + healing += 0.1 + + // you forgot the pillow + if(locate(/obj/item/pillow) in owner.loc) healing += 0.1 - break //Only count the first bedsheet if(healing > 0 && health_ratio > 0.8) owner.adjustBruteLoss(-1 * healing, required_bodytype = BODYTYPE_ORGANIC)