Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
e84b674
monuments table
dhvanipa Jan 10, 2024
46b459a
claim area instead of shards
dhvanipa Jan 10, 2024
324e4d2
fix compile
dhvanipa Jan 10, 2024
805652a
update lb
dhvanipa Jan 10, 2024
7c3ccf5
start derived test
dhvanipa Jan 10, 2024
6e3e2cf
claim area tests
dhvanipa Jan 10, 2024
e71896b
add leaderboard test
dhvanipa Jan 10, 2024
905b7a0
update signatures to be monuments specific
dhvanipa Jan 10, 2024
217758e
more checks
dhvanipa Jan 11, 2024
e546872
wording
dhvanipa Jan 11, 2024
1f1c250
start monument bounties system
dhvanipa Jan 12, 2024
24f64f1
claim bounty
dhvanipa Jan 12, 2024
4036546
add bounty test
dhvanipa Jan 12, 2024
667ab54
update signatures to be monuments specific
dhvanipa Jan 12, 2024
809e3b3
account for terrain blocks in claim bounty
dhvanipa Jan 13, 2024
f9e26db
update wording
dhvanipa Jan 13, 2024
45a341b
add likes tracker; and transfer functions
dhvanipa Jan 14, 2024
b571228
fix bug
dhvanipa Jan 14, 2024
e54e241
remove shards
dhvanipa Jan 16, 2024
b29ac92
add monuments terrain; add snow, sand
dhvanipa Jan 16, 2024
d93fa7b
add credit
dhvanipa Jan 16, 2024
8de6424
fix bug
dhvanipa Jan 16, 2024
15c15b2
disable collisions
dhvanipa Jan 17, 2024
4377fe1
rename to claimed area
dhvanipa Jan 17, 2024
fca729f
remove liking of claimed areas
dhvanipa Jan 20, 2024
7c9dbdf
add minted field
dhvanipa Jan 22, 2024
0cf86eb
update typegen path
dhvanipa Jan 22, 2024
15591f4
deployment
dhvanipa Jan 22, 2024
dd00476
rename likes to tokens
dhvanipa Jan 23, 2024
fc8d0f6
set max claims per faucet to 1
dhvanipa Jan 23, 2024
c5d90e4
disable non monument related stuff
dhvanipa Jan 23, 2024
bb4e848
add new blocks
dhvanipa Jan 26, 2024
320d3f6
rearrange
dhvanipa Jan 26, 2024
0efcaf5
add everlon new terrain; fix floor div handling negative numbers
dhvanipa Jan 26, 2024
19130e9
remove unused sim tables and systems
dhvanipa Jan 28, 2024
85ba759
remove unused packages
dhvanipa Jan 28, 2024
f20f026
address deploy
dhvanipa Jan 28, 2024
41fe836
add basic gravity rule
dhvanipa Jan 28, 2024
dca0a4d
start gravity test
dhvanipa Jan 28, 2024
3d5a26d
fix
dhvanipa Jan 29, 2024
bb4ff69
fix checking
dhvanipa Jan 29, 2024
ac6b1f7
fix and add more test
dhvanipa Jan 29, 2024
8086ade
add fall test
dhvanipa Jan 29, 2024
b89d77b
apply health damage
dhvanipa Jan 29, 2024
a811e9c
remove logs
dhvanipa Jan 29, 2024
7b7a3ee
cost to moving in y
dhvanipa Jan 29, 2024
17a082c
add move up cost test
dhvanipa Jan 29, 2024
54dd5cd
fix delta calculation
dhvanipa Jan 29, 2024
febd96a
add health damage to collisions
dhvanipa Jan 29, 2024
83d396b
fix gravity
dhvanipa Jan 29, 2024
a286e0a
collision health damage test
dhvanipa Jan 29, 2024
6036136
add stamina health sys
dhvanipa Jan 29, 2024
685dd74
hit
dhvanipa Jan 30, 2024
43e81de
fix stack
dhvanipa Jan 30, 2024
44a6e0e
replace to keysintable with haskeys
dhvanipa Jan 30, 2024
3a009a0
remove keyswithvalue and replace with reverse table
dhvanipa Jan 30, 2024
16db759
add bootstrap script
dhvanipa Jan 31, 2024
34e2de9
allow build/mine
dhvanipa Jan 31, 2024
d142805
add inventory
dhvanipa Jan 31, 2024
0975f19
fix build for inventory
dhvanipa Jan 31, 2024
b3bdf33
add build mine test
dhvanipa Jan 31, 2024
9b4c7f8
turn off gravity
dhvanipa Feb 1, 2024
b7d1cb8
increase agent action radius
dhvanipa Feb 1, 2024
a71585d
fix mine event
dhvanipa Feb 1, 2024
02f2372
fix surrounding cube check
dhvanipa Feb 2, 2024
49633a8
5
dhvanipa Feb 2, 2024
d2936b0
remove extra sim physics; increase faucet agents
dhvanipa Feb 2, 2024
a859c07
add more faucets
dhvanipa Feb 2, 2024
e627a8b
set one sec block time
dhvanipa Feb 4, 2024
af7721b
add agent actions; hit action
dhvanipa Feb 5, 2024
33167d3
add hit test
dhvanipa Feb 5, 2024
cf18469
increase health with blocks
dhvanipa Feb 5, 2024
0f92984
gravity does not cost stamina
dhvanipa Feb 5, 2024
c611de9
add agent metadata for moves
dhvanipa Feb 6, 2024
58f8254
adjust stamina cost based on num moves in a tx
dhvanipa Feb 6, 2024
c54af47
check terrain blocks in gravity
dhvanipa Feb 6, 2024
0b3b491
fix gravity terrain checks
dhvanipa Feb 6, 2024
7d2a22a
increase stamina over time; turn off health action consq
dhvanipa Feb 7, 2024
da7bce9
fix max health and stamina
dhvanipa Feb 7, 2024
59a646d
dont apply increase if maxed
dhvanipa Feb 7, 2024
cd852b0
fix
dhvanipa Feb 7, 2024
022dcdf
transfer inventory on health reaching 0
dhvanipa Feb 8, 2024
984076c
adjust stamina
dhvanipa Feb 8, 2024
9d6203e
add limit for claiming across all faucets
dhvanipa Feb 8, 2024
9753f43
add clear action
dhvanipa Feb 8, 2024
f76edf7
on health 0, mine agent
dhvanipa Feb 8, 2024
82697ca
apply stamina cost to build and mine
dhvanipa Feb 9, 2024
d3a3b61
update physics
dhvanipa Feb 13, 2024
d63369b
update mass values
dhvanipa Feb 14, 2024
a632b4f
fix values
dhvanipa Feb 14, 2024
321c239
mined if fall and lost all health
dhvanipa Feb 15, 2024
34c3e18
make inventory general beyond agents
dhvanipa Feb 15, 2024
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
4 changes: 2 additions & 2 deletions examples/basic-world/packages/simulator/mud.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ export default tenetMudConfig({
systems: {},
modules: [
{
name: "KeysInTableModule",
name: "HasKeysModule",
root: true,
args: [resolveTableId("Mass")],
},
{
name: "KeysInTableModule",
name: "HasKeysModule",
root: true,
args: [resolveTableId("Energy")],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pragma solidity >=0.8.0;

import { System } from "@latticexyz/world/src/System.sol";
import { IStore } from "@latticexyz/store/src/IStore.sol";
import { hasKey } from "@latticexyz/world/src/modules/keysintable/hasKey.sol";
import { hasKey } from "@latticexyz/world/src/modules/haskeys/hasKey.sol";
import { SimInitSystem as SimInitProtoSystem } from "@tenet-base-simulator/src/systems/SimInitSystem.sol";
import { Mass, MassTableId } from "@tenet-simulator/src/codegen/tables/Mass.sol";
import { Energy, EnergyTableId } from "@tenet-simulator/src/codegen/tables/Energy.sol";
Expand Down
2 changes: 1 addition & 1 deletion examples/basic-world/packages/world/src/Constants.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ address constant REGISTRY_ADDRESS = 0x057ef64E23666F000b34aE31332854aCBd1c8544;
address constant SIMULATOR_ADDRESS = 0x5FbDB2315678afecb367f032d93F642f64180aa3;

uint256 constant NUM_MAX_OBJECTS_INTERACTION_RUN = 100;
uint256 constant NUM_MAX_AGENT_ACTION_RADIUS = 1;
int32 constant NUM_MAX_AGENT_ACTION_RADIUS = 1;

bytes32 constant AirObjectID = bytes32(keccak256("air"));
bytes32 constant DirtObjectID = bytes32(keccak256("dirt"));
Expand Down
4 changes: 4 additions & 0 deletions examples/basic-world/packages/world/src/Types.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ pragma solidity >=0.8.0;

import { VoxelCoord } from "@tenet-utils/src/Types.sol";

struct BuildEventData {
bytes32 inventoryId;
}

struct MoveEventData {
VoxelCoord oldCoord;
}
18 changes: 17 additions & 1 deletion examples/basic-world/packages/world/src/systems/BuildSystem.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { VoxelCoord } from "@tenet-utils/src/Types.sol";

import { SIMULATOR_ADDRESS, AirObjectID } from "@tenet-world/src/Constants.sol";
import { BuildSystem as BuildProtoSystem } from "@tenet-base-world/src/systems/BuildSystem.sol";
import { BuildEventData } from "@tenet-world/src/Types.sol";

contract BuildSystem is BuildProtoSystem {
function getSimulatorAddress() internal pure override returns (address) {
Expand All @@ -16,12 +17,27 @@ contract BuildSystem is BuildProtoSystem {
return AirObjectID;
}

function getInventoryId(bytes memory eventData) internal pure override returns (bytes32) {
BuildEventData memory buildEventData = abi.decode(eventData, (BuildEventData));
return buildEventData.inventoryId;
}

function build(
bytes32 actingObjectEntityId,
bytes32 buildObjectTypeId,
VoxelCoord memory buildCoord,
bytes32 inventoryId
) public override returns (bytes32) {
BuildEventData memory buildEventData = BuildEventData({ inventoryId: inventoryId });
return super.build(actingObjectEntityId, buildObjectTypeId, buildCoord, abi.encode(buildEventData));
}

function build(
bytes32 actingObjectEntityId,
bytes32 buildObjectTypeId,
VoxelCoord memory buildCoord
) public override returns (bytes32) {
return super.build(actingObjectEntityId, buildObjectTypeId, buildCoord, new bytes(0));
return super.build(actingObjectEntityId, buildObjectTypeId, buildCoord);
}

function buildTerrain(bytes32 actingObjectEntityId, VoxelCoord memory buildCoord) public override returns (bytes32) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,22 @@ import { VoxelCoord, EventType } from "@tenet-utils/src/Types.sol";

import { SIMULATOR_ADDRESS, NUM_MAX_AGENT_ACTION_RADIUS } from "@tenet-world/src/Constants.sol";
import { EventApprovalsSystem as EventApprovalsProtoSystem } from "@tenet-base-world/src/systems/EventApprovalsSystem.sol";
import { MoveEventData } from "@tenet-world/src/Types.sol";
import { BuildEventData, MoveEventData } from "@tenet-world/src/Types.sol";

contract EventApprovalsSystem is EventApprovalsProtoSystem {
function getSimulatorAddress() internal pure override returns (address) {
return SIMULATOR_ADDRESS;
}

function getMaxAgentActionRadius() internal pure override returns (uint256) {
function getMaxAgentActionRadius() internal pure override returns (int32) {
return NUM_MAX_AGENT_ACTION_RADIUS;
}

function getInventoryId(bytes memory eventData) internal pure override returns (bytes32) {
BuildEventData memory buildEventData = abi.decode(eventData, (BuildEventData));
return buildEventData.inventoryId;
}

function getOldCoord(bytes memory eventData) internal pure override returns (VoxelCoord memory) {
MoveEventData memory moveEventData = abi.decode(eventData, (MoveEventData));
return moveEventData.oldCoord;
Expand All @@ -40,7 +45,9 @@ contract EventApprovalsSystem is EventApprovalsProtoSystem {
bytes32 objectTypeId,
VoxelCoord memory coord,
bytes memory eventData
) internal override {}
) internal override {
return super.approveEvent(eventType, caller, actingObjectEntityId, objectTypeId, coord, eventData);
}

function postApproval(
EventType eventType,
Expand Down
2 changes: 1 addition & 1 deletion examples/everlon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"deploy:farming": "concurrently -n farming -c green \"yarn workspace @tenetxyz/farming run build && yarn workspace @tenetxyz/farming run deploy\"",
"deploy:creatures": "concurrently -n creatures -c white \"yarn workspace @tenetxyz/creatures run build && yarn workspace @tenetxyz/creatures run deploy\"",
"deploy:pretty": "concurrently -n pretty -c #BF40BF \"yarn workspace @tenetxyz/pretty run build && yarn workspace @tenetxyz/pretty run deploy\"",
"deploy:extensions": "yarn run deploy:farming && yarn run deploy:creatures",
"deploy:extensions": "echo \"No extensions to deploy\"",
"deploy:derived": "concurrently -n derived -c #FFA500 \"yarn workspace @tenetxyz/derived run build && yarn workspace @tenetxyz/derived run deploy\"",
"initialize": "yarn workspaces foreach -A run initialize"
},
Expand Down
8 changes: 0 additions & 8 deletions examples/everlon/packages/creatures/.env

This file was deleted.

18 changes: 0 additions & 18 deletions examples/everlon/packages/creatures/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions examples/everlon/packages/creatures/.prettierrc

This file was deleted.

12 changes: 0 additions & 12 deletions examples/everlon/packages/creatures/.solhint.json

This file was deleted.

57 changes: 0 additions & 57 deletions examples/everlon/packages/creatures/buildDeployHandler.tsx

This file was deleted.

22 changes: 0 additions & 22 deletions examples/everlon/packages/creatures/foundry.toml

This file was deleted.

44 changes: 0 additions & 44 deletions examples/everlon/packages/creatures/mud.config.ts

This file was deleted.

72 changes: 0 additions & 72 deletions examples/everlon/packages/creatures/package.json

This file was deleted.

11 changes: 0 additions & 11 deletions examples/everlon/packages/creatures/remappings.txt

This file was deleted.

Loading