-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
245 additions
and
251 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Sky Strife Headless Client | ||
|
||
This is a full-featured Sky Strife client that does not require a browser/UI to play. | ||
|
||
## Getting Started | ||
|
||
The scripts/example.ts file contains a simple example of how to use the client. | ||
|
||
You can run it against the current, live Sky Strife world with `pnpm example:redstone`. | ||
|
||
```typescript | ||
import { createSkyStrife } from "../src/createSkyStrife"; | ||
|
||
const skyStrife = await createSkyStrife(); | ||
``` | ||
|
||
`createSkyStrife` will connect to an exsiting Sky Strife world and sync all onchain data locally. |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Has, defineEnterSystem, getComponentValueStrict } from "@latticexyz/recs"; | ||
|
||
import { createSkyStrife } from "../src/createSkyStrife"; | ||
|
||
const skyStrife = await createSkyStrife(); | ||
|
||
const { | ||
networkLayer: { | ||
world, | ||
components: { MatchName }, | ||
}, | ||
} = skyStrife; | ||
|
||
defineEnterSystem(world, [Has(MatchName)], ({ entity }) => { | ||
const matchName = getComponentValueStrict(MatchName, entity); | ||
|
||
console.log(`Match ${matchName.value} was created.`); | ||
}); |
4 changes: 2 additions & 2 deletions
4
packages/bots/src/mapCopier.ts β ...ages/headless-client/scripts/mapCopier.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/bots/src/matchCreator.ts β ...s/headless-client/scripts/matchCreator.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/bots/src/createNetworkConfig.ts β ...eadless-client/src/createNetworkConfig.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.