mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-14 20:23:26 +00:00
Changed the shotgun pump proc a bit, should work better now and not teleport old shells around. Added a config option for the jobs to be loaded from the jobs.txt rather than use the defaults. Loyalty implanter removed. The Limplanter was designed to be on the prison station as it took more time and was a pain to get people up there to implant them. No prison station, no Limplanter. Implanter lockbox moved to the armory from the HoS' locker. Security room's table once again shrunk so people can walk around in there. Brig lockers are now anchored to the inside of the cells and once again have their IDs set. Warden's locker moved to his office. Cell controls Names/IDs/Access fixed as well as once again working with the brig lockers. Removed a few of the blast doors from the inside of the brig. The three secure cells have blast doors controlled from a button outside of the cell. The play admin midis toggle should be working properly now. Morgue trays will no longer teleport anything from anywhere. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2413 316c924e-a436-60f5-8080-3fe189b3f50e
128 lines
2.6 KiB
Plaintext
128 lines
2.6 KiB
Plaintext
var/global/datum/controller/game_controller/master_controller //Set in world.New()
|
|
var/global/controllernum = "no"
|
|
|
|
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()
|
|
|
|
if(!job_master)
|
|
job_master = new /datum/controller/occupations()
|
|
if(job_master.SetupOccupations())
|
|
world << "\red \b Job setup complete"
|
|
job_master.LoadJobs("config/jobs.txt")
|
|
|
|
if(!tension_master)
|
|
tension_master = new /datum/tension()
|
|
|
|
world.tick_lag = 0.9
|
|
|
|
setup_objects()
|
|
|
|
setupgenetics()
|
|
|
|
syndicate_code_phrase = generate_code_phrase()//Sets up code phrase for traitors, for the round.
|
|
syndicate_code_response = generate_code_phrase()
|
|
|
|
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)
|
|
for(var/obj/machinery/atmospherics/unary/vent_pump/T in world)
|
|
T.broadcast_status()
|
|
for(var/obj/machinery/atmospherics/unary/vent_scrubber/T in world)
|
|
T.broadcast_status()
|
|
|
|
world << "\red \b Initializations complete."
|
|
|
|
|
|
process()
|
|
|
|
if(!processing)
|
|
return 0
|
|
//world << "Processing"
|
|
controllernum = "yes"
|
|
spawn (100) controllernum = "no"
|
|
|
|
var/start_time = world.timeofday
|
|
|
|
air_master.process()
|
|
|
|
tension_master.process()
|
|
|
|
sleep(1)
|
|
|
|
sun.calc_position()
|
|
|
|
sleep(-1)
|
|
|
|
for(var/mob/M in world)
|
|
M.Life()
|
|
|
|
sleep(-1)
|
|
|
|
for(var/datum/disease/D in active_diseases)
|
|
D.process()
|
|
|
|
for(var/obj/machinery/machine in machines)
|
|
if(machine)
|
|
machine.process()
|
|
if(machine && machine.use_power)
|
|
machine.auto_use_power()
|
|
|
|
|
|
sleep(-1)
|
|
sleep(1)
|
|
|
|
for(var/obj/object in processing_objects)
|
|
// spawn(0)Still need to test the spawn ticker
|
|
object.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 |