Commit Graph
33 Commits
Author SHA1 Message Date
bbassieandClaude Opus 5 0bb92966eb Fix type annotations the linter found to be wrong
Async ids come from `get_function_name`, which returns a string, but
were documented as numbers.

`setmetatable` in clusterio's compat module loses `LibCompat` on the
module return, so the require is cast.

`GuiData.__index` accepts a `DataKey` but emmylua needs that as an
index signature on the class.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-07 15:31:18 +00:00
bbassieandClaude Opus 5 c233a9ab06 Defer need-check-nil and clean up stale suppressions
emmylua deserialises an unknown diagnostic code to a catch all that
matches no checker, so every `invisible`, `nil-check` and
`global-element` suppression was silently doing nothing. Renamed to the
emmylua codes. `name-style-check` has no equivalent and is dropped, it
was already disabled under luals.

The `get_tile` suppressions referenced an api typedef bug from 2024
which no longer reproduces.

need-check-nil is deferred rather than disabled on merit: a third of the
407 findings come from MapPosition and BoundingBox being aliased as
`struct|[double, double]`, so every `entity.position.x` reads as
possibly nil. The rest need per site knowledge of runtime invariants.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-07 15:31:18 +00:00
bbassieandClaude Opus 5 90f32699c7 Fix duplicate class and annotation placement lint errors
Classes contributed to by more than one file now carry the `partial`
attribute. trains.lua declared its command as `ExpCommand_Artillery`,
which was a copy paste.

`Color.0` and `MapPosition.0` became `.struct` in fmtk 2.1.6.

emmylua rejects `@type` on a function statement or a `do` block, so
those are moved onto the local or replaced by `@param` and `@return`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-07 15:31:18 +00:00
Cooldude2606 cfa9cc980a Fix lint warning 2026-05-19 22:21:01 +01:00
Cooldude2606andGitHub 7ab721b4b6 Refactor some of the Guis from the legacy plugin (#399)
* Fix bugs in core and add default args to Gui defs

* Refactor production Gui

* Refactor landfill blueprint button

* Fix more bugs in core

* Consistent naming of new guis

* Refactor module inserter gui

* Refactor surveillance gui

* Add shorthand for data from arguments

* Make element names consistent

* Add types

* Change how table rows work

* Refactor player stats gui

* Refactor quick actions gui

* Refactor research milestones gui

* Refactor player bonus gui

* Refactor science production gui

* Refactor autofill gui

* Cleanup use of aligned flow

* Rename "Gui.element" to "Gui.define"

* Rename Gui types

* Rename property_from_arg

* Add guide for making guis

* Add full reference document

* Add condensed reference

* Apply style guide to refactored guis

* Bug fixes
2025-08-29 14:30:30 +01:00
Cooldude2606andGitHub ce80ae9021 Refactored UPS monitor as clusterio plugin (#398)
* Refactor server ups

* Use catalogs

* Move to own plugin

* Use web config

* Remove External.get_server_ups

* Update workspace version requirement

* Remove need for storage

* Add locale

* Fix CI
2025-08-08 16:36:22 +01:00
Cooldude2606 1d95d899ea Fix lint issue 2025-08-04 21:26:56 +01:00
Cooldude2606andGitHub aedc3cff6b Fix lint errors on new luals version (#384) 2025-04-06 17:05:40 +01:00
phidiasandGitHub 5862ad200b GUI Core Locale ZH (#383)
* Create zh-CN.cfg

* Create zh-TW.cfg
2025-03-07 15:40:57 +00:00
Cooldude2606 64e31adbc9 Fix toolbar buttons not showing on role assign 2025-03-07 14:38:31 +00:00
phidiasandGitHub 55b1756a42 Fix missing storage reference (#373) 2025-02-03 21:20:08 +00:00
Cooldude2606 d5fd466246 Allow toolbar to be deleted from lib 2025-01-30 00:24:59 +00:00
Cooldude2606 6850cfa968 Add player as an event argument 2025-01-30 00:08:46 +00:00
Cooldude2606 824c5fe772 Add toolbar saving and better consistency 2025-01-30 00:08:45 +00:00
Cooldude2606 e34a320d97 Convert toolbar minus datastore 2025-01-30 00:08:44 +00:00
Cooldude2606 a2b4fd119b Convert player list, data, module, and vlayer 2025-01-30 00:08:38 +00:00
Cooldude2606 242545b007 Convert tasks, production, tools, and landfill 2025-01-30 00:07:09 +00:00
Cooldude2606 cc274595c7 Convert rocket info and autofill 2025-01-30 00:07:08 +00:00
Cooldude2606 6f9a062190 Convert readme and science info 2025-01-30 00:07:07 +00:00
Cooldude2606 bd6781b3a0 Start converting GUI modules 2025-01-30 00:07:07 +00:00
Cooldude2606 88a47e3edc Add core elements 2025-01-30 00:07:06 +00:00
Cooldude2606 ee6359582c Make GuiData more lean 2025-01-30 00:07:06 +00:00
Cooldude2606 0b665bbd46 Add control stage asserts 2025-01-30 00:07:06 +00:00
Cooldude2606 e67959a239 Remove anchor 2025-01-30 00:07:05 +00:00
Cooldude2606 f534355861 Add property_from_args and global_data 2025-01-30 00:07:05 +00:00
Cooldude2606 d52ab6d2dc Add module exports 2025-01-30 00:07:05 +00:00
Cooldude2606 2fc922218d Add events for data clean up 2025-01-30 00:07:05 +00:00
Cooldude2606 8572e156a2 Add generic event handlers and anchor 2025-01-30 00:07:05 +00:00
Cooldude2606 ce560ca157 Minor adjustments to ExpElement 2025-01-30 00:07:04 +00:00
Cooldude2606 d752b01076 Add ExpElement 2025-01-30 00:07:04 +00:00
Cooldude2606 49e08af7ed Add ExpGui_GuiIter 2025-01-30 00:07:04 +00:00
Cooldude2606 3b9d895682 Add ExpGui_GuiData 2025-01-30 00:07:04 +00:00
Cooldude2606 a924a211ae Add exp_gui 2025-01-30 00:06:59 +00:00