Added watch to allow optimistion

This commit is contained in:
Cooldude2606 committed 2019-05-05 20:50:21 +01:00
1 parent 6b14fe9649
commit 34fcb94200
5 files changed
+96 -14

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
local Store = require 'expcore.store'
Store.register('force.mining_speed','force',function(force)
return force.manual_mining_speed_modifier
end,function(force,value)
force.manual_mining_speed_modifier = value
game.print(force.name..' how has '..value..' mining speed')
end)
Store.watch('force.mining_speed','player')