Skip to content

Develop#1

Merged
Insality merged 26 commits intomainfrom
develop
Dec 20, 2025
Merged

Develop#1
Insality merged 26 commits intomainfrom
develop

Conversation

@Insality
Copy link
Copy Markdown
Owner

@Insality Insality commented Jul 6, 2025

No description provided.

Copilot AI review requested due to automatic review settings October 15, 2025 17:42
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Refactors the token system into a modular, container-based API with pluggable restore/infinity features, a configurable logger, and explicit state/config management. Tests and docs are updated to reflect the new API and data model.

  • Introduces token.container, token.value, token.config, token.state, token.restore, token.infinity, token.time, and token.logger modules; removes legacy token_internal and smart_value.
  • Reworks the public API around container instances, per-container events, and a periodic restore update loop; updates tests and example usage.
  • Updates configuration schema (token_configs/token_groups) and documentation; adds debug page scaffolding and resource loading from test resources.

Reviewed Changes

Copilot reviewed 36 out of 37 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
token/token_internal.lua Removes legacy monolithic config/logger helpers (replaced by modular components).
token/token/value.lua Adds token value wrapper with min/max clamping, total sum, and visual credit handling.
token/token/time.lua Adds time abstraction (socket.gettime) for restore/infinity timing.
token/token/state.lua Adds serializable state container registry (containers/tokens/restore/infinity).
token/token/restore.lua Adds timed restore plugin (enable/disable/reset, time-to-restore, batch update).
token/token/logger.lua Adds swappable logger with default and empty implementations.
token/token/infinity.lua Adds “infinity” spend window support and remaining time helpers.
token/token/debug_page.lua Adds debug panel rendering helpers (Druid-based).
token/token/container.lua Implements container class: per-token ops, group ops, events, and plugin integration.
token/token/config.lua Adds config store/lookup API; supports token_configs/token_groups/lots.
token/token.lua Rewrites public module: container lifecycle, config/log/state wiring, timer update loop.
token/smart_value.lua Removes legacy smart_value implementation (replaced by token.value).
test/test_tokens.lua Removes old tests (replaced by granular tests for new API).
test/test_token_visual.lua Adds tests for visual credit API.
test/test_token_state.lua Adds tests for save/load state roundtrip.
test/test_token_restore.lua Adds tests for restore timer behavior and reconfiguration.
test/test_token_logger.lua Updates/extends logger behavior tests.
test/test_token_infinity.lua Adds tests for infinity spend window.
test/test_token_groups.lua Adds tests for group/lot behavior using new config schema.
test/test_token_events.lua Adds tests for on_token_change propagation.
test/test_token_config.lua Updates tests for registering tokens/groups/lots and config groups.
test/test_token.lua Updates core API tests to container-based API.
test/test_load_json.lua Updates JSON loading test to new schema and custom test resource path.
test/test.script Switches runner to script-based tests (no GUI).
test/test.gui Removes GUI runner.
test/test.collection Switches collection to script component runner.
test/resources/token_config.json Adds test JSON config with new schema.
resources/token_config.json Migrates default JSON config to new schema keys.
event Adds symlink to external defold-event module (used by event.event).
druid Adds symlink to external Druid (used by debug UI helpers).
api/token_api.md Updates token module API docs to new surface area.
api/container_api.md Adds container API docs.
.vscode/settings.json Updates Lua diagnostics/library settings.
example/example.gui_script Updates example to new container-based API and initialization.
game.project Adds test resources; removes defold-event dependency; adjusts libraries.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread token/internal/logger.lua Outdated
Comment thread token/token.lua
Comment thread token/token/config.lua Outdated
Comment thread api/token_api.md Outdated
Comment thread token/token.lua Outdated
Comment thread token/internal/token_state.lua
Comment thread token/internal/container.lua Outdated
Comment thread event Outdated
Comment thread druid Outdated
Comment thread api/token_api.md Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 59 out of 60 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread widget/properties_panel/properties_panel.gui Outdated
Comment thread token/token.lua Outdated
Comment thread example/example.gui_script Outdated
Comment thread widget/properties_panel/properties_panel.lua
@Insality Insality merged commit 2258c23 into main Dec 20, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants