Skip to content

Commit

Permalink
llint
Browse files Browse the repository at this point in the history
  • Loading branch information
ponderingdemocritus committed Dec 12, 2024
1 parent 441f27d commit 0fc5a97
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 56 deletions.
19 changes: 11 additions & 8 deletions client/src/dojo/setup.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { BUILDING_CATEGORY_POPULATION_CONFIG_ID, HYPERSTRUCTURE_CONFIG_ID, WORLD_CONFIG_ID } from "@bibliothecadao/eternum";
import {
BUILDING_CATEGORY_POPULATION_CONFIG_ID,
HYPERSTRUCTURE_CONFIG_ID,
WORLD_CONFIG_ID,
} from "@bibliothecadao/eternum";
import { DojoConfig } from "@dojoengine/core";
import { getSyncEntities, getSyncEvents, syncEntities } from "@dojoengine/state";
import { Clause } from "@dojoengine/torii-client";
Expand Down Expand Up @@ -45,14 +49,13 @@ export async function setup({ ...config }: DojoConfig) {
models: [],
},
},
{
Keys: {
keys: [HYPERSTRUCTURE_CONFIG_ID.toString()],
pattern_matching: "VariableLen",
models: [],
},
{
Keys: {
keys: [HYPERSTRUCTURE_CONFIG_ID.toString()],
pattern_matching: "VariableLen",
models: [],
},

},
];

// fetch all existing entities from torii
Expand Down
2 changes: 1 addition & 1 deletion client/src/hooks/store/useWorldLoading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ interface WorldState {
export const useWorldStore = create<WorldState>((set) => ({
isWorldLoading: true,
setWorldLoading: (loading: boolean) => set({ isWorldLoading: loading }),
}));
}));
86 changes: 44 additions & 42 deletions client/src/three/scenes/Worldmap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -584,8 +584,6 @@ export default class WorldmapScene extends HexagonScene {
const globalRow = startRow + row;
const globalCol = startCol + col;



hexPositions.push(new THREE.Vector3(dummy.position.x, dummy.position.y, dummy.position.z));
const pos = getWorldPositionForHex({ row: globalRow, col: globalCol });
dummy.position.copy(pos);
Expand Down Expand Up @@ -671,47 +669,51 @@ export default class WorldmapScene extends HexagonScene {

const range = this.chunkSize + 4;

const sub = await getEntities(this.dojo.network.toriiClient, {
Composite: {
operator: "Or",
clauses: [
{
Member: {
model: "s0_eternum-Tile",
member: "col",
operator: "Gte",
value: { Primitive: { U32: startCol - range } },
},
},
{
Member: {
model: "s0_eternum-Tile",
member: "col",
operator: "Lte",
value: { Primitive: { U32: startCol + range } },
},
},
{
Member: {
model: "s0_eternum-Tile",
member: "row",
operator: "Gte",
value: { Primitive: { U32: startRow - range } },
},
},
{
Member: {
model: "s0_eternum-Tile",
member: "row",
operator: "Lte",
value: { Primitive: { U32: startRow + range } },
},
},
],
const sub = await getEntities(
this.dojo.network.toriiClient,
{
Composite: {
operator: "Or",
clauses: [
{
Member: {
model: "s0_eternum-Tile",
member: "col",
operator: "Gte",
value: { Primitive: { U32: startCol - range } },
},
},
{
Member: {
model: "s0_eternum-Tile",
member: "col",
operator: "Lte",
value: { Primitive: { U32: startCol + range } },
},
},
{
Member: {
model: "s0_eternum-Tile",
member: "row",
operator: "Gte",
value: { Primitive: { U32: startRow - range } },
},
},
{
Member: {
model: "s0_eternum-Tile",
member: "row",
operator: "Lte",
value: { Primitive: { U32: startRow + range } },
},
},
],
},
},
}, this.dojo.network.contractComponents as any, 1000, false);


this.dojo.network.contractComponents as any,
1000,
false,
);

console.log(sub);
}
Expand Down
1 change: 0 additions & 1 deletion client/src/ui/components/resources/EntityResourceTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export const EntityResourceTable = ({ entityId }: { entityId: ID | undefined })
return multiplyByPrecision(quantity * storehouseCapacityKg + storehouseCapacityKg);
}, [quantity, entityId]);


if (!entityId || entityId === 0) {
return <div>No Entity Selected</div>;
}
Expand Down
2 changes: 0 additions & 2 deletions client/src/ui/modules/navigation/RightNavigationModule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ export const RightNavigationModule = () => {
const view = useUIStore((state) => state.rightNavigationView);
const setView = useUIStore((state) => state.setRightNavigationView);



const navigation = useMemo(
() => [
{
Expand Down
3 changes: 1 addition & 2 deletions config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
EternumGlobalConfig,
EternumProvider,
getContractByName,
NAMESPACE
NAMESPACE,
} from "@bibliothecadao/eternum";
import { Account } from "starknet";

Expand Down Expand Up @@ -61,7 +61,6 @@ setupConfig.vrf.vrfProviderAddress = VITE_VRF_PROVIDER_ADDRESS!;
velords_fee_recipient: BigInt("0x045c587318c9ebcf2fbe21febf288ee2e3597a21cd48676005a5770a50d433c5"), // burner
season_pool_fee_recipient: BigInt(getContractByName(manifest, `${NAMESPACE}-season_systems`)),
}),

// Season Pass
(setupConfig.season = {
...EternumGlobalConfig.season,
Expand Down

0 comments on commit 0fc5a97

Please sign in to comment.