Skip to content

Module/Plugin expansion for mobs/buffs/pets/conversations#611

Merged
Volte6 merged 2 commits into
masterfrom
module-imports
Jun 9, 2026
Merged

Module/Plugin expansion for mobs/buffs/pets/conversations#611
Volte6 merged 2 commits into
masterfrom
module-imports

Conversation

@Volte6

@Volte6 Volte6 commented Jun 9, 2026

Copy link
Copy Markdown
Member

Description

Extends the module/plugin system so modules can ship their own embedded data files and scripts for buffs, pets, quests, mobs, and conversations (previously limited to items, mutators, and templates). Also refactors the gametime period-parsing logic and adds calendar-aware period anchoring.

Changes

• Added RegisterFS plugin integration to the buffs, pets, quests, mobs, and conversations packages, merging embedded module data files into in-memory state at load time with disk content winning on ID collisions.
• Added script-registration helpers ( RegisterBuffScript , RegisterMobScript , plus pet/buff/mob GetScript lookups) so modules can supply embedded JS scripts that are checked before the disk path.
• Wired the new RegisterFS calls into main.go against the plugin registry.
• Refactored gametime.AddPeriod into a dedicated parsePeriod helper and a unified switch, collapsing duplicated unit branches.
• Promoted period-anchoring logic to a calendar-aware GameDate.LastPeriod method, added a StartOf backward-snapping helper, and consolidated SetToNight / SetToDay into a shared implementation.
• Added month and year start-of-period handling and an anchorPeriods table for noon/midnight/sunrise/sunset units.
• Added plugin tests for buffs, pets, quests, mobs, and conversations, plus new gametime test coverage.
• Updated module authoring documentation ( modules/AGENTS.md , package AGENTS.md files, and the admin module docs page).

@Volte6 Volte6 merged commit fb4e382 into master Jun 9, 2026
10 checks passed
@Volte6 Volte6 deleted the module-imports branch June 9, 2026 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant