Skip to content

Comments

feat(lua,UI): display power gen/usage in voltmeter, add more bindings#7724

Merged
scarf005 merged 6 commits intocataclysmbn:mainfrom
scarf005:feat/voltmeter-power-display
Dec 31, 2025
Merged

feat(lua,UI): display power gen/usage in voltmeter, add more bindings#7724
scarf005 merged 6 commits intocataclysmbn:mainfrom
scarf005:feat/voltmeter-power-display

Conversation

@scarf005
Copy link
Member

@scarf005 scarf005 commented Dec 28, 2025

Purpose of change (The Why)

resolves #7723 (#7707)

Describe the solution (The How)

  • make bn (data/json) work as a lua mod
  • add VOLTMETER lua-based item action
  • lua-ify voltmeter, directly show grid status
  • add more bindings (inventory distribution_grid, overmapbuffer, requirement_data)

Testing

image image
2025-12-29_03-37-05.mp4
  • fix bug where connection is only displaced as center

Additional context

Note

needs to be rebase merged

global warming from token usage letsgoooooo

Checklist

Mandatory

Optional

  • This PR adds/removes a mod.
    • I have added mods scope to the PR title.
    • The mod_name in data/mods/<mod_name> matches id in modinfo.json.
    • I have committed the output of deno task semantic.
  • This PR modifies lua scripts or the lua API.
    • I have added lua scope to the PR title.
    • I have added type annotations to functions so that it's safe and easy to maintain.
    • I have committed the output of deno task docs:gen so the Lua API documentation is updated.

@github-actions github-actions bot added docs PRs releated to docs page src changes related to source code. JSON related to game datas in JSON format. tests changes related to tests mods PR changes related to mods. lua PRs and issues related to Lua scripting labels Dec 28, 2025
@scarf005 scarf005 force-pushed the feat/voltmeter-power-display branch 5 times, most recently from a7bacc4 to baffcca Compare December 28, 2025 18:38
@scarf005 scarf005 marked this pull request as ready for review December 28, 2025 18:39
@cataclysmbn cataclysmbn deleted a comment from autofix-ci bot Dec 28, 2025
@scarf005 scarf005 marked this pull request as draft December 28, 2025 18:40
@scarf005 scarf005 force-pushed the feat/voltmeter-power-display branch from fbb06a0 to e3bb117 Compare December 29, 2025 16:36
@scarf005 scarf005 changed the title feat(mods,lua,UI): display power gen/usage in voltmeter feat(lua,UI): display power gen/usage in voltmeter Dec 29, 2025
@scarf005 scarf005 marked this pull request as ready for review December 29, 2025 16:38
@scarf005 scarf005 force-pushed the feat/voltmeter-power-display branch 3 times, most recently from 2d85779 to 3ac4040 Compare December 29, 2025 16:45
@scarf005 scarf005 force-pushed the feat/voltmeter-power-display branch 2 times, most recently from f20755b to b64be22 Compare December 29, 2025 16:46
@scarf005 scarf005 changed the title feat(lua,UI): display power gen/usage in voltmeter feat(lua,UI): display power gen/usage in voltmeter, add more bindings Dec 29, 2025
@scarf005 scarf005 force-pushed the feat/voltmeter-power-display branch from f1d0423 to c0fd346 Compare December 29, 2025 23:11
@cataclysmbn cataclysmbn deleted a comment from autofix-ci bot Dec 29, 2025
for some interesting reason they didn't make it pipable
@scarf005 scarf005 force-pushed the feat/voltmeter-power-display branch from 1f1c7f5 to 9c4a7b0 Compare December 30, 2025 12:43
@scarf005 scarf005 force-pushed the feat/voltmeter-power-display branch from 9c4a7b0 to 6550037 Compare December 30, 2025 13:46
@scarf005 scarf005 force-pushed the feat/voltmeter-power-display branch from 6550037 to 4fd659e Compare December 31, 2025 07:33
@scarf005 scarf005 merged commit cbf2976 into cataclysmbn:main Dec 31, 2025
14 checks passed
@scarf005 scarf005 deleted the feat/voltmeter-power-display branch December 31, 2025 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs PRs releated to docs page JSON related to game datas in JSON format. lua PRs and issues related to Lua scripting mods PR changes related to mods. src changes related to source code. tests changes related to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How can I check the power output of my power grid?

2 participants