mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 03:25:23 +09:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user