mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-11-19 15:23: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
@@ -4,12 +4,11 @@ Automatically name stations when they are placed based on closest resource and d
|
||||
|
||||
local Feature = require("modules/exp_scenario/features")
|
||||
|
||||
local feature = Feature.register("station_auto_name", {
|
||||
--- @setting station_name the name given to new stations, placeholders:
|
||||
local feature, config = Feature.register("station_auto_name", {
|
||||
-- the name given to new stations, placeholders:
|
||||
-- __icon__ __item_name__ __backer_name__ __direction__ __x__ __y__
|
||||
station_name = "[L] __icon__",
|
||||
})
|
||||
local config = feature.config
|
||||
|
||||
local get_direction do
|
||||
local directions = {
|
||||
|
||||
Reference in new issue
Block a user