-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Description
This seems like an inefficient way to clear out disbanded factions:
Lines 25 to 36 in c2e3d07
| -- Gather and clean up disbanded factions | |
| local changed = false | |
| for i, fac_name in ipairs(area.faction_open) do | |
| if not factions.get_owner(fac_name) then | |
| table.remove(area.faction_open, i) | |
| changed = true | |
| end | |
| end | |
| if #area.faction_open == 0 then | |
| -- Prevent DB clutter, remove value | |
| area.faction_open = nil | |
| else |
Wouldn't it make more sense to clean DB on boot and then rely on callbacks from [playerfactions]?
I guess the challenge here is that there are several forks of [playerfactions] around.
For the mt-mods fork I have proposed adding registration this way:
mt-mods/playerfactions@a73f7cb
The impact is probably not massive in the amount of factions there are per area, so I don't know if it is worth adding this feature with backward compat for forks that don't support it.
What do you think?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels