mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-01-09 17:02:56 +00:00
Huge commit! Standardizes var definitions in most places.
Signed-off-by: Mloc <colmohici@gmail.com>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
|
||||
|
||||
|
||||
/proc/isassembly(O)
|
||||
if(istype(O, /obj/item/device/assembly))
|
||||
@@ -46,38 +48,35 @@
|
||||
throw_range = 10
|
||||
origin_tech = "magnets=1"
|
||||
|
||||
var
|
||||
secured = 1
|
||||
small_icon_state_left = null
|
||||
small_icon_state_right = null
|
||||
list/small_icon_state_overlays = null
|
||||
obj/item/device/assembly_holder/holder = null
|
||||
cooldown = 0//To prevent spam
|
||||
wires = WIRE_RECEIVE | WIRE_PULSE
|
||||
var/secured = 1
|
||||
var/small_icon_state_left = null
|
||||
var/small_icon_state_right = null
|
||||
var/list/small_icon_state_overlays = null
|
||||
var/obj/item/device/assembly_holder/holder = null
|
||||
var/cooldown = 0//To prevent spam
|
||||
var/wires = WIRE_RECEIVE | WIRE_PULSE
|
||||
|
||||
var/const
|
||||
WIRE_RECEIVE = 1 //Allows Pulsed(0) to call Activate()
|
||||
WIRE_PULSE = 2 //Allows Pulse(0) to act on the holder
|
||||
WIRE_PULSE_SPECIAL = 4 //Allows Pulse(0) to act on the holders special assembly
|
||||
WIRE_RADIO_RECEIVE = 8 //Allows Pulsed(1) to call Activate()
|
||||
WIRE_RADIO_PULSE = 16 //Allows Pulse(1) to send a radio message
|
||||
|
||||
proc
|
||||
activate() //What the device does when turned on
|
||||
pulsed(var/radio = 0) //Called when another assembly acts on this one, var/radio will determine where it came from for wire calcs
|
||||
pulse(var/radio = 0) //Called when this device attempts to act on another device, var/radio determines if it was sent via radio or direct
|
||||
toggle_secure() //Code that has to happen when the assembly is un\secured goes here
|
||||
attach_assembly(var/obj/A, var/mob/user) //Called when an assembly is attacked by another
|
||||
process_cooldown() //Called via spawn(10) to have it count down the cooldown var
|
||||
holder_movement() //Called when the holder is moved
|
||||
interact(mob/user as mob) //Called when attack_self is called
|
||||
var/const/WIRE_RECEIVE = 1 //Allows Pulsed(0) to call Activate()
|
||||
var/const/WIRE_PULSE = 2 //Allows Pulse(0) to act on the holder
|
||||
var/const/WIRE_PULSE_SPECIAL = 4 //Allows Pulse(0) to act on the holders special assembly
|
||||
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
|
||||
|
||||
|
||||
process_cooldown()
|
||||
proc/activate() //What the device does when turned on
|
||||
proc/pulsed(var/radio = 0) //Called when another assembly acts on this one, var/radio will determine where it came from for wire calcs
|
||||
pulse(var/radio = 0) //Called when this device attempts to act on another device, var/radio determines if it was sent via radio or direct
|
||||
proc/toggle_secure() //Code that has to happen when the assembly is un\secured goes here
|
||||
proc/attach_assembly(var/obj/A, var/mob/user) //Called when an assembly is attacked by another
|
||||
proc/holder_movement() //Called when the holder is moved
|
||||
proc/interact(mob/user as mob) //Called when attack_self is called
|
||||
|
||||
|
||||
proc/process_cooldown()
|
||||
cooldown--
|
||||
if(cooldown <= 0) return 0
|
||||
spawn(10)
|
||||
process_cooldown()
|
||||
process_cooldown()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -89,7 +88,7 @@
|
||||
return 1
|
||||
|
||||
|
||||
pulse(var/radio = 0)
|
||||
proc/pulse(var/radio = 0)
|
||||
if(holder && (wires & WIRE_PULSE))
|
||||
holder.process_activation(src, 1, 0)
|
||||
if(holder && (wires & WIRE_PULSE_SPECIAL))
|
||||
@@ -186,15 +185,13 @@ Desc: If true is an object that can be attached to an assembly holder but is a s
|
||||
/obj/proc/IsSpecialAssembly()
|
||||
return 0
|
||||
/*
|
||||
var
|
||||
small_icon_state = null//If this obj will go inside the assembly use this for icons
|
||||
list/small_icon_state_overlays = null//Same here
|
||||
obj/holder = null
|
||||
cooldown = 0//To prevent spam
|
||||
var/small_icon_state = null//If this obj will go inside the assembly use this for icons
|
||||
var/list/small_icon_state_overlays = null//Same here
|
||||
var/obj/holder = null
|
||||
var/cooldown = 0//To prevent spam
|
||||
|
||||
proc
|
||||
Activate()//Called when this assembly is pulsed by another one
|
||||
Process_cooldown()//Call this via spawn(10) to have it count down the cooldown var
|
||||
Attach_Holder(var/obj/H, var/mob/user)//Called when an assembly holder attempts to attach, sets src's loc in here
|
||||
|
||||
|
||||
@@ -222,4 +219,4 @@ Desc: If true is an object that can be attached to an assembly holder but is a s
|
||||
//Remember to have it set its loc somewhere in here
|
||||
|
||||
|
||||
*/
|
||||
*/
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
|
||||
|
||||
/obj/item/device/assembly_holder
|
||||
name = "Assembly"
|
||||
desc = "Holds various devices"//Fix this by adding dynamic desc
|
||||
@@ -11,11 +13,10 @@
|
||||
throw_speed = 3
|
||||
throw_range = 10
|
||||
|
||||
var
|
||||
secured = 0
|
||||
obj/item/device/assembly/a_left = null
|
||||
obj/item/device/assembly/a_right = null
|
||||
obj/special_assembly = null
|
||||
var/secured = 0
|
||||
var/obj/item/device/assembly/a_left = null
|
||||
var/obj/item/device/assembly/a_right = null
|
||||
var/obj/special_assembly = null
|
||||
|
||||
proc
|
||||
attach(var/obj/item/device/D, var/obj/item/device/D2, var/mob/user)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
|
||||
|
||||
/obj/item/device/assembly/infra
|
||||
name = "Infrared Beam"
|
||||
desc = "Emits a visible or invisible beam and is triggered when the beam is interrupted."
|
||||
@@ -11,10 +13,9 @@
|
||||
small_icon_state_left = "infrared_left"
|
||||
small_icon_state_right = "infrared_right"
|
||||
|
||||
var
|
||||
scanning = 0
|
||||
visible = 0
|
||||
obj/effect/beam/i_beam/first = null
|
||||
var/scanning = 0
|
||||
var/visible = 0
|
||||
var/obj/effect/beam/i_beam/first = null
|
||||
|
||||
proc
|
||||
trigger_beam()
|
||||
@@ -271,4 +272,4 @@
|
||||
/obj/effect/beam/i_beam/Del()
|
||||
del(src.next)
|
||||
..()
|
||||
return
|
||||
return
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
|
||||
|
||||
/obj/item/device/assembly/prox_sensor
|
||||
name = "proximity sensor"
|
||||
desc = "Used for scanning and alerting when someone enters a certain proximity."
|
||||
@@ -11,10 +13,9 @@
|
||||
small_icon_state_left = "prox_left"
|
||||
small_icon_state_right = "prox_right"
|
||||
|
||||
var
|
||||
scanning = 0
|
||||
timing = 0
|
||||
time = 10
|
||||
var/scanning = 0
|
||||
var/timing = 0
|
||||
var/time = 10
|
||||
|
||||
proc
|
||||
toggle_scan()
|
||||
@@ -153,4 +154,4 @@
|
||||
attack_self(usr)
|
||||
|
||||
|
||||
return
|
||||
return
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
|
||||
|
||||
/obj/item/device/assembly/signaler
|
||||
name = "Remote Signaling Device"
|
||||
desc = "Used to remotely activate devices."
|
||||
@@ -13,13 +15,12 @@
|
||||
small_icon_state_left = "signaller_left"
|
||||
small_icon_state_right = "signaller_right"
|
||||
|
||||
var
|
||||
code = 30
|
||||
frequency = 1457
|
||||
delay = 0
|
||||
airlock_wire = null
|
||||
datum/radio_frequency/radio_connection
|
||||
deadman = 0
|
||||
var/code = 30
|
||||
var/frequency = 1457
|
||||
var/delay = 0
|
||||
var/airlock_wire = null
|
||||
var/datum/radio_frequency/radio_connection
|
||||
var/deadman = 0
|
||||
|
||||
proc
|
||||
signal()
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
|
||||
|
||||
/obj/item/device/assembly/timer
|
||||
name = "timer"
|
||||
desc = "Used to time things. Works well with contraptions which has to count down. Tick tock."
|
||||
@@ -11,9 +13,8 @@
|
||||
small_icon_state_left = "timer_left"
|
||||
small_icon_state_right = "timer_right"
|
||||
|
||||
var
|
||||
timing = 0
|
||||
time = 10
|
||||
var/timing = 0
|
||||
var/time = 10
|
||||
|
||||
proc
|
||||
timer_end()
|
||||
@@ -114,4 +115,4 @@
|
||||
if(usr)
|
||||
attack_self(usr)
|
||||
|
||||
return
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user