create-mud 2.0.0-main-bfcb293d → 2.0.0-main-80dd6992

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/cli.js +1 -1
  2. package/dist/templates/phaser/.vscode/settings.json +2 -1
  3. package/dist/templates/phaser/packages/contracts/foundry.toml +1 -1
  4. package/dist/templates/phaser/packages/contracts/script/PostDeploy.s.sol +1 -1
  5. package/dist/templates/phaser/packages/contracts/src/codegen/index.sol +1 -1
  6. package/dist/templates/phaser/packages/contracts/src/codegen/tables/Counter.sol +1 -1
  7. package/dist/templates/phaser/packages/contracts/src/codegen/world/IIncrementSystem.sol +1 -1
  8. package/dist/templates/phaser/packages/contracts/src/codegen/world/IWorld.sol +1 -1
  9. package/dist/templates/phaser/packages/contracts/src/systems/IncrementSystem.sol +1 -1
  10. package/dist/templates/phaser/packages/contracts/test/CounterTest.t.sol +1 -1
  11. package/dist/templates/react/.vscode/settings.json +2 -1
  12. package/dist/templates/react/packages/contracts/foundry.toml +1 -1
  13. package/dist/templates/react/packages/contracts/script/PostDeploy.s.sol +1 -1
  14. package/dist/templates/react/packages/contracts/src/codegen/index.sol +1 -1
  15. package/dist/templates/react/packages/contracts/src/codegen/tables/Counter.sol +1 -1
  16. package/dist/templates/react/packages/contracts/src/codegen/world/IIncrementSystem.sol +1 -1
  17. package/dist/templates/react/packages/contracts/src/codegen/world/IWorld.sol +1 -1
  18. package/dist/templates/react/packages/contracts/src/systems/IncrementSystem.sol +1 -1
  19. package/dist/templates/react/packages/contracts/test/CounterTest.t.sol +1 -1
  20. package/dist/templates/threejs/.vscode/settings.json +2 -1
  21. package/dist/templates/threejs/packages/contracts/foundry.toml +1 -1
  22. package/dist/templates/threejs/packages/contracts/src/codegen/index.sol +1 -1
  23. package/dist/templates/threejs/packages/contracts/src/codegen/tables/Position.sol +28 -4
  24. package/dist/templates/threejs/packages/contracts/src/codegen/world/IMoveSystem.sol +1 -1
  25. package/dist/templates/threejs/packages/contracts/src/codegen/world/IWorld.sol +1 -1
  26. package/dist/templates/threejs/packages/contracts/src/systems/MoveSystem.sol +1 -1
  27. package/dist/templates/vanilla/.vscode/settings.json +2 -1
  28. package/dist/templates/vanilla/packages/contracts/foundry.toml +1 -1
  29. package/dist/templates/vanilla/packages/contracts/script/PostDeploy.s.sol +1 -1
  30. package/dist/templates/vanilla/packages/contracts/src/codegen/index.sol +1 -1
  31. package/dist/templates/vanilla/packages/contracts/src/codegen/tables/Counter.sol +1 -1
  32. package/dist/templates/vanilla/packages/contracts/src/codegen/world/IIncrementSystem.sol +1 -1
  33. package/dist/templates/vanilla/packages/contracts/src/codegen/world/IWorld.sol +1 -1
  34. package/dist/templates/vanilla/packages/contracts/src/systems/IncrementSystem.sol +1 -1
  35. package/dist/templates/vanilla/packages/contracts/test/CounterTest.t.sol +1 -1
  36. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var t=require("create-create-app"),s=require("path");var e={name:"create-mud",version:"2.0.0-main-bfcb293d",description:"Create a new MUD project",license:"MIT",author:"Lattice <mud@lattice.xyz>",bin:"dist/cli.js",files:["dist"],scripts:{build:"pnpm run build:js","build:js":"tsup && ./scripts/copy-templates.sh",clean:"pnpm run clean:js","clean:js":"rimraf dist",dev:"tsup --watch",prepublishOnly:"npm run clean && npm run build",test:"pnpm run test:vanilla && pnpm run test:react && pnpm run test:phaser && pnpm run test:threejs","test:ci":"pnpm run test","test:phaser":"dist/cli.js test-project --template phaser && rimraf test-project","test:react":"dist/cli.js test-project --template react && rimraf test-project","test:threejs":"dist/cli.js test-project --template threejs && rimraf test-project","test:vanilla":"dist/cli.js test-project --template vanilla && rimraf test-project"},dependencies:{"create-create-app":"git+https://github.com/holic/create-create-app#74376c59b48a04aabbe94d9cacfe9cb1cecccd63"},devDependencies:{"@types/node":"^18.15.11",tsup:"^6.7.0"},publishConfig:{access:"public",registry:"https://registry.npmjs.org"},gitHead:"914a1e0ae4a573d685841ca2ea921435057deb8f"};var i=(0,s.resolve)(__dirname,"..","dist","templates");(0,t.create)("create-mud",{templateRoot:i,defaultTemplate:"vanilla",defaultPackageManager:"pnpm",promptForDescription:!1,promptForAuthor:!1,promptForEmail:!1,promptForLicense:!1,promptForTemplate:!0,caveat:({answers:a,packageManager:r})=>`Done! Play in the MUD with \`cd ${a.name}\` and \`${r} run dev\``,extra:{"mud-version":{type:"input",describe:"The version of MUD packages to use, defaults to latest",default:e.version}}});
2
+ "use strict";var t=require("create-create-app"),s=require("path");var e={name:"create-mud",version:"2.0.0-main-80dd6992",description:"Create a new MUD project",license:"MIT",author:"Lattice <mud@lattice.xyz>",bin:"dist/cli.js",files:["dist"],scripts:{build:"pnpm run build:js","build:js":"tsup && ./scripts/copy-templates.sh",clean:"pnpm run clean:js","clean:js":"rimraf dist",dev:"tsup --watch",prepublishOnly:"npm run clean && npm run build",test:"pnpm run test:vanilla && pnpm run test:react && pnpm run test:phaser && pnpm run test:threejs","test:ci":"pnpm run test","test:phaser":"dist/cli.js test-project --template phaser && rimraf test-project","test:react":"dist/cli.js test-project --template react && rimraf test-project","test:threejs":"dist/cli.js test-project --template threejs && rimraf test-project","test:vanilla":"dist/cli.js test-project --template vanilla && rimraf test-project"},dependencies:{"create-create-app":"git+https://github.com/holic/create-create-app#74376c59b48a04aabbe94d9cacfe9cb1cecccd63"},devDependencies:{"@types/node":"^18.15.11",tsup:"^6.7.0"},publishConfig:{access:"public",registry:"https://registry.npmjs.org"},gitHead:"914a1e0ae4a573d685841ca2ea921435057deb8f"};var i=(0,s.resolve)(__dirname,"..","dist","templates");(0,t.create)("create-mud",{templateRoot:i,defaultTemplate:"vanilla",defaultPackageManager:"pnpm",promptForDescription:!1,promptForAuthor:!1,promptForEmail:!1,promptForLicense:!1,promptForTemplate:!0,caveat:({answers:a,packageManager:r})=>`Done! Play in the MUD with \`cd ${a.name}\` and \`${r} run dev\``,extra:{"mud-version":{type:"input",describe:"The version of MUD packages to use, defaults to latest",default:e.version}}});
@@ -1,3 +1,4 @@
1
1
  {
2
- "solidity.monoRepoSupport": true
2
+ "solidity.monoRepoSupport": true,
3
+ "solidity.compileUsingRemoteVersion": "v0.8.21+commit.d9974bed"
3
4
  }
@@ -1,5 +1,5 @@
1
1
  [profile.default]
2
- solc_version = "0.8.13"
2
+ solc = "0.8.21"
3
3
  ffi = false
4
4
  fuzz_runs = 256
5
5
  optimizer = true
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.0;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  import { Script } from "forge-std/Script.sol";
5
5
  import { console } from "forge-std/console.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.0;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.0;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.0;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.0;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.0;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  import { System } from "@latticexyz/world/src/System.sol";
5
5
  import { Counter } from "../codegen/index.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.0;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  import "forge-std/Test.sol";
5
5
  import { MudTest } from "@latticexyz/world/test/MudTest.t.sol";
@@ -1,3 +1,4 @@
1
1
  {
2
- "solidity.monoRepoSupport": true
2
+ "solidity.monoRepoSupport": true,
3
+ "solidity.compileUsingRemoteVersion": "v0.8.21+commit.d9974bed"
3
4
  }
@@ -1,5 +1,5 @@
1
1
  [profile.default]
2
- solc_version = "0.8.13"
2
+ solc = "0.8.21"
3
3
  ffi = false
4
4
  fuzz_runs = 256
5
5
  optimizer = true
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.0;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  import { Script } from "forge-std/Script.sol";
5
5
  import { console } from "forge-std/console.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.0;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.0;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.0;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.0;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.0;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  import { System } from "@latticexyz/world/src/System.sol";
5
5
  import { Counter } from "../codegen/index.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.0;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  import "forge-std/Test.sol";
5
5
  import { MudTest } from "@latticexyz/world/test/MudTest.t.sol";
@@ -1,3 +1,4 @@
1
1
  {
2
- "solidity.monoRepoSupport": true
2
+ "solidity.monoRepoSupport": true,
3
+ "solidity.compileUsingRemoteVersion": "v0.8.21+commit.d9974bed"
3
4
  }
@@ -1,5 +1,5 @@
1
1
  [profile.default]
2
- solc_version = "0.8.13"
2
+ solc = "0.8.21"
3
3
  ffi = false
4
4
  fuzz_runs = 256
5
5
  optimizer = true
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.0;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.0;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
@@ -321,17 +321,41 @@ library Position {
321
321
 
322
322
  /** Set the full data using the data struct */
323
323
  function set(bytes32 key, PositionData memory _table) internal {
324
- set(key, _table.x, _table.y, _table.z);
324
+ bytes memory _staticData = encodeStatic(_table.x, _table.y, _table.z);
325
+
326
+ PackedCounter _encodedLengths;
327
+ bytes memory _dynamicData;
328
+
329
+ bytes32[] memory _keyTuple = new bytes32[](1);
330
+ _keyTuple[0] = key;
331
+
332
+ StoreSwitch.setRecord(_tableId, _keyTuple, _staticData, _encodedLengths, _dynamicData, _fieldLayout);
325
333
  }
326
334
 
327
335
  /** Set the full data using the data struct */
328
336
  function _set(bytes32 key, PositionData memory _table) internal {
329
- set(key, _table.x, _table.y, _table.z);
337
+ bytes memory _staticData = encodeStatic(_table.x, _table.y, _table.z);
338
+
339
+ PackedCounter _encodedLengths;
340
+ bytes memory _dynamicData;
341
+
342
+ bytes32[] memory _keyTuple = new bytes32[](1);
343
+ _keyTuple[0] = key;
344
+
345
+ StoreCore.setRecord(_tableId, _keyTuple, _staticData, _encodedLengths, _dynamicData, _fieldLayout);
330
346
  }
331
347
 
332
348
  /** Set the full data using the data struct (using the specified store) */
333
349
  function set(IStore _store, bytes32 key, PositionData memory _table) internal {
334
- set(_store, key, _table.x, _table.y, _table.z);
350
+ bytes memory _staticData = encodeStatic(_table.x, _table.y, _table.z);
351
+
352
+ PackedCounter _encodedLengths;
353
+ bytes memory _dynamicData;
354
+
355
+ bytes32[] memory _keyTuple = new bytes32[](1);
356
+ _keyTuple[0] = key;
357
+
358
+ _store.setRecord(_tableId, _keyTuple, _staticData, _encodedLengths, _dynamicData, _fieldLayout);
335
359
  }
336
360
 
337
361
  /**
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.0;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.0;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.0;
2
+ pragma solidity >=0.8.21;
3
3
  import { System } from "@latticexyz/world/src/System.sol";
4
4
  import { Position, PositionData } from "../codegen/index.sol";
5
5
 
@@ -1,3 +1,4 @@
1
1
  {
2
- "solidity.monoRepoSupport": true
2
+ "solidity.monoRepoSupport": true,
3
+ "solidity.compileUsingRemoteVersion": "v0.8.21+commit.d9974bed"
3
4
  }
@@ -1,5 +1,5 @@
1
1
  [profile.default]
2
- solc_version = "0.8.13"
2
+ solc = "0.8.21"
3
3
  ffi = false
4
4
  fuzz_runs = 256
5
5
  optimizer = true
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.0;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  import { Script } from "forge-std/Script.sol";
5
5
  import { console } from "forge-std/console.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.0;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.0;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.0;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.0;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.0;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  import { System } from "@latticexyz/world/src/System.sol";
5
5
  import { Counter } from "../codegen/index.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.0;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  import "forge-std/Test.sol";
5
5
  import { MudTest } from "@latticexyz/world/test/MudTest.t.sol";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-mud",
3
- "version": "2.0.0-main-bfcb293d",
3
+ "version": "2.0.0-main-80dd6992",
4
4
  "description": "Create a new MUD project",
5
5
  "license": "MIT",
6
6
  "author": "Lattice <mud@lattice.xyz>",