Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Sweep GHA Fix] The GitHub Actions run failed with... #42

Open
wants to merge 6 commits into
base: sweep/sweep_gha_fix_the_github_actions_run_fai_e030a
Choose a base branch
from
Open
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
12 changes: 9 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing

This document will help you setting up this project on your machine for development. If you just want to use dungeon-revealer we recommend using the docker images or prebuilt binaries. [See the release section for more information](https://github.com/dungeon-revealer/dungeon-revealer/releases).
This document will provide detailed instructions for setting up the project on your machine for development. If you only want to use dungeon-revealer, it is recommended to use the docker images or prebuilt binaries. [See the release section for more information](https://github.com/dungeon-revealer/dungeon-revealer/releases).

## Required Software

Expand All @@ -16,6 +16,7 @@ These are the most important commands for getting the dev server up and running.
### Install dependencies

```bash
npm run start
npm install
```

Expand Down Expand Up @@ -44,6 +45,11 @@ npm run start:server:dev
Run the react development server:

```bash
npm run start:server:dev

Run the react development server:
```bash
npm run start:frontend:dev
npm run start:frontend:dev
```

Expand All @@ -70,9 +76,9 @@ The executables are located in the bin folder.
## TypeScript Migration

We are currently in the process of migrating the code base to TypeScript.
All new files under `src` and `server` should be written in TypeScript.
All new files under `src` and `server` should be written in TypeScript using the `id` attribute instead of `templateId`. All new features should be built using TypeScript.

All new features should be built using TypeScript.
Existing features can be ported over to TypeScript by adding changing the file extension from `.js` to `.ts`/`.tsx`.

In case you want to help porting features over to TypeScript, feel free to open an issue or pull request.
If you want to contribute to the TypeScript migration, feel free to open an issue or pull request.
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Heroku is a platform supporting one-click deployments and includes a free usage

[![button](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/dungeon-revealer/dungeon-revealer/tree/v1.17.1)

### Using the app
### Using the dungeon-revealer App

The app is separated into two sections. One for the dungeon master and one for the players. Check out the [wiki](https://github.com/dungeon-revealer/dungeon-revealer/wiki) for a detailed walkthrough!

Expand All @@ -106,9 +106,11 @@ To clear areas of the map, click and draw on the map. You can switch the brush m

To switch to a different map, click "Map Library", and then select one of the maps you have already uploaded and click "Load". The "LIVE" indicator in the lower right indicates if the map currently on the dungeon master page is being presented on the player page. the "Stop Sharing" button will blank the player page in preparation for a new map to be loaded.

You can add token with the "Token" tool. Click anywhere on the map to place it. The token can be changed by opening the context menu trough right-clicking on a single token. You can alter it's label, color and size.
**Keyboard Shortcuts for Players**

##### Shortcuts
- `Long Click` - Place a point of interest on the map.

##### Keyboard Shortcuts for the Dungeon Master

| Key | Functionality |
| -------------- | --------------------------------------------------------------------------------------------- |
Expand All @@ -118,12 +120,17 @@ You can add token with the "Token" tool. Click anywhere on the map to place it.
| `4` | select mark tool. |
| `5` | select token tool. |
| `Shift` | toggle between hide/reveal. |
| `CMD/Ctrl + S` | push map to players. |
| ``CMD/Ctrl + S` - Push map to players.` | push map to players. |
| Hold `Alt` | use move tool while `Alt` key is pressed and return to previous mode after `Alt` is released. |

#### Players

Navigate to the server using a web browser and wait at the home page. (The connection information is displayed in command prompt for convenience.) When the dungeon master is ready, they will push a map to your webpage. You will see either a black screen or a partially covered image. You can zoom in/out and pan the map. On a long click you will place a "point of interest" on the map that will show as a red circle.
**Player Functionality**

Navigate to the server using a web browser and wait at the home page. (The connection information is displayed in command prompt for convenience.) Once the dungeon master is ready, they will push a map to your webpage. You will see either a black screen or a partially covered image. You can zoom in/out and pan the map. On a long click, you will place a "point of interest" on the map that will show as a red circle.
**Keyboard Shortcuts for Players**

- `Long Click` - Place a point of interest on the map.

## Contributing

Expand Down
15 changes: 12 additions & 3 deletions server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const getListeningAddresses = () => {
};

bootstrapServer(env).then(({ httpServer }) => {
httpServer.on('error', (err) => {
httpServer.on('error', (error) => {
console.log('Server startup error:', err);
process.exitCode = 1;
process.exit(1);
Expand Down Expand Up @@ -68,7 +68,7 @@ Player Section: ${addresses[0]}
DM Section: ${addresses[0]}/dm`);

console.log(`\n-------------------\n`);
process.on('SIGINT', () => {
process.on('SIGINT', shutdownHandler);
console.log("Shutting down gracefully");
httpServer.close((err) => {
if (err) {
Expand Down Expand Up @@ -97,9 +97,18 @@ DM Section: ${addresses[0]}/dm`);
httpServer.close((err) => {

if (err) {
console.error('Server shutdown error:', err);
console.error('Server shutdown error:', err);
if (err) {
process.exitCode = 1;
}
process.exit(1);
} else {
});
process.on("SIGINT", shutdownHandler);
});
});
process.on("SIGINT", shutdownHandler);
});
console.log('Server shut down gracefully.');
process.exit(0);
}
Expand Down
6 changes: 3 additions & 3 deletions wiki/Dice-Macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ As well as the following custom components for structuring content:
- BoxRow (Horizontal row)
- BoxColumn (horizontal row column)

Variables can bes set by using the variable name surrounded by curly brackets `{{myVariable}}`.
Variables can be set by using the variable name surrounded by curly brackets `{{myVariable}}`.

The template can be used by setting the `templateId` attribute to the Template `id`. In addition variable values can be passed by setting them as attributes on the `ChatMacro` and prefixing them with `var-`.

Expand Down Expand Up @@ -148,11 +148,11 @@ This allows powerful features such as conditionals, variable declarations and ma
"value": 0,
"min": -20,
"max": 20
}}

>
{% assign attackRoll = "1d20" | diceRoll %}
{% assign result = attackRoll.result | plus: vars.handicap %}
<div style="color:red;font-weight:bold">Attack with {{weapon}}</div>
<div>Attack with {{weapon}}</div>
<div>
<span style="font-weight:bold">Attack Roll:</span>
{% renderDiceRoll attackRoll %}
Expand Down
Loading