mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge pull request #5426 from Anewbe/deadringer_fixes
Fixes a few bugs associated with the Dead Ringer
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#define TRANSITIONEDGE 7 // Distance from edge to move to another z-level.
|
#define TRANSITIONEDGE 7 // Distance from edge to move to another z-level.
|
||||||
|
|
||||||
// Invisibility constants.
|
// Invisibility constants. These should only be used for TRUE invisibility, AKA nothing living players touch
|
||||||
#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
|
||||||
@@ -21,6 +21,9 @@
|
|||||||
#define SEE_INVISIBLE_MINIMUM 5
|
#define SEE_INVISIBLE_MINIMUM 5
|
||||||
#define INVISIBILITY_MAXIMUM 100
|
#define INVISIBILITY_MAXIMUM 100
|
||||||
|
|
||||||
|
// Pseudo-Invis, like Ninja, Ling, Etc.
|
||||||
|
#define EFFECTIVE_INVIS 50 // Below this, can't be examined, may as well be invisible to the game
|
||||||
|
|
||||||
// For the client FPS pref and anywhere else
|
// For the client FPS pref and anywhere else
|
||||||
#define MAX_CLIENT_FPS 200
|
#define MAX_CLIENT_FPS 200
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
processing_objects -= src
|
processing_objects -= src
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/deadringer/dropped()
|
/obj/item/weapon/deadringer/dropped()
|
||||||
if(timer > 20)
|
if(timer > 20)
|
||||||
uncloak()
|
uncloak()
|
||||||
@@ -50,7 +49,6 @@
|
|||||||
activated = 0
|
activated = 0
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/deadringer/process()
|
/obj/item/weapon/deadringer/process()
|
||||||
if(activated)
|
if(activated)
|
||||||
if (ismob(src.loc))
|
if (ismob(src.loc))
|
||||||
@@ -77,13 +75,11 @@
|
|||||||
icon_state = "deadringer"
|
icon_state = "deadringer"
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/deadringer/proc/deathprevent()
|
/obj/item/weapon/deadringer/proc/deathprevent()
|
||||||
for(var/mob/living/simple_animal/D in oviewers(7, src))
|
for(var/mob/living/simple_animal/D in oviewers(7, src))
|
||||||
D.LoseTarget()
|
D.LoseTarget()
|
||||||
watchowner.emote("deathgasp")
|
watchowner.emote("deathgasp")
|
||||||
watchowner.invisibility = 85
|
watchowner.alpha = 15
|
||||||
watchowner.alpha = 127
|
|
||||||
makeacorpse(watchowner)
|
makeacorpse(watchowner)
|
||||||
for(var/mob/living/simple_animal/D in oviewers(7, src))
|
for(var/mob/living/simple_animal/D in oviewers(7, src))
|
||||||
D.LoseTarget()
|
D.LoseTarget()
|
||||||
@@ -91,7 +87,6 @@
|
|||||||
|
|
||||||
/obj/item/weapon/deadringer/proc/uncloak()
|
/obj/item/weapon/deadringer/proc/uncloak()
|
||||||
if(watchowner)
|
if(watchowner)
|
||||||
watchowner.invisibility = 0
|
|
||||||
watchowner.alpha = 255
|
watchowner.alpha = 255
|
||||||
playsound(get_turf(src), 'sound/effects/uncloak.ogg', 35, 1, -1)
|
playsound(get_turf(src), 'sound/effects/uncloak.ogg', 35, 1, -1)
|
||||||
return
|
return
|
||||||
@@ -180,5 +175,3 @@
|
|||||||
var/obj/item/organ/internal/G = I
|
var/obj/item/organ/internal/G = I
|
||||||
G.Destroy()
|
G.Destroy()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
var/skip_gear = 0
|
var/skip_gear = 0
|
||||||
var/skip_body = 0
|
var/skip_body = 0
|
||||||
|
|
||||||
if(alpha <= 50)
|
if(alpha <= EFFECTIVE_INVIS)
|
||||||
src.loc.examine(user)
|
src.loc.examine(user)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -796,8 +796,6 @@
|
|||||||
var/mob/living/L = target_mob
|
var/mob/living/L = target_mob
|
||||||
if(L.stat != DEAD)
|
if(L.stat != DEAD)
|
||||||
return 1
|
return 1
|
||||||
if(L.invisibility < INVISIBILITY_LEVEL_ONE)
|
|
||||||
return 1
|
|
||||||
if (istype(target_mob,/obj/mecha))
|
if (istype(target_mob,/obj/mecha))
|
||||||
var/obj/mecha/M = target_mob
|
var/obj/mecha/M = target_mob
|
||||||
if (M.occupant)
|
if (M.occupant)
|
||||||
@@ -917,7 +915,7 @@
|
|||||||
continue
|
continue
|
||||||
else if(L in friends)
|
else if(L in friends)
|
||||||
continue
|
continue
|
||||||
else if(L.invisibility >= INVISIBILITY_LEVEL_ONE)
|
else if(L.alpha <= EFFECTIVE_INVIS)
|
||||||
continue
|
continue
|
||||||
else if(!SA_attackable(L))
|
else if(!SA_attackable(L))
|
||||||
continue
|
continue
|
||||||
@@ -1246,7 +1244,7 @@
|
|||||||
ai_log("AttackTarget() Bailing because we're disabled",2)
|
ai_log("AttackTarget() Bailing because we're disabled",2)
|
||||||
LoseTarget()
|
LoseTarget()
|
||||||
return 0
|
return 0
|
||||||
if(!target_mob || !SA_attackable(target_mob) || (target_mob.invisibility >= INVISIBILITY_LEVEL_ONE)) //if the target went invisible, you can't follow it
|
if(!target_mob || !SA_attackable(target_mob) || (target_mob.alpha <= EFFECTIVE_INVIS)) //if the target went invisible, you can't follow it
|
||||||
LoseTarget()
|
LoseTarget()
|
||||||
return 0
|
return 0
|
||||||
if(!(target_mob in ListTargets(view_range)))
|
if(!(target_mob in ListTargets(view_range)))
|
||||||
|
|||||||
Reference in New Issue
Block a user