Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/small-horses-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@latticexyz/world": patch
---

Support systems without the System suffix by adding them to the MUD config.
8 changes: 7 additions & 1 deletion packages/world/ts/node/getSystemContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,16 @@ export async function getSystemContracts({
pattern: path.join(config.sourceDirectory, "**"),
});

// Get system labels from all namespaces
const configSystemLabels = Object.values(config.namespaces || {}).flatMap((namespace) =>
Object.values(namespace.systems).map((system) => system.label),
);

return solidityFiles
.filter(
(file) =>
file.basename.endsWith("System") &&
// Include files with the System suffix and files defined in config
(file.basename.endsWith("System") || configSystemLabels.includes(file.basename)) &&
Comment thread
frolic marked this conversation as resolved.
Outdated
// exclude the base System contract
file.basename !== "System" &&
// exclude interfaces
Expand Down