mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 08:37:43 +01:00
Nanite programs with triggers won't ignore rules (#56516)
* Added condition check to the trigger function * Reversed the statement * Updated the comment
This commit is contained in:
@@ -193,7 +193,7 @@
|
||||
if(passive_enabled)
|
||||
disable_passive_effect()
|
||||
|
||||
//If false, disables active and passive effects, but doesn't consume nanites
|
||||
//If false, disables active, passive effects, and triggers without consuming nanites
|
||||
//Can be used to avoid consuming nanites for nothing
|
||||
/datum/nanite_program/proc/check_conditions()
|
||||
if (!LAZYLEN(rules))
|
||||
@@ -229,6 +229,8 @@
|
||||
return
|
||||
if(world.time < next_trigger)
|
||||
return
|
||||
if(!check_conditions())
|
||||
return
|
||||
if(!consume_nanites(trigger_cost))
|
||||
return
|
||||
next_trigger = world.time + trigger_cooldown
|
||||
|
||||
Reference in New Issue
Block a user