Refactor legacy addons into Clusterio format (#413)

* Refactor custom start

* Refactor afk kick

* Fix use of assert get player

* Refactor chat popup

* Refactor chat auto reply

* Refactor help bubbles

* Refactor damage popups

* Refactor death markers

* Refactor deconstruction log

* Remove FAGC logging

* Refactor discord alerts

* Refactor insert pickup

* Refactor inventory clear

* Refactor extra logging

* Refactor nuke protection

* Refactor pollution grading

* Refactor protection jail

* Refactor report jail

* Refactor mine depletion

* Refactor degrading tiles

* Refactor station auto name

* Refactor spawn area

* Refactor fast deconstruction

* Bug Fixes
This commit is contained in:
Cooldude2606
2025-12-02 18:34:24 +00:00
committed by GitHub
parent a45f53bc48
commit 9bd699ebf1
69 changed files with 2614 additions and 2260 deletions

View File

@@ -31,7 +31,8 @@ types.lower_role =
--- @cast result any TODO role is not a defined type
local player_highest = highest_role(player)
if player_highest.index >= result.index then
local is_root = Roles.config.internal.root == player_highest.name
if not is_root and player_highest.index >= result.index then
return invalid{ "exp-commands-parse_role.lower-role" }
else
return valid(result)
@@ -47,7 +48,8 @@ types.lower_role_player =
local other_highest = highest_role(result)
local player_highest = highest_role(player)
if player_highest.index >= other_highest.index then
local is_root = Roles.config.internal.root == player_highest.name
if not is_root and player_highest.index >= other_highest.index then
return invalid{ "exp-commands-parse_role.lower-role-player" }
else
return valid(result)
@@ -63,7 +65,8 @@ types.lower_role_player_online =
local other_highest = highest_role(result)
local player_highest = highest_role(player)
if player_highest.index >= other_highest.index then
local is_root = Roles.config.internal.root == player_highest.name
if not is_root and player_highest.index >= other_highest.index then
return invalid{ "exp-commands-parse_role.lower-role-player" }
else
return valid(result)
@@ -79,7 +82,8 @@ types.lower_role_player_alive =
local other_highest = highest_role(result)
local player_highest = highest_role(player)
if player_highest.index >= other_highest.index then
local is_root = Roles.config.internal.root == player_highest.name
if not is_root and player_highest.index >= other_highest.index then
return invalid{ "exp-commands-parse_role.lower-role-player" }
else
return valid(result)