Skip to content

Commit

Permalink
cleanup brackets and spaces
Browse files Browse the repository at this point in the history
changes (_ to (
changes _) to )

doesnt change structures of the form
(
something
)
  • Loading branch information
CookieNoob authored and aeoncleanse committed May 6, 2017
1 parent a416588 commit bfa4aa6
Show file tree
Hide file tree
Showing 168 changed files with 2,569 additions and 2,569 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,38 @@ InainoEffectController01 = Class(NullShell) {
local army = self:GetArmy()
self:ForkThread(self.CreateInitialHit, army)
self:ForkThread(self.CreateInitialBuildup, army)
self:ForkThread(self.CreateGroundFingers )
self:ForkThread(self.CreateInitialFingers )
self:ForkThread(self.CreateGroundFingers)
self:ForkThread(self.CreateInitialFingers)
self:ForkThread(self.MainBlast, army)
end,

CreateInitialHit = function( self, army )
CreateInitialHit = function(self, army)
for k, v in EffectTemplate.SIFInainoHit01 do
emit = CreateEmitterAtEntity(self,army,v)
end
end,

CreateInitialBuildup = function( self, army )
CreateInitialBuildup = function(self, army)
WaitSeconds(2.0)
for k, v in EffectTemplate.SIFInainoHit02 do
emit = CreateEmitterAtEntity(self,army,v)
end
end,

MainBlast = function( self, army )
MainBlast = function(self, army)
WaitSeconds(5.00)

-- Create a light for this thing's flash.
CreateLightParticle(self, -1, self:GetArmy(), 160, 14, 'flare_lens_add_03', 'ramp_white_07' )
CreateLightParticle(self, -1, self:GetArmy(), 160, 14, 'flare_lens_add_03', 'ramp_white_07')

-- Create our decals
CreateDecal( self:GetPosition(), RandomFloat(0.0,6.28), 'Scorch_012_albedo', '', 'Albedo', 80, 80, 1000, 0, self:GetArmy())
CreateDecal(self:GetPosition(), RandomFloat(0.0,6.28), 'Scorch_012_albedo', '', 'Albedo', 80, 80, 1000, 0, self:GetArmy())

-- Create explosion effects
for k, v in EffectTemplate.SIFInainoDetonate01 do
emit = CreateEmitterAtEntity(self,army,v)
end
self:ShakeCamera( 55, 10, 0, 2.5 )
self:ShakeCamera(55, 10, 0, 2.5)

WaitSeconds(0.3)

Expand All @@ -65,7 +65,7 @@ InainoEffectController01 = Class(NullShell) {
local vx, vy, vz = self:GetVelocity()
local num_projectiles = 16
local horizontal_angle = (2*math.pi) / num_projectiles
local angleInitial = RandomFloat( 0, horizontal_angle )
local angleInitial = RandomFloat(0, horizontal_angle)
local xVec, zVec
local offsetMultiple = 30.0
local px, pz
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SeraphimNukeEffectController01 = Class(NullShell) {
local offsetMultiple = 10.0
local px, pz

WaitSeconds( 3.5 )
WaitSeconds(3.5)
for i = 0, (num_projectiles -1) do
xVec = (math.sin(angleInitial + (i*horizontal_angle)))
zVec = (math.cos(angleInitial + (i*horizontal_angle)))
Expand All @@ -48,16 +48,16 @@ SeraphimNukeEffectController01 = Class(NullShell) {
local offsetMultiple = 0.0
local px, pz

WaitSeconds( 3.5 )
WaitSeconds(3.5)
for i = 0, (num_projectiles -1) do
xVec = (math.sin(angleInitial + (i*horizontal_angle)))
zVec = (math.cos(angleInitial + (i*horizontal_angle)))
px = (offsetMultiple*xVec)
pz = (offsetMultiple*zVec)

local proj = self:CreateProjectile( SIFExperimentalStrategicMissileEffect06, px, -8, pz, xVec, 0, zVec )
local proj = self:CreateProjectile(SIFExperimentalStrategicMissileEffect06, px, -8, pz, xVec, 0, zVec)
proj:SetLifetime(3.0)
proj:SetVelocity(RandomFloat( 11, 20 ))
proj:SetVelocity(RandomFloat(11, 20))
proj:SetAcceleration(-0.35)
end
end,
Expand Down Expand Up @@ -113,7 +113,7 @@ SeraphimNukeEffectController01 = Class(NullShell) {
px = (offsetMultiple*xVec)
pz = (offsetMultiple*zVec)

local proj = self:CreateProjectile( SIFExperimentalStrategicMissileEffect02, px, -12, pz, xVec, 0, zVec )
local proj = self:CreateProjectile(SIFExperimentalStrategicMissileEffect02, px, -12, pz, xVec, 0, zVec)
proj:SetLifetime(12.0)
proj:SetVelocity(10.0)
proj:SetAcceleration(-0.35)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ UEFNukeEffectController01 = Class(NullShell) {
self:CreateProjectile('/effects/entities/UEFNukeEffect02/UEFNukeEffect02_proj.bp',0,PlumeEffectYOffset,0,0,0,1)

for k, v in EffectTemplate.TNukeRings01 do
CreateEmitterAtEntity(self, army, v )
CreateEmitterAtEntity(self, army, v)
end

self:CreateInitialFireballSmokeRing()
Expand Down Expand Up @@ -76,10 +76,10 @@ UEFNukeEffectController01 = Class(NullShell) {
local Z = math.cos(i*angle)
local proj = self:CreateProjectile('/effects/entities/UEFNukeShockwave02/UEFNukeShockwave02_proj.bp', X * OffsetMod , 2.5, Z * OffsetMod, X, 0, Z)
:SetVelocity(velocity)
table.insert( projectiles, proj )
table.insert(projectiles, proj)
end

WaitSeconds( 3 )
WaitSeconds(3)

-- Slow projectiles down to normal speed
for k, v in projectiles do
Expand All @@ -90,7 +90,7 @@ UEFNukeEffectController01 = Class(NullShell) {
CreateFlavorPlumes = function(self)
local numProjectiles = 8
local angle = (2*math.pi) / numProjectiles
local angleInitial = RandomFloat( 0, angle )
local angleInitial = RandomFloat(0, angle)
local angleVariation = angle * 0.75
local projectiles = {}

Expand All @@ -110,10 +110,10 @@ UEFNukeEffectController01 = Class(NullShell) {
yVec = RandomFloat(0.2, 1)
zVec = math.cos(angleInitial + (i*angle) + RandomFloat(-angleVariation, angleVariation))
velocity = 3.4 + (yVec * RandomFloat(2,5))
table.insert(projectiles, self:CreateProjectile('/effects/entities/UEFNukeFlavorPlume01/UEFNukeFlavorPlume01_proj.bp', 0, 0, 0, xVec, yVec, zVec):SetVelocity(velocity) )
table.insert(projectiles, self:CreateProjectile('/effects/entities/UEFNukeFlavorPlume01/UEFNukeFlavorPlume01_proj.bp', 0, 0, 0, xVec, yVec, zVec):SetVelocity(velocity))
end

WaitSeconds( 3 )
WaitSeconds(3)

-- Slow projectiles down to normal speed
for k, v in projectiles do
Expand Down Expand Up @@ -143,15 +143,15 @@ UEFNukeEffectController01 = Class(NullShell) {
local z = math.cos(i*angle)
local proj = projectiles[i+1]
proj:SetVelocityAlign(false)
proj:SetOrientation(OrientFromDir(Util.Cross( Vector(x,0,z), Vector(0,1,0))),true)
proj:SetOrientation(OrientFromDir(Util.Cross(Vector(x,0,z), Vector(0,1,0))),true)
proj:SetVelocity(0,3,0)
proj:SetBallisticAcceleration(-0.05)
end
end,

CreateGroundPlumeConvectionEffects = function(self,army)
for k, v in EffectTemplate.TNukeGroundConvectionEffects01 do
CreateEmitterAtEntity(self, army, v )
CreateEmitterAtEntity(self, army, v)
end

local sides = 10
Expand All @@ -171,7 +171,7 @@ UEFNukeEffectController01 = Class(NullShell) {
local magnitude = RandomFloat(outer_lower_limit, outer_upper_limit)
local x = math.sin(i*angle+RandomFloat(-angle/2, angle/4)) * magnitude
local z = math.cos(i*angle+RandomFloat(-angle/2, angle/4)) * magnitude
local velocity = RandomFloat( 1, 3 ) * 3
local velocity = RandomFloat(1, 3) * 3
self:CreateProjectile('/effects/entities/UEFNukeEffect05/UEFNukeEffect05_proj.bp', x, RandomFloat(outer_lower_height, outer_upper_height), z, x, 0, z)
:SetVelocity(x * velocity, 0, z * velocity)
end
Expand Down
4 changes: 2 additions & 2 deletions engine/Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ function PointVector()
end

---
-- RPCSound( {cue,bank,cutoff} ) - Make a sound parameters object
-- RPCSound({cue,bank,cutoff}) - Make a sound parameters object
function RPCSound({cue, bank, cutoff})
end

Expand Down Expand Up @@ -232,7 +232,7 @@ function SecondsPerTick()
end

---
-- Sound( {cue,bank,cutoff} ) - Make a sound parameters object
-- Sound({cue,bank,cutoff}) - Make a sound parameters object
function Sound({cue, bank, cutoff})
end

Expand Down
4 changes: 2 additions & 2 deletions engine/Sim.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-- @module Sim

--- Restrict the army from building the unit category.
-- The categories can be combined using + - * ( ), example: (categories.TECH3 * categories:NAVAL) + categories.urb0202.
-- The categories can be combined using + - * (), example: (categories.TECH3 * categories:NAVAL) + categories.urb0202.
-- @param army Army's index.
-- @param category Unit category.
function AddBuildRestriction(army, category)
Expand Down Expand Up @@ -806,7 +806,7 @@ function Random()
end

--- Unrestrict the army from building the unit category.
-- The categories can be combined using + - * ( ), example: (categories.TECH3 * categories:NAVAL) + categories.urb0202.
-- The categories can be combined using + - * (), example: (categories.TECH3 * categories:NAVAL) + categories.urb0202.
-- @param army Army's index.
-- @param category Unit category.
function RemoveBuildRestriction(army, category)
Expand Down
4 changes: 2 additions & 2 deletions engine/Sim/CAimManipulator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function CAimManipulator:OnTarget()
end

---
-- AimManipulator:SetAimHeadingOffset( offset )
-- AimManipulator:SetAimHeadingOffset(offset)
function CAimManipulator:SetAimHeadingOffset(offset)
end

Expand All @@ -22,7 +22,7 @@ function CAimManipulator:SetFiringArc(minHeading, maxHeading, headingMaxSlew,
end

---
-- AimManipulator:SetHeadingPitch( heading, pitch )
-- AimManipulator:SetHeadingPitch(heading, pitch)
function CAimManipulator:SetHeadingPitch(heading, pitch)
end

Expand Down
2 changes: 1 addition & 1 deletion engine/Sim/CBuilderArmManipulator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function CBuilderArmManipulator:SetAimingArc(minHeading, maxHeading, headingMa
end

---
-- CBuilderArmManipulator:SetHeadingPitch( heading, pitch )
-- CBuilderArmManipulator:SetHeadingPitch(heading, pitch)
function CBuilderArmManipulator:SetHeadingPitch(heading, pitch)
end

Expand Down
2 changes: 1 addition & 1 deletion engine/Sim/Entity.lua
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ function Entity:SetMesh(meshBp, bool keepActor)
end

---
-- Entity:SetOrientation(orientation, immediately )
-- Entity:SetOrientation(orientation, immediately)
function Entity:SetOrientation(orientation, immediately)
end

Expand Down
4 changes: 2 additions & 2 deletions engine/Sim/Projectile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ function Projectile:SetMaxSpeed(speed)
end

---
-- Projectile:SetNewTarget( entity )
-- Projectile:SetNewTarget(entity)
function Projectile:SetNewTarget(entity)
end

---
-- Projectile:SetNewTargetGround( location )
-- Projectile:SetNewTargetGround(location)
function Projectile:SetNewTargetGround(location)
end

Expand Down
2 changes: 1 addition & 1 deletion engine/Sim/Unit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function Unit:AddToggleCap(capName)
end

---
-- Unit:AddUnitToStorage( storedUnit )
-- Unit:AddUnitToStorage(storedUnit)
function Unit:AddUnitToStorage(storedUnit)
end

Expand Down
4 changes: 2 additions & 2 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ whitelist = {
}

local function mount_dir(dir, mountpoint)
table.insert(path, { dir = dir, mountpoint = mountpoint } )
table.insert(path, { dir = dir, mountpoint = mountpoint })
end

local function mount_contents(dir, mountpoint)
Expand Down Expand Up @@ -152,7 +152,7 @@ mount_map_dir(InitFileDir .. '\\..\\user\\My Games\\Gas Powered Games\\Supreme C
-- This section mounts sounds from the mods directory to allow mods to add custom sounds to the game
function mount_mod_sounds(MODFOLDER)
-- searching for mods inside the modfolder
for _,mod in io.dir( MODFOLDER..'\\*.*') do
for _,mod in io.dir(MODFOLDER..'\\*.*') do
-- do we have a true directory ?
if mod != '.' and mod != '..' then
-- searching for sounds inside mod folder
Expand Down
4 changes: 2 additions & 2 deletions lua/AI/AIAddBuilderTable.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ end

function AddGlobalBuilderGroup(aiBrain, locationType, builderGroupName)
if BuilderGroups[builderGroupName] then
AddBuilderTable( aiBrain, locationType, BuilderGroups[builderGroupName], builderGroupName)
AddBuilderTable(aiBrain, locationType, BuilderGroups[builderGroupName], builderGroupName)
end
end

Expand Down Expand Up @@ -58,7 +58,7 @@ function AddBuilderTable(aiBrain, locationType, builderTable, tableName)
if not Builders[v] then
WARN('*AI ERROR: Invalid Builder named - ' .. v)
end
table.insert( builders, managers[tableType]:AddBuilder(Builders[v], locationType) )
table.insert(builders, managers[tableType]:AddBuilder(Builders[v], locationType))
end
end
end
2 changes: 1 addition & 1 deletion lua/AI/AIBaseTemplates/NavalExpansionSmall.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ BaseBuilderTemplate {
end

local personality = ScenarioInfo.ArmySetup[aiBrain.Name].AIPersonality
if not ( personality == 'easy' or personality == 'medium' ) then
if not (personality == 'easy' or personality == 'medium') then
return 50
end

Expand Down
4 changes: 2 additions & 2 deletions lua/AI/AIBaseTemplates/RushExpansionAirFull.lua
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@ BaseBuilderTemplate {
end

local personality = ScenarioInfo.ArmySetup[aiBrain.Name].AIPersonality
if not( personality == 'adaptive' or personality == 'rushair' ) then
if not(personality == 'adaptive' or personality == 'rushair') then
return 0
end

local threatCutoff = 10 # value of overall threat that determines where enemy bases are
local distance = import('/lua/ai/AIUtilities.lua').GetThreatDistance( aiBrain, location, threatCutoff )
local distance = import('/lua/ai/AIUtilities.lua').GetThreatDistance(aiBrain, location, threatCutoff)
if not distance or distance > 1000 then
return 75
elseif distance > 500 then
Expand Down
4 changes: 2 additions & 2 deletions lua/AI/AIBaseTemplates/RushExpansionAirSmall.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ BaseBuilderTemplate {
end

local personality = ScenarioInfo.ArmySetup[aiBrain.Name].AIPersonality
if not( personality == 'adaptive' or personality == 'rushair' ) then
if not(personality == 'adaptive' or personality == 'rushair') then
return 0
end

local threatCutoff = 10 # value of overall threat that determines where enemy bases are
local distance = import('/lua/ai/AIUtilities.lua').GetThreatDistance( aiBrain, location, threatCutoff )
local distance = import('/lua/ai/AIUtilities.lua').GetThreatDistance(aiBrain, location, threatCutoff)
if not distance or distance > 1000 then
return 75
elseif distance > 500 then
Expand Down
4 changes: 2 additions & 2 deletions lua/AI/AIBaseTemplates/RushExpansionBalancedFull.lua
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,12 @@ BaseBuilderTemplate {
end

local personality = ScenarioInfo.ArmySetup[aiBrain.Name].AIPersonality
if not( personality == 'adaptive' or personality == 'rushbalanced' ) then
if not(personality == 'adaptive' or personality == 'rushbalanced') then
return 0
end

local threatCutoff = 10 # value of overall threat that determines where enemy bases are
local distance = import('/lua/ai/AIUtilities.lua').GetThreatDistance( aiBrain, location, threatCutoff )
local distance = import('/lua/ai/AIUtilities.lua').GetThreatDistance(aiBrain, location, threatCutoff)
if not distance or distance > 1000 then
return 50
elseif distance > 500 then
Expand Down
4 changes: 2 additions & 2 deletions lua/AI/AIBaseTemplates/RushExpansionBalancedSmall.lua
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ BaseBuilderTemplate {
end

local personality = ScenarioInfo.ArmySetup[aiBrain.Name].AIPersonality
if not( personality == 'adaptive' or personality == 'rushbalanced' ) then
if not(personality == 'adaptive' or personality == 'rushbalanced') then
return 0
end

local threatCutoff = 10 # value of overall threat that determines where enemy bases are
local distance = import('/lua/ai/AIUtilities.lua').GetThreatDistance( aiBrain, location, threatCutoff )
local distance = import('/lua/ai/AIUtilities.lua').GetThreatDistance(aiBrain, location, threatCutoff)
if not distance or distance > 1000 then
return 50
elseif distance > 500 then
Expand Down
4 changes: 2 additions & 2 deletions lua/AI/AIBaseTemplates/RushExpansionLandFull.lua
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,12 @@ BaseBuilderTemplate {
end

local personality = ScenarioInfo.ArmySetup[aiBrain.Name].AIPersonality
if not( personality == 'adaptive' or personality == 'rushland' ) then
if not(personality == 'adaptive' or personality == 'rushland') then
return 0
end

local threatCutoff = 10 # value of overall threat that determines where enemy bases are
local distance = import('/lua/ai/AIUtilities.lua').GetThreatDistance( aiBrain, location, threatCutoff )
local distance = import('/lua/ai/AIUtilities.lua').GetThreatDistance(aiBrain, location, threatCutoff)
if not distance or distance > 1000 then
return 10
elseif distance > 500 then
Expand Down
4 changes: 2 additions & 2 deletions lua/AI/AIBaseTemplates/RushExpansionLandSmall.lua
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ BaseBuilderTemplate {
end

local personality = ScenarioInfo.ArmySetup[aiBrain.Name].AIPersonality
if not( personality == 'adaptive' or personality == 'rushland' ) then
if not(personality == 'adaptive' or personality == 'rushland') then
return 0
end

local threatCutoff = 10 # value of overall threat that determines where enemy bases are
local distance = import('/lua/ai/AIUtilities.lua').GetThreatDistance( aiBrain, location, threatCutoff )
local distance = import('/lua/ai/AIUtilities.lua').GetThreatDistance(aiBrain, location, threatCutoff)
if not distance or distance > 1000 then
return 10
elseif distance > 500 then
Expand Down
Loading

0 comments on commit bfa4aa6

Please sign in to comment.