mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-11-20 15:33:12 +09:00
Address the second inline review of the features framework
- Feature.register returns the config as a second value, so files write `local feature, config = Feature.register(...)`. - The lib is ExpScenario.Features and the instance class with its fields sits on Feature._prototype, which is the __index, the same shape as exp_commands. - update_config only looks at values whose override was added, removed, or replaced. _apply_field sets one value and returns it, so the comparison happens while applying and the second loop only raises. Overrides dropped from the previous set count as candidates because the value reverts to its default. - The `@setting name` tags are gone from the config comments. - Protection is guarded as a whole instead of checking config.enabled in one handler. The handlers also forget mined entities, so get_entities and is_entity_protected now drop invalid references, which also covers entities destroyed without an event. The list getters are gone, the selection overlay builds its lists from Protection.config. - Chat and damage popups are one feature in control/popups.lua. - ignore_admins and command_admin_only are removed, roles cover them. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
bff6a1c612
commit
f90b8fcee1
21 files changed
+289
-286
No files matched your search
@@ -5,12 +5,11 @@ Marks mining drills for deconstruction when resources deplete
|
||||
local Async = require("modules/exp_util/async")
|
||||
local Feature = require("modules/exp_scenario/features")
|
||||
|
||||
local feature = Feature.register("mine_depletion", {
|
||||
fluid = true, --- @setting fluid When true, checks for for fluid pipes when removing miners
|
||||
chest = true, --- @setting chest When true, checks for for chest when removing miners
|
||||
beacon = true, --- @setting beacon When true, checks for for beacon when removing miners
|
||||
local feature, config = Feature.register("mine_depletion", {
|
||||
fluid = true, -- When true, checks for for fluid pipes when removing miners
|
||||
chest = true, -- When true, checks for for chest when removing miners
|
||||
beacon = true, -- When true, checks for for beacon when removing miners
|
||||
})
|
||||
local config = feature.config
|
||||
|
||||
local floor = math.floor
|
||||
|
||||
|
||||
Reference in new issue
Block a user