mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +01:00
Moths can now eat clothes (#39350)
* Moths can now eat clothes * Remove old call hacky fix * Fix damage sound, cleaned code
This commit is contained in:
@@ -56,6 +56,7 @@
|
||||
#define isslimeperson(A) (is_species(A, /datum/species/jelly/slime))
|
||||
#define isluminescent(A) (is_species(A, /datum/species/jelly/luminescent))
|
||||
#define iszombie(A) (is_species(A, /datum/species/zombie))
|
||||
#define ismoth(A) (is_species(A, /datum/species/moth))
|
||||
#define ishumanbasic(A) (is_species(A, /datum/species/human))
|
||||
|
||||
//why arent catpeople a subspecies
|
||||
|
||||
@@ -56,6 +56,22 @@
|
||||
if(M.putItemFromInventoryInHandIfPossible(src, H.held_index))
|
||||
add_fingerprint(usr)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/clothing
|
||||
name = "oops"
|
||||
desc = "If you're reading this it means I messed up. This is related to moths eating clothes and I didn't know a better way to do it than making a new food object."
|
||||
list_reagents = list("nutriment" = 1)
|
||||
tastes = list("dust" = 1, "lint" = 1)
|
||||
|
||||
/obj/item/clothing/attack(mob/M, mob/user, def_zone)
|
||||
if(user.a_intent != INTENT_HARM && ismoth(M))
|
||||
var/obj/item/reagent_containers/food/snacks/clothing/clothing_as_food = new
|
||||
clothing_as_food.name = name
|
||||
if(clothing_as_food.attack(M, user, def_zone))
|
||||
take_damage(15, sound_effect=FALSE)
|
||||
qdel(clothing_as_food)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/attackby(obj/item/W, mob/user, params)
|
||||
if(damaged_clothes && istype(W, /obj/item/stack/sheet/cloth))
|
||||
var/obj/item/stack/sheet/cloth/C = W
|
||||
|
||||
Reference in New Issue
Block a user