Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
95b79e8
update README
dhvanipa Feb 16, 2024
c7e3d94
add recipes table; add craft system
dhvanipa Feb 16, 2024
625abce
add oak lumber recipe
dhvanipa Feb 16, 2024
da2eb00
update recipes structure
dhvanipa Feb 16, 2024
051f601
add crafting test
dhvanipa Feb 16, 2024
f64b1a3
make output 4
dhvanipa Feb 16, 2024
17c065a
add equip
dhvanipa Feb 17, 2024
314377f
add unequip
dhvanipa Feb 17, 2024
65c04a5
add inventory size
dhvanipa Feb 18, 2024
6c1cec6
Add stackable limit to items
dhvanipa Feb 18, 2024
85d12da
fix craft ingredients check; fix tests
dhvanipa Feb 18, 2024
5e2570e
add stackable test
dhvanipa Feb 18, 2024
84b592b
add full inventory test
dhvanipa Feb 18, 2024
f0957bd
add item durability
dhvanipa Feb 18, 2024
c0789a4
add wooden pick; durability test
dhvanipa Feb 18, 2024
269b69f
basalt recipes
wandcrafting Feb 19, 2024
7fe1ebd
bug fix
wandcrafting Feb 19, 2024
dab01e1
fix terrain hash bug
dhvanipa Feb 19, 2024
bbd21f4
bug fix
wandcrafting Feb 19, 2024
fe4c7e4
Merge branch 'everlon-chemistry-phase' of https://github.com/tenetxyz…
wandcrafting Feb 19, 2024
cd2f67c
add transfer inventory
dhvanipa Feb 19, 2024
4ac00ae
bug fix
wandcrafting Feb 19, 2024
604c3a9
Merge branch 'everlon-chemistry-phase' of https://github.com/tenetxyz…
wandcrafting Feb 19, 2024
186dddc
fix transfer
dhvanipa Feb 19, 2024
0e65276
more recipes
wandcrafting Feb 19, 2024
296590b
Merge branch 'everlon-chemistry-phase' of https://github.com/tenetxyz…
wandcrafting Feb 19, 2024
d1f1006
add inventory tests
dhvanipa Feb 19, 2024
a41c245
remove unused test
dhvanipa Feb 19, 2024
44659da
add chest recipe
dhvanipa Feb 19, 2024
d2d5205
MORE RECIPES
wandcrafting Feb 19, 2024
07e7168
Merge branch 'everlon-chemistry-phase' of https://github.com/tenetxyz…
wandcrafting Feb 19, 2024
c591e9e
mass change for chest
wandcrafting Feb 19, 2024
ddaf423
more recipes
wandcrafting Feb 19, 2024
1c91bd7
morerecipes
wandcrafting Feb 19, 2024
8eac77a
recipes
wandcrafting Feb 20, 2024
7d020d7
recipes
wandcrafting Feb 20, 2024
a8eeda1
dont allow self transfers
dhvanipa Feb 20, 2024
6269e2e
more recipes
wandcrafting Feb 20, 2024
de3b064
Merge branch 'everlon-chemistry-phase' of https://github.com/tenetxyz…
wandcrafting Feb 20, 2024
59dd05f
too large contracts
wandcrafting Feb 20, 2024
9a64ac7
recipes
wandcrafting Feb 20, 2024
001ede7
add damage
dhvanipa Feb 20, 2024
df9d091
recipes
wandcrafting Feb 21, 2024
1abdf33
Merge branch 'everlon-chemistry-phase' of https://github.com/tenetxyz…
wandcrafting Feb 21, 2024
5f9975a
added mass
wandcrafting Feb 21, 2024
88d0502
RECIPES
wandcrafting Feb 21, 2024
5f5a857
recipes
wandcrafting Feb 21, 2024
e155601
recipes
wandcrafting Feb 21, 2024
e6f1f63
contract size limit
wandcrafting Feb 21, 2024
6ef1fdb
recipes
wandcrafting Feb 21, 2024
7503b7d
recipes
wandcrafting Feb 21, 2024
06ec996
allow world to build where there are drops
dhvanipa Feb 21, 2024
5273afb
fix
dhvanipa Feb 22, 2024
41dca01
deploy
dhvanipa Feb 22, 2024
1ca6567
better
wandcrafting Feb 23, 2024
f2d33fe
Merge branch 'everlon-chemistry-phase' of https://github.com/tenetxyz…
wandcrafting Feb 23, 2024
c4a15ee
dyes
wandcrafting Feb 23, 2024
0d09aca
colored oak
wandcrafting Feb 23, 2024
9e44507
colored cotton
wandcrafting Feb 23, 2024
c881a0d
corrected mass
wandcrafting Feb 23, 2024
7fbb40f
glass color
wandcrafting Feb 23, 2024
d343594
rename
wandcrafting Feb 23, 2024
2bc2fc8
deploy
dhvanipa Feb 23, 2024
f224c24
add missing clay mass
dhvanipa Feb 24, 2024
9007c31
chest
wandcrafting Feb 26, 2024
813aba7
recipes
wandcrafting Feb 26, 2024
d140df8
paper recipe removed
wandcrafting Feb 26, 2024
8d238cf
remove spores
wandcrafting Feb 26, 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
2 changes: 1 addition & 1 deletion examples/basic-world/packages/world/buildDeployHandler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if (!action) {

if (action == "build") {
// List of dev commands
const setRegistryAddressCommand = `node ../../../../scripts/setAddress.js ${chainId} ../../../../packages/registry/worlds.json src/Constants.sol REGISTRY_ADDRESS`;
const setRegistryAddressCommand = `node ../../../../scripts/setAddress.js ${chainId} ../../../../packages/registry/worlds.json ../../../../packages/base-world/src/Constants.sol REGISTRY_ADDRESS`;
const setSimAddressCommand = `node ../../../../scripts/setAddress.js ${chainId} ../simulator/worlds.json src/Constants.sol SIMULATOR_ADDRESS`;
const devCommands = [setRegistryAddressCommand, setSimAddressCommand, "yarn run initialize"];

Expand Down
1 change: 0 additions & 1 deletion examples/basic-world/packages/world/src/Constants.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

address constant REGISTRY_ADDRESS = 0x057ef64E23666F000b34aE31332854aCBd1c8544;
address constant SIMULATOR_ADDRESS = 0x5FbDB2315678afecb367f032d93F642f64180aa3;

uint256 constant NUM_MAX_OBJECTS_INTERACTION_RUN = 100;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@ pragma solidity >=0.8.0;
import { IStore } from "@latticexyz/store/src/IStore.sol";
import { System } from "@latticexyz/world/src/System.sol";

import { REGISTRY_ADDRESS, SIMULATOR_ADDRESS, NUM_MAX_OBJECTS_INTERACTION_RUN } from "@tenet-world/src/Constants.sol";
import { SIMULATOR_ADDRESS, NUM_MAX_OBJECTS_INTERACTION_RUN } from "@tenet-world/src/Constants.sol";
import { ObjectInteractionSystem as ObjectInteractionProtoSystem } from "@tenet-base-world/src/systems/ObjectInteractionSystem.sol";

contract ObjectInteractionSystem is ObjectInteractionProtoSystem {
function getRegistryAddress() internal pure override returns (address) {
return REGISTRY_ADDRESS;
}

function getSimulatorAddress() internal pure override returns (address) {
return SIMULATOR_ADDRESS;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,9 @@ import { System } from "@latticexyz/world/src/System.sol";

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

import { REGISTRY_ADDRESS } from "@tenet-world/src/Constants.sol";
import { ObjectSystem as ObjectProtoSystem } from "@tenet-base-world/src/systems/ObjectSystem.sol";

contract ObjectSystem is ObjectProtoSystem {
function getRegistryAddress() internal pure override returns (address) {
return REGISTRY_ADDRESS;
}

function enterWorld(
bytes32 objectTypeId,
VoxelCoord memory coord,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ contract AirObjectSystem is ObjectType {
IWorld(world).world_AirObjectSystem_exitWorld.selector,
IWorld(world).world_AirObjectSystem_eventHandler.selector,
IWorld(world).world_AirObjectSystem_neighbourEventHandler.selector,
"Air",
""
0,
0,
0,
"Air"
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ contract BedrockObjectSystem is ObjectType {
IWorld(world).world_BedrockObjectSys_exitWorld.selector,
IWorld(world).world_BedrockObjectSys_eventHandler.selector,
IWorld(world).world_BedrockObjectSys_neighbourEventHandler.selector,
"Bedrock",
""
99,
0,
0,
"Bedrock"
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ contract DirtObjectSystem is ObjectType {
IWorld(world).world_DirtObjectSystem_exitWorld.selector,
IWorld(world).world_DirtObjectSystem_eventHandler.selector,
IWorld(world).world_DirtObjectSystem_neighbourEventHandler.selector,
"Dirt",
""
99,
0,
0,
"Dirt"
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ contract GrassObjectSystem is ObjectType {
IWorld(world).world_GrassObjectSyste_exitWorld.selector,
IWorld(world).world_GrassObjectSyste_eventHandler.selector,
IWorld(world).world_GrassObjectSyste_neighbourEventHandler.selector,
"Grass",
""
99,
0,
0,
"Grass"
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ contract BuilderObjectSystem is AgentType {
IWorld(world).world_BuilderObjectSys_exitWorld.selector,
IWorld(world).world_BuilderObjectSys_eventHandler.selector,
IWorld(world).world_BuilderObjectSys_neighbourEventHandler.selector,
"Builder",
""
1,
0,
0,
"Builder"
);
}

Expand Down
3 changes: 0 additions & 3 deletions examples/everlon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

## Simulator

The following is an overview diagram of the rules and constraints currently in Everlon.
![everlon constraints rules](./everlon-constraints-rules.jpg)

### Running locally

`./t run dev everlon --with-extensions `
Expand Down
Binary file removed examples/everlon/everlon-constraints-rules.jpg
Binary file not shown.
6 changes: 3 additions & 3 deletions examples/everlon/packages/derived/src/Constants.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

address constant REGISTRY_ADDRESS = 0x057ef64E23666F000b34aE31332854aCBd1c8544;
address constant WORLD_ADDRESS = 0x99dBE4AEa58E518C50a1c04aE9b48C9F6354612f;
address constant SIMULATOR_ADDRESS = 0x5FbDB2315678afecb367f032d93F642f64180aa3;
address constant REGISTRY_ADDRESS = 0x5FbDB2315678afecb367f032d93F642f64180aa3;
address constant WORLD_ADDRESS = 0xde2Bd2ffEA002b8E84ADeA96e5976aF664115E2c;
address constant SIMULATOR_ADDRESS = 0x322813Fd9A801c5507c9de605d63CEA4f2CE6c44;
2 changes: 1 addition & 1 deletion examples/everlon/packages/pretty/.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# development. Please do not commit changes to this file!
#
# Anvil default private key:
PRIVATE_KEY=0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a
PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
6 changes: 4 additions & 2 deletions examples/everlon/packages/pretty/deployPrettyObjects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,10 @@ async function main() {
exitWorldSelector,
eventHandlerSelector,
neighbourEventHandlerSelector,
objectTypeDisplayName,
""
99,
0,
0,
objectTypeDisplayName
);

// Check the status of each transaction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ contract PrettyObjectSystem is ObjectType {
IWorld(world).pretty_PrettyObjectSyst_exitWorld.selector,
IWorld(world).pretty_PrettyObjectSyst_eventHandler.selector,
IWorld(world).pretty_PrettyObjectSyst_neighbourEventHandler.selector,
"Pretty Template",
""
99,
0,
0,
"Pretty Template"
);
}

Expand Down
2 changes: 1 addition & 1 deletion examples/everlon/packages/simulator/src/Constants.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

address constant REGISTRY_ADDRESS = 0x057ef64E23666F000b34aE31332854aCBd1c8544;
address constant REGISTRY_ADDRESS = 0x5FbDB2315678afecb367f032d93F642f64180aa3;

uint256 constant MAX_AGENT_HEALTH = 100;
uint256 constant MAX_AGENT_STAMINA = 200000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ contract VelocityRuleSystem is System {
InventoryObject.getObjectProperties(IStore(worldAddress), inventoryIds[i][0]),
(ObjectProperties)
);
inventoryMass += objectProperties.mass;
inventoryMass +=
(objectProperties.mass) *
InventoryObject.getNumObjects(IStore(worldAddress), inventoryIds[i][0]);
}
// add inventory mass to resourceRequired
resourceRequired += (inventoryMass / 50);
Expand Down
2 changes: 1 addition & 1 deletion examples/everlon/packages/world/buildDeployHandler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if (!action) {

if (action == "build") {
// List of dev commands
const setRegistryAddressCommand = `node ../../../../scripts/setAddress.js ${chainId} ../../../../packages/registry/worlds.json src/Constants.sol REGISTRY_ADDRESS`;
const setRegistryAddressCommand = `node ../../../../scripts/setAddress.js ${chainId} ../../../../packages/registry/worlds.json ../../../../packages/base-world/src/Constants.sol REGISTRY_ADDRESS`;
const setSimAddressCommand = `node ../../../../scripts/setAddress.js ${chainId} ../simulator/worlds.json src/Constants.sol SIMULATOR_ADDRESS`;
const devCommands = [setRegistryAddressCommand, setSimAddressCommand, "yarn run initialize"];

Expand Down
40 changes: 40 additions & 0 deletions examples/everlon/packages/world/mud.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,46 @@ export default tenetMudConfig({
},
},
systems: {
RecipeSystem: {
name: "RecipeSystem",
openAccess: true,
registerAsRoot: true,
},
RecipeSystemTwo: {
name: "RecipeSystemTwo",
openAccess: true,
registerAsRoot: true,
},
RecipeSysThree: {
name: "RecipeSysThree",
openAccess: true,
registerAsRoot: true,
},
RecipeSysDye: {
name: "RecipeSysDye",
openAccess: true,
registerAsRoot: true,
},
RecipeColorOak: {
name: "RecipeColorOak",
openAccess: true,
registerAsRoot: true,
},
RecipeColorCott: {
name: "RecipeColorCott",
openAccess: true,
registerAsRoot: true,
},
RecipeColorGlass: {
name: "RecipeColorGlass",
openAccess: true,
registerAsRoot: true,
},
RecipeStations: {
name: "RecipeStations",
openAccess: true,
registerAsRoot: true,
},
FaucetSystem: {
name: "FaucetSystem",
openAccess: true,
Expand Down
15 changes: 15 additions & 0 deletions examples/everlon/packages/world/script/PostDeploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ contract PostDeploy is Script {

IWorld world = IWorld(worldAddress);

world.initRecipes();
world.initRecipesTwo();
world.initRecipesThree();
world.initRecipeSysDye();
world.initRecipeColorOak();
world.initRecipeColorCott();
world.initRecipeColorGlass();
world.initRecipeStations();

world.world_AirObjectSystem_registerObject();

world.world_SnowObjectSystem_registerObject();
Expand All @@ -33,6 +42,7 @@ contract PostDeploy is Script {

world.world_OakLogObjectSyst_registerObject();
world.world_OakLeafObjectSys_registerObject();
world.world_OakLumberObjectS_registerObject();
world.world_BirchLogObjectSy_registerObject();
world.world_BirchLeafObjectS_registerObject();
world.world_SakuraLogObjectS_registerObject();
Expand Down Expand Up @@ -63,6 +73,11 @@ contract PostDeploy is Script {
world.world_LavaObjectSystem_registerObject();
world.world_BedrockObjectSys_registerObject();

world.world_ChestObjectSyste_registerObject();

// Items
world.world_WoodenPickObject_registerObject();

// Agents
world.world_BuilderObjectSys_registerObject();
world.world_FaucetObjectSyst_registerObject();
Expand Down
Loading