Spacing fixes.

This commit is contained in:
tigercat2000
2018-03-20 19:12:55 -07:00
parent d88a17a0f4
commit f5940155ca
11 changed files with 582 additions and 588 deletions
+1 -1
View File
@@ -197,7 +197,7 @@
var/high_pop_mc_tick_rate = 1.1
var/high_pop_mc_mode_amount = 65
var/disable_high_pop_mc_mode_amount = 60
var/disable_high_pop_mc_mode_amount = 60
/datum/configuration/New()
var/list/L = subtypesof(/datum/game_mode)
+20 -20
View File
@@ -144,7 +144,7 @@ SUBSYSTEM_DEF(air)
currentpart = SSAIR_PIPENETS
/datum/controller/subsystem/air/proc/process_deferred_pipenets(resumed = 0)
if (!resumed)
if(!resumed)
src.currentrun = deferred_pipenet_rebuilds.Copy()
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
@@ -159,7 +159,7 @@ SUBSYSTEM_DEF(air)
return
/datum/controller/subsystem/air/proc/process_pipenets(resumed = 0)
if (!resumed)
if(!resumed)
src.currentrun = networks.Copy()
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
@@ -175,7 +175,7 @@ SUBSYSTEM_DEF(air)
/datum/controller/subsystem/air/proc/process_atmos_machinery(resumed = 0)
var/seconds = wait * 0.1
if (!resumed)
if(!resumed)
src.currentrun = atmos_machinery.Copy()
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
@@ -188,7 +188,7 @@ SUBSYSTEM_DEF(air)
return
/datum/controller/subsystem/air/proc/process_super_conductivity(resumed = 0)
if (!resumed)
if(!resumed)
src.currentrun = active_super_conductivity.Copy()
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
@@ -200,14 +200,14 @@ SUBSYSTEM_DEF(air)
return
/datum/controller/subsystem/air/proc/process_hotspots(resumed = 0)
if (!resumed)
if(!resumed)
src.currentrun = hotspots.Copy()
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
while(currentrun.len)
var/obj/effect/hotspot/H = currentrun[currentrun.len]
currentrun.len--
if (H)
if(H)
H.process()
else
hotspots -= H
@@ -215,7 +215,7 @@ SUBSYSTEM_DEF(air)
return
/datum/controller/subsystem/air/proc/process_high_pressure_delta(resumed = 0)
while (high_pressure_delta.len)
while(high_pressure_delta.len)
var/turf/simulated/T = high_pressure_delta[high_pressure_delta.len]
high_pressure_delta.len--
T.high_pressure_movements()
@@ -226,20 +226,20 @@ SUBSYSTEM_DEF(air)
/datum/controller/subsystem/air/proc/process_active_turfs(resumed = 0)
//cache for sanic speed
var/fire_count = times_fired
if (!resumed)
if(!resumed)
src.currentrun = active_turfs.Copy()
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
while(currentrun.len)
var/turf/simulated/T = currentrun[currentrun.len]
currentrun.len--
if (T)
if(T)
T.process_cell(fire_count)
if (MC_TICK_CHECK)
if(MC_TICK_CHECK)
return
/datum/controller/subsystem/air/proc/process_excited_groups(resumed = 0)
if (!resumed)
if(!resumed)
src.currentrun = excited_groups.Copy()
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
@@ -251,7 +251,7 @@ SUBSYSTEM_DEF(air)
EG.self_breakdown()
else if(EG.breakdown_cooldown >= 20)
EG.dismantle()
if (MC_TICK_CHECK)
if(MC_TICK_CHECK)
return
/datum/controller/subsystem/air/proc/remove_from_active(turf/simulated/T)
@@ -294,24 +294,24 @@ SUBSYSTEM_DEF(air)
/turf/simulated/proc/resolve_active_graph()
. = list()
var/datum/excited_group/EG = excited_group
if (blocks_air || !air)
if(blocks_air || !air)
return
if (!EG)
if(!EG)
EG = new
EG.add_turf(src)
for (var/turf/simulated/ET in atmos_adjacent_turfs)
if ( ET.blocks_air || !ET.air)
for(var/turf/simulated/ET in atmos_adjacent_turfs)
if(ET.blocks_air || !ET.air)
continue
var/ET_EG = ET.excited_group
if (ET_EG)
if (ET_EG != EG)
if(ET_EG)
if(ET_EG != EG)
EG.merge_groups(ET_EG)
EG = excited_group //merge_groups() may decide to replace our current EG
else
EG.add_turf(ET)
if (!ET.excited)
if(!ET.excited)
ET.excited = 1
. += ET
@@ -358,7 +358,7 @@ SUBSYSTEM_DEF(air)
icemaster = new /obj/effect/overlay()
icemaster.icon = 'icons/turf/overlays.dmi'
icemaster.icon_state = "snowfloor"
icemaster.layer = TURF_LAYER+0.1
icemaster.layer = TURF_LAYER + 0.1
icemaster.mouse_opacity = 0
#undef SSAIR_PIPENETS
+8 -8
View File
@@ -13,30 +13,30 @@ SUBSYSTEM_DEF(spacedrift)
/datum/controller/subsystem/spacedrift/fire(resumed = 0)
if (!resumed)
if(!resumed)
src.currentrun = processing.Copy()
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
while (currentrun.len)
while(currentrun.len)
var/atom/movable/AM = currentrun[currentrun.len]
currentrun.len--
if (!AM)
if(!AM)
processing -= AM
if (MC_TICK_CHECK)
return
continue
if (AM.inertia_next_move > world.time)
if(AM.inertia_next_move > world.time)
if (MC_TICK_CHECK)
return
continue
if (!AM.loc || AM.loc != AM.inertia_last_loc || AM.Process_Spacemove(0))
if(!AM.loc || AM.loc != AM.inertia_last_loc || AM.Process_Spacemove(0))
AM.inertia_dir = 0
if (!AM.inertia_dir)
if(!AM.inertia_dir)
AM.inertia_last_loc = null
processing -= AM
if (MC_TICK_CHECK)
@@ -49,11 +49,11 @@ SUBSYSTEM_DEF(spacedrift)
step(AM, AM.inertia_dir)
AM.inertia_moving = FALSE
AM.inertia_next_move = world.time + AM.inertia_move_delay
if (AM.loc == old_loc)
if(AM.loc == old_loc)
AM.inertia_dir = 0
AM.setDir(old_dir)
AM.inertia_last_loc = AM.loc
if (MC_TICK_CHECK)
if(MC_TICK_CHECK)
return
+26 -27
View File
@@ -14,9 +14,8 @@ SUBSYSTEM_DEF(throwing)
/datum/controller/subsystem/throwing/stat_entry()
..("P:[processing.len]")
/datum/controller/subsystem/throwing/fire(resumed = 0)
if (!resumed)
if(!resumed)
src.currentrun = processing.Copy()
//cache for sanic speed (lists are references anyways)
@@ -26,15 +25,15 @@ SUBSYSTEM_DEF(throwing)
var/atom/movable/AM = currentrun[currentrun.len]
var/datum/thrownthing/TT = currentrun[AM]
currentrun.len--
if (!AM || !TT)
if(!AM || !TT)
processing -= AM
if (MC_TICK_CHECK)
if(MC_TICK_CHECK)
return
continue
TT.tick()
if (MC_TICK_CHECK)
if(MC_TICK_CHECK)
return
currentrun = null
@@ -63,7 +62,7 @@ SUBSYSTEM_DEF(throwing)
/datum/thrownthing/proc/tick()
var/atom/movable/AM = thrownthing
if (!isturf(AM.loc) || !AM.throwing)
if(!isturf(AM.loc) || !AM.throwing)
finalize()
return
@@ -71,7 +70,7 @@ SUBSYSTEM_DEF(throwing)
delayed_time += world.time - last_move
return
if (dist_travelled && hitcheck()) //to catch sneaky things moving on our tile while we slept
if(dist_travelled && hitcheck()) //to catch sneaky things moving on our tile while we slept
finalize()
return
@@ -80,51 +79,51 @@ SUBSYSTEM_DEF(throwing)
last_move = world.time
//calculate how many tiles to move, making up for any missed ticks.
var/tilestomove = CEILING(min(((((world.time+world.tick_lag) - start_time + delayed_time) * speed) - (dist_travelled ? dist_travelled : -1)), speed*MAX_TICKS_TO_MAKE_UP) * (world.tick_lag * SSthrowing.wait), 1)
while (tilestomove-- > 0)
if ((dist_travelled >= maxrange || AM.loc == target_turf) && has_gravity(AM, AM.loc))
var/tilestomove = CEILING(min(((((world.time + world.tick_lag) - start_time + delayed_time) * speed) - (dist_travelled ? dist_travelled : -1)), speed * MAX_TICKS_TO_MAKE_UP) * (world.tick_lag * SSthrowing.wait), 1)
while(tilestomove-- > 0)
if((dist_travelled >= maxrange || AM.loc == target_turf) && has_gravity(AM, AM.loc))
finalize()
return
if (dist_travelled <= max(dist_x, dist_y)) //if we haven't reached the target yet we home in on it, otherwise we use the initial direction
if(dist_travelled <= max(dist_x, dist_y)) //if we haven't reached the target yet we home in on it, otherwise we use the initial direction
step = get_step(AM, get_dir(AM, target_turf))
else
step = get_step(AM, init_dir)
if (!pure_diagonal && !diagonals_first) // not a purely diagonal trajectory and we don't want all diagonal moves to be done first
if (diagonal_error >= 0 && max(dist_x,dist_y) - dist_travelled != 1) //we do a step forward unless we're right before the target
if(!pure_diagonal && !diagonals_first) // not a purely diagonal trajectory and we don't want all diagonal moves to be done first
if (diagonal_error >= 0 && max(dist_x, dist_y) - dist_travelled != 1) //we do a step forward unless we're right before the target
step = get_step(AM, dx)
diagonal_error += (diagonal_error < 0) ? dist_x/2 : -dist_y
diagonal_error += (diagonal_error < 0) ? dist_x / 2 : -dist_y
if (!step) // going off the edge of the map makes get_step return null, don't let things go off the edge
if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge
finalize()
return
AM.Move(step, get_dir(AM, step))
if (!AM.throwing) // we hit something during our move
if(!AM.throwing) // we hit something during our move
finalize(hit = TRUE)
return
dist_travelled++
if (dist_travelled > MAX_THROWING_DIST)
if(dist_travelled > MAX_THROWING_DIST)
finalize()
return
/datum/thrownthing/proc/finalize(hit = FALSE, target=null)
/datum/thrownthing/proc/finalize(hit = FALSE, target = null)
set waitfor = 0
SSthrowing.processing -= thrownthing
//done throwing, either because it hit something or it finished moving
thrownthing.throwing = null
if (!hit)
for (var/thing in get_turf(thrownthing)) //looking for our target on the turf we land on.
if(!hit)
for(var/thing in get_turf(thrownthing)) //looking for our target on the turf we land on.
var/atom/A = thing
if (A == target)
if(A == target)
hit = 1
thrownthing.throw_impact(A, src)
break
if (!hit)
if(!hit)
thrownthing.throw_impact(get_turf(thrownthing), src) // we haven't hit something yet and we still must, let's hit the ground.
thrownthing.newtonian_move(init_dir)
else
@@ -133,17 +132,17 @@ SUBSYSTEM_DEF(throwing)
if(target)
thrownthing.throw_impact(target, src)
if (callback)
if(callback)
callback.Invoke()
/datum/thrownthing/proc/hit_atom(atom/A)
finalize(hit=TRUE, target=A)
finalize(hit = TRUE, target = A)
/datum/thrownthing/proc/hitcheck()
for (var/thing in get_turf(thrownthing))
for(var/thing in get_turf(thrownthing))
var/atom/movable/AM = thing
if (AM == thrownthing)
if(AM == thrownthing)
continue
if(AM.density && !(AM.pass_flags & LETPASSTHROW) && !(AM.flags & ON_BORDER))
finalize(hit=TRUE, target=AM)
finalize(hit = TRUE, target = AM)
return TRUE