mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +01:00
[MIRROR] Cleans up living duffel bag code to meet guidelines (#3501)
* Cleans up living duffel bag code to meet guidelines (#57014) * Cleans up living duffel bag code to meet guidelines Co-authored-by: necromanceranne <40847847+necromanceranne@users.noreply.github.com>
This commit is contained in:
co-authored by
necromanceranne
parent
85d72458a1
commit
accafd8deb
@@ -399,10 +399,8 @@
|
||||
. = ..()
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/cursed/process()
|
||||
///don't process if it's somehow on the floor
|
||||
if(!iscarbon(src.loc))
|
||||
return
|
||||
var/mob/living/carbon/user = src.loc
|
||||
|
||||
var/mob/living/carbon/user = loc
|
||||
///check hp
|
||||
if(obj_integrity == 0)
|
||||
user.dropItemToGround(src, TRUE)
|
||||
@@ -411,16 +409,16 @@
|
||||
if((hunger > 50) && prob(20))
|
||||
for(var/obj/item/I in contents)
|
||||
if(IS_EDIBLE(I))
|
||||
var/obj/item/food/F = I
|
||||
F.forceMove(user.loc)
|
||||
var/obj/item/food/hunger_breaks = I //If you fed them poundland microwave meals, it probably would kill them
|
||||
hunger_breaks.forceMove(user.loc)
|
||||
playsound(src, 'sound/items/eatfood.ogg', 20, TRUE)
|
||||
///poisoned food damages it
|
||||
if(istype(F, /obj/item/food/badrecipe))
|
||||
if(istype(hunger_breaks, /obj/item/food/badrecipe))
|
||||
to_chat(user, "<span class='warning'>The [name] grumbles!</span>")
|
||||
obj_integrity -= 50
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The [name] eats your [F]!</span>")
|
||||
qdel(F)
|
||||
to_chat(user, "<span class='notice'>The [name] eats your [hunger_breaks]!</span>")
|
||||
QDEL_NULL(hunger_breaks)
|
||||
hunger = 0
|
||||
return
|
||||
///no food found: it bites you and loses some hp
|
||||
|
||||
Reference in New Issue
Block a user