From ecf236d831112f0b985b6ac1130e5a14a236f18c Mon Sep 17 00:00:00 2001 From: bbassie <17990055+bbassie@users.noreply.github.com> Date: Thu, 6 Aug 2026 21:30:00 +0000 Subject: [PATCH] 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) --- exp_legacy/module/expcore/datastore.lua | 14 +++++++++++++- exp_legacy/module/modules/control/vlayer.lua | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/exp_legacy/module/expcore/datastore.lua b/exp_legacy/module/expcore/datastore.lua index 9d498787..07fe28d5 100644 --- a/exp_legacy/module/expcore/datastore.lua +++ b/exp_legacy/module/expcore/datastore.lua @@ -149,7 +149,19 @@ PlayerData.Statistics:combine('JoinCount') local Storage = require("modules/exp_util/storage") local DatastoreManager = {} -local Datastores = {} +local Datastores = {} --- @type table +--- @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 +--- @field metadata table +--- @field events table +--- @field data table local Datastore = {} local Data = {} local copy = table.deep_copy diff --git a/exp_legacy/module/modules/control/vlayer.lua b/exp_legacy/module/modules/control/vlayer.lua index 37718244..d70b15f8 100644 --- a/exp_legacy/module/modules/control/vlayer.lua +++ b/exp_legacy/module/modules/control/vlayer.lua @@ -582,7 +582,7 @@ local function handle_circuit_interfaces() if not interface.valid then vlayer_data.entity_interfaces.circuit[index] = nil 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 control.add_section() end