mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Phase fixes (#7484)
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
#define INVISIBILITY_LIGHTING 20
|
#define INVISIBILITY_LIGHTING 20
|
||||||
#define INVISIBILITY_LEVEL_ONE 35
|
#define INVISIBILITY_LEVEL_ONE 35
|
||||||
#define INVISIBILITY_LEVEL_TWO 45
|
#define INVISIBILITY_LEVEL_TWO 45
|
||||||
|
#define INVISIBILITY_SHADEKIN 55
|
||||||
#define INVISIBILITY_OBSERVER 60
|
#define INVISIBILITY_OBSERVER 60
|
||||||
#define INVISIBILITY_EYE 61
|
#define INVISIBILITY_EYE 61
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,8 @@
|
|||||||
continue
|
continue
|
||||||
if(!attack_can_reach(user, SM, 1))
|
if(!attack_can_reach(user, SM, 1))
|
||||||
continue
|
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.
|
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++
|
hit_mobs++
|
||||||
|
|
||||||
|
|||||||
@@ -96,7 +96,7 @@
|
|||||||
if (istype(A,/mob/living))
|
if (istype(A,/mob/living))
|
||||||
var/dirtslip = FALSE //CHOMPEdit
|
var/dirtslip = FALSE //CHOMPEdit
|
||||||
var/mob/living/M = A
|
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 ..()
|
return ..()
|
||||||
|
|
||||||
if(M.dirties_floor())
|
if(M.dirties_floor())
|
||||||
|
|||||||
@@ -769,6 +769,9 @@ GLOBAL_LIST_EMPTY(vending_products)
|
|||||||
if(!target)
|
if(!target)
|
||||||
return 0
|
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))
|
for(var/datum/stored_item/vending_product/R in shuffle(product_records))
|
||||||
throw_item = R.get_product(loc)
|
throw_item = R.get_product(loc)
|
||||||
if(!throw_item)
|
if(!throw_item)
|
||||||
|
|||||||
@@ -7,6 +7,9 @@
|
|||||||
if(!istype(M))
|
if(!istype(M))
|
||||||
return
|
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))))
|
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),
|
//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.
|
//so we don't appear to teleport from two tiles away when moving into a turf adjacent to vines.
|
||||||
|
|||||||
@@ -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 category = "IC"
|
||||||
set name = "Give"
|
set name = "Give"
|
||||||
|
|
||||||
|
|||||||
@@ -431,7 +431,7 @@ emp_act
|
|||||||
I.forceMove(vore_selected)
|
I.forceMove(vore_selected)
|
||||||
return //CHOMPADD End
|
return //CHOMPADD End
|
||||||
if(in_throw_mode && speed <= THROWFORCE_SPEED_DIVISOR) //empty active hand and we're in throw mode
|
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(isturf(O.loc))
|
||||||
if(can_catch(O))
|
if(can_catch(O))
|
||||||
put_in_active_hand(O)
|
put_in_active_hand(O)
|
||||||
@@ -439,6 +439,9 @@ emp_act
|
|||||||
throw_mode_off()
|
throw_mode_off()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if(src.is_incorporeal()) // CHOMPADD - Don't hit what's not there.
|
||||||
|
return
|
||||||
|
|
||||||
var/dtype = O.damtype
|
var/dtype = O.damtype
|
||||||
var/throw_damage = O.throwforce*(speed/THROWFORCE_SPEED_DIVISOR)
|
var/throw_damage = O.throwforce*(speed/THROWFORCE_SPEED_DIVISOR)
|
||||||
|
|
||||||
|
|||||||
@@ -263,7 +263,7 @@
|
|||||||
to_chat(src, "<span class='notice'>You take a moment to listen in to your environment...</span>")
|
to_chat(src, "<span class='notice'>You take a moment to listen in to your environment...</span>")
|
||||||
for(var/mob/living/L in range(client.view, src))
|
for(var/mob/living/L in range(client.view, src))
|
||||||
var/turf/T = get_turf(L)
|
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
|
continue
|
||||||
heard_something = TRUE
|
heard_something = TRUE
|
||||||
var/feedback = list()
|
var/feedback = list()
|
||||||
|
|||||||
@@ -155,7 +155,7 @@
|
|||||||
|
|
||||||
H.shadekin_set_energy(0)
|
H.shadekin_set_energy(0)
|
||||||
H.ability_flags |= AB_DARK_RESPITE
|
H.ability_flags |= AB_DARK_RESPITE
|
||||||
H.invisibility = INVISIBILITY_LEVEL_TWO
|
H.invisibility = INVISIBILITY_SHADEKIN
|
||||||
|
|
||||||
H.adjustFireLoss(-(H.getFireLoss() * 0.75))
|
H.adjustFireLoss(-(H.getFireLoss() * 0.75))
|
||||||
H.adjustBruteLoss(-(H.getBruteLoss() * 0.75))
|
H.adjustBruteLoss(-(H.getBruteLoss() * 0.75))
|
||||||
@@ -166,7 +166,7 @@
|
|||||||
bp.bandage()
|
bp.bandage()
|
||||||
bp.disinfect()
|
bp.disinfect()
|
||||||
H.nutrition = 0
|
H.nutrition = 0
|
||||||
H.invisibility = INVISIBILITY_LEVEL_TWO
|
H.invisibility = INVISIBILITY_SHADEKIN
|
||||||
BITRESET(H.hud_updateflag, HEALTH_HUD)
|
BITRESET(H.hud_updateflag, HEALTH_HUD)
|
||||||
BITRESET(H.hud_updateflag, STATUS_HUD)
|
BITRESET(H.hud_updateflag, STATUS_HUD)
|
||||||
BITRESET(H.hud_updateflag, LIFE_HUD)
|
BITRESET(H.hud_updateflag, LIFE_HUD)
|
||||||
|
|||||||
@@ -246,9 +246,9 @@
|
|||||||
add_modifier(/datum/modifier/shadekin_phase_vision)
|
add_modifier(/datum/modifier/shadekin_phase_vision)
|
||||||
add_modifier(/datum/modifier/shadekin_phase) //CHOMPEdit - Shadekin probably shouldn't be hit while phasing
|
add_modifier(/datum/modifier/shadekin_phase) //CHOMPEdit - Shadekin probably shouldn't be hit while phasing
|
||||||
sleep(5)
|
sleep(5)
|
||||||
invisibility = INVISIBILITY_LEVEL_TWO
|
invisibility = INVISIBILITY_SHADEKIN
|
||||||
see_invisible = INVISIBILITY_LEVEL_TWO
|
see_invisible = INVISIBILITY_SHADEKIN
|
||||||
see_invisible_default = INVISIBILITY_LEVEL_TWO // CHOMPEdit - Allow seeing phased entities while phased.
|
see_invisible_default = INVISIBILITY_SHADEKIN // CHOMPEdit - Allow seeing phased entities while phased.
|
||||||
//cut_overlays()
|
//cut_overlays()
|
||||||
update_icon()
|
update_icon()
|
||||||
alpha = 127
|
alpha = 127
|
||||||
|
|||||||
@@ -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 name = "Robot Nom"
|
||||||
set category = "IC"
|
set category = "IC"
|
||||||
set desc = "Allows you to eat someone."
|
set desc = "Allows you to eat someone."
|
||||||
|
|||||||
@@ -128,6 +128,8 @@
|
|||||||
//CHOMPSTATION add
|
//CHOMPSTATION add
|
||||||
if(!M.devourable) //Why was there never a check for edibility to begin with
|
if(!M.devourable) //Why was there never a check for edibility to begin with
|
||||||
return 0
|
return 0
|
||||||
|
if(M.is_incorporeal()) // CHOMPADD - No eating the phased ones
|
||||||
|
return 0
|
||||||
//CHOMPSTATION add end
|
//CHOMPSTATION add end
|
||||||
if(vore_ignores_undigestable && !M.digestable) //Don't eat people with nogurgle prefs
|
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
|
//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
|
/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
|
if(!M.canmove || issilicon(M) || world.time < vore_pounce_cooldown) //eliminate situations where pouncing CANNOT happen
|
||||||
return FALSE
|
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
|
if(!prob(vore_pounce_chance) || !will_eat(M)) //mob doesn't want to pounce
|
||||||
return FALSE
|
return FALSE
|
||||||
if(vore_standing_too) //100% chance of hitting people we can eat on the spot
|
if(vore_standing_too) //100% chance of hitting people we can eat on the spot
|
||||||
|
|||||||
@@ -53,6 +53,8 @@
|
|||||||
if(ismob(AM))
|
if(ismob(AM))
|
||||||
if(isliving(AM))
|
if(isliving(AM))
|
||||||
var/mob/living/A = 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(A.mob_size > MOB_SMALL)
|
||||||
if(prob(squish_chance))
|
if(prob(squish_chance))
|
||||||
A.visible_message("<span class='notice'>[A] squashed [src].</span>", "<span class='notice'>You squashed [src].</span>")
|
A.visible_message("<span class='notice'>[A] squashed [src].</span>", "<span class='notice'>You squashed [src].</span>")
|
||||||
|
|||||||
@@ -429,7 +429,7 @@
|
|||||||
env.merge(removed)
|
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.
|
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)) ) ) )
|
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!
|
SSradiation.radiate(src, max(power * 1.5, 50) ) //Better close those shutters!
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
user.face_atom(A)
|
user.face_atom(A)
|
||||||
if(ismob(A) && user.aiming)
|
if(ismob(A) && user.aiming)
|
||||||
user.aiming.aim_at(A, src)
|
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 0
|
||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
@@ -369,7 +369,7 @@
|
|||||||
//
|
//
|
||||||
// Clearly super important. Obviously.
|
// 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 name = "Lick"
|
||||||
set category = "IC"
|
set category = "IC"
|
||||||
set desc = "Lick someone nearby!"
|
set desc = "Lick someone nearby!"
|
||||||
@@ -412,7 +412,7 @@
|
|||||||
|
|
||||||
|
|
||||||
//This is just the above proc but switched about.
|
//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 name = "Smell"
|
||||||
set category = "IC"
|
set category = "IC"
|
||||||
set desc = "Smell someone nearby!"
|
set desc = "Smell someone nearby!"
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
//
|
//
|
||||||
// Simple nom proc for if you get ckey'd into a simple_mob mob! Avoids grabs.
|
// 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 name = "Animal Nom"
|
||||||
set category = "Abilities" // Moving this to abilities from IC as it's more fitting there
|
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!"
|
set desc = "Since you can't grab, you get a verb!"
|
||||||
|
|||||||
@@ -241,6 +241,8 @@
|
|||||||
var/datum/sprite_accessory/tail/taur/tail = H.tail_style
|
var/datum/sprite_accessory/tail/taur/tail = H.tail_style
|
||||||
src_message = tail.msg_owner_help_run
|
src_message = tail.msg_owner_help_run
|
||||||
tmob_message = tail.msg_prey_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
|
//Smaller person stepping under larger person
|
||||||
else if(get_effective_size(TRUE) < tmob.get_effective_size(TRUE) && ishuman(tmob))
|
else if(get_effective_size(TRUE) < tmob.get_effective_size(TRUE) && ishuman(tmob))
|
||||||
|
|||||||
14
modular_chomp/code/_HELPERS/mobs.dm
Normal file
14
modular_chomp/code/_HELPERS/mobs.dm
Normal file
@@ -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
|
||||||
@@ -4600,6 +4600,7 @@
|
|||||||
#include "modular_chomp\code\coalesce_ch.dm"
|
#include "modular_chomp\code\coalesce_ch.dm"
|
||||||
#include "modular_chomp\code\global.dm"
|
#include "modular_chomp\code\global.dm"
|
||||||
#include "modular_chomp\code\_global_vars\tgui.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\icons\flatten.dm"
|
||||||
#include "modular_chomp\code\_HELPERS\type2type\color.dm"
|
#include "modular_chomp\code\_HELPERS\type2type\color.dm"
|
||||||
#include "modular_chomp\code\_onclick\hud\alert.dm"
|
#include "modular_chomp\code\_onclick\hud\alert.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user