mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 12:08:55 +01:00
Fix moth's ability to eat mice infinitely (#66141)
Adds a check to clothing.dm to prevent the ability to eat held mobs (like a mouse), which not only doesn't make sense but also does not remove the source mob correctly and gives an infinite food source for moths. Steps to reproduce the bug: Spawn in a mouse mob (living) As a Moth take the mouse into your hand Eat mouse Mouse will act as appropriate food for Moth's as well as will simply drop the held mouse on the ground allowing you to pick it up and eat again
This commit is contained in:
@@ -203,6 +203,8 @@ GLOBAL_LIST_INIT(turfs_openspace, typecacheof(list(
|
||||
|
||||
#define isclothing(A) (istype(A, /obj/item/clothing))
|
||||
|
||||
#define ispickedupmob(A) (istype(A, /obj/item/clothing/head/mob_holder)) // Checks if clothing item is actually a held mob
|
||||
|
||||
#define iscash(A) (istype(A, /obj/item/coin) || istype(A, /obj/item/stack/spacecash) || istype(A, /obj/item/holochip))
|
||||
|
||||
#define isbodypart(A) (istype(A, /obj/item/bodypart))
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/item/clothing/attack(mob/living/M, mob/living/user, params)
|
||||
if(user.combat_mode || !ismoth(M))
|
||||
if(user.combat_mode || !ismoth(M) || ispickedupmob(src))
|
||||
return ..()
|
||||
if(isnull(moth_snack))
|
||||
moth_snack = new
|
||||
|
||||
Reference in New Issue
Block a user