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)
+8
View File
@@ -33,6 +33,7 @@
'sound/effects/mob_effects/xenochimera/regen_3.ogg',
'sound/effects/mob_effects/xenochimera/regen_5.ogg'
)
var/trash_catching = FALSE //Toggle for trash throw vore from chompstation
//
// Hook for generic creation of stuff on new creatures
@@ -867,6 +868,13 @@
to_chat(src, "<span class='notice'>This item is not appropriate for ethical consumption.</span>")
return
/mob/living/proc/toggle_trash_catching() //Ported from chompstation
set name = "Toggle Trash Catching"
set category = "Abilities"
set desc = "Toggle Trash Eater throw vore abilities."
trash_catching = !trash_catching
to_chat(src, "<span class='warning'>Trash catching [trash_catching ? "enabled" : "disabled"].</span>")
/mob/living/proc/eat_minerals() //Actual eating abstracted so the user isn't given a prompt due to an argument in this verb.
set name = "Eat Minerals"
set category = "Abilities"