Fix merge conflicts

🖕 map conflicts over lines that weren't even edited by both upstream
and this branch.
This commit is contained in:
DZD
2015-07-15 22:28:12 -04:00
88 changed files with 2338 additions and 3634 deletions
+115 -15
View File
@@ -1,22 +1,122 @@
/datum/controller/process/air/setup()
var/kill_air = 0
var/global/datum/controller/process/air_system/air_master
/datum/controller/process/air_system
var/list/excited_groups = list()
var/list/active_turfs = list()
var/list/hotspots = list()
//Special functions lists
var/list/turf/simulated/active_super_conductivity = list()
var/list/turf/simulated/high_pressure_delta = list()
var/current_cycle = 0
var/failed_ticks = 0
var/tick_progress = 0
/datum/controller/process/air_system/setup()
name = "air"
schedule_interval = 20 // every 2 seconds
air_master = src
if(!air_master)
air_master = new
air_master.Setup()
world << "<span class='danger'>Processing Geometry...</span>"
var/start_time = world.timeofday
setup_allturfs() // Get all currently active tiles that need processing each atmos tick.
setup_overlays() // Assign icons and such for gas-turf-overlays
world << "<span class='danger'>Geometry processed in [(world.timeofday-start_time)/10] seconds!</span>"
/datum/controller/process/air/doWork()
if(!air_processing_killed)
if(!air_master.process()) //Runtimed.
air_master.failed_ticks++
/datum/controller/process/air_system/doWork()
if(kill_air)
return 1
current_cycle++
process_active_turfs()
process_excited_groups()
scheck()
process_high_pressure_delta()
process_hotspots()
process_super_conductivity()
scheck()
return 1
if(air_master.failed_ticks > 5)
world << "<SPAN CLASS='danger'>RUNTIMES IN ATMOS TICKER. Killing air simulation!</SPAN>"
world.log << "### ZAS SHUTDOWN"
/datum/controller/process/air_system/proc/process_hotspots()
for(var/obj/effect/hotspot/H in hotspots)
H.process()
message_admins("ZASALERT: Shutting down! status: [air_master.tick_progress]")
log_admin("ZASALERT: Shutting down! status: [air_master.tick_progress]")
/datum/controller/process/air_system/proc/process_super_conductivity()
for(var/turf/simulated/T in active_super_conductivity)
T.super_conduct()
air_processing_killed = TRUE
air_master.failed_ticks = 0
/datum/controller/process/air_system/proc/process_high_pressure_delta()
for(var/turf/T in high_pressure_delta)
T.high_pressure_movements()
T.pressure_difference = 0
high_pressure_delta.len = 0
/datum/controller/process/air_system/proc/process_active_turfs()
for(var/turf/simulated/T in active_turfs)
T.process_cell()
/datum/controller/process/air_system/proc/remove_from_active(var/turf/simulated/T)
if(istype(T))
T.excited = 0
active_turfs -= T
if(T.excited_group)
T.excited_group.garbage_collect()
/datum/controller/process/air_system/proc/add_to_active(var/turf/simulated/T, var/blockchanges = 1)
if(istype(T) && T.air)
T.excited = 1
active_turfs |= T
if(blockchanges && T.excited_group)
T.excited_group.garbage_collect()
else
for(var/direction in cardinal)
if(!(T.atmos_adjacent_turfs & direction))
continue
var/turf/simulated/S = get_step(T, direction)
if(istype(S))
add_to_active(S)
/datum/controller/process/air_system/proc/setup_allturfs(var/turfs_in = world)
for(var/turf/simulated/T in turfs_in)
T.CalculateAdjacentTurfs()
if(!T.blocks_air)
if(T.air.check_tile_graphic())
T.update_visuals(T.air)
for(var/direction in cardinal)
if(!(T.atmos_adjacent_turfs & direction))
continue
var/turf/enemy_tile = get_step(T, direction)
if(istype(enemy_tile,/turf/simulated/))
var/turf/simulated/enemy_simulated = enemy_tile
if(!T.air.compare(enemy_simulated.air))
T.excited = 1
active_turfs |= T
break
else
if(!T.air.check_turf_total(enemy_tile))
T.excited = 1
active_turfs |= T
/datum/controller/process/air_system/proc/process_excited_groups()
for(var/datum/excited_group/EG in excited_groups)
EG.breakdown_cooldown ++
if(EG.breakdown_cooldown == 10)
EG.self_breakdown()
return
if(EG.breakdown_cooldown > 20)
EG.dismantle()
/datum/controller/process/air_system/proc/setup_overlays()
plmaster = new /obj/effect/overlay()
plmaster.icon = 'icons/effects/tile_effects.dmi'
plmaster.icon_state = "plasma"
plmaster.layer = FLY_LAYER
plmaster.mouse_opacity = 0
slmaster = new /obj/effect/overlay()
slmaster.icon = 'icons/effects/tile_effects.dmi'
slmaster.icon_state = "sleeping_agent"
slmaster.layer = FLY_LAYER
slmaster.mouse_opacity = 0
+12 -3
View File
@@ -3,10 +3,10 @@
schedule_interval = 20 // every 2 seconds
/datum/controller/process/machinery/doWork()
//#ifdef PROFILE_MACHINES
//machine_profiling.len = 0
//#endif
process_power()
process_machines()
/datum/controller/process/machinery/proc/process_machines()
for(var/obj/machinery/M in machines)
if(M && isnull(M.gcDestroyed))
#ifdef PROFILE_MACHINES
@@ -33,3 +33,12 @@
machines -= M
scheck()
/datum/controller/process/machinery/proc/process_power()
for(var/datum/powernet/powerNetwork in powernets)
if(istype(powerNetwork) && isnull(powerNetwork.gcDestroyed))
powerNetwork.reset()
scheck()
continue
else
powernets -= powerNetwork
@@ -1,40 +0,0 @@
var/global/list/power_machinery_profiling = list()
/datum/controller/process/power_machinery
var/tmp/datum/updateQueue/updateQueueInstance
/datum/controller/process/power_machinery/setup()
name = "pow_machine"
schedule_interval = 20 // every 2 seconds
/datum/controller/process/power_machinery/doWork()
for(var/obj/machinery/M in power_machines)
if(istype(M) && isnull(M.gcDestroyed))
#ifdef PROFILE_MACHINES
var/time_start = world.timeofday
#endif
if(M.process() == PROCESS_KILL)
M.inMachineList = 0
power_machines -= M
continue
if(M && M.use_power)
M.auto_use_power()
if(istype(M))
#ifdef PROFILE_MACHINES
var/time_end = world.timeofday
if(!(M.type in power_machinery_profiling))
power_machinery_profiling[M.type] = 0
power_machinery_profiling[M.type] += (time_end - time_start)
#endif
else
power_machines -= M
else
if(istype(M))
M.inMachineList = 0
power_machines -= M
scheck()
-12
View File
@@ -1,12 +0,0 @@
/datum/controller/process/powernet/setup()
name = "powernet"
schedule_interval = 20 // every 2 seconds
/datum/controller/process/powernet/doWork()
for(var/datum/powernet/powerNetwork in powernets)
if(istype(powerNetwork) && isnull(powerNetwork.gcDestroyed))
powerNetwork.reset()
scheck()
continue
else
powernets -= powerNetwork
+47 -3
View File
@@ -1,7 +1,51 @@
var/global/datum/controller/process/sun/sun
/datum/controller/process/sun
var/angle
var/dx
var/dy
var/rate
var/list/solars = list() // for debugging purposes, references solars list at the constructor
/datum/controller/process/sun/setup()
name = "sun"
schedule_interval = 20 // every second
sun = new
schedule_interval = 600 // every 60 seconds
sun = src
angle = rand (0,360) // the station position to the sun is randomised at round start
rate = rand(50,200)/100 // 50% - 200% of standard rotation
if(prob(50)) // same chance to rotate clockwise than counter-clockwise
rate = -rate
/datum/controller/process/sun/doWork()
sun.calc_position()
calc_position()
update_solar_machinery()
// calculate the sun's position given the time of day
// at the standard rate (100%) the angle is increase/decreased by 6 degrees every minute.
// a full rotation thus take a game hour in that case
/datum/controller/process/sun/proc/calc_position()
angle = (360 + angle + rate * 6) % 360 // increase/decrease the angle to the sun, adjusted by the rate
// now calculate and cache the (dx,dy) increments for line drawing
var/s = sin(angle)
var/c = cos(angle)
// Either "abs(s) < abs(c)" or "abs(s) >= abs(c)"
// In both cases, the greater is greater than 0, so, no "if 0" check is needed for the divisions
if(abs(s) < abs(c))
dx = s / abs(c)
dy = c / abs(c)
else
dx = s / abs(s)
dy = c / abs(s)
//now tell the solar control computers to update their status and linked devices
/datum/controller/process/sun/proc/update_solar_machinery()
for(var/obj/machinery/power/solar_control/SC in solars)
if(!SC.powernet)
solars.Remove(SC)
continue
SC.update()
+5
View File
@@ -100,6 +100,9 @@
var/revival_cloning = 1
var/revival_brain_life = -1
var/auto_toggle_ooc_during_round = 0
//Used for modifying movement speed for mobs.
//Unversal modifiers
var/run_speed = 0
@@ -534,6 +537,8 @@
config.revival_cloning = value
if("revival_brain_life")
config.revival_brain_life = value
if("auto_toggle_ooc_during_round")
config.auto_toggle_ooc_during_round = 1
if("run_speed")
config.run_speed = value
if("walk_speed")
+1 -1
View File
@@ -49,7 +49,7 @@ datum/controller/game_controller/New()
if(master_controller != src)
if(istype(master_controller))
Recover()
qdel(master_controller)
del(master_controller)
master_controller = src
if(!job_master)
+4 -1
View File
@@ -25,7 +25,7 @@
return
/client/proc/debug_controller(controller in list("Master","failsafe","Ticker","Air","Jobs","Sun","Radio","Supply","Shuttles","Emergency Shuttle","Configuration","pAI", "Cameras","Garbage", "Transfer Controller","Event","Scheduler"))
/client/proc/debug_controller(controller in list("Master","failsafe","Ticker","Air","Lighting","Jobs","Sun","Radio","Supply","Shuttles","Emergency Shuttle","Configuration","pAI", "Cameras","Garbage", "Transfer Controller","Event","Scheduler"))
set category = "Debug"
set name = "Debug Controller"
set desc = "Debug the various periodic loop controllers for the game (be careful!)"
@@ -44,6 +44,9 @@
if("Air")
debug_variables(air_master)
feedback_add_details("admin_verb","DAir")
if("Lighting")
debug_variables(lighting_controller)
feedback_add_details("admin_verb","DLighting")
if("Jobs")
debug_variables(job_master)
feedback_add_details("admin_verb","DJobs")