[MIRROR] fix vore helpers (#11906)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-11-03 18:51:27 -07:00
committed by GitHub
parent 53831b910c
commit bb9f437a86
20 changed files with 55 additions and 51 deletions

View File

@@ -4,7 +4,9 @@
/// Most basic check of them all.
/// Checks if PRED can eat PREY.
/proc/CanVore(mob/living/pred, mob/living/prey)
/proc/can_vore(mob/living/pred, mob/living/prey)
if(pred == prey)
return FALSE
if(!istype(pred) || !istype(prey))
return FALSE
if(!prey.devourable)
@@ -19,50 +21,50 @@
/// Basic spont vore check.
/// Checks if both have spont vore enable
/proc/CanSpontaneousVore(mob/living/pred, mob/living/prey)
if(!CanVore(pred, prey))
/proc/can_spontaneous_vore(mob/living/pred, mob/living/prey)
if(!can_vore(pred, prey))
return FALSE
if(!pred.can_be_drop_pred || !prey.can_be_drop_prey)
return FALSE
return TRUE
/proc/CanStumbleVore(mob/living/pred, mob/living/prey)
if(!CanSpontaneousVore(pred, prey))
/proc/can_stumble_vore(mob/living/pred, mob/living/prey)
if(!can_spontaneous_vore(pred, prey))
return FALSE
if(!pred.stumble_vore || !prey.stumble_vore)
return FALSE
return TRUE
/proc/CanDropVore(mob/living/pred, mob/living/prey)
if(!CanSpontaneousVore(pred, prey))
/proc/can_drop_vore(mob/living/pred, mob/living/prey)
if(!can_spontaneous_vore(pred, prey))
return FALSE
if(!pred.drop_vore || !prey.stumble_vore)
if(!pred.drop_vore || !prey.drop_vore)
return FALSE
return TRUE
/proc/CanThrowVore(mob/living/pred, mob/living/prey)
if(!CanSpontaneousVore(pred, prey))
/proc/can_throw_vore(mob/living/pred, mob/living/prey)
if(!can_spontaneous_vore(pred, prey))
return FALSE
if(!pred.throw_vore || !prey.throw_vore)
return FALSE
return TRUE
/proc/CanFoodVore(mob/living/pred, mob/living/prey)
if(!CanSpontaneousVore(pred, prey))
/proc/can_food_vore(mob/living/pred, mob/living/prey)
if(!can_spontaneous_vore(pred, prey))
return FALSE
if(!pred.food_vore || !prey.food_vore)
return FALSE
return TRUE
/proc/CanPhaseVore(mob/living/pred, mob/living/prey)
if(!CanSpontaneousVore(pred, prey))
/proc/can_phase_vore(mob/living/pred, mob/living/prey)
if(!can_spontaneous_vore(pred, prey))
return FALSE
if(!pred.phase_vore || !prey.phase_vore)
return FALSE
return TRUE
/proc/CanSlipVore(mob/living/pred, mob/living/prey)
if(!CanSpontaneousVore(pred, prey))
/proc/can_slip_vore(mob/living/pred, mob/living/prey)
if(!can_spontaneous_vore(pred, prey))
return FALSE
if(!pred.slip_vore && !prey.slip_vore)
return FALSE
@@ -72,8 +74,8 @@
return FALSE
return TRUE
/proc/CanAnimalVore(mob/living/pred, mob/living/prey)
if(!CanVore(pred, prey))
/proc/can_animal_vore(mob/living/pred, mob/living/prey)
if(!can_vore(pred, prey))
return FALSE
if(!prey.allowmobvore && isanimal(pred) && !pred.ckey || (!pred.allowmobvore && isanimal(prey) && !prey.ckey))
return FALSE

View File

@@ -156,7 +156,7 @@
/obj/effect/abstract/dark_maw/proc/do_trigger(var/mob/living/L)
var/will_vore = 1
if(!(target in owner) || CanPhaseVore(owner, L))
if(!(target in owner) || can_phase_vore(owner, L))
will_vore = 0
if(!src || src.gc_destroyed)

View File

@@ -169,12 +169,12 @@
var/mob/living/our_prey
if(potentials.len)
var/mob/living/target = pick(potentials)
if(CanPhaseVore(src, target))
if(can_phase_vore(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()]!"))
to_chat(src, span_vwarning("You phase around [target], [vore_selected.vore_verb]ing them into your [vore_selected.get_belly_name()]!"))
our_prey = target
else if(CanPhaseVore(target, src))
else if(can_phase_vore(target, src))
our_prey = src
forceMove(target.vore_selected)
to_chat(target, span_vwarning("\The [src] phases into you, [target.vore_selected.vore_verb]ing them into your [target.vore_selected.get_belly_name()]!"))

View File

@@ -167,7 +167,7 @@
continue //Don't do anything to ourselves.
if(living_mob.stat)
continue
if(!CanStumbleVore(living_guy, living_mob) && !CanStumbleVore(living_mob, living_guy)) //Works both ways! Either way, someone's getting eaten!
if(!can_stumble_vore(living_guy, living_mob) && !can_stumble_vore(living_mob, living_guy)) //Works both ways! Either way, someone's getting eaten!
continue
living_mob.stumble_into(living_guy) //logic reversed here because the game is DUMB. This means that living_guy is stumbling into the target!
living_guy.visible_message(span_danger("[living_guy] loses their balance and slips into [living_mob]!"), span_boldwarning("You lose your balance, slipping into [living_mob]!"))

View File

@@ -108,7 +108,7 @@ Bonus
var/place
for(var/mob/living/carbon/human/B in range(A.stage, mob))
if(CanSpontaneousVore(B, mob))
if(can_spontaneous_vore(B, mob))
destination += B.vore_selected
for(var/turf/T in range(A.stage, mob))
@@ -125,9 +125,9 @@ Bonus
var/mob/living/unlucky = locate() in place
if(unlucky)
if(CanSpontaneousVore(unlucky, mob))
if(can_spontaneous_vore(unlucky, mob))
place = unlucky.vore_selected
else if(CanSpontaneousVore(mob, unlucky))
else if(can_spontaneous_vore(mob, unlucky))
unlucky.forceMove(mob.vore_selected)
mob.emote("sneeze")

View File

@@ -26,14 +26,14 @@
return
//We are able to eat the person stumbling into us.
if(CanStumbleVore(prey = target, pred = source)) //This is if the person stumbling into us is able to eat us!
if(can_stumble_vore(prey = target, pred = source)) //This is if the person stumbling into us is able to eat us!
source.visible_message(span_vwarning("[target] flops carelessly into [source]!"))
source.begin_instant_nom(source, prey = target, pred = source, belly = source.vore_selected)
target.stop_flying()
return CANCEL_STUMBLED_INTO
//The person stumbling into us is able to eat us.
if(CanStumbleVore(prey = source, pred = target)) //This is if the person stumbling into us is able to be eaten by us! BROKEN!
if(can_stumble_vore(prey = source, pred = target)) //This is if the person stumbling into us is able to be eaten by us! BROKEN!
source.visible_message(span_vwarning("[target] flops carelessly into [source]!"))
target.forceMove(get_turf(source))
source.begin_instant_nom(target, prey = source, pred = target, belly = target.vore_selected)
@@ -52,7 +52,7 @@
//pred = drop_mob
//prey = source
//result: source is eaten by drop_mob
if(CanDropVore(prey = source, pred = drop_mob))
if(can_drop_vore(prey = source, pred = drop_mob))
drop_mob.feed_grabbed_to_self_falling_nom(drop_mob, prey = source)
drop_mob.visible_message(span_vdanger("\The [drop_mob] falls right onto \the [source]!"))
return COMSIG_CANCEL_FALL
@@ -60,7 +60,7 @@
//pred = source
//prey = drop_mob
//result: drop_mob is eaten by source
if(CanDropVore(prey = drop_mob, pred = source))
if(can_drop_vore(prey = drop_mob, pred = source))
source.feed_grabbed_to_self_falling_nom(source, prey = drop_mob)
source.Weaken(4)
source.visible_message(span_vdanger("\The [drop_mob] falls right into \the [source]!"))
@@ -93,7 +93,7 @@
// PERSON BEING HIT: CAN BE DROP PRED, ALLOWS THROW VORE.
// PERSON BEING THROWN: DEVOURABLE, ALLOWS THROW VORE, CAN BE DROP PREY.
if(CanThrowVore(prey = thrown_mob, pred = source))
if(can_throw_vore(prey = thrown_mob, pred = source))
if(!source.vore_selected)
return
source.vore_selected.nom_mob(thrown_mob) //Eat them!!!
@@ -106,7 +106,7 @@
// 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(CanThrowVore(prey = source, pred = thrown_mob))//Pred thrown into prey.
else if(can_throw_vore(prey = source, pred = thrown_mob))//Pred thrown into prey.
if(!thrown_mob.vore_selected)
return
source.visible_message(span_vwarning("[source] suddenly slips inside of [thrown_mob]'s [lowertext(thrown_mob.vore_selected.name)] as [thrown_mob] flies into them!"))
@@ -125,11 +125,11 @@
return
//Person being slipped into eats the person slipping
if(CanSlipVore(pred = source, prey = crossed)) //If we can vore them go for it
if(can_slip_vore(pred = source, prey = crossed)) //If we can vore them go for it
source.begin_instant_nom(source, prey = crossed, pred = source, belly = source.vore_selected)
return COMPONENT_BLOCK_CROSS
//The person slipping eats the person being slipped into
else if(CanSlipVore(pred = crossed, prey = source))
else if(can_slip_vore(pred = crossed, prey = source))
source.begin_instant_nom(crossed, prey = source, pred = crossed, belly = crossed.vore_selected) //Must be
return //We DON'T block it here. Pred can slip onto the prey's tile, no problem.

View File

@@ -129,7 +129,7 @@
if(has_buckled_mobs() && buckled_mobs.len >= max_buckled_mobs)
for(var/mob/living/L in buckled_mobs)
if(istype(L) && CanStumbleVore(prey = L, pred = M))
if(istype(L) && can_stumble_vore(prey = L, pred = M))
unbuckle_mob(L, TRUE)
if(M == user)
M.visible_message(span_warning("[M.name] sits down on [L.name]!"))
@@ -218,7 +218,7 @@
if(has_buckled_mobs() && buckled_mobs.len >= max_buckled_mobs) //Handles trying to buckle yourself to the chair when someone is on it
if(can_do_spont_vore && is_vore_predator(M) && M.vore_selected)
for(var/mob/living/buckled in buckled_mobs)
if(CanStumbleVore(prey = buckled, pred = M))
if(can_stumble_vore(prey = buckled, pred = M))
return TRUE
to_chat(M, span_notice("\The [src] can't buckle any more people."))
return FALSE

View File

@@ -35,7 +35,7 @@
if(isliving(src))
var/mob/living/L = src
for(var/mob/living/P in loc)
if(CanDropVore(L, P))
if(can_drop_vore(L, P))
L.feed_grabbed_to_self_falling_nom(L,P)
L.visible_message(span_vdanger("\The [L] falls right onto \the [P]!"))

View File

@@ -101,7 +101,7 @@
if(food_inserted_micros && food_inserted_micros.len)
for(var/mob/living/F in food_inserted_micros)
food_inserted_micros -= F
if(!CanFoodVore(M, F))
if(!can_food_vore(M, F))
F.forceMove(get_turf(src))
else
F.forceMove(M.vore_selected)

View File

@@ -296,7 +296,7 @@
return
else if(isliving(source))
var/mob/living/L = source
if(CanThrowVore(gargoyle, L))
if(can_throw_vore(gargoyle, L))
var/drop_prey_temp = FALSE
if(gargoyle.can_be_drop_prey)
drop_prey_temp = TRUE

View File

@@ -101,7 +101,7 @@
do_nom = TRUE
if(do_nom)
if(!CanFoodVore(M, F))
if(!can_food_vore(M, F))
continue
if(isanimal(M) && !F.allowmobvore && !M.ckey) //If the one doing the eating is a simple mob controlled by AI, check mob vore prefs
continue

View File

@@ -70,7 +70,7 @@
do_nom = TRUE
if(do_nom)
if(!CanFoodVore(M, F))
if(!can_food_vore(M, F))
continue
F.forceMove(M.vore_selected)
food_inserted_micros -= F

View File

@@ -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(CanThrowVore(src, thrown_mob))
if(can_throw_vore(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(CanThrowVore(thrown_mob, src)) //Pred thrown into prey.
else if(can_throw_vore(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)

View File

@@ -385,7 +385,7 @@
var/list/potentials = living_mobs(0)
if(potentials.len)
var/mob/living/target = pick(potentials)
if(CanSpontaneousVore(src, target))
if(can_spontaneous_vore(src, target))
if(target.buckled)
target.buckled.unbuckle_mob(target, force = TRUE)
target.forceMove(vore_selected)

View File

@@ -59,7 +59,7 @@
var/list/potentials = living_mobs(0)
if(potentials.len)
var/mob/living/target = pick(potentials)
if(CanPhaseVore(src, target))
if(can_phase_vore(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(CanPhaseVore(src, target))
if(can_phase_vore(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()]!"))

View File

@@ -331,14 +331,16 @@
set category = "Abilities.Vore"
set name = "Resist Control"
set desc = "Attempt to resist control."
if(pred_body.ckey == pred_ckey)
dominate_predator()
return
if(pred_ckey == ckey && pred_body.prey_controlled)
to_chat(src, span_danger("You begin to resist \the [prey_name]'s control!!!"))
to_chat(pred_body, span_danger("You feel the captive mind of [src] begin to resist your control."))
if(do_after(src, 10 SECONDS, target = prey_name))
if(do_after(src, 10 SECONDS, target = src))
restore_control()
else
to_chat(src, span_notice("Your attempt to regain control has been interrupted..."))

View File

@@ -217,7 +217,7 @@
var/list/potentials = living_mobs(0)
if(potentials.len)
var/mob/living/target = pick(potentials)
if(CanSpontaneousVore(src, target))
if(can_spontaneous_vore(src, target))
if(target.buckled)
target.buckled.unbuckle_mob(target, force = TRUE)
target.forceMove(vore_selected)

View File

@@ -75,7 +75,7 @@
return ..()
if(istype(A, /mob/living)) //Swoopie gonn swoop
var/mob/living/M = A //typecast
if(CanSpontaneousVore(src, A))
if(can_spontaneous_vore(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(!CanSpontaneousVore(src, M))
if(!can_spontaneous_vore(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!"))

View File

@@ -141,7 +141,7 @@
belly_dest = pick(living_user.vore_organs)
if(belly_dest)
for(var/mob/living/prey in ToTurf)
if(CanDropVore(user, prey))
if(can_drop_vore(user, prey))
prey.forceMove(belly_dest)
vore_happened = TRUE
to_chat(prey, span_vdanger("[living_user] materializes around you, as you end up in their [belly_dest]!"))

View File

@@ -119,7 +119,7 @@
winner.visible_message(span_bold("\The [winner]") + " is suddenly knocked to the ground.")
winner.SetWeakened(max(winner.weakened,50))
if(TELEPORTING_CRACKER)
if(CanSpontaneousVore(loser, winner))
if(can_spontaneous_vore(loser, winner))
winner.visible_message(span_bold("\The [winner]") + " is teleported to somewhere nearby...")
var/datum/effect/effect/system/spark_spread/spk
spk = new(winner)