mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-30 04:02:33 +00:00
Singularity Engine -Recoded some parts, still works mostly the same Welders -Recoded, it works mostly the same but is easier to use in code -Cyborgs have a larger fuel tank -Brought most if not all of the areas that use welders upto spec Moved the changeling chem recharge code into the human life proc New players who log out before spawning in are now deleted New minor Common event Machines around the station use more power, system might need some changes later Likely few other minor changes that I just cant think of atm git-svn-id: http://tgstation13.googlecode.com/svn/trunk@945 316c924e-a436-60f5-8080-3fe189b3f50e
112 lines
2.1 KiB
Plaintext
112 lines
2.1 KiB
Plaintext
var/global/datum/controller/game_controller/master_controller //Set in world.New()
|
|
|
|
datum/controller/game_controller
|
|
var/processing = 1
|
|
|
|
proc
|
|
setup()
|
|
setup_objects()
|
|
process()
|
|
|
|
setup()
|
|
if(master_controller && (master_controller != src))
|
|
del(src)
|
|
return
|
|
//There can be only one master.
|
|
|
|
if(!air_master)
|
|
air_master = new /datum/controller/air_system()
|
|
air_master.setup()
|
|
|
|
//world.tick_lag = 0.6
|
|
|
|
setup_objects()
|
|
|
|
setupgenetics()
|
|
|
|
setupcorpses()
|
|
|
|
emergency_shuttle = new /datum/shuttle_controller/emergency_shuttle()
|
|
|
|
if(!ticker)
|
|
ticker = new /datum/controller/gameticker()
|
|
|
|
spawn
|
|
ticker.pregame()
|
|
|
|
setup_objects()
|
|
world << "\red \b Initializing objects"
|
|
sleep(-1)
|
|
|
|
for(var/obj/object in world)
|
|
object.initialize()
|
|
|
|
world << "\red \b Initializing pipe networks"
|
|
sleep(-1)
|
|
|
|
for(var/obj/machinery/atmospherics/machine in world)
|
|
machine.build_network()
|
|
|
|
/*world << "\red \b Initializing atmos machinery"
|
|
sleep(-1)
|
|
|
|
find_air_alarms()*/
|
|
|
|
world << "\red \b Initializations complete."
|
|
|
|
|
|
process()
|
|
|
|
if(!processing)
|
|
return 0
|
|
//world << "Processing"
|
|
|
|
var/start_time = world.timeofday
|
|
|
|
air_master.process()
|
|
|
|
sleep(1)
|
|
|
|
sun.calc_position()
|
|
|
|
sleep(-1)
|
|
|
|
for(var/mob/M in world)
|
|
if (M.metabslow)
|
|
if (air_master.current_cycle%10==1) // For everyone who has their metabolism slowed, make updates not so frequently
|
|
M.Life()
|
|
else
|
|
M.Life()
|
|
|
|
sleep(-1)
|
|
|
|
for(var/datum/disease/D in active_diseases)
|
|
D.process()
|
|
|
|
for(var/obj/machinery/machine in machines)
|
|
machine.process()
|
|
if(machine)//Testing this for now, might change it up later - Mport
|
|
if(machine.power_usage && machine.power_channel)
|
|
machine.use_power(machine.power_usage,machine.power_channel)
|
|
|
|
sleep(-1)
|
|
sleep(1)
|
|
|
|
for(var/obj/item/item in processing_items)
|
|
item.process()
|
|
|
|
for(var/datum/pipe_network/network in pipe_networks)
|
|
network.process()
|
|
|
|
for(var/datum/powernet/P in powernets)
|
|
P.reset()
|
|
|
|
sleep(-1)
|
|
|
|
ticker.process()
|
|
|
|
sleep(world.timeofday+10-start_time)
|
|
|
|
spawn process()
|
|
|
|
return 1 |