mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 12:31:41 +09:00
Covnerted Event and Global
This commit is contained in:
@@ -17,7 +17,7 @@ local ThisModule = {
|
||||
}
|
||||
|
||||
-- Global Define
|
||||
local global = global{
|
||||
local global = {
|
||||
update=0,
|
||||
first=0,
|
||||
_last=0,
|
||||
@@ -25,6 +25,7 @@ local global = global{
|
||||
fastest=0,
|
||||
milestones={m1=0,m2=0,m5=0,m10=0,m20=0,m50=0,m100=0,m200=0,m500=0,m1000=0,m2000=0,m5000=0}
|
||||
}
|
||||
Global.register(global,function(tbl) global = tbl end)
|
||||
|
||||
-- Function Define
|
||||
ThisModule.Gui = Gui.left{
|
||||
@@ -97,7 +98,7 @@ ThisModule.Gui = Gui.left{
|
||||
}
|
||||
|
||||
-- Event Define
|
||||
script.on_event(defines.events.on_rocket_launched,function(event) Gui.left.update('rockets') end)
|
||||
Event.add(defines.events.on_rocket_launched,function(event) Gui.left.update('rockets') end)
|
||||
|
||||
-- Module Return
|
||||
-- when called will toggle the gui for that player, updates gui if no player given
|
||||
|
||||
@@ -28,7 +28,7 @@ local ThisModule = {
|
||||
}
|
||||
|
||||
-- Global Define
|
||||
local global = global{
|
||||
local global = {
|
||||
_base={
|
||||
update=0,
|
||||
_update=0,
|
||||
@@ -36,6 +36,7 @@ local global = global{
|
||||
_made={0,0,0,0,0,0,0}
|
||||
}
|
||||
}
|
||||
Global.register(global,function(tbl) global = tbl end)
|
||||
|
||||
-- Function Define
|
||||
ThisModule.Gui = Gui.left{
|
||||
@@ -98,7 +99,7 @@ ThisModule.Gui = Gui.left{
|
||||
}
|
||||
|
||||
-- Event Define
|
||||
script.on_event(defines.events.on_research_finished,function(event) Gui.left.update('science') end)
|
||||
Event.add(defines.events.on_research_finished,function(event) Gui.left.update('science') end)
|
||||
|
||||
-- Module Return
|
||||
-- when called will toggle the gui for that player, if no player it will update the gui
|
||||
|
||||
@@ -14,7 +14,7 @@ local module_verbose = false
|
||||
local ThisModule = {}
|
||||
|
||||
-- Global Define
|
||||
local global = global{
|
||||
local global = {
|
||||
tasks={},
|
||||
_edit={},
|
||||
_base={
|
||||
@@ -23,6 +23,7 @@ local global = global{
|
||||
_editing={}
|
||||
}
|
||||
}
|
||||
Global.register(global,function(tbl) global = tbl end)
|
||||
|
||||
-- Function Define
|
||||
local edit = Gui.inputs{
|
||||
|
||||
Reference in New Issue
Block a user