Skip to content

Commit 2660580

Browse files
committed
Fix all empty if branches
1 parent 2d68470 commit 2660580

File tree

27 files changed

+37
-75
lines changed

27 files changed

+37
-75
lines changed

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@ function aClientClick ( button )
995995
aViewMessages()
996996
elseif ( source == aTab1.ScreenShots ) then
997997
aPlayerScreenShot()
998-
elseif ( source == aTab1.PlayerListSearch ) then
998+
--elseif ( source == aTab1.PlayerListSearch ) then
999999

10001000
elseif ( source == aTab1.HideColorCodes ) then
10011001
setHideColorCodes ( guiCheckBoxGetSelected ( aTab1.HideColorCodes ) )
@@ -1049,9 +1049,7 @@ function aClientClick ( button )
10491049
end
10501050
-- TAB 2, RESOURCES
10511051
elseif ( getElementParent ( source ) == aTab2.Tab ) then
1052-
if ( source == aTab2.ResourceListSearch ) then
1053-
1054-
elseif ( ( source == aTab2.ResourceStart ) or ( source == aTab2.ResourceRestart ) or ( source == aTab2.ResourceStop ) or ( source == aTab2.ResourceDelete ) or ( source == aTab2.ResourceSettings ) ) then
1052+
if ( ( source == aTab2.ResourceStart ) or ( source == aTab2.ResourceRestart ) or ( source == aTab2.ResourceStop ) or ( source == aTab2.ResourceDelete ) or ( source == aTab2.ResourceSettings ) ) then
10551053
if ( guiGridListGetSelectedItem ( aTab2.ResourceList ) == -1 ) then
10561054
aMessageBox ( "error", "No resource selected!" )
10571055
else
@@ -1165,7 +1163,7 @@ function aClientClick ( button )
11651163
else triggerServerEvent ( "aAdminChat", localPlayer, message ) end
11661164
guiSetText ( aTab5.AdminText, "" )
11671165
end
1168-
elseif ( source == aTab5.AdminText ) then
1166+
--elseif ( source == aTab5.AdminText ) then
11691167

11701168
end
11711169
-- TAB 6, OPTIONS
@@ -1186,11 +1184,11 @@ function aClientClick ( button )
11861184
aPerformance()
11871185
elseif ( source == aTab6.AutoLogin ) then
11881186
triggerServerEvent ( "aAdmin", localPlayer, "autologin", guiCheckBoxGetSelected ( aTab6.AutoLogin ) )
1189-
elseif ( source == aTab6.PasswordOld ) then
1187+
--elseif ( source == aTab6.PasswordOld ) then
11901188

1191-
elseif ( source == aTab6.PasswordNew ) then
1189+
--elseif ( source == aTab6.PasswordNew ) then
11921190

1193-
elseif ( source == aTab6.PasswordConfirm ) then
1191+
--elseif ( source == aTab6.PasswordConfirm ) then
11941192

11951193
elseif ( source == aTab6.PasswordChange ) then
11961194
local passwordNew, passwordConf = guiGetText ( aTab6.PasswordNew ), guiGetText ( aTab6.PasswordConfirm )

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,7 @@ addEventHandler("getMaps_c", getLocalPlayer(), loadMaps)
6262
function guiClick(button)
6363
if button == "left" then
6464
if ( getElementParent ( source ) == aTabMap.Tab ) then
65-
if source == aTabMap.MapListSearch then
66-
67-
elseif source == aTabMap.RefreshList then
65+
if source == aTabMap.RefreshList then
6866
guiGridListClear(aTabMap.MapList)
6967
triggerServerEvent("getMaps_s", getLocalPlayer(), true)
7068
end

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ function aClientReportClick ( button )
157157
triggerServerEvent ( "aMessage", getLocalPlayer(), "new", tableOut )
158158
aReportClose ()
159159
end
160-
elseif ( source == aReportSubject ) then
160+
--elseif ( source == aReportSubject ) then
161161

162-
elseif ( source == aReportMessage ) then
162+
--elseif ( source == aReportMessage ) then
163163

164164
elseif ( source == aReportCancel ) then
165165
aReportClose ()

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function aClientTeamClick ( button )
100100
aNewTeamShow ( false )
101101
end
102102
setTimer ( aTeamsRefresh, 2000, 1 )
103-
elseif ( source == aTeamName ) then
103+
--elseif ( source == aTeamName ) then
104104

105105
elseif ( source == aTeamCancel ) then
106106
aNewTeamShow ( false )

[admin]/admin/server/admin_server.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ addEventHandler ( "aAdmin", _root, function ( action, ... )
619619
outputChatBox ( "Error - Invalid password.", source, 255, 0, 0 )
620620
end
621621
end
622-
elseif ( action == "autologin" ) then
622+
--elseif ( action == "autologin" ) then
623623

624624
elseif ( action == "settings" ) then
625625
local cmd = arg[1]

[admin]/admin2/client/main/admin_network.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ function aNetworkTab.Create(tab)
1717
end
1818

1919
function aNetworkTab.onClientClick(button)
20-
if (button == "left") then
21-
end
20+
--if (button == "left") then
21+
--end
2222
end

[admin]/admin2/server/admin_ACL.lua

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,6 @@ local aACLFunctions = {
197197
[ACL_RESOURCES] = function()
198198
end,
199199
[ACL_ACL] = function(action, group)
200-
if (action == ACL_ADD) then
201-
elseif (action == ACL_REMOVE) then
202-
end
203200
local data = {}
204201
for id, acl in ipairs(aclGroupListACL(aclGetGroup(group))) do
205202
local storage = {}
@@ -243,7 +240,6 @@ function moo()
243240
outputChatBox("Error - Invalid password.", source, 255, 0, 0)
244241
end
245242
end
246-
elseif (action == "autologin") then
247243
elseif (action == "sync") then
248244
local type = arg[1]
249245
local tableOut = {}

[admin]/admin2/server/admin_network.lua

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,5 @@ addEventHandler(
218218
"onPlayerChat",
219219
getRootElement(),
220220
function(message, type)
221-
if (type == 0) then
222-
elseif (type == 1) then
223-
end
224221
end
225222
)

[admin]/admin2/server/admin_screenshot.lua

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ addEventHandler(
3636
EVENT_SCREEN_SHOT,
3737
root,
3838
function(action, id, ...)
39-
if (action == SCREENSHOT_SAVE) then
40-
elseif (action == SCREENSHOT_DELETE) then
41-
end
4239
end
4340
)
4441

[editor]/move_freecam/move_freecam.lua

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ end
5252
local function getCoordsWithBoundingBox(origX, origY, origZ)
5353
if (not collisionless) then
5454
local newX, newY, newZ = origX, origY, origZ
55-
if (not ignoreElementWalls) then
56-
-- hard stuff
57-
else
55+
if (ignoreElementWalls) then
5856
local surfaceFound, surfaceX, surfaceY, surfaceZ, element = processLineOfSight(origX, origY, origZ + SURFACE_ERROR_CORRECTION_OFFSET, origX, origY, origZ + minZ, true, true, true, true, true, true, false, true, selectedElement)
5957
if (surfaceFound) then
6058
newZ = surfaceZ + centerToBaseDistance

0 commit comments

Comments
 (0)