Vore preference helpers (#18656)

* Procs

* Pref checks

* Snack eat changes

* Fix
This commit is contained in:
Guti
2025-10-31 04:26:10 +01:00
committed by GitHub
parent fb73d362a0
commit aa14f1fbcc
18 changed files with 140 additions and 120 deletions
@@ -359,7 +359,7 @@ emp_act
return
// PERSON BEING HIT: CAN BE DROP PRED, ALLOWS THROW VORE.
// PERSON BEING THROWN: DEVOURABLE, ALLOWS THROW VORE, CAN BE DROP PREY.
if((can_be_drop_pred && throw_vore && vore_selected) && (thrown_mob.devourable && thrown_mob.throw_vore && thrown_mob.can_be_drop_prey)) //Prey thrown into pred.
if(CanThrowVore(src, thrown_mob))
vore_selected.nom_mob(thrown_mob) //Eat them!!!
visible_message(span_vwarning("[thrown_mob] is thrown right into [src]'s [lowertext(vore_selected.name)]!"))
if(thrown_mob.loc != vore_selected)
@@ -369,7 +369,7 @@ emp_act
// PERSON BEING HIT: CAN BE DROP PREY, ALLOWS THROW VORE, AND IS DEVOURABLE.
// PERSON BEING THROWN: CAN BE DROP PRED, ALLOWS THROW VORE.
else if((can_be_drop_prey && throw_vore && devourable) && (thrown_mob.can_be_drop_pred && thrown_mob.throw_vore && thrown_mob.vore_selected)) //Pred thrown into prey.
else if(CanThrowVore(thrown_mob, src)) //Pred thrown into prey.
visible_message(span_vwarning("[src] suddenly slips inside of [thrown_mob]'s [lowertext(thrown_mob.vore_selected.name)] as [thrown_mob] flies into them!"))
thrown_mob.vore_selected.nom_mob(src) //Eat them!!!
if(src.loc != thrown_mob.vore_selected)
@@ -383,7 +383,7 @@
var/list/potentials = living_mobs(0)
if(potentials.len)
var/mob/living/target = pick(potentials)
if(istype(target) && target.devourable && target.can_be_drop_prey && vore_selected)
if(CanSpontaneousVore(src, target))
if(target.buckled)
target.buckled.unbuckle_mob(target, force = TRUE)
target.forceMove(vore_selected)
@@ -59,7 +59,7 @@
var/list/potentials = living_mobs(0)
if(potentials.len)
var/mob/living/target = pick(potentials)
if(istype(target) && target.devourable && target.can_be_drop_prey && vore_selected)
if(CanPhaseVore(src, target))
target.forceMove(vore_selected)
to_chat(target,span_vwarning("\The [src] phases in around you, [vore_selected.vore_verb]ing you into their [vore_selected.get_belly_name()]!"))
@@ -203,7 +203,7 @@
var/list/potentials = living_mobs(0)
if(potentials.len)
var/mob/living/target = pick(potentials)
if(istype(target) && target.devourable && target.can_be_drop_prey && vore_selected)
if(CanPhaseVore(src, target))
target.forceMove(vore_selected)
to_chat(target,span_vwarning("\The [src] phases in around you, [vore_selected.vore_verb]ing you into their [vore_selected.get_belly_name()]!"))
@@ -217,7 +217,7 @@
var/list/potentials = living_mobs(0)
if(potentials.len)
var/mob/living/target = pick(potentials)
if(istype(target) && target.devourable && target.can_be_drop_prey && vore_selected)
if(CanSpontaneousVore(src, target))
if(target.buckled)
target.buckled.unbuckle_mob(target, force = TRUE)
target.forceMove(vore_selected)
@@ -75,7 +75,7 @@
return ..()
if(istype(A, /mob/living)) //Swoopie gonn swoop
var/mob/living/M = A //typecast
if(!M.devourable || !M.can_be_drop_prey)
if(CanSpontaneousVore(src, A))
return ..()
Vac.afterattack(M, src, 1)
return
@@ -246,7 +246,7 @@
for(var/atom/movable/AM in D)
if(istype(AM, /mob/living))
var/mob/living/M = AM
if(!M.devourable || !M.can_be_drop_prey)
if(!CanSpontaneousVore(src, M))
to_chat(M, span_warning("[src] plunges their head into \the [D], while you narrowly avoid being sucked up!"))
continue
to_chat(M, span_warning("[src] plunges their head into \the [D], sucking up everything inside- Including you!"))