Skip to content

Commit 49d3259

Browse files
committed
Fix all inconsistent indentation
1 parent 7955351 commit 49d3259

File tree

39 files changed

+259
-260
lines changed

39 files changed

+259
-260
lines changed

[admin]/admin/client/gui/admin_inputbox.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ function aInputBox ( title, message, default, action, vOne, vTwo, defaultNick, d
1515
if ( aInputForm == nil ) then
1616
local x, y = guiGetScreenSize()
1717
aInputForm = guiCreateWindow ( x / 2 - 150, y / 2 - 64, 300, 170, "", false )
18-
guiWindowSetSizable ( aInputForm, false )
18+
guiWindowSetSizable ( aInputForm, false )
1919
aInputLabel = guiCreateLabel ( 20, 24, 270, 15, "", false, aInputForm )
20-
guiLabelSetHorizontalAlign ( aInputLabel, "center" )
20+
guiLabelSetHorizontalAlign ( aInputLabel, "center" )
2121
aInputValue = guiCreateEdit ( 35, 47, 230, 24, "", false, aInputForm )
2222
aInputOk = guiCreateButton ( 90, 80, 55, 17, "Ok", false, aInputForm )
2323
aInputCancel = guiCreateButton ( 150, 80, 55, 17, "Cancel", false, aInputForm )

[admin]/admin/client/gui/admin_main.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,17 +262,17 @@ y=y+B aTab1.VehicleHealth = guiCreateLabel ( 0.26, y, 0.25, 0.04, "Vehicle Heal
262262
aTab3.SpeedCurrent = guiCreateLabel ( 0.05, 0.55, 0.30, 0.04, "Game Speed: "..getGameSpeed(), true, aTab3.Tab )
263263
aTab3.Speed = guiCreateEdit ( 0.35, 0.55, 0.135, 0.04, "1", true, aTab3.Tab )
264264
aTab3.SpeedSet = guiCreateButton ( 0.50, 0.55, 0.10, 0.04, "Set", true, aTab3.Tab, "setgamespeed" )
265-
guiCreateLabel ( 0.63, 0.55, 0.09, 0.04, "( 0-10 )", true, aTab3.Tab )
265+
guiCreateLabel ( 0.63, 0.55, 0.09, 0.04, "( 0-10 )", true, aTab3.Tab )
266266

267267
aTab3.WavesCurrent = guiCreateLabel ( 0.05, 0.60, 0.25, 0.04, "Wave Height: "..getWaveHeight(), true, aTab3.Tab )
268268
aTab3.Waves = guiCreateEdit ( 0.35, 0.60, 0.135, 0.04, "0", true, aTab3.Tab )
269269
aTab3.WavesSet = guiCreateButton ( 0.50, 0.60, 0.10, 0.04, "Set", true, aTab3.Tab, "setwaveheight" )
270-
guiCreateLabel ( 0.63, 0.60, 0.09, 0.04, "( 0-100 )", true, aTab3.Tab )
270+
guiCreateLabel ( 0.63, 0.60, 0.09, 0.04, "( 0-100 )", true, aTab3.Tab )
271271

272272
aTab3.FPSCurrent = guiCreateLabel ( 0.05, 0.65, 0.25, 0.04, "FPS Limit: 38", true, aTab3.Tab )
273273
aTab3.FPS = guiCreateEdit ( 0.35, 0.65, 0.135, 0.04, "38", true, aTab3.Tab )
274274
aTab3.FPSSet = guiCreateButton ( 0.50, 0.65, 0.10, 0.04, "Set", true, aTab3.Tab, "setfpslimit" )
275-
guiCreateLabel ( 0.63, 0.65, 0.1, 0.04, "( 25-100 )", true, aTab3.Tab )
275+
guiCreateLabel ( 0.63, 0.65, 0.1, 0.04, "( 25-100 )", true, aTab3.Tab )
276276

277277

278278
aTab4 = {}
@@ -372,7 +372,7 @@ y=y+B aTab1.VehicleHealth = guiCreateLabel ( 0.26, y, 0.25, 0.04, "Vehicle Heal
372372
else guiRadioButtonSetSelected ( aTab6.PerformanceAuto, true ) end
373373
aTab6.PerformanceAdvanced = guiCreateButton ( 0.05, 0.91, 0.11, 0.04, "Advanced", true, aTab6.Tab )
374374
aPerformance()
375-
guiCreateLabel ( 0.70, 0.90, 0.19, 0.055, "Refresh Delay(MS):", true, aTab6.Tab )
375+
guiCreateLabel ( 0.70, 0.90, 0.19, 0.055, "Refresh Delay(MS):", true, aTab6.Tab )
376376
aTab6.RefreshDelay = guiCreateEdit ( 0.89, 0.90, 0.08, 0.045, "50", true, aTab6.Tab )
377377

378378
if ( aGetSetting ( "outputPlayer" ) ) then guiCheckBoxSetSelected ( aTab6.OutputPlayer, true ) end

[admin]/admin/client/gui/admin_spectator.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ function aSpectator.Initialize ()
4343
aSpectator.SetStats = guiCreateButton ( 0.10, 0.45, 0.80, 0.05, "Set Stats", true, aSpectator.Actions )
4444
aSpectator.Slap = guiCreateButton ( 0.10, 0.51, 0.80, 0.05, "Slap! "..aCurrentSlap.."hp", true, aSpectator.Actions )
4545
aSpectator.Slaps = guiCreateGridList ( 0.10, 0.51, 0.80, 0.48, true, aSpectator.Actions )
46-
guiGridListAddColumn( aSpectator.Slaps, "", 0.85 )
47-
guiSetVisible ( aSpectator.Slaps, false )
46+
guiGridListAddColumn( aSpectator.Slaps, "", 0.85 )
47+
guiSetVisible ( aSpectator.Slaps, false )
4848
local i = 0
4949
while i <= 10 do
5050
guiGridListSetItemText ( aSpectator.Slaps, guiGridListAddRow ( aSpectator.Slaps ), 1, tostring ( i * 10 ), false, false )
@@ -53,13 +53,13 @@ function aSpectator.Initialize ()
5353

5454
aSpectator.CollideWithWalls = guiCreateCheckBox ( 0.08, 0.8, 0.84, 0.04, "Collide with walls", true, true, aSpectator.Actions )
5555
aSpectator.Skip = guiCreateCheckBox ( 0.08, 0.85, 0.84, 0.04, "Skip dead players", true, true, aSpectator.Actions )
56-
guiCreateLabel ( 0.08, 0.89, 0.84, 0.04, "____________________", true, aSpectator.Actions )
56+
guiCreateLabel ( 0.08, 0.89, 0.84, 0.04, "____________________", true, aSpectator.Actions )
5757
aSpectator.Back = guiCreateButton ( 0.10, 0.93, 0.80, 0.05, "Back", true, aSpectator.Actions )
5858

5959
aSpectator.Players = guiCreateWindow ( 30, y / 2 - 200, 160, 400, "Players", false )
60-
guiWindowSetSizable ( aSpectator.Players, false )
60+
guiWindowSetSizable ( aSpectator.Players, false )
6161
aSpectator.PlayerList = guiCreateGridList ( 0.03, 0.07, 0.94, 0.92, true, aSpectator.Players )
62-
guiGridListAddColumn( aSpectator.PlayerList, "Player Name", 0.85 )
62+
guiGridListAddColumn( aSpectator.PlayerList, "Player Name", 0.85 )
6363
for id, player in ipairs ( getElementsByType ( "player" ) ) do
6464
local row = guiGridListAddRow ( aSpectator.PlayerList )
6565
guiGridListSetItemPlayerName ( aSpectator.PlayerList, row, 1, getPlayerName ( player ), false, false )

[admin]/admin/server/admin_ip2c.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ CoroutineSleeper = {
317317
new = function(self, myFunc, ...)
318318
local obj = setmetatable({}, { __index = CoroutineSleeper })
319319
-- Use inner function to call myFunc, so we can auto :detach when finished
320-
obj.handle = coroutine.create( function(obj, ...)
320+
obj.handle = coroutine.create( function(obj, ...)
321321
myFunc(obj, ...)
322322
obj:detach()
323323
end )
@@ -339,7 +339,7 @@ CoroutineSleeper = {
339339
sleep = function(self, ms)
340340
if not self:isAttached() then return end
341341
setTimer( function()
342-
if not self:isAttached() then return end
342+
if not self:isAttached() then return end
343343
local status = coroutine.status(self.handle)
344344
if (status == "suspended") then
345345
coroutine.resume(self.handle)

[editor]/editor_gui/client/editingControls.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,12 +1360,12 @@ eC.color = {
13601360
local boxWidth = (self.selectWindow.historyWidth - 15) / 3
13611361
local boxHeight = (self.selectWindow.historyHeight - 45) / 3
13621362
for i=1,3 do
1363-
for j=1,3 do
1364-
local color = colorHistory[j + ((i - 1) * 3)]
1365-
local x = wx + self.selectWindow.historyX + ((boxWidth + 5) * (j-1))
1366-
local y = wy + self.selectWindow.historyY + 30 + ((boxHeight + 5) * (i-1))
1367-
dxDrawRectangle(x, y, boxWidth, boxHeight, tocolor(unpack(color)), true)
1368-
end
1363+
for j=1,3 do
1364+
local color = colorHistory[j + ((i - 1) * 3)]
1365+
local x = wx + self.selectWindow.historyX + ((boxWidth + 5) * (j-1))
1366+
local y = wy + self.selectWindow.historyY + 30 + ((boxHeight + 5) * (i-1))
1367+
dxDrawRectangle(x, y, boxWidth, boxHeight, tocolor(unpack(color)), true)
1368+
end
13691369
end
13701370
end,
13711371
isCursorInArea = function( self, cursorX, cursorY, minX, minY, maxX, maxY )

[editor]/editor_gui/client/elementproperties.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,8 @@ local function addPropertyControl( controlType, controlLabelName, controlDescrip
420420

421421
newControl = controlPrototype:create( parameters )
422422
newControl:addChangeHandler(function ()
423-
setPropertiesChanged(true)
424-
editor_main.updateArrowMarker()
423+
setPropertiesChanged(true)
424+
editor_main.updateArrowMarker()
425425
end)
426426
if propertyApplier and type(propertyApplier) == "function" then
427427
newControl:addChangeHandler(propertyApplier)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
local function getCameraRotation ()
22
local px, py, pz, lx, ly, lz = getCameraMatrix()
33
local rotz = 6.2831853071796 - math.atan2 ( ( lx - px ), ( ly - py ) ) % 6.2831853071796
4-
local rotx = math.atan2 ( lz - pz, getDistanceBetweenPoints2D ( lx, ly, px, py ) )
4+
local rotx = math.atan2 ( lz - pz, getDistanceBetweenPoints2D ( lx, ly, px, py ) )
55
--Convert to degrees
66
rotx = math.deg(rotx)
77
rotz = -math.deg(rotz)
88

9-
return rotx, 180, rotz
9+
return rotx, 180, rotz
1010
end

[editor]/editor_main/client/attachplayer.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ local attachPlayersEnabled = false
44
function getCameraRotation ()
55
local px, py, pz, lx, ly, lz = getCameraMatrix()
66
local rotz = 6.2831853071796 - math.atan2 ( ( lx - px ), ( ly - py ) ) % 6.2831853071796
7-
local rotx = math.atan2 ( lz - pz, getDistanceBetweenPoints2D ( lx, ly, px, py ) )
7+
local rotx = math.atan2 ( lz - pz, getDistanceBetweenPoints2D ( lx, ly, px, py ) )
88
--Convert to degrees
99
rotx = math.deg(rotx)
1010
rotz = math.deg(rotz)
1111

12-
return rotx, 180, rotz
12+
return rotx, 180, rotz
1313
end
1414

1515
local function attachRender()

[editor]/editor_main/client/gridlines.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ local function renderGridlines()
4545
end
4646
--
4747
local face1 = matrix{
48-
{minX,maxY,minZ,1},
48+
{minX,maxY,minZ,1},
4949
{minX,maxY,maxZ,1},
5050
{maxX,maxY,maxZ,1},
5151
{maxX,maxY,minZ,1},

[editor]/editor_main/client/main.lua

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -234,20 +234,20 @@ addEventHandler("onClientRender", root,
234234
local line1 = ( not g_RemoveWorldBuildingMode_main and "[SELECT WORLD OBJECT]" or "[REMOVE WORLD OBJECT]" )
235235
local line2 = ""
236236
local line3 = ""
237-
if not targetElement and buildingInfo then
238-
local camX, camY, camZ = getCameraMatrix()
239-
local distance = math.sqrt( (targetX - camX)^2 + (targetY - camY)^2 + (targetZ - camZ)^2 )
240-
local roundedDistance = string.format("%." .. (DISTANCE_DECIMAL_PLACES) .. "f", distance)
241-
local modelName = tostring( engineGetModelNameFromID( buildingInfo.id ) )
237+
if not targetElement and buildingInfo then
238+
local camX, camY, camZ = getCameraMatrix()
239+
local distance = math.sqrt( (targetX - camX)^2 + (targetY - camY)^2 + (targetZ - camZ)^2 )
240+
local roundedDistance = string.format("%." .. (DISTANCE_DECIMAL_PLACES) .. "f", distance)
241+
local modelName = tostring( engineGetModelNameFromID( buildingInfo.id ) )
242242
if ( buildingInfo.LODid ~= nil ) then
243-
line1 = buildingInfo.id .. " (" .. modelName .. ")" .. " LOD: " .. buildingInfo.LODid
243+
line1 = buildingInfo.id .. " (" .. modelName .. ")" .. " LOD: " .. buildingInfo.LODid
244244
else
245-
line1 = buildingInfo.id .. " (" .. modelName .. ")"
245+
line1 = buildingInfo.id .. " (" .. modelName .. ")"
246246
end
247247
line2 = "[world]"
248248
line3 = roundedDistance .. " m"
249-
g_worldBuildingInfo = buildingInfo
250-
end
249+
g_worldBuildingInfo = buildingInfo
250+
end
251251
createHighlighterText ( labelCenterX,labelCenterY, line1, line2, line3 )
252252
end
253253

@@ -1358,7 +1358,7 @@ function handleWorldBuildingMode(keyState)
13581358
creationParameters.rotation = { g_worldBuildingInfo.rx, g_worldBuildingInfo.ry, g_worldBuildingInfo.rz }
13591359
doCreateElement("object", "editor_main", creationParameters)
13601360
end
1361-
end
1361+
end
13621362
g_SelectWorldBuildingMode_main = false
13631363
g_RemoveWorldBuildingMode_main = false
13641364
return true

0 commit comments

Comments
 (0)