diff --git a/packages/contracts/mud.config.ts b/packages/contracts/mud.config.ts index 40bac437..508c7e1a 100644 --- a/packages/contracts/mud.config.ts +++ b/packages/contracts/mud.config.ts @@ -13,8 +13,7 @@ export default mudConfig({ GMSystem: { name: "gm", // TODO,测试,正式需要关闭 - openAccess: true, - accessList: [], + openAccess: true }, PlayerSystem: { name: "player", diff --git a/packages/contracts/src/systems/GMSystem.sol b/packages/contracts/src/systems/GMSystem.sol index 04bd748d..7798ceb8 100644 --- a/packages/contracts/src/systems/GMSystem.sol +++ b/packages/contracts/src/systems/GMSystem.sol @@ -37,13 +37,13 @@ contract GMSystem is System { } // create box - function CreateBox(uint16 _x, uint16 _y, uint16 _oreBalance, uint16 _treasureBalance) public { + function CreateBox(uint16 _x, uint16 _y) public { uint256 boxId = GameConfig.getBoxId(GAME_CONFIG_KEY); BoxList.setX(boxId, _x); BoxList.setY(boxId, _y); BoxList.setDropTime(boxId, block.timestamp); - BoxList.setOreBalance(boxId, _oreBalance); - BoxList.setTreasureBalance(boxId, _treasureBalance); + // BoxList.setOreBalance(boxId, _oreBalance); + // BoxList.setTreasureBalance(boxId, _treasureBalance); GameConfig.setBoxId(GAME_CONFIG_KEY, boxId + 1); } diff --git a/packages/contracts/test/BoxTest.t.sol b/packages/contracts/test/BoxTest.t.sol index a8723776..c871bfa0 100644 --- a/packages/contracts/test/BoxTest.t.sol +++ b/packages/contracts/test/BoxTest.t.sol @@ -23,7 +23,7 @@ contract BoxTest is MudTest { function testOpenBox() public { vm.startPrank(vm.addr(vm.envUint("PRIVATE_KEY"))); - world.CreateBox(5,4, 4, 5); + world.CreateBox(5,4); Player.setX(bob, 4); Player.setY(bob, 4); Player.setStrength(bob, 5);