Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 4 additions & 4 deletions packages/client/src/pages/CharacterCreation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -432,20 +432,20 @@ export const CharacterCreation = (): JSX.Element => {
Warrior
</Button>
<Button
onClick={() => setCharacterClass(CharacterClasses.Mage)}
onClick={() => setCharacterClass(CharacterClasses.Rogue)}
size="sm"
variant={characterClass === 1 ? 'solid' : 'outline'}
w="150px"
>
Mage
Rogue
</Button>
<Button
onClick={() => setCharacterClass(CharacterClasses.Rogue)}
onClick={() => setCharacterClass(CharacterClasses.Mage)}
size="sm"
variant={characterClass === 2 ? 'solid' : 'outline'}
w="150px"
>
Rogue
Mage
</Button>
</ButtonGroup>
</VStack>
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/utils/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export type Character = Metadata & {

export enum CharacterClasses {
Warrior,
Mage,
Rogue,
Mage,
}

export type Metadata = {
Expand Down
28 changes: 28 additions & 0 deletions packages/contracts/mud.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,34 @@ export default defineWorld({
experience: "uint256",
},
},
MapConfig: {
key: [],
schema: {
height: "uint32",
width: "uint32",
},
codegen: {
dataStruct: false,
},
},
Position: {
key: ["characterId"],
schema: {
characterId: "uint256",
x: "uint32",
y: "uint32",
},
codegen: {
dataStruct: false,
},
},
Spawned: {
key: ["characterId"],
schema: {
characterId: "uint256",
spawned: "bool",
},
},
MobStats: {
key: ["entityId"],
schema: {
Expand Down
36 changes: 36 additions & 0 deletions packages/contracts/out/IWorld.sol/IWorld.abi.json
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,29 @@
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "UD__move",
"inputs": [
{
"name": "characterId",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "x",
"type": "uint32",
"internalType": "uint32"
},
{
"name": "y",
"type": "uint32",
"internalType": "uint32"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "UD__rollStats",
Expand Down Expand Up @@ -758,6 +781,19 @@
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "UD__spawn",
"inputs": [
{
"name": "characterId",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "UD__unequipItem",
Expand Down
36 changes: 36 additions & 0 deletions packages/contracts/out/IWorld.sol/IWorld.abi.json.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,29 @@ declare const abi: [
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "UD__move",
"inputs": [
{
"name": "characterId",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "x",
"type": "uint32",
"internalType": "uint32"
},
{
"name": "y",
"type": "uint32",
"internalType": "uint32"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "UD__rollStats",
Expand Down Expand Up @@ -758,6 +781,19 @@ declare const abi: [
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "UD__spawn",
"inputs": [
{
"name": "characterId",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "UD__unequipItem",
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/out/IWorld.sol/IWorld.json

Large diffs are not rendered by default.

Loading