Skip to content

Commit 3063712

Browse files
committed
Update gamemodestopper.lua
1 parent bfad624 commit 3063712

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

[editor]/editor_main/gamemodestopper.lua

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ function isMap(res)
1111
end
1212

1313
function onResourceStart(startedResource)
14-
local stopPermission = hasObjectPermissionTo(startedResource, "function.stopResource")
15-
16-
if not stopPermission then
14+
if not hasObjectPermissionTo(startedResource, "function.stopResource") then
1715
outputDebugString("Editor: Unable to stop running gamemodes (no access to function.stopResource)")
1816

1917
return false
@@ -23,9 +21,8 @@ function onResourceStart(startedResource)
2321

2422
for resourceID = 1, #resourcesTable do
2523
local resourceElement = resourcesTable[resourceID]
26-
local resourceRunning = isResourceRunning(resourceElement)
2724

28-
if resourceRunning then
25+
if isResourceRunning(resourceElement) then
2926
local gamemodeOrMap = isGamemode(resourceElement) or isMap(resourceElement)
3027

3128
if gamemodeOrMap then

0 commit comments

Comments
 (0)