diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm
index 59de4cb649..58d03eb631 100644
--- a/code/__defines/misc.dm
+++ b/code/__defines/misc.dm
@@ -8,6 +8,7 @@
#define INVISIBILITY_LIGHTING 20
#define INVISIBILITY_LEVEL_ONE 35
#define INVISIBILITY_LEVEL_TWO 45
+#define INVISIBILITY_SHADEKIN 55
#define INVISIBILITY_OBSERVER 60
#define INVISIBILITY_EYE 61
diff --git a/code/game/objects/weapons.dm b/code/game/objects/weapons.dm
index cc9e2fa5c7..ce48d03783 100644
--- a/code/game/objects/weapons.dm
+++ b/code/game/objects/weapons.dm
@@ -37,6 +37,8 @@
continue
if(!attack_can_reach(user, SM, 1))
continue
+ if(SM.is_incorporeal()) // CHOMPADD - Don't cleave phased entities.
+ continue
if(resolve_attackby(SM, user, attack_modifier = 0.5)) // Hit them with the weapon. This won't cause recursive cleaving due to the cleaving variable being set to true.
hit_mobs++
diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm
index ad4a90bf2d..8462357163 100644
--- a/code/game/turfs/simulated.dm
+++ b/code/game/turfs/simulated.dm
@@ -96,7 +96,7 @@
if (istype(A,/mob/living))
var/dirtslip = FALSE //CHOMPEdit
var/mob/living/M = A
- if(M.lying || M.flying) //VOREStation Edit
+ if(M.lying || M.flying || M.is_incorporeal()) //VOREStation Edit - CHOMPADD - Don't forget the phased ones.
return ..()
if(M.dirties_floor())
diff --git a/code/modules/economy/vending.dm b/code/modules/economy/vending.dm
index be0303a41f..9382e8bb0e 100644
--- a/code/modules/economy/vending.dm
+++ b/code/modules/economy/vending.dm
@@ -769,6 +769,9 @@ GLOBAL_LIST_EMPTY(vending_products)
if(!target)
return 0
+ if(target.is_incorporeal()) // CHOMPADD - Don't shoot at things that aren't there.
+ return 0
+
for(var/datum/stored_item/vending_product/R in shuffle(product_records))
throw_item = R.get_product(loc)
if(!throw_item)
diff --git a/code/modules/hydroponics/spreading/spreading_response.dm b/code/modules/hydroponics/spreading/spreading_response.dm
index b9e64b8d32..f7e582f5dc 100644
--- a/code/modules/hydroponics/spreading/spreading_response.dm
+++ b/code/modules/hydroponics/spreading/spreading_response.dm
@@ -7,6 +7,9 @@
if(!istype(M))
return
+ if(M.is_incorporeal()) // CHOMPEdit - Don't buckle phased entities.
+ return
+
if(!has_buckled_mobs() && !M.buckled && !M.anchored && (issmall(M) || prob(round(seed.get_trait(TRAIT_POTENCY)/3))))
//wait a tick for the Entered() proc that called HasProximity() to finish (and thus the moving animation),
//so we don't appear to teleport from two tiles away when moving into a turf adjacent to vines.
diff --git a/code/modules/mob/living/carbon/give.dm b/code/modules/mob/living/carbon/give.dm
index a8724facaa..1faab06e09 100644
--- a/code/modules/mob/living/carbon/give.dm
+++ b/code/modules/mob/living/carbon/give.dm
@@ -1,4 +1,4 @@
-/mob/living/verb/give(var/mob/living/target in living_mobs(1))
+/mob/living/verb/give(var/mob/living/target in living_mobs_in_view(1))
set category = "IC"
set name = "Give"
@@ -43,4 +43,4 @@
if(src.unEquip(I))
target.put_in_hands(I) // If this fails it will just end up on the floor, but that's fitting for things like dionaea.
- target.visible_message(SPAN_NOTICE("\The [src] handed \the [I] to \the [target]"))
\ No newline at end of file
+ target.visible_message(SPAN_NOTICE("\The [src] handed \the [I] to \the [target]"))
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index de2dc6a12c..787b310f67 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -431,7 +431,7 @@ emp_act
I.forceMove(vore_selected)
return //CHOMPADD End
if(in_throw_mode && speed <= THROWFORCE_SPEED_DIVISOR) //empty active hand and we're in throw mode
- if(canmove && !restrained())
+ if(canmove && !restrained() && !src.is_incorporeal()) // CHOMPADD - No hands for the phased ones.
if(isturf(O.loc))
if(can_catch(O))
put_in_active_hand(O)
@@ -439,6 +439,9 @@ 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)
diff --git a/code/modules/mob/living/carbon/human/human_powers.dm b/code/modules/mob/living/carbon/human/human_powers.dm
index ce3fb9d186..c484844ba3 100644
--- a/code/modules/mob/living/carbon/human/human_powers.dm
+++ b/code/modules/mob/living/carbon/human/human_powers.dm
@@ -263,7 +263,7 @@
to_chat(src, "You take a moment to listen in to your environment...")
for(var/mob/living/L in range(client.view, src))
var/turf/T = get_turf(L)
- if(!T || L == src || L.stat == DEAD || is_below_sound_pressure(T))
+ if(!T || L == src || L.stat == DEAD || is_below_sound_pressure(T) || L.is_incorporeal()) // CHOMPAdd - No bluespace ears.
continue
heard_something = TRUE
var/feedback = list()
diff --git a/code/modules/mob/living/carbon/human/species/shadekin/shadekin.dm b/code/modules/mob/living/carbon/human/species/shadekin/shadekin.dm
index b505e38a70..e6097ac33c 100644
--- a/code/modules/mob/living/carbon/human/species/shadekin/shadekin.dm
+++ b/code/modules/mob/living/carbon/human/species/shadekin/shadekin.dm
@@ -155,7 +155,7 @@
H.shadekin_set_energy(0)
H.ability_flags |= AB_DARK_RESPITE
- H.invisibility = INVISIBILITY_LEVEL_TWO
+ H.invisibility = INVISIBILITY_SHADEKIN
H.adjustFireLoss(-(H.getFireLoss() * 0.75))
H.adjustBruteLoss(-(H.getBruteLoss() * 0.75))
@@ -166,7 +166,7 @@
bp.bandage()
bp.disinfect()
H.nutrition = 0
- H.invisibility = INVISIBILITY_LEVEL_TWO
+ H.invisibility = INVISIBILITY_SHADEKIN
BITRESET(H.hud_updateflag, HEALTH_HUD)
BITRESET(H.hud_updateflag, STATUS_HUD)
BITRESET(H.hud_updateflag, LIFE_HUD)
diff --git a/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm b/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm
index 074538a51b..c22fe460f9 100644
--- a/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm
+++ b/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm
@@ -246,9 +246,9 @@
add_modifier(/datum/modifier/shadekin_phase_vision)
add_modifier(/datum/modifier/shadekin_phase) //CHOMPEdit - Shadekin probably shouldn't be hit while phasing
sleep(5)
- invisibility = INVISIBILITY_LEVEL_TWO
- see_invisible = INVISIBILITY_LEVEL_TWO
- see_invisible_default = INVISIBILITY_LEVEL_TWO // CHOMPEdit - Allow seeing phased entities while phased.
+ invisibility = INVISIBILITY_SHADEKIN
+ see_invisible = INVISIBILITY_SHADEKIN
+ see_invisible_default = INVISIBILITY_SHADEKIN // CHOMPEdit - Allow seeing phased entities while phased.
//cut_overlays()
update_icon()
alpha = 127
diff --git a/code/modules/mob/living/silicon/robot/robot_vr.dm b/code/modules/mob/living/silicon/robot/robot_vr.dm
index adc49d3e50..9fecc2691b 100644
--- a/code/modules/mob/living/silicon/robot/robot_vr.dm
+++ b/code/modules/mob/living/silicon/robot/robot_vr.dm
@@ -1,4 +1,4 @@
-/mob/living/silicon/robot/verb/robot_nom(var/mob/living/T in living_mobs(1))
+/mob/living/silicon/robot/verb/robot_nom(var/mob/living/T in living_mobs_in_view(1))
set name = "Robot Nom"
set category = "IC"
set desc = "Allows you to eat someone."
diff --git a/code/modules/mob/living/simple_mob/simple_mob_vr.dm b/code/modules/mob/living/simple_mob/simple_mob_vr.dm
index 28b1ff024d..30b1f9d339 100644
--- a/code/modules/mob/living/simple_mob/simple_mob_vr.dm
+++ b/code/modules/mob/living/simple_mob/simple_mob_vr.dm
@@ -128,6 +128,8 @@
//CHOMPSTATION add
if(!M.devourable) //Why was there never a check for edibility to begin with
return 0
+ if(M.is_incorporeal()) // CHOMPADD - No eating the phased ones
+ return 0
//CHOMPSTATION add end
if(vore_ignores_undigestable && !M.digestable) //Don't eat people with nogurgle prefs
//ai_log("vr/wont eat [M] because I am picky", 3) //VORESTATION AI TEMPORARY REMOVAL
@@ -172,6 +174,10 @@
/mob/living/simple_mob/proc/CanPounceTarget(var/mob/living/M) //returns either FALSE or a %chance of success
if(!M.canmove || issilicon(M) || world.time < vore_pounce_cooldown) //eliminate situations where pouncing CANNOT happen
return FALSE
+ // CHOMPADD Start - No pouncing on the shades
+ if(M.is_incorporeal())
+ return FALSE
+ // CHOMPADD End
if(!prob(vore_pounce_chance) || !will_eat(M)) //mob doesn't want to pounce
return FALSE
if(vore_standing_too) //100% chance of hitting people we can eat on the spot
diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/passive/cockroach.dm b/code/modules/mob/living/simple_mob/subtypes/animal/passive/cockroach.dm
index bae25b4619..3f33e6c590 100644
--- a/code/modules/mob/living/simple_mob/subtypes/animal/passive/cockroach.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/animal/passive/cockroach.dm
@@ -53,6 +53,8 @@
if(ismob(AM))
if(isliving(AM))
var/mob/living/A = AM
+ if(A.is_incorporeal()) // CHOMPADD - Bad kin, no squishing the roach
+ return
if(A.mob_size > MOB_SMALL)
if(prob(squish_chance))
A.visible_message("[A] squashed [src].", "You squashed [src].")
diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm
index fea483fcc2..5c29b1ae71 100644
--- a/code/modules/power/supermatter/supermatter.dm
+++ b/code/modules/power/supermatter/supermatter.dm
@@ -429,7 +429,7 @@
env.merge(removed)
for(var/mob/living/carbon/human/l in view(src, min(7, round(sqrt(power/6))))) // If they can see it without mesons on. Bad on them.
- if(!istype(l.glasses, /obj/item/clothing/glasses/meson)) // VOREStation Edit - Only mesons can protect you!
+ if(!istype(l.glasses, /obj/item/clothing/glasses/meson) || l.is_incorporeal()) // VOREStation Edit - Only mesons can protect you! - CHOMPEdit - OR if they're not in the same plane of existence
l.hallucination = max(0, min(200, l.hallucination + power * config_hallucination_power * sqrt( 1 / max(1,get_dist(l, src)) ) ) )
SSradiation.radiate(src, max(power * 1.5, 50) ) //Better close those shutters!
diff --git a/code/modules/projectiles/targeting/targeting_gun.dm b/code/modules/projectiles/targeting/targeting_gun.dm
index 3b80658226..367c17247d 100644
--- a/code/modules/projectiles/targeting/targeting_gun.dm
+++ b/code/modules/projectiles/targeting/targeting_gun.dm
@@ -17,7 +17,7 @@
user.face_atom(A)
if(ismob(A) && user.aiming)
user.aiming.aim_at(A, src)
- if(!isliving(A))
+ if(!isliving(A) || A.is_incorporeal()) // CHOMPEdit - Phase out can't be targetted when phased
return 0
return 1
- return 0
\ No newline at end of file
+ return 0
diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm
index 5aac20dc78..ce24d59905 100644
--- a/code/modules/vore/eating/living_vr.dm
+++ b/code/modules/vore/eating/living_vr.dm
@@ -369,7 +369,7 @@
//
// Clearly super important. Obviously.
//
-/mob/living/proc/lick(mob/living/tasted in living_mobs(1, TRUE)) //CHOMPEdit
+/mob/living/proc/lick(mob/living/tasted in living_mobs_in_view(1, TRUE)) //CHOMPEdit
set name = "Lick"
set category = "IC"
set desc = "Lick someone nearby!"
@@ -412,7 +412,7 @@
//This is just the above proc but switched about.
-/mob/living/proc/smell(mob/living/smelled in living_mobs(1, TRUE)) //CHOMPEdit
+/mob/living/proc/smell(mob/living/smelled in living_mobs_in_view(1, TRUE)) //CHOMPEdit
set name = "Smell"
set category = "IC"
set desc = "Smell someone nearby!"
diff --git a/code/modules/vore/eating/simple_animal_vr.dm b/code/modules/vore/eating/simple_animal_vr.dm
index abe8830ce6..165101b0c5 100644
--- a/code/modules/vore/eating/simple_animal_vr.dm
+++ b/code/modules/vore/eating/simple_animal_vr.dm
@@ -12,7 +12,7 @@
//
// Simple nom proc for if you get ckey'd into a simple_mob mob! Avoids grabs.
//
-/mob/living/simple_mob/proc/animal_nom(mob/living/T in living_mobs(1))
+/mob/living/simple_mob/proc/animal_nom(mob/living/T in living_mobs_in_view(1))
set name = "Animal Nom"
set category = "Abilities" // Moving this to abilities from IC as it's more fitting there
set desc = "Since you can't grab, you get a verb!"
diff --git a/code/modules/vore/resizing/resize_vr.dm b/code/modules/vore/resizing/resize_vr.dm
index 9fb8560f48..07d2bd087e 100644
--- a/code/modules/vore/resizing/resize_vr.dm
+++ b/code/modules/vore/resizing/resize_vr.dm
@@ -241,6 +241,8 @@
var/datum/sprite_accessory/tail/taur/tail = H.tail_style
src_message = tail.msg_owner_help_run
tmob_message = tail.msg_prey_help_run
+ if(tmob.is_incorporeal()) // CHOMPEdit - Nothing to step over.
+ return TRUE
//Smaller person stepping under larger person
else if(get_effective_size(TRUE) < tmob.get_effective_size(TRUE) && ishuman(tmob))
diff --git a/modular_chomp/code/_HELPERS/mobs.dm b/modular_chomp/code/_HELPERS/mobs.dm
new file mode 100644
index 0000000000..cd3f75581d
--- /dev/null
+++ b/modular_chomp/code/_HELPERS/mobs.dm
@@ -0,0 +1,14 @@
+/atom/proc/living_mobs_in_view(var/range = world.view, var/count_held = FALSE)
+ var/list/viewers = oviewers(src, range)
+ if(count_held)
+ viewers = viewers(src,range)
+ var/list/living = list()
+ for(var/mob/living/L in viewers)
+ if(L.is_incorporeal())
+ continue
+ living += L
+ if(count_held)
+ for(var/obj/item/weapon/holder/H in L.contents)
+ if(istype(H.held_mob, /mob/living))
+ living += H.held_mob
+ return living
diff --git a/vorestation.dme b/vorestation.dme
index 60ff2e35fa..415884089a 100644
--- a/vorestation.dme
+++ b/vorestation.dme
@@ -4600,6 +4600,7 @@
#include "modular_chomp\code\coalesce_ch.dm"
#include "modular_chomp\code\global.dm"
#include "modular_chomp\code\_global_vars\tgui.dm"
+#include "modular_chomp\code\_HELPERS\mobs.dm"
#include "modular_chomp\code\_HELPERS\icons\flatten.dm"
#include "modular_chomp\code\_HELPERS\type2type\color.dm"
#include "modular_chomp\code\_onclick\hud\alert.dm"