Use correct file extension when saving from the console or when performing an autosave. Otherwise .park files are generated with the old .sv6 extension.
`COLOUR_WHITE` was being passed as the colour when drawing
any text. The Options window uses the `rct_window::colours`
array for resolving the correct theme colour.
Replacing all occurrences of `COLOUR_WHITE` with
`w->colours[1]` makes the text colours more consistent.
In the details section values are still painted in black
no matter the colour theme, which is consistent with e.g.
the park information window.
This commit ignores keypresses when the mod key is held.
The reasoning is that an odd interaction happens between SDL applications and
tiling window managers. Tiling window managers like Xmonad and i3 usually use
the mod ("windows") key and a number to change workspaces. When changing
workspaces, however, the WMs still send the number key through instead of
"eating" it. It's not clear why, exactly, but it seems universal.
Mod+1 -> Goes to workspace #1
Mod+2 -> Goes to workspace #2
...
Mod+9 -> Goes to workspace #9
Most applications don't even see the number key being sent, so if you move to
workspace 1, Firefox won't type "1" into the browser bar, Vim won't type "1"
into your file, etc. But SDL applications, for whatever reason, DO see this
keydown. Of course, they'll handle it like a regular key press. So if you move
to workspace 1, which contains OpenRCT, it inadvertently toggles x-ray mode.
I first found this bug in another SDL game, The Powder Toy. After some
discussion with the devs, they fixed it like this, by ignoring keydown events
when the mod key is pressed, since the mod key is reserved for the window
manager anyway. It works well and should be in the next release.
c7619387ac...93b920a57f
I did the same thing here.
* Update TopToolbar.cpp
Removed else statement which caused the game to skip toolbar element deactivations.
* Update contributors.md
Adding name to contrib.md
* Update changelog.txt
Updated changelog
* Update changelog.txt
Fixing changelog item position
* Add initial implementation of "vehicle.crash" hook for the scripting api
The hook will fire whenever a vehicle crashes, i.e. an individual car
explodes and it's status becomes "Crashed!"
* Update contributors.md
Add name to contributors list under the "Additional implementation (OpenRCT2)" section.
- If the added line needs to be changed or removed entirely let me know
- I added this based off of the Github wiki: "If it's the first time you're contributing with the project, make sure to update the contributors.md file by appending your name at the end of the respective list."
* Move hook code into function
* Rename hook function
Renamed function, "FireVehicleCrashHook" to "InvokeVehicleCrashHook"
* Wrap InvokeVehicleCrashHook in #ifdef
Move the #ifdef from inside the function body to the outside
* Update changelog and api version
- Added entry to changelog
- Increment API version
* Fix whitespace
Replace tab character with four spaces
* Update src/openrct2/scripting/HookEngine.cpp
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
When exiting the Track Design Manager window the user was placed into the scenario editor in a broken state.
User is now returned to the main menu when the window is closed.
The codes that finds the closest entry that isn't used for remapping has the indices of remappable colors slightly off, and would make some colors in the imported image remappable even though they shouldn't have been.
Comment in header file describing the standard palette corrected as well.
* Fix some actions for plugins
If an action doesn't have an AcceptParameters method, the paramaters passed in executeAction will be ignored and the action will fail.
* Change plugin parameter names
* Increment plugin API version
* add ActionType
* Make all game actions available to plugins
Includes list of game actions in the .d.ts
* Add an overload for internal game actions
This allows things like Visual Studio Code to autocomplete
* action can be a string (custom gameactions)
* Increment OPENRCT2_PLUGIN_API_VERSION
* Add #12708 to changelog and tombomp to contributors.
After identifying guests that are near an entertainer, modify the guest's HappinessTarget and TimeInQueue values instead of the entertainer's own values.
* Update track_remove_station_element signature
Part of #12331: This commit will update the
signature of track_remove_station_element and
its callers, to use CoordsXYZD.
* Fix track_remove_station_element local vars
Part of #12331: This commit will ensure that
references to the previous arguments in
track_remove_station_element will now use the new
CoordsXYZD argument.
* Refactor remove in track_remove_station_element
Part of #12331: This commit refactors the removeX/Y
to use CoordsXY.
* Refactor station0 in track_remove_station_element
Part of #12331: This commit will refactor stationX/Y0
to use CoordsXY.
* Close#12331 track_remove_station_element refactor
This commit refactors stationX/Y1 to use CoordsXY,
and fixes the smallZ vs bigZ problem in callers of
track_remove_station_element. These are the final
changes for this issue.
* Added operator for CoordsXYZD minus CoordsXY.
This commit adds a missing operator for subtracting
a CoordsXY from a CoordsXYZD. This was needed for
refactoring Track.cpp
* Refactor track_remove_station_element Coord use
This commit utilises the overloaded operators for
Coords and ensures that they are used so that the
function implementation is more readable.
* Close#12331 track_remove_station_element refactor
This commit also fixes a bug in which a small Z
value (the Height of a RideStation) was being
updated with a big Z value without scaling. It
adds a few extra refactors in calls of the
track_remove_station_element function, and
changes the contributors to add ion232.
* refactor: deleted double check of SPRITE_INDEX_NULL in Staff* ride_get_mechanic(Ride* ride)
* refactor: deleted double check of SPRITE_INDEX_NULL in Ride.cpp file
* refactor: deleted double check of SPRITE_INDEX_NULL in windows/Ride.cpp in function static rct_string_id window_ride_get_status_vehicle
* refactor: deleted double check of SPRITE_INDEX_NULL in ride/Ride.cpp
* refactor: deleted double check in FormatStatusTo
* Use stored values of customers to adjust income from on-ride photos
Use stored values of photos sold and total customers to calculate ratio
and use that to predict income per hour for rides that include
on-ride-photo sections.
* Get rid of float
* Fix formatting
* Fix formatting - again
* Review changes
* Fix formatting
* Use new method of checking on-ride photo
* Use constants
* Add a changelog and contributors entry