mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 04:21:41 +09:00
Updated warps
This commit is contained in:
@@ -98,11 +98,7 @@ function Constructor.store(sync,callback)
|
||||
|
||||
if not sync then
|
||||
categorize = location
|
||||
location = Store.uid_location()
|
||||
end
|
||||
|
||||
if Store.is_registered(location) then
|
||||
return error('Location for store is already registered: '..location,2)
|
||||
location = Store.register()
|
||||
end
|
||||
|
||||
self.store = location
|
||||
@@ -110,7 +106,7 @@ function Constructor.store(sync,callback)
|
||||
|
||||
Instances.register(self.name,self.categorize)
|
||||
|
||||
Store.register(self.store,sync,function(value,category)
|
||||
Store.watch(self.store,function(value,category)
|
||||
self:raise_event('on_store_update',value,category)
|
||||
|
||||
if Instances.is_registered(self.name) then
|
||||
|
||||
@@ -650,8 +650,8 @@ end)
|
||||
Event.add(defines.events.on_tick,function()
|
||||
progressbar_one:increment()
|
||||
progressbar_three:decrement()
|
||||
local categories = Store.get_children(progressbar_two.store)
|
||||
for _,category in pairs(categories) do
|
||||
local categories = Store.get(progressbar_two.store) or {}
|
||||
for category,_ in pairs(categories) do
|
||||
progressbar_two:increment(1,category)
|
||||
end
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user