Ports trash throw vore from Chomp (#15877)

* Ports trash throw vore from Chomp

Ports the ability to catch thrown trash directly in your bellies if you have the trash eater trait from Chompstation: https://github.com/CHOMPStation2/CHOMPStation2/pull/5987

This adds a new verb in the abilities tab called Toggle Trash Catching to all mobs who have the Trash Eater trait. This is disabled by default.

* Changes Chompedits to something that won't trigger their mirror bot
This commit is contained in:
SatinIsle
2024-03-30 05:58:09 +10:00
committed by GitHub
parent d3f5c215f9
commit b2ba38c8b6
4 changed files with 23 additions and 0 deletions
@@ -423,6 +423,13 @@ emp_act
if(istype(AM,/obj/))
var/obj/O = AM
if(stat != DEAD && istype(O,/obj/item) && trash_catching && vore_selected) //Ported from chompstation
var/obj/item/I = O
if(adminbus_trash || is_type_in_list(I,edible_trash) && I.trash_eatable && !is_type_in_list(I,item_vore_blacklist))
visible_message("<span class='warning'>[I] is thrown directly into [src]'s [lowertext(vore_selected.name)]!</span>")
I.throwing = 0
I.forceMove(vore_selected)
return
if(in_throw_mode && speed <= THROWFORCE_SPEED_DIVISOR) //empty active hand and we're in throw mode
if(canmove && !restrained())
if(isturf(O.loc))
@@ -199,6 +199,7 @@
/datum/trait/neutral/trashcan/apply(var/datum/species/S,var/mob/living/carbon/human/H)
..()
H.verbs |= /mob/living/proc/eat_trash
H.verbs |= /mob/living/proc/toggle_trash_catching //Ported from chompstation
/datum/trait/neutral/gem_eater
name = "Expensive Taste"
@@ -257,6 +257,13 @@
/mob/living/hitby(atom/movable/AM as mob|obj,var/speed = THROWFORCE_SPEED_DIVISOR)//Standardization and logging -Sieve
if(istype(AM,/obj/))
var/obj/O = AM
if(stat != DEAD && istype(O,/obj/item) && trash_catching && vore_selected) //ported from chompstation
var/obj/item/I = O
if(adminbus_trash || is_type_in_list(I,edible_trash) && I.trash_eatable && !is_type_in_list(I,item_vore_blacklist))
visible_message("<span class='warning'>[I] is thrown directly into [src]'s [lowertext(vore_selected.name)]!</span>")
I.throwing = 0
I.forceMove(vore_selected)
return
var/dtype = O.damtype
var/throw_damage = O.throwforce*(speed/THROWFORCE_SPEED_DIVISOR)