Skip to content

Commit

Permalink
Rename GuestIds with PeepIds
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry-Hopkinson committed Aug 28, 2024
1 parent 1b640e8 commit 4485b44
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# OpenRCT2 Peep Remover

A plugin for OpenRCT2 that allows you to easily remove guests from your park.
A plugin for OpenRCT2 that allows you to easily remove peeps from your park.

![(OpenRCT2 Peep Remover)](https://raw.githubusercontent.com/Harry-Hopkinson/openrct2-guest-remover/main/image.png)

## Features

- Click on the eyedropper and click as many guests as you want to remove.
- Click on the trash can to remove all guests from the park.
- Click on the eyedropper and click as many Peeps as you want to remove.
- Click on the trash can to remove all peeps from the park.
- Cancel the current action by clicking on the cancel button.

## Installation
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "openrct2-guest-remover",
"name": "openrct2-peep-remover",
"version": "1.0.2",
"type": "module",
"license": "MIT",
"description": "A plugin for OpenRCT2 that allows you to easily remove many guests at once.",
"description": "A plugin for OpenRCT2 that allows you to easily remove many peeps at once.",
"scripts": {
"start": "nodemon --watch ./src --ext js,ts --exec \"npm run build:dev\"",
"build": "rollup --config rollup.config.js --environment BUILD:production",
Expand Down
2 changes: 1 addition & 1 deletion src/info.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const name = "openrct2-guest-remover";
export const name = "openrct2-peep-remover";
export const version = "1.0.2s";
export const type = "intransient";
export const license = "MIT";
Expand Down
4 changes: 2 additions & 2 deletions src/ui/MainWindow.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { button, label, window } from "openrct2-flexui";
import { PeepSelect } from "./PeepSelect";
import { RemovePeep } from "../utils/RemovePeeps";
import { GuestIds } from "../utils/stores";
import { PeepIds } from "../utils/stores";
import { PeepMessage } from "../utils/PeepMessage";

export const MainWindow = window({
Expand Down Expand Up @@ -37,7 +37,7 @@ export const MainWindow = window({
button({
text: "Cancel Selection",
height: 23,
onClick: () => GuestIds.set([]),
onClick: () => PeepIds.set([]),
}),
],
});
4 changes: 2 additions & 2 deletions src/ui/PeepSelect.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GuestIds } from "../utils/stores";
import { PeepIds } from "../utils/stores";

export function PeepSelect() {
ui.activateTool({
Expand All @@ -18,7 +18,7 @@ export function PeepSelect() {
ui.showError("You must select a guest", "or staff member");
return;
}
GuestIds.set([...GuestIds.get(), EntityId]);
PeepIds.set([...PeepIds.get(), EntityId]);
ui.tool?.cancel();
}
},
Expand Down
4 changes: 2 additions & 2 deletions src/utils/PeepMessage.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { GuestIds } from "./stores";
import { PeepIds } from "./stores";

export function PeepMessage() {
const selectedPeepIds = GuestIds.get();
const selectedPeepIds = PeepIds.get();
if (selectedPeepIds.length === 0) {
return park.postMessage("No peeps selected");
}
Expand Down
6 changes: 3 additions & 3 deletions src/utils/RemovePeeps.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { GuestIds } from "./stores";
import { PeepIds } from "./stores";

export function RemovePeep(): void {
const SelectedPeepIds = GuestIds.get();
const SelectedPeepIds = PeepIds.get();

SelectedPeepIds.forEach((id) => {
const entity = map.getEntity(id);
Expand All @@ -10,5 +10,5 @@ export function RemovePeep(): void {
}
});

GuestIds.set([]);
PeepIds.set([]);
}
4 changes: 2 additions & 2 deletions src/utils/stores.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { store, WritableStore } from "openrct2-flexui";

let GuestIds: WritableStore<number[]> = store([]);
let PeepIds: WritableStore<number[]> = store([]);

export { GuestIds };
export { PeepIds };

0 comments on commit 4485b44

Please # to comment.