mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-08-13 00:45:11 +09:00
Describe the Datastore type
The registry and the prototype were both bare tables, so every `datastore:method()` call resolved to nothing. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -149,7 +149,19 @@ PlayerData.Statistics:combine('JoinCount')
|
|||||||
local Storage = require("modules/exp_util/storage")
|
local Storage = require("modules/exp_util/storage")
|
||||||
|
|
||||||
local DatastoreManager = {}
|
local DatastoreManager = {}
|
||||||
local Datastores = {}
|
local Datastores = {} --- @type table<string, Datastore>
|
||||||
|
--- @class Datastore
|
||||||
|
--- @field name string
|
||||||
|
--- @field value_name string
|
||||||
|
--- @field auto_save boolean
|
||||||
|
--- @field save_to_disk boolean
|
||||||
|
--- @field propagate_changes boolean
|
||||||
|
--- @field serializer function | false
|
||||||
|
--- @field parent Datastore | false
|
||||||
|
--- @field children table<string, Datastore>
|
||||||
|
--- @field metadata table
|
||||||
|
--- @field events table<string, function[]>
|
||||||
|
--- @field data table
|
||||||
local Datastore = {}
|
local Datastore = {}
|
||||||
local Data = {}
|
local Data = {}
|
||||||
local copy = table.deep_copy
|
local copy = table.deep_copy
|
||||||
|
|||||||
@@ -582,7 +582,7 @@ local function handle_circuit_interfaces()
|
|||||||
if not interface.valid then
|
if not interface.valid then
|
||||||
vlayer_data.entity_interfaces.circuit[index] = nil
|
vlayer_data.entity_interfaces.circuit[index] = nil
|
||||||
else
|
else
|
||||||
local control = interface.get_or_create_control_behavior()
|
local control = interface.get_or_create_control_behavior() --[[@as LuaConstantCombinatorControlBehavior]]
|
||||||
if control.sections_count == 0 then
|
if control.sections_count == 0 then
|
||||||
control.add_section()
|
control.add_section()
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user