mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-01-08 08:23:49 +00:00
- More R&D stuff. Moved code from code/datums/technology to code/game/research (more apt and it isn't JUST datums now). Still very WIP. - Circuit printer now requires Sulfuric Acid instead of H2SO4. (Yes, I get the irony) - New helper proc: between(low, middle, high). It returns middle unless it is greater than high (in which case, it returns high) or less than low (in which case it returns low). It's a fairly simple proc but it cleans up some bits of code I am working on. - Changeling chem regeneration is now a curve rather then a flat amount. At low amounts (<20) it's faster then in r917, at high amounts it's slower (>20). This means you can use cheap abilities more often and expensive abilities less. - Changeling "Dart" abilities now named "sting" abilities to (Hopefully) cause less confusion. "Boost Dart Range" renamed "Ranged Sting." - Changeling "Absorb DNA" ability now not only doesn't cost chem to use, it actually regenerates a small amount (if successful). git-svn-id: http://tgstation13.googlecode.com/svn/trunk@929 316c924e-a436-60f5-8080-3fe189b3f50e
110 lines
2.1 KiB
Plaintext
110 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)
|
|
//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()
|
|
if (M.mind)
|
|
if (M.mind.special_role == "Changeling")
|
|
M.chem_charges = between(0, (max((0.9 - (M.chem_charges / 50)), 0.1) + M.chem_charges), 50)
|
|
sleep(-1)
|
|
|
|
for(var/datum/disease/D in active_diseases)
|
|
D.process()
|
|
|
|
for(var/obj/machinery/machine in machines)
|
|
machine.process()
|
|
|
|
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 |