mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Fix new genetics stealth powers.
This commit is contained in:
@@ -104,9 +104,6 @@
|
|||||||
var/list/deactivation_messages=list()
|
var/list/deactivation_messages=list()
|
||||||
|
|
||||||
/datum/dna/gene/basic/can_activate(var/mob/M,var/flags)
|
/datum/dna/gene/basic/can_activate(var/mob/M,var/flags)
|
||||||
if(mutation==0)
|
|
||||||
return 0
|
|
||||||
|
|
||||||
// Probability check
|
// Probability check
|
||||||
if(flags & MUTCHK_FORCED || probinj(activation_prob,(flags&MUTCHK_FORCED)))
|
if(flags & MUTCHK_FORCED || probinj(activation_prob,(flags&MUTCHK_FORCED)))
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -84,7 +84,7 @@
|
|||||||
/datum/dna/gene/disability/speech
|
/datum/dna/gene/disability/speech
|
||||||
can_activate(var/mob/M, var/flags)
|
can_activate(var/mob/M, var/flags)
|
||||||
// Can only activate one of these at a time.
|
// Can only activate one of these at a time.
|
||||||
if(is_type_in_list(/datum/dna/gene/disability/speech,M.mutations))
|
if(is_type_in_list(/datum/dna/gene/disability/speech,M.active_genes))
|
||||||
return 0
|
return 0
|
||||||
return ..(M,flags)
|
return ..(M,flags)
|
||||||
|
|
||||||
|
|||||||
@@ -30,10 +30,15 @@
|
|||||||
/datum/dna/gene/basic/stealth
|
/datum/dna/gene/basic/stealth
|
||||||
can_activate(var/mob/M, var/flags)
|
can_activate(var/mob/M, var/flags)
|
||||||
// Can only activate one of these at a time.
|
// Can only activate one of these at a time.
|
||||||
if(is_type_in_list(/datum/dna/gene/basic/stealth,M.mutations))
|
if(is_type_in_list(/datum/dna/gene/basic/stealth,M.active_genes))
|
||||||
|
testing("Cannot activate [type]: /datum/dna/gene/basic/stealth in M.active_genes.")
|
||||||
return 0
|
return 0
|
||||||
return ..(M,flags)
|
return ..(M,flags)
|
||||||
|
|
||||||
|
deactivate(var/mob/M)
|
||||||
|
..(M)
|
||||||
|
M.alpha=255
|
||||||
|
|
||||||
// WAS: /datum/bioEffect/darkcloak
|
// WAS: /datum/bioEffect/darkcloak
|
||||||
/datum/dna/gene/basic/stealth/darkcloak
|
/datum/dna/gene/basic/stealth/darkcloak
|
||||||
name = "Cloak of Darkness"
|
name = "Cloak of Darkness"
|
||||||
@@ -49,9 +54,9 @@
|
|||||||
if(!istype(T))
|
if(!istype(T))
|
||||||
return
|
return
|
||||||
if(T.lighting_lumcount <= 2)
|
if(T.lighting_lumcount <= 2)
|
||||||
M.alpha = round((255 * 0.15))
|
M.alpha = round(255 * 0.05)
|
||||||
else
|
else
|
||||||
M.alpha = round((255 * 0.80))
|
M.alpha = round(255 * 0.80)
|
||||||
|
|
||||||
//WAS: /datum/bioEffect/chameleon
|
//WAS: /datum/bioEffect/chameleon
|
||||||
/datum/dna/gene/basic/stealth/chameleon
|
/datum/dna/gene/basic/stealth/chameleon
|
||||||
@@ -64,8 +69,7 @@
|
|||||||
block=CHAMELEONBLOCK
|
block=CHAMELEONBLOCK
|
||||||
|
|
||||||
OnMobLife(var/mob/M)
|
OnMobLife(var/mob/M)
|
||||||
if((world.timeofday - M.last_move_intent) >= 30 && !M.stat && M.canmove && !M.restrained())
|
if((world.time - M.last_movement) >= 30 && !M.stat && M.canmove && !M.restrained())
|
||||||
M.alpha = round((255 * 0.15))
|
M.alpha = round(255 * 0.10)
|
||||||
else
|
else
|
||||||
M.alpha = round((255 * 0.80))
|
M.alpha = round(255 * 0.80)
|
||||||
return
|
|
||||||
@@ -222,4 +222,6 @@
|
|||||||
|
|
||||||
var/list/active_genes=list()
|
var/list/active_genes=list()
|
||||||
|
|
||||||
var/kills=0
|
var/kills=0
|
||||||
|
|
||||||
|
var/last_movement = -100 // Last world.time the mob actually moved of its own accord.
|
||||||
@@ -345,8 +345,10 @@
|
|||||||
|
|
||||||
else if(mob.confused)
|
else if(mob.confused)
|
||||||
step(mob, pick(cardinal))
|
step(mob, pick(cardinal))
|
||||||
|
mob.last_movement=world.time
|
||||||
else
|
else
|
||||||
. = ..()
|
. = ..()
|
||||||
|
mob.last_movement=world.time
|
||||||
|
|
||||||
moving = 0
|
moving = 0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user