Skip to content

Commit

Permalink
Update to 0.9.14
Browse files Browse the repository at this point in the history
  • Loading branch information
ZwerOxotnik committed Sep 28, 2021
1 parent bc54187 commit 3d12b85
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---------------------------------------------------------------------------------------------------
Version: 0.9.14
Date: 28. 09. 2021
Changes:
- Refactored on_gui_click event sligthly
---------------------------------------------------------------------------------------------------
Version: 0.9.13
Date: 28. 09. 2021
Changes:
Expand Down
2 changes: 1 addition & 1 deletion info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lua-compiler",
"version": "0.9.13",
"version": "0.9.14",
"factorio_version": "1.1",
"title": "Lua Compiler",
"author": "ZwerOxotnik",
Expand Down
4 changes: 2 additions & 2 deletions models/lua-compiler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ local players_copyboard


--#region Constants
local find = string.find
local sub = string.sub
local RED_COLOR = {1, 0, 0}
local DEFAULT_TEXT = "local compiler, player = ...\nplayer.print(compiler.name)"
--#endregion
Expand Down Expand Up @@ -359,7 +359,7 @@ local GUIS = {
}
local function on_gui_click(event)
local element = event.element
if not find(element.name, "^zLua_") then return end
if sub(element.name, 1, 5) ~= "zLua_" then return end

local f = GUIS[element.name]
if f then f(element, game.get_player(event.player_index)) end
Expand Down

0 comments on commit 3d12b85

Please sign in to comment.