Files
CHOMPStation2/code/game/machinery/embedded_controller/embedded_controller_base.dm
Ren Erthilo 6c98b2048c TG:
Removes poo. XSI and co. weren't very fond of it, and the last thing I would do
is make them uncomfortable and challenge their leadership by keeping poo in.

An experimental lagfix, which removes a couple THOUSAND unnecessary machines
from the machine processing list. Please report any unresponsive machinery (as
result of this commit) as HIGH PRIORITY issues. I'm not quite sure how much lag
this will kill, but I'm confident that it will be at least slightly noticeable.

More work on step_triggers. The escape shuttle should no longer blast things
forever and give them infinite momentum.

Runtimes goin down for the count
Lookin at the ground
I think they a hater
Revision: r3370 r3371
Author: vageyenaman quartz235
2012-05-01 00:36:20 +01:00

84 lines
1.9 KiB
Plaintext

datum/computer/file/embedded_program
var/list/memory = list()
var/state
var/obj/machinery/embedded_controller/master
proc
post_signal(datum/signal/signal, comm_line)
if(master)
master.post_signal(signal, comm_line)
else
del(signal)
receive_user_command(command)
receive_signal(datum/signal/signal, receive_method, receive_param)
return null
process()
return 0
obj/machinery/embedded_controller
var/datum/computer/file/embedded_program/program
name = "Embedded Controller"
density = 0
anchored = 1
var/on = 1
attack_hand(mob/user)
user << browse(return_text(), "window=computer")
user.machine = src
onclose(user, "computer")
update_icon()
proc/return_text()
proc/post_signal(datum/signal/signal, comm_line)
return 0
receive_signal(datum/signal/signal, receive_method, receive_param)
if(!signal || signal.encryption) return
if(program)
program.receive_signal(signal, receive_method, receive_param)
//spawn(5) program.process() //no, program.process sends some signals and machines respond and we here again and we lag -rastaf0
Topic(href, href_list)
if(..())
return 0
if(program)
program.receive_user_command(href_list["command"])
spawn(5) program.process()
usr.machine = src
spawn(5) src.updateDialog()
process()
if(program)
program.process()
update_icon()
src.updateDialog()
radio
var/frequency
var/datum/radio_frequency/radio_connection
initialize()
set_frequency(frequency)
post_signal(datum/signal/signal)
signal.transmission_method = TRANSMISSION_RADIO
if(radio_connection)
return radio_connection.post_signal(src, signal)
else
del(signal)
proc
set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
radio_connection = radio_controller.add_object(src, frequency)