mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
* Messages in a mob's say_log var are now timestamped and include the coordinates of the mob at the time. * Fix oil slime extract explosion reaction not being logged. * Fixes lack of log for reagent explosion. * Mob's attack_log now show when the mob was electrocuted. Doors get an electrification log when electrified (including via an EMP). * Fixes gibself admin log showing null instead of the key.
150 lines
3.4 KiB
Plaintext
150 lines
3.4 KiB
Plaintext
/obj/item/device/assembly/control
|
|
name = "blast door controller"
|
|
desc = "A small electronic device able to control a blast door remotely."
|
|
icon_state = "control"
|
|
origin_tech = "magnets=1;programming=2"
|
|
attachable = 1
|
|
var/id = null
|
|
var/can_change_id = 0
|
|
|
|
/obj/item/device/assembly/control/examine(mob/user)
|
|
..()
|
|
if(id)
|
|
user << "<span class='notice'>Its channel ID is '[id]'.</span>"
|
|
|
|
|
|
/obj/item/device/assembly/control/activate()
|
|
cooldown = 1
|
|
var/openclose
|
|
for(var/obj/machinery/door/poddoor/M in machines)
|
|
if(M.id == src.id)
|
|
if(openclose == null)
|
|
openclose = M.density
|
|
spawn(0)
|
|
if(M)
|
|
if(openclose)
|
|
M.open()
|
|
else
|
|
M.close()
|
|
return
|
|
sleep(10)
|
|
cooldown = 0
|
|
|
|
|
|
/obj/item/device/assembly/control/airlock
|
|
name = "airlock controller"
|
|
desc = "A small electronic device able to control an airlock remotely."
|
|
id = "badmin" // Set it to null for MEGAFUN.
|
|
var/specialfunctions = OPEN
|
|
/*
|
|
Bitflag, 1= open (OPEN)
|
|
2= idscan (IDSCAN)
|
|
4= bolts (BOLTS)
|
|
8= shock (SHOCK)
|
|
16= door safties (SAFE)
|
|
*/
|
|
|
|
/obj/item/device/assembly/control/airlock/activate()
|
|
cooldown = 1
|
|
for(var/obj/machinery/door/airlock/D in airlocks)
|
|
if(D.id_tag == src.id)
|
|
if(specialfunctions & OPEN)
|
|
if(D.density)
|
|
D.open()
|
|
else
|
|
D.close()
|
|
if(specialfunctions & IDSCAN)
|
|
D.aiDisabledIdScanner = !D.aiDisabledIdScanner
|
|
if(specialfunctions & BOLTS)
|
|
if(!D.wires.is_cut(WIRE_BOLTS) && D.hasPower())
|
|
D.locked = !D.locked
|
|
D.update_icon()
|
|
if(specialfunctions & SHOCK)
|
|
if(D.secondsElectrified)
|
|
D.secondsElectrified = -1
|
|
D.shockedby += "\[[time_stamp()]\][usr](ckey:[usr.ckey])"
|
|
add_logs(usr, D, "electrified")
|
|
else
|
|
D.secondsElectrified = 0
|
|
if(specialfunctions & SAFE)
|
|
D.safe = !D.safe
|
|
sleep(10)
|
|
cooldown = 0
|
|
|
|
|
|
/obj/item/device/assembly/control/massdriver
|
|
name = "mass driver controller"
|
|
desc = "A small electronic device able to control a mass driver."
|
|
|
|
/obj/item/device/assembly/control/massdriver/activate()
|
|
cooldown = 1
|
|
for(var/obj/machinery/door/poddoor/M in machines)
|
|
if (M.id == src.id)
|
|
spawn( 0 )
|
|
M.open()
|
|
|
|
sleep(10)
|
|
|
|
for(var/obj/machinery/mass_driver/M in machines)
|
|
if(M.id == src.id)
|
|
M.drive()
|
|
|
|
sleep(60)
|
|
|
|
for(var/obj/machinery/door/poddoor/M in machines)
|
|
if (M.id == src.id)
|
|
spawn( 0 )
|
|
M.close()
|
|
|
|
sleep(10)
|
|
cooldown = 0
|
|
|
|
|
|
/obj/item/device/assembly/control/igniter
|
|
name = "ignition controller"
|
|
desc = "A remote controller for a mounted igniter."
|
|
|
|
/obj/item/device/assembly/control/igniter/activate()
|
|
cooldown = 1
|
|
for(var/obj/machinery/sparker/M in machines)
|
|
if (M.id == src.id)
|
|
spawn( 0 )
|
|
M.ignite()
|
|
|
|
for(var/obj/machinery/igniter/M in machines)
|
|
if(M.id == src.id)
|
|
M.use_power(50)
|
|
M.on = !M.on
|
|
M.icon_state = "igniter[M.on]"
|
|
|
|
sleep(30)
|
|
cooldown = 0
|
|
|
|
|
|
/obj/item/device/assembly/control/flasher
|
|
name = "flasher controller"
|
|
desc = "A remote controller for a mounted flasher."
|
|
|
|
/obj/item/device/assembly/control/flasher/activate()
|
|
cooldown = 1
|
|
for(var/obj/machinery/flasher/M in machines)
|
|
if(M.id == src.id)
|
|
spawn(0)
|
|
M.flash()
|
|
|
|
sleep(50)
|
|
cooldown = 0
|
|
|
|
|
|
/obj/item/device/assembly/control/crematorium
|
|
name = "crematorium controller"
|
|
desc = "An evil-looking remote controller for a crematorium."
|
|
|
|
/obj/item/device/assembly/control/crematorium/activate()
|
|
cooldown = 1
|
|
for (var/obj/structure/bodycontainer/crematorium/C in crematoriums)
|
|
if (C.id == id)
|
|
C.cremate(usr)
|
|
|
|
sleep(50)
|
|
cooldown = 0 |