Fix gene activation logic.

This commit is contained in:
Rob Nelson
2014-01-31 22:27:46 -05:00
committed by ZomgPonies
parent c9b19f5f24
commit 433d7b52dd
3 changed files with 8 additions and 5 deletions
+3 -4
View File
@@ -104,11 +104,10 @@
var/list/deactivation_messages=list()
/datum/dna/gene/basic/can_activate(var/mob/M,var/flags)
// Probability check
if(flags & MUTCHK_FORCED || probinj(activation_prob,(flags&MUTCHK_FORCED)))
if(flags & MUTCHK_FORCED)
return 1
return 0
// Probability check
return probinj(activation_prob,(flags&MUTCHK_FORCED))
/datum/dna/gene/basic/activate(var/mob/M)
M.mutations.Add(mutation)
+1 -1
View File
@@ -54,7 +54,7 @@
if(!istype(T))
return
if(T.lighting_lumcount <= 2)
M.alpha = round(255 * 0.05)
M.alpha = 0
else
M.alpha = round(255 * 0.80)
+4
View File
@@ -71,6 +71,8 @@
block=COLDBLOCK
can_activate(var/mob/M,var/flags)
if(flags & MUTCHK_FORCED)
return !(/datum/dna/gene/basic/cold_resist in M.active_genes)
// Probability check
var/_prob = 15
if(M_RESIST_COLD in M.mutations)
@@ -90,6 +92,8 @@
block=FIREBLOCK
can_activate(var/mob/M,var/flags)
if(flags & MUTCHK_FORCED)
return !(/datum/dna/gene/basic/heat_resist in M.active_genes)
// Probability check
var/_prob=30
if(M_RESIST_HEAT in M.mutations)