Skip to content

Commit

Permalink
finalize v1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Sadret committed Mar 28, 2021
1 parent 08ae2bf commit 315c8b7
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 33 deletions.
9 changes: 9 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
1.2.0
------------------------------------------------------------------------
- Feature: [#2] Hotkey support.
- Feature: [#12] Toggle area selection tool and placing scenery cursor.
- Feature: [#16] Cut (copy and remove) templates.
- Improvement: Complete overhaul of the main window.
- Improvement: Complete overhaul of the file dialogs.
- Fix: [#20] Brush tool controls bugged.

1.1.7
------------------------------------------------------------------------
- Feature: Scatter tool for random scenery placement.
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rollup-test",
"version": "1.0.0",
"version": "1.2.0",
"description": "Test project for rollup.",
"author": "Sadret",
"license": "GPL-3.0",
Expand All @@ -10,4 +10,4 @@
"tslib": "^2.1.0",
"typescript": "^4.2.3"
}
}
}
82 changes: 58 additions & 24 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,58 +2,93 @@

An OpenRCT2 plug-in to copy and paste scenery, with many more features.

<a href="http://www.youtube.com/watch?feature=player_embedded&v=xH_dSPXPLAg" target="_blank"><img src="http://img.youtube.com/vi/xH_dSPXPLAg/0.jpg" alt="Launch Trailer" width="480" height="360" border="10" /></a>

## Installation

1. Make sure that your OpenRCT2 version is up-to-date. You need at least version `0.3.3` (as of 2020-12-04: not yet released) or a recent development version.
1. Make sure that your OpenRCT2 version is up-to-date. You need at least version `0.3.3` or a recent development version.
2. Go to the [releases](https://github.com/Sadret/openrct2-scenery-manager/releases) page and download the `scenery-manager.js` file from the latest release. Save it in the `plugin` subfolder of your OpenRCT2 user directory.\
On Windows, this is usually at `C:Users\{User}\Documents\OpenRCT2\plugin`.
3. Start OpenRCT2. If this is the first time that you use this plug-in, it should show a welcome message.

## Usage

#### Copy and Paste
#### User Interface

The preferred way to work with this plug-in is to use hotkeys. Nevertheless, everything can also be done via the Scenery Manager window.\

To open the graphical user interface, click on "Scenery Manager" in the map menu in the upper toolbar of OpenRCT2.
To open the window the graphical user interface, click on "Scenery Manager" in the map menu in the upper toolbar of OpenRCT2, or simply press the `[W]` key.

If you want to change any hotkey, go to the 'Controls and Interface' tab of OpenRCT2's 'Options' window.

#### Copy and Paste

Click the "Select Area" button to activate the selection tool. You can now select an area of the map with click and drag (click the left mouse button and hold it down, move the cursor, release the button).\
- Select Area `[CTRL + A]`: Activates the selection tool. You can now select an area of the map with click and drag (click the left mouse button and hold it down, move the cursor, release the button).\
Click the button again to cancel the selection.

Click the "Copy area" button to copy the selected region to the clipboard.
- Copy Area `[CTRL + C]`: Copies the selected region to the clipboard and switches to paste mode.

Click on any scenery template in the clipboard or the library to paste it. If you now hover the cursor over the map, a ghost of the scenery template will be shown. Click anywhere to place the scenery template at the shown location.
- Paste Area `[CTRL + V]`: Activates the paste mode. If you now hover the cursor over the map, a ghost of the scenery template will be shown. Click anywhere to place the template at the shown location.

- Cut Area `[CTRL + X]`: Copies and then removes the selected area.

- Rotate Template `[Y]`: Rotates the template. Only works in paste mode.

- Mirror Template `[CTRL + M]`: Mirrors the template. Only works in paste mode.

Note that any tool in OpenRCT2 can be cancelled by pressing the `[ESC]` key.

#### Filter

Check or uncheck any of the checkboxes in the filter section of the window. It will affect both copy and paste actions.
Check or uncheck any of the checkboxes in the filter section of the window. It will affect both copy and paste actions.\
You can also use the `[CTRL + 1]` through `[CTRL + 0]` hotkeys.

#### Additional Copy & Paste Features

#### Options
- You can paste the template at a certain height offset, which you can set in the 'Options' area of the first tab.

When pasting a scenery template, rotate or mirror it via the elements in the options section.
- Another way to change the height is by enabling 'height offset with mouse cursor' in the settings tab. If enabled, hold down the mouse button in paste mode and then move the cursor up and down to adjust the height of the template.

There are two different modes how the paste height is calculated:\
\- "Relative to surface" (default): The pasted scenery template has the same height relative to the surface as the original scenery.\
\- "Absolute height": The pasted scenery has the same absolute height as the original scenery.\
Additionally, you can manually change the height with an offset.
- The same thing as above works with rotation by moving the cursor left or right.

- There are two different area selection modes:
- "surface" (default): The map tile that the cursor selects is determined by the surface element that the cursor points to. So it ignores any scenery, track or entities.
- "scenery" (old behaviour): The map tile that the cursor selects is determined by the element directly under the cursor, let it be scenery, track or surface.

You can change the mode in the 'Options' area or by pressing `[CTRl + T]`.

- By default, if you try to paste a template which includes elements that cannot be pasted on the current map, it gives you an error. This behaviour can be changed in the settings tab.

#### Clipboard

The clipboard is a simple temporal storage for every copied scenery template. Although it won't be cleared automatically at any point, it should be seen as a short-lived for quick use.
Any copied or loaded template gets added to the clipboard. You can cycle through the entries of the clipboard with the `[Q]` (previous template) and `[E]` (next template) keys. You can delete the current template with the `[CTRL + D]` hotkey.

Click on any scenery template in the clipboard to paste it. Once selected, you can also rename, delete, or save it to the library.
IMPORTANT: Unlike in previous versions of the Scenery Manager, the clipboard will not be persistent across sessions. If you want o keep your copied templates, save them to the library!

#### Library

The library consists of an editable structure of folders and files (i.e. scenery templates), just like any other file system. Here you can store all your creations in a well-ordered manner.\
The library consists of an editable structure of folders and files (i.e. scenery templates), just like any other file system. Here you can store all your creations in a well-ordered manner.

You can find the library in the second tab. Double-click any template to load it. Alternatively you can use the buttons in the first tab or the hotkeys:

- Load Template `[SHIFT + L]`: Opens a window to select and load a template. The template is then added to the clipboard.

- Save Template `[SHIFT + S]`: Opens a window to save the clipboard's current template to a new file or override and existing one.

#### Scatter Tool

The third tab includes the scatter tool. It is a brush that randomly places scenery from a previously selected palette.\
You can enable 'drag to place' in the settings.

#### Bench Brush

The fourth tab is the bench brush, which works similar to the scatter tool. It can place footpath additions, such as benches, litter bins, lamps or queue TVs, in a predefined pattern onto existing footpaths.

## Known Problems

- Sloped fences and walls do not copy.
- Banner text and color do not copy.
- Copy / paste does not work well on sloped surfaces.
- Banner text and colour do not copy.
- Large scenery does not mirror.
- Ghost banners sometimes does not show.
- Scroll position resets when list content changes.
- Queue layouts do not copy correctly.

## Planned Features

Expand All @@ -68,9 +103,8 @@ The library consists of an editable structure of folders and files (i.e. scenery
- (Instancing system.)
- Whatever you propose.

Follow me on social media to learn about upcoming features:\
YouTube: [Sadret Gaming](https://www.youtube.com/channel/UCLF2DGVDbo_Od5K4MeGNTRQ/) or
Twitter: [@SadretGaming](https://twitter.com/SadretGaming)
Subscribe to my YouTube channel to learn about upcoming features:
[Sadret Gaming](https://www.youtube.com/channel/UCLF2DGVDbo_Od5K4MeGNTRQ/)

## Support Me

Expand Down
2 changes: 1 addition & 1 deletion src/Shortcuts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function register() {
id: "scenery-manager.mirrored",
text: "[SM] Mirror template",
bindings: ["CTRL+M", "GUI+M"],
callback: () => Clipboard.settings.mirrored.flip(),
callback: Clipboard.mirror,
});
ui.registerShortcut({
id: "scenery-manager.cursorMode",
Expand Down
3 changes: 3 additions & 0 deletions src/Updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ export function update(load: () => void): void {
setVersion();
return load();

case "1.3.0":
return load();

default:
return Dialog.showConfirm(
"Welcome to Scenery Manager!",
Expand Down
6 changes: 6 additions & 0 deletions src/core/Clipboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ export function getTemplate(): Template | undefined {

function addTemplate(template: Template): void {
settings.rotation.setValue(0);
settings.mirrored.setValue(false);
cursor = templates.length;
templates.push(template);
builder.rebuild(); // rebuild if already active
Expand Down Expand Up @@ -249,6 +250,11 @@ export function rotate(): void {
settings.rotation.increment();
}

export function mirror(): void {
if (builder.isActive())
settings.mirrored.flip();
}

export function deleteTemplate(): void {
if (cursor === undefined)
return ui.showError("Can't delete template...", "Clipboard is empty!");
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import MainWindow from "./window/MainWindow";

registerPlugin({
name: "scenery-manager",
version: "1.1.7",
version: "1.2.0",
authors: ["Sadret"],
type: "local",
licence: "GPL-3.0",
Expand Down
9 changes: 4 additions & 5 deletions src/window/tabs/Research.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,16 @@ export default new GUI.Tab(
).add(
new GUI.Label({ text: "Version: 1.2.0", }),
new GUI.GroupBox({ text: "Latest changes" }).add(
new GUI.Label({ text: "- Scatter tool for random scenery placement." }),
new GUI.Label({ text: "- Use mouse to adjust height and rotation of templates." }),
new GUI.Label({ text: "- Brush for benches, litter bins, etc." }),
new GUI.Label({ text: "- Hotkeys for most operations." }),
new GUI.Label({ text: "- Cut (copy and remove) templates." }),
new GUI.Label({ text: "- [BETA] Trackitecture is now supported." }),
),
new GUI.GroupBox({ text: "Known problems" }).add(
new GUI.Label({ text: "- Sloped fences and walls do not copy." }),
new GUI.Label({ text: "- Copy / paste does not work well on sloped surfaces." }),
new GUI.Label({ text: "- Banner text and colour do not copy." }),
new GUI.Label({ text: "- Large scenery does not mirror." }),
new GUI.Label({ text: "- Ghost banners sometimes does not show." }),
new GUI.Label({ text: "- Scroll position resets when list content changes." }),
new GUI.Label({ text: "- Queue layouts do not copy correctly." }),
),
new GUI.GroupBox({ text: "Planned features" }).add(
new GUI.Label({ text: "- Colour brush." }),
Expand Down

0 comments on commit 315c8b7

Please sign in to comment.