Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to define multiple namespaces in one world config? #2689

Closed
foxgem opened this issue Apr 19, 2024 · 1 comment
Closed

how to define multiple namespaces in one world config? #2689

foxgem opened this issue Apr 19, 2024 · 1 comment

Comments

@foxgem
Copy link

foxgem commented Apr 19, 2024

Hi

I can see there is a proposal for this: #994 (comment). Also, I tried the following config in mud config:

export default defineWorld({
  namespaces: {
    "": {
      tables: {
        Counter1: {
          schema: {
            value: "uint32",
          },
          key: [],
        },
      },
    },
    namespace1: {
      tables: {
        Counter2: {
          schema: {
            value: "uint32",
          },
          key: [],
        },
      },
    },
  },
});

Since there is no error shown in vscode, I assume this configuration is ok. Then run pnpm run tablegen, what I got is still two tables with empty namespace

  // Hex below is the result of `WorldResourceIdLib.encode({ namespace: "", name: "Counter1", typeId: RESOURCE_TABLE });`
  ResourceId constant _tableId = ResourceId.wrap(0x74620000000000000000000000000000436f756e746572310000000000000000);

  // Hex below is the result of `WorldResourceIdLib.encode({ namespace: "", name: "Counter2", typeId: RESOURCE_TABLE });`
  ResourceId constant _tableId = ResourceId.wrap(0x74620000000000000000000000000000436f756e746572320000000000000000);

Do I miss something, or this feature is not implemented yet?

@holic
Copy link
Member

holic commented Apr 19, 2024

Sorry, this is not yet implemented! Keep an eye on #994!

We’re heads down in prep for the Redstone launch but planning to get to this soon after.

@holic holic closed this as completed Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants