diff --git a/code/__DEFINES/combat.dm b/code/__DEFINES/combat.dm index 786f29cbf14..8993420f083 100644 --- a/code/__DEFINES/combat.dm +++ b/code/__DEFINES/combat.dm @@ -41,6 +41,8 @@ #define MAGIC "magic" /// Involved in checking the likelyhood of applying a wound to a mob. #define WOUND "wound" +/// Involves being eaten +#define CONSUME "consume" //bitflag damage defines used for suicide_act #define BRUTELOSS (1<<0) diff --git a/code/datums/armor.dm b/code/datums/armor.dm index 0653a4e792f..4a15b35b440 100644 --- a/code/datums/armor.dm +++ b/code/datums/armor.dm @@ -18,6 +18,7 @@ var/acid var/magic var/wound + var/consume /datum/armor/New(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0, magic = 0, wound = 0) src.melee = melee @@ -31,6 +32,7 @@ src.acid = acid src.magic = magic src.wound = wound + src.consume = melee tag = ARMORID /datum/armor/proc/modifyRating(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0, magic = 0, wound = 0) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 373e612d04e..9a68b9e206e 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -120,7 +120,7 @@ /obj/item/food/clothing/proc/after_eat(mob/eater) var/obj/item/clothing/resolved_clothing = clothing.resolve() if (resolved_clothing) - resolved_clothing.take_damage(MOTH_EATING_CLOTHING_DAMAGE, sound_effect = FALSE) + resolved_clothing.take_damage(MOTH_EATING_CLOTHING_DAMAGE, sound_effect = FALSE, damage_flag = CONSUME) else qdel(src) @@ -495,6 +495,13 @@ BLIND // can't see anything //so the shred survives potential turf change from the explosion. addtimer(CALLBACK_NEW(/obj/effect/decal/cleanable/shreds, list(T, name)), 1) deconstruct(FALSE) + if(damage_flag == CONSUME) //This allows for moths to fully consume clothing, rather than damaging it like other sources like brute + var/turf/current_position = get_turf(src) + new /obj/effect/decal/cleanable/shreds(current_position, name) + if(isliving(loc)) + var/mob/living/possessing_mob = loc + possessing_mob.visible_message(span_danger("[src] is consumed until naught but shreds remains!"), span_boldwarning("[src] falls apart into little bits!")) + deconstruct(FALSE) //SKYRAT EDIT CHANGE BEGIN //else if(!(damage_flag in list(ACID, FIRE))) - SKYRAT EDIT - ORIGINAL else if(!(damage_flag in list(ACID))) @@ -504,7 +511,7 @@ BLIND // can't see anything update_clothes_damaged_state(CLOTHING_SHREDDED) if(isliving(loc)) var/mob/living/M = loc - if(src in M.get_equipped_items(FALSE)) //make sure they were wearing it and not attacking the item in their hands / eating it if they were a moth. + if(src in M.get_equipped_items(FALSE)) //make sure they were wearing it and not attacking the item in their hands M.visible_message(span_danger("[M]'s [src.name] fall[p_s()] off, [p_theyre()] completely shredded!"), span_warning("Your [src.name] fall[p_s()] off, [p_theyre()] completely shredded!"), vision_distance = COMBAT_MESSAGE_RANGE) M.dropItemToGround(src) else