Revert "12/21 modernizations from TG live"

This commit is contained in:
LetterJay
2016-12-22 22:35:44 -06:00
committed by GitHub
parent cf59ac1c3d
commit ae40d4134e
2215 changed files with 86928 additions and 707332 deletions
+18 -7
View File
@@ -4,7 +4,7 @@
icon = 'icons/obj/assemblies/new_assemblies.dmi'
icon_state = ""
flags = CONDUCT
w_class = WEIGHT_CLASS_SMALL
w_class = 2
materials = list(MAT_METAL=100)
throwforce = 2
throw_speed = 3
@@ -14,6 +14,7 @@
var/secured = 1
var/list/attached_overlays = null
var/obj/item/device/assembly_holder/holder = null
var/cooldown = 0//To prevent spam
var/wire_type = WIRE_RECEIVE | WIRE_PULSE
var/attachable = 0 // can this be attached to wires
var/datum/wires/connected = null
@@ -24,8 +25,6 @@
var/const/WIRE_RADIO_RECEIVE = 8 //Allows Pulsed(1) to call Activate()
var/const/WIRE_RADIO_PULSE = 16 //Allows Pulse(1) to send a radio message
var/next_activate = 0 //When we're next allowed to activate - for spam control
/obj/item/device/assembly/proc/on_attach()
/obj/item/device/assembly/proc/on_detach()
@@ -44,6 +43,16 @@
return 1
//Called via spawn(10) to have it count down the cooldown var
/obj/item/device/assembly/proc/process_cooldown()
cooldown--
if(cooldown <= 0)
return 0
spawn(10)
process_cooldown()
return 1
//Called when another assembly acts on this one, var/radio will determine where it came from for wire calcs
/obj/item/device/assembly/proc/pulsed(radio = 0)
if(wire_type & WIRE_RECEIVE)
@@ -69,10 +78,12 @@
// What the device does when turned on
/obj/item/device/assembly/proc/activate()
if(qdeleted(src) || !secured || (next_activate > world.time))
return FALSE
next_activate = world.time + 30
return TRUE
if(!secured || (cooldown > 0))
return 0
cooldown = 2
spawn(10)
process_cooldown()
return 1
/obj/item/device/assembly/proc/toggle_secure()