Commit Graph
2973 Commits
Author SHA1 Message Date
phidiasandGitHub 6eee2be630 Merge branch 'explosivegaming:main' into aperx 2026-08-07 16:53:56 +09:00
70471c5085 Pin factoriomod-debug to 2.1.3 in the lint workflow (#449)
FMTK 2.1.4 onwards reshapes its generated typedefs for EmmyLua, which
LuaLS misreads: 2.1.4 changed dicts to table<K,V> (game.surfaces.nauvis
now reports undefined-field) and 2.1.5 changed LocalisedString to the
variadic tuple [string, LocalisedString...], which LuaLS 3.18.2 cannot
match against a plain string. Together those account for all 279
findings CI has reported since 2026-07-13; with 2.1.3 the check is
clean.

Upstream FMTK has announced it is dropping sumneko/LuaLS support in
favour of EmmyLua, so this pin is a stopgap until the check is ported
to emmylua_check.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-06 21:32:43 +01:00
Cooldude2606andGitHub a324388bc8 Merge pull request #448 from bbassie/feature/roles-plugin
Add exp_roles plugin and scenario permissions
2026-08-06 15:45:04 +01:00
Cooldude2606 486151723e Fix game properties UI on small screens 2026-08-06 09:55:45 +01:00
bbassieandClaude Opus 5 1943d8743d Left align the role property labels
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-06 07:19:36 +00:00
bbassieandClaude Opus 5 dcba1eef1c Address review on the roles plugin
- Use the core role permissions rather than defining new ones. Assignments are
  only sent between the controller and an instance, so they are no longer
  addressed to control and need no permission at all.
- Split the datastore reconciliation into ensureRoleMeta, sweepRoleMeta and
  applyAutoAssign, all run on init as well as when roles change. Properties left
  behind by a role deleted while the plugin was not running are now swept up,
  where before they would be inherited by the next role given that id.
- Use a switch in onControllerConfigFieldChanged, matching instance.ts.
- Resolve pending assignments on initialise. A pending role is either confirmed,
  and so now held by synced_players, or it never landed; either way it stops
  being held locally. Roles assigned with assign_player_local are untouched.
- Drop the emit_updates juggling in reject_assignment, sync is already false.
- Send each permission name once and reference it by index, see the benchmark in
  the pull request. Single role updates stay in the plain form.
- Lay the role properties out in columns, name the apply button for the section
  it belongs to, and give every field a tooltip.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-05 08:04:36 +00:00
phidiasandGitHub 4255522c57 Research Log (#447)
* Update research.lua

* Fix config file references in research milestones
2026-08-04 14:35:26 +01:00
bbassieandClaude Opus 5 fcfa174794 Fix LuaLS findings in the roles module
Checked with the same LuaLS version and factorio library CI uses. The module now
reports no findings; the 279 which remain are all pre-existing and main is
already failing on them.

Most were annotations rather than behaviour. Two are worth noting:

- The role prototype is now its own class which the role inherits, since
  defining methods on a table annotated as the role counted as injecting fields
  into it.
- The role change message is built from a literal locale key per branch. Building
  the key by concatenation gives a plain string where a localised string is
  wanted, which is the same finding the legacy module reports.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-31 09:39:04 +00:00
bbassieandClaude Opus 5 bbd3b7c1f2 Add exp_roles plugin to sync roles from the controller
Clusterio already stores roles, the permissions they grant, and which user holds
which role, along with a web UI for all three. What it does not have is the
properties a role only needs in game, or a way for an instance to learn about
any of it, since role and user updates are only sent to control connections.

This plugin fills both gaps. The controller keeps a record per role holding the
order, priority, short hand, tag, colour and auto assign threshold, created
automatically for any role which does not have one. It then rebroadcasts roles
and assignments on its own events so instances can follow them.

The lua module presents the same interface the legacy expcore.roles module did,
so the call sites can be moved over without being rewritten. Permission checks
translate the legacy action strings using the same mapping exp_scenario defines.

Two things replace features the legacy system had:

- Priority replaces disallow. Only the roles with the highest priority a player
  holds are considered, so Jail can suppress every other role including the
  default one, without needing to take roles away first.
- Assignments made in game are applied locally and then sent to the controller,
  which keeps assign_player synchronous for callers. A role which should never
  leave this map, such as one earned from time on the map, is assigned with
  assign_player_local instead.

Roles earned from online time across the cluster are granted by the controller
from the threshold on the role, using the online time clusterio already tracks.

Nothing requires this plugin yet; moving the call sites off expcore.roles and
removing the legacy config is left for a follow up.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-31 09:28:40 +00:00
bbassieandClaude Opus 5 e852abc309 Define scenario permissions for legacy role actions
The role system is moving onto clusterio's own roles and permissions, which
requires every in game action to exist as a real permission rather than a bare
string held only by the lua config.

Adds a permission for each of the 104 actions and 7 flags used by the legacy
role config. Names are derived from the legacy action by a deterministic
transform, exported so the lua side can apply the same mapping and keep existing
call sites working. Command descriptions are taken from the existing locale
entries so they match what players already see.

Actions held by the Guest role are marked grantByDefault, since the in game
default role and clusterio's default role are the same concept.

Role management actions have no scenario permission; they map onto
core.user.update_roles and core.role.list instead.

Also corrects the /unjail description, which was a copy of /jail.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-31 09:11:26 +00:00
phidias 0cf4a83d0e . 2026-07-23 02:03:27 +09:00
phidias d36d698089 . 2026-07-22 22:46:31 +09:00
phidias fce815bc11 . 2026-07-22 22:01:35 +09:00
phidias b23d57e88f . 2026-07-22 20:14:31 +09:00
phidias f72c7a7deb . 2026-07-21 13:43:53 +09:00
phidias 2cad1386db . 2026-07-21 13:15:42 +09:00
phidias ba5f39a471 . 2026-07-21 13:07:32 +09:00
phidias dddadf2b08 . 2026-07-21 03:28:20 +09:00
phidias 4c4404c0f7 . 2026-07-21 03:27:24 +09:00
phidias ed6d2526a9 . 2026-07-19 13:31:29 +09:00
phidias 3e27d9ed24 Merge branch 'aperx' of https://github.com/PHIDIAS0303/ExpCluster into aperx 2026-07-19 13:22:02 +09:00
phidias ca656d5bd1 .. 2026-07-19 13:21:57 +09:00
phidiasandGitHub da85e3dbdb Merge branch 'explosivegaming:main' into aperx 2026-07-14 16:55:45 +09:00
Cooldude2606 a07be7b7ed Bump version in package jsons 2026-07-14 00:50:00 +01:00
phidiasandGitHub a1716a9aea Merge branch 'explosivegaming:main' into aperx 2026-06-29 17:08:43 +09:00
Cooldude2606 50daa81a4a Fix require for /debug 2026-06-29 01:14:39 +01:00
phidiasandGitHub c4f9c97130 remove limit (#446)
* Update surface.lua

* .

* .
2026-06-28 21:53:43 +01:00
phidiasandGitHub 889f1cefec Merge branch 'explosivegaming:main' into aperx 2026-06-27 23:32:37 +09:00
Cooldude2606andGitHub 4fe0e9c0a6 Add AABB.size (#445) 2026-06-27 14:02:49 +01:00
phidiasandGitHub 195b280e1c Merge branch 'explosivegaming:main' into aperx 2026-06-27 00:04:37 +09:00
Cooldude2606andGitHub 27b1a34a83 Merge pull request #443 from Cooldude2606/fix/lint
Fixes many lint issues and other bugs
2026-06-26 15:58:47 +01:00
phidiasandGitHub 1f3689a0ac entity api change (#442)
* Update warps.lua

* .

* .
2026-06-26 15:45:46 +01:00
Cooldude2606 7890540a3e Final lint fixes 2026-06-26 15:40:53 +01:00
Cooldude2606 8b3c437847 Move debug GUI out of legacy 2026-06-26 15:22:06 +01:00
Cooldude2606 95bb8ac304 Move logo out of legacy 2026-06-26 15:09:11 +01:00
Cooldude2606 7be2f8d490 Fix lint errors 2026-06-26 15:02:08 +01:00
Cooldude2606 9019be307c Update to new version of SubscriptionRequest 2026-06-26 14:51:43 +01:00
Cooldude2606 3b6163451c Fix missed use of bonus.initial_value 2026-06-26 14:34:12 +01:00
Cooldude2606 147c586c4b Remove invalid item from file loader 2026-06-26 14:30:35 +01:00
Cooldude2606 f4766cd20e Fix redirect after group creation 2026-06-26 14:21:28 +01:00
Cooldude2606 9755ec8e3a Use /sc rather than /c 2026-06-26 14:20:32 +01:00
Cooldude2606 6b99378fa2 Fix use of MapSubscriber 2026-06-26 14:20:10 +01:00
Cooldude2606 aa75a43aa9 Ignore web dirs for lint 2026-06-26 14:19:15 +01:00
phidiasandGitHub 4fab391d38 Merge pull request #26 from PHIDIAS0303/main
Main
2026-06-26 22:06:12 +09:00
phidiasandGitHub 595f78f6bd Merge branch 'aperx' into main 2026-06-26 22:05:34 +09:00
71ab3e7be4 clear blueprint changed to selection (#435)
* Update surface.lua

* Update en.cfg

* Update surface.lua

* Update en.cfg

* Fix description keys for ground items and blueprints

* Update roles.lua

* Update surface.lua

* Update quick_actions.lua

* Update en.cfg

* Update en.cfg

* Update surface.lua

* Update zh-CN.cfg

* Update zh-TW.cfg

* .

* .

* .

* Many fixes and reverts

---------

Co-authored-by: Cooldude2606 <25043174+Cooldude2606@users.noreply.github.com>
2026-06-26 13:15:49 +01:00
phidiasandGitHub cb89c08c9f Update vlayer.lua (#440) 2026-06-26 12:43:00 +01:00
3a46ec4fa4 Migrate player list gui to scenario (#421)
* Migrate player list gui to scenario

Move modules/gui/player-list into exp_scenario/gui/player_list using the
new exp_gui element API, matching the other scenario guis.

- Store the selected player and action on the container's player data
  instead of a datastore, folding the datastore on_update reactivity
  into explicit setter functions
- Switch the actions config to injected accessor functions and the
  exp-gui_player-list locale namespace
- Add the locale section, register in control.lua, and disable the
  legacy module in the file loader

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Align names and call patterns to best practice

Apply the conventions from the rocket info gui review to the player list,
and remove the now migrated legacy module.

- Move row building onto the table def as calculate_row_data, and refresh
  via refresh_player which computes the row data once per player
- Store the selection on the container with private/public accessor
  methods instead of poking element data directly
- Store the selected player as a LuaPlayer rather than a string and update
  the actions config to match
- Use :style{} on the player table and make the action and reason bars
  their own element definitions
- Delete the migrated legacy gui and its file loader entry

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Address player list review feedback

- Rename the player table element data class to element_data
- Remove the redundant offline selection clear; on_player_left_game
  already clears any selection pointing at a player who disconnects
- Move the action bar and reason bar visibility into their own refresh
  methods so refresh_player just delegates to them

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Style and locale fixes

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Cooldude2606 <25043174+Cooldude2606@users.noreply.github.com>
2026-06-26 12:42:33 +01:00
Cooldude2606 31c18c7851 Style and locale fixes 2026-06-26 12:41:49 +01:00
phidiasandGitHub d732f5759d Merge pull request #25 from PHIDIAS0303/main
Main
2026-06-26 20:20:34 +09:00