Destroying a camera now also cuts wires randomly.

This commit is contained in:
PsiOmega
2015-05-16 10:38:50 +02:00
parent 7e14930209
commit bc0e87ceaa
2 changed files with 7 additions and 0 deletions
+5
View File
@@ -278,6 +278,11 @@ var/const/POWER = 8
var/r = rand(1, wires.len)
CutWireIndex(r)
/datum/wires/proc/RandomCutAll(var/probability = 10)
for(var/i = 1; i < MAX_FLAG && i < (1 << wire_count); i += i)
if(prob(probability))
CutWireIndex(i)
/datum/wires/proc/CutAll()
for(var/i = 1; i < MAX_FLAG && i < (1 << wire_count); i += i)
CutWireIndex(i)