mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Fixes Arachnophobia Exploit
This commit is contained in:
@@ -431,4 +431,10 @@
|
||||
#define EXAMINE_SKIPLEGS 0x0080
|
||||
#define EXAMINE_SKIPFEET 0x0100
|
||||
|
||||
<<<<<<< HEAD
|
||||
#define MAX_NUTRITION 5000 //VOREStation Edit
|
||||
=======
|
||||
#define MAX_NUTRITION 500
|
||||
|
||||
#define FAKE_INVIS_ALPHA_THRESHOLD 127 // If something's alpha var is at or below this number, certain things will pretend it is invisible.
|
||||
>>>>>>> e3d2490... Fixes Arachnophobia Exploit (#7410)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
var/vision_range = 7 // How far the targeting system will look for things to kill. Note that values higher than 7 are 'offscreen' and might be unsporting.
|
||||
var/respect_alpha = TRUE // If true, mobs with a sufficently low alpha will be treated as invisible.
|
||||
var/alpha_vision_threshold = 127 // Targets with an alpha less or equal to this will be considered invisible. Requires above var to be true.
|
||||
var/alpha_vision_threshold = FAKE_INVIS_ALPHA_THRESHOLD // Targets with an alpha less or equal to this will be considered invisible. Requires above var to be true.
|
||||
|
||||
var/lose_target_time = 0 // world.time when a target was lost.
|
||||
var/lose_target_timeout = 5 SECONDS // How long until a mob 'times out' and stops trying to find the mob that disappeared.
|
||||
|
||||
@@ -120,6 +120,11 @@
|
||||
|
||||
// People covered in blood is also bad.
|
||||
// Feel free to trim down if its too expensive CPU wise.
|
||||
if(isliving(thing))
|
||||
var/mob/living/L = thing
|
||||
if(L.alpha <= FAKE_INVIS_ALPHA_THRESHOLD) // Can't fear something you can't (easily) see.
|
||||
continue
|
||||
|
||||
if(istype(thing, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = thing
|
||||
var/self_multiplier = H == holder ? 2 : 1
|
||||
@@ -207,8 +212,14 @@
|
||||
if(istype(thing, /obj/structure/snowman/spider)) //Snow spiders are also spooky so people can be assholes with those too.
|
||||
fear_amount += 1
|
||||
|
||||
if(istype(thing, /mob/living/simple_mob/animal/giant_spider)) // Actual giant spiders are the scariest of them all.
|
||||
var/mob/living/simple_mob/animal/giant_spider/S = thing
|
||||
if(isliving(thing))
|
||||
var/mob/living/L = thing
|
||||
if(L.alpha <= FAKE_INVIS_ALPHA_THRESHOLD) // Can't fear something you can't (easily) see.
|
||||
continue
|
||||
|
||||
if(istype(L, /mob/living/simple_mob/animal/giant_spider)) // Actual giant spiders are the scariest of them all.
|
||||
var/mob/living/simple_mob/animal/giant_spider/S = L
|
||||
|
||||
if(S.stat == DEAD) // Dead giant spiders are less scary than alive ones.
|
||||
fear_amount += 4
|
||||
else
|
||||
@@ -425,8 +436,12 @@
|
||||
if(istype(thing, /obj/item/clothing/head/collectable/slime)) // Some hats are spooky so people can be assholes with them.
|
||||
fear_amount += 1
|
||||
|
||||
if(istype(thing, /mob/living/simple_mob/slime)) // An actual predatory specimen!
|
||||
var/mob/living/simple_mob/slime/S = thing
|
||||
if(isliving(thing))
|
||||
var/mob/living/L = thing
|
||||
if(L.alpha <= FAKE_INVIS_ALPHA_THRESHOLD) // Can't fear something you can't (easily) see.
|
||||
continue
|
||||
if(istype(L, /mob/living/simple_mob/slime)) // An actual predatory specimen!
|
||||
var/mob/living/simple_mob/slime/S = L
|
||||
if(S.stat == DEAD) // Dead slimes are somewhat less spook.
|
||||
fear_amount += 4
|
||||
if(istype(S, /mob/living/simple_mob/slime/xenobio))
|
||||
@@ -438,8 +453,8 @@
|
||||
else
|
||||
fear_amount += 10 // It's huge and feral.
|
||||
|
||||
if(istype(thing, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/S = thing
|
||||
if(istype(L, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/S = L
|
||||
if(istype(S.species, /datum/species/skrell)) //Skrell ARE slimey.
|
||||
fear_amount += 1
|
||||
if(istype(S.species, /datum/species/shapeshifter/promethean))
|
||||
@@ -525,8 +540,12 @@
|
||||
if(istype(thing, /obj/item/weapon/gun/launcher/syringe))
|
||||
fear_amount += 6
|
||||
|
||||
if(istype(thing, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = thing
|
||||
if(isliving(thing))
|
||||
var/mob/living/L = thing
|
||||
if(L.alpha <= FAKE_INVIS_ALPHA_THRESHOLD) // Can't fear something you can't (easily) see.
|
||||
continue
|
||||
if(istype(L, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = L
|
||||
if(H.l_hand && istype(H.l_hand, /obj/item/weapon/reagent_containers/syringe) || H.r_hand && istype(H.r_hand, /obj/item/weapon/reagent_containers/syringe))
|
||||
fear_amount += 10
|
||||
|
||||
|
||||
Reference in New Issue
Block a user