Fix multiple KIN exploits (#9786)

This commit is contained in:
Kashargul
2025-01-05 14:38:24 +01:00
committed by GitHub
parent edae67fd5f
commit 4f51cf1044
12 changed files with 43 additions and 10 deletions

View File

@@ -109,7 +109,7 @@ Bonus
var/mob/living/carbon/human/unlucky = locate() in place
if(unlucky)
if(unlucky && !unlucky.is_incorporeal()) // CHOMPEdit
if(unlucky.can_be_drop_pred && H.can_be_drop_prey && H.devourable)
place = unlucky.vore_selected
else if(unlucky.devourable && unlucky.can_be_drop_prey && H.can_be_drop_pred)

View File

@@ -390,6 +390,10 @@ emp_act
//this proc handles being hit by a thrown atom
/mob/living/carbon/human/hitby(atom/movable/AM as mob|obj,var/speed = THROWFORCE_SPEED_DIVISOR)
// CHOMPADD Start
if(src.is_incorporeal())
return
// CHOMPAdd End
// if(buckled && buckled == AM)
// return // Don't get hit by the thing we're buckled to.
@@ -439,9 +443,6 @@ emp_act
throw_mode_off()
return
if(src.is_incorporeal()) // CHOMPADD - Don't hit what's not there.
return
var/dtype = O.damtype
var/throw_damage = O.throwforce*(speed/THROWFORCE_SPEED_DIVISOR)

View File

@@ -183,7 +183,7 @@
// This handles the drag-open inventory panel.
/mob/living/MouseDrop(atom/over_object)
var/mob/living/L = over_object
if(istype(L) && L != src && L == usr && Adjacent(L))
if(istype(L) && L != src && L == usr && Adjacent(L) && !L.is_incorporeal()) // CHOMPEdit
show_inventory_panel(L)
. = ..()

View File

@@ -263,6 +263,10 @@
//this proc handles being hit by a thrown atom
/mob/living/hitby(atom/movable/AM as mob|obj,var/speed = THROWFORCE_SPEED_DIVISOR)//Standardization and logging -Sieve
// CHOMPAdd Start
if(is_incorporeal())
return
// CHOMPAdd End
if(istype(AM,/obj/))
var/obj/O = AM
if(stat != DEAD && istype(O,/obj/item) && trash_catching && vore_selected) //ported from chompstation

View File

@@ -9,7 +9,7 @@
if(istype(mover, /obj/item/projectile))
var/obj/item/projectile/P = mover
return !P.can_hit_target(src, P.permutated, src == P.original, TRUE)
return (!mover.density || !density || lying)
return (!mover.density || !density || lying || is_incorporeal()) // CHOMPEdit
/mob/CanZASPass(turf/T, is_zone)
return ATMOS_PASS_YES
@@ -48,7 +48,7 @@ default behaviour is:
return 0
/mob/living/Bump(atom/movable/AM)
if(now_pushing || !loc || buckled == AM)
if(now_pushing || !loc || buckled == AM || AM.is_incorporeal())
return
now_pushing = 1
if (istype(AM, /mob/living))

View File

@@ -40,6 +40,7 @@
// change
ability_flags &= ~AB_PHASE_SHIFTED
throwpass = FALSE // CHOMPAdd
mouse_opacity = 1
name = real_name
for(var/obj/belly/B as anything in vore_organs)
@@ -108,6 +109,7 @@
// change
ability_flags |= AB_PHASE_SHIFTED
throwpass = TRUE // CHOMPAdd
mouse_opacity = 0
custom_emote(1,"phases out!")
real_name = name

View File

@@ -32,6 +32,10 @@
return 0
var/mob/living/pred = hit_atom
// CHOMPAdd Start
if(pred.is_incorporeal())
return
// CHOMPAdd End
var/safe_fall = FALSE
if(pred.softfall || (istype(pred, /mob/living/simple_mob) && pred.mob_size <= MOB_SMALL)) // TODO: add ability for mob below to be 'soft' and cushion fall
safe_fall = TRUE

View File

@@ -931,6 +931,10 @@
/mob/living/proc/feed_grabbed_to_self_falling_nom(var/mob/living/user, var/mob/living/prey)
// CHOMPAdd Start
if(user.is_incorporeal())
return FALSE
// CHOMPAdd End
var/belly = user.vore_selected
return perform_the_nom(user, prey, user, belly, delay = 1) //1/10th of a second is probably fine.

View File

@@ -8,6 +8,10 @@
/mob/living/proc/can_slip_vore(var/mob/living/target)
if(!target.is_slipping) //Obviously they have to be slipping to get slip vored
return FALSE
// CHOMPAdd Start
if(is_incorporeal())
return FALSE
// CHOMPAdd End
if(world.time <= target.slip_protect)
return FALSE
if(!(src.can_be_drop_pred && target.devourable && target.can_be_drop_prey)) //Make sure both of their prefs align with what we're gonna do.
@@ -23,6 +27,10 @@
/mob/living/proc/can_be_slip_vored_by(var/mob/living/target)
if(!target.is_slipping) //Obviously they have to be slipping to get slip vored
return FALSE
// CHOMPAdd Start
if(is_incorporeal())
return FALSE
// CHOMPAdd End
if(world.time <= target.slip_protect)
return FALSE
if(!(target.can_be_drop_pred && src.devourable && src.can_be_drop_prey)) //Make sure both of their prefs align with what we're gonna do.

View File

@@ -1,6 +1,10 @@
/mob/living/proc/CanStumbleVore(mob/living/target)
if(!can_be_drop_pred)
return FALSE
// CHOMPAdd Start
if(is_incorporeal() || target.is_incorporeal())
return FALSE
// CHOMPAdd End
if(!is_vore_predator(src))
return FALSE
if(!target.devourable)
@@ -14,8 +18,12 @@
/mob/living/Bump(atom/movable/AM)
//. = ..()
if(istype(AM, /mob/living))
if(buckled != AM && (((confused || is_blind()) && stat == CONSCIOUS && prob(50) && m_intent==I_RUN) || flying && flight_vore))
AM.stumble_into(src)
// CHOMPEdit Start
var/mob/living/L = AM
if(!L.is_incorporeal())
if(buckled != AM && (((confused || is_blind()) && stat == CONSCIOUS && prob(50) && m_intent==I_RUN) || flying && flight_vore))
AM.stumble_into(src)
// CHOMPEdit End
return ..()
// Because flips toggle density
/mob/living/Crossed(var/atom/movable/AM)

View File

@@ -3,7 +3,7 @@
set desc = "Allows you to eat people who are below your tile or adjacent one. Requires passability."
set category = "Abilities.Vore"
if(stat == DEAD || paralysis || weakened || stunned)
if(stat == DEAD || paralysis || weakened || stunned || is_incorporeal()) // CHOMPEdit
to_chat(src, span_notice("You cannot do that while in your current state."))
return

View File

@@ -125,6 +125,7 @@
// change
ability_flags &= ~AB_PHASE_SHIFTED
ability_flags |= AB_PHASE_SHIFTING
throwpass = FALSE
name = get_visible_name()
for(var/obj/belly/B as anything in vore_organs)
B.escapable = initial(B.escapable)
@@ -235,6 +236,7 @@
// change
ability_flags |= AB_PHASE_SHIFTED
ability_flags |= AB_PHASE_SHIFTING
throwpass = TRUE
custom_emote(1,"phases out!")
name = get_visible_name()