summaryrefslogtreecommitdiff
path: root/gamemode/events/fallout.lua
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2016-05-30 21:01:18 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2016-05-30 21:01:18 -0400
commitd62058fcdea5fc6736a2a373f47dc6c14c70c319 (patch)
tree79a1325190e3f1f1b6d6a2dbcdfc1ba3fa866ac9 /gamemode/events/fallout.lua
parentc38f00182ba6c282806eecb39a42e64d5feafa37 (diff)
downloadredead-d62058fcdea5fc6736a2a373f47dc6c14c70c319.tar.gz
redead-d62058fcdea5fc6736a2a373f47dc6c14c70c319.tar.bz2
redead-d62058fcdea5fc6736a2a373f47dc6c14c70c319.zip
Removed exessive whitespace so future commits will be cleaner
Diffstat (limited to 'gamemode/events/fallout.lua')
-rw-r--r--gamemode/events/fallout.lua58
1 files changed, 29 insertions, 29 deletions
diff --git a/gamemode/events/fallout.lua b/gamemode/events/fallout.lua
index b316523..2d31118 100644
--- a/gamemode/events/fallout.lua
+++ b/gamemode/events/fallout.lua
@@ -3,75 +3,75 @@ local EVENT = {}
EVENT.Chance = 0.50
EVENT.Type = EVENT_BAD
-EVENT.TimeText = { "30 seconds", "1 minute" }
-EVENT.Times = { 30, 60 }
+EVENT.TimeText = { "30 seconds", "1 minute" }
+EVENT.Times = { 30, 60 }
function EVENT:Start()
-
+
local num = math.random(1,2)
-
+
EVENT.Delay = CurTime() + 15
EVENT.RadTime = CurTime() + EVENT.Times[ num ] + 15
EVENT.RadDelay = 0
-
+
for k,v in pairs( team.GetPlayers( TEAM_ARMY ) ) do
-
+
v:Notice( "Nuclear fallout contamination is imminent", GAMEMODE.Colors.White, 7 )
v:Notice( "Enter a building to avoid radiation poisoning", GAMEMODE.Colors.White, 7, 2 )
v:Notice( "The atmospheric fallout will subside in " .. EVENT.TimeText[ num ], GAMEMODE.Colors.White, 7, 15 )
v:Notice( "Atmospheric radioactivity levels are now safe", GAMEMODE.Colors.White, 7, EVENT.Times[ num ] + 15 )
-
+
end
-
+
timer.Simple( 15, function() SetGlobalBool( "Radiation", true ) end )
-
+
end
-
+
function EVENT:Think()
if EVENT.Delay < CurTime() then
-
+
if EVENT.RadDelay < CurTime() then
-
+
EVENT.RadDelay = CurTime() + 1
-
+
for k,v in pairs( team.GetPlayers( TEAM_ARMY ) ) do
-
+
if not v:IsIndoors() then
-
+
if math.random(1,2) == 1 then
v:EmitSound( table.Random( GAMEMODE.Geiger ), 100, math.random(90,110) )
-
- end
-
+
+ end
+
if math.random(1,5) == 1 then
-
+
v:AddRadiation( 1 )
-
+
end
-
+
else
-
+
if math.random(1,6) == 1 then
v:EmitSound( table.Random( GAMEMODE.Geiger ), 100, math.random(120,140) )
-
- end
-
+
+ end
+
end
-
+
end
-
+
end
-
+
end
end
function EVENT:EndThink()
- return EVENT.RadTime < CurTime()
+ return EVENT.RadTime < CurTime()
end