From 3c8da91913dd74700a8c687683dd0bb871d51394 Mon Sep 17 00:00:00 2001 From: SoundScopes Date: Mon, 24 Nov 2014 16:49:28 +0000 Subject: [PATCH] Fixes for the grav gen No face planting at round start anymore --- Scopes Files/gravitygenerator.dm | 7 ++----- code/game/area/areas.dm | 9 +++++---- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Scopes Files/gravitygenerator.dm b/Scopes Files/gravitygenerator.dm index 6f5472a4..7e03e17e 100644 --- a/Scopes Files/gravitygenerator.dm +++ b/Scopes Files/gravitygenerator.dm @@ -146,9 +146,6 @@ var/list/gravity_field_generators = list() // We will keep track of this by addi middle.overlays += "activated" log_debug("Gravity Generator spawned: initialize()") update_list() - spawn(100) - if(round_start >= 1) - round_start-- // // Generator an admin can spawn @@ -462,8 +459,8 @@ var/list/gravity_field_generators = list() // We will keep track of this by addi A.gravitychange(A.has_gravity,A,1) else A.gravitychange(A.has_gravity,A) - if(round_start == 1) - round_start = 0 + if(round_start >= 1) + round_start-- gravity_field_generators["[T.z]"] |= src else msg_scopes("Here is a lovely list of floaty people") diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 0d2a6ddf..49ce3970 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -328,16 +328,17 @@ L << sound(sound, repeat = 0, wait = 0, volume = musVolume, channel = 1) L.client.played = world.time -/area/proc/gravitychange(var/gravitystate = 0, var/area/A) +/area/proc/gravitychange(var/gravitystate = 0, var/area/A, var/bypass_thunk = 0) A.has_gravity = gravitystate for(var/area/SubA in A.related) SubA.has_gravity = gravitystate - if(gravitystate) - for(var/mob/living/carbon/human/M in SubA) - thunk(M) + if(!bypass_thunk) + if(gravitystate) + for(var/mob/living/carbon/human/M in SubA) + thunk(M) /area/proc/thunk(mob) if(istype(mob,/mob/living/carbon/human/)) // Only humans can wear magboots, so we give them a chance to.