mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 21:48:21 +01:00
Fix gene activation logic.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user