Skip to content

Commit

Permalink
Use systems as default directory for system libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
vdrg committed Nov 26, 2024
1 parent ce80658 commit ca6e07d
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/pages/world/systems.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ pragma solidity >=0.8.24;
import { System } from "@latticexyz/world/src/System.sol";
// Library generated for MoveSystem,
import { moveSystem } from "./codegen/libraries/MoveSystemLib.sol";
import { moveSystem } from "./codegen/systems/MoveSystemLib.sol";
contract MySystem is System {
function someAction(uint256 x, uint256 y) external {
Expand Down
2 changes: 1 addition & 1 deletion packages/world/ts/config/v2/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export type MODULE_DEFAULTS = typeof MODULE_DEFAULTS;
export const CODEGEN_DEFAULTS = {
worldInterfaceName: "IWorld",
worldgenDirectory: "world",
systemLibrariesDirectory: "libraries",
systemLibrariesDirectory: "systems",
generateSystemLibraries: false,
worldImportPath: "@latticexyz/world/src",
} as const satisfies CodegenInput;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/system-libraries/src/namespaces/b/BSystem.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity >=0.8.28;

import { System } from "@latticexyz/world/src/System.sol";
import { aSystem } from "../a/codegen/libraries/ASystemLib.sol";
import { aSystem } from "../a/codegen/systems/ASystemLib.sol";

contract BSystem is System {
function setValueInA(uint256 value) external {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/system-libraries/src/namespaces/root/RootSystem.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity >=0.8.28;

import { System } from "@latticexyz/world/src/System.sol";
import { aSystem } from "../a/codegen/libraries/ASystemLib.sol";
import { aSystem } from "../a/codegen/systems/ASystemLib.sol";

contract RootSystem is System {
function setValueInA(uint256 value) external {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions test/system-libraries/test/Libraries.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import { SYSTEMBOUND_DELEGATION } from "@latticexyz/world-modules/src/modules/st

import { Value } from "../src/namespaces/a/codegen/tables/Value.sol";
import { AddressValue } from "../src/namespaces/a/codegen/tables/AddressValue.sol";
import { aSystem } from "../src/namespaces/a/codegen/libraries/ASystemLib.sol";
import { bSystem } from "../src/namespaces/b/codegen/libraries/BSystemLib.sol";
import { rootSystem } from "../src/namespaces/root/codegen/libraries/RootSystemLib.sol";
import { aSystem } from "../src/namespaces/a/codegen/systems/ASystemLib.sol";
import { bSystem } from "../src/namespaces/b/codegen/systems/BSystemLib.sol";
import { rootSystem } from "../src/namespaces/root/codegen/systems/RootSystemLib.sol";

contract LibrariesTest is MudTest {
function testNamespaceIdExists() public {
Expand Down

0 comments on commit ca6e07d

Please sign in to comment.