Destroying a camera now also cuts wires randomly.

This commit is contained in:
PsiOmega
2015-05-16 11:04:32 +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)
+2
View File
@@ -226,6 +226,8 @@
//Used when someone breaks a camera
/obj/machinery/camera/proc/destroy()
stat |= BROKEN
wires.RandomCutAll()
kick_viewers()
triggerCameraAlarm()
update_icon()