Commit Graph

184 Commits

Author SHA1 Message Date
adam-bloom 9dc065c2a7 edit contributors 2021-10-09 14:59:58 -06:00
Gaven Rendell 7787bb46e0 Handle mod key edge-cases in tiling WMs
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.
2021-10-08 21:25:33 +01:00
Soham Roy 4d27417fd2
Fix #11354: Coding style causes undefined behaviour
An underscore followed by a capital letter used as a prefix might cause
undefined behaviour
2021-10-05 13:58:50 +02:00
seanmajorpayne 33fbad9726
Fix #15257: Chat widgets removed from Scenario Editor (#15365)
* 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
2021-09-08 12:39:34 +02:00
spacek531 cba52b240e
Bird animation (#15294)
* initial implementation;

progress 1

progress 2

refactor to chain start

progress 3

begin walking

finish bird

remove walking

remove unused functions

refactor track element getting

fix formatting

refactor and add comments

remove brackets from simple if-else statements

invalidate vehicle

refactor again

fix format and refactor

please satisfy clang format

fix fallthrough

invalidate default case

remove redundant falltrhough

network bump

use std::max

refactor animation again

fix modulus

* move array declaration

* satisfy clang-format

* add changelog entry
2021-08-29 10:30:34 +01:00
Basssiiie 23bae61b7a
Add new plugin API properties to entity, ride and park 2021-08-11 13:54:00 +02:00
ocalhoun6 8a09406b64
Fix #13465: Creating a scenario based on a won save game results in a scenario that’s instantly won 2021-08-04 13:31:53 +02:00
saad 0df5d3cdf2 add name to list of contributors 2021-07-31 02:07:35 +04:00
andrewpratt64 62d66ca9d0
Add hook for vehicle crashes to plugin api (#15084)
* 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>
2021-07-30 09:03:15 -03:00
Kane dbdca55645
Fix #14316: Closing the Track Designs Manager window causes broken state
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.
2021-07-29 12:44:24 +02:00
Struan Clark aa69593064
Close #12626: Allow completing RCTC scenarios with RCT2 saves 2021-07-19 16:12:03 +02:00
Daniel Karandikar b017ea4159
Fix [#12262]: Windows can appear off screen in some cases (#14881)
Fix: [#12262] Windows can appear off screen with small screens or high scaling.
2021-07-03 09:38:39 -03:00
KirilAngelov 97002cae5d
Close #14804: Rename isBanner to isDoubleSided 2021-06-03 12:18:22 +02:00
Emre Aydin ac80ca7b46 Refactored code to use a constant for max circuits 2021-06-02 17:48:09 +03:00
Silent 94da3cf422
Fix #13445: Make FileScanner::ScanDirectory return a unique_ptr
Also fixes a resource leak in TitleSequence::GetSaves.
2021-05-20 19:22:36 +02:00
zrowny f6f5b41b76
Correct palette indexes of remap colors in image importer
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.
2021-05-13 16:30:35 +02:00
Basssiiie 5480c99e0b
Rename previously unknown vehicle flags, and json strings to camelCase 2021-05-13 13:34:32 +02:00
Ryan eb9ed63b0e
Fix some actions for plugins (#14607)
* 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
2021-05-09 22:04:03 +01:00
Geoff B 0532ebab7a
Fix #14095: Holding down [-][+] buttons does not change number of circuits 2021-02-17 08:51:07 +01:00
Adam 1b61b4b104
Fix #13489: Mechanics continue heading to inspect broken down rides (#13490)
* Fix #13489: Mechanics continue heading to inspect broken down rides
2020-12-05 15:05:55 -03:00
Aaron van Geffen 158e83fee3 Move Aaron to 'Former development team members' 2020-11-01 20:36:44 +01:00
evilclownattack 3e7ff12a72
Fix #13292: Impossible excitement rating requirements
Incorrect argument was used when drawing the minimum excitement rating in the Objective Selection window.
2020-10-28 23:55:29 +01:00
Aaron van Geffen 8414fa24b5 Add X7123M3-256 to contributor list 2020-10-11 12:26:39 +02:00
Keith Stellyes 3468d1fc6b
Close #13125: Selecting the RCT2 files now uses localised dialogs 2020-10-09 21:13:14 +02:00
gsckoco 0e607fff43 Added myself to contributors.md 2020-09-28 12:29:22 +01:00
rpstester 48f1335559
Add rpstester to list of Bug Fixes (#12937)
* Add rpstester to list of Bug Fixes

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-09-15 22:31:24 -03:00
Sadret a9cd89d02e
Fix #12912: Plugin: selectedCell of CustomListView (#12913) 2020-09-12 19:24:23 -03:00
Tom Parsons 9a30100a81
Make all GameAction types accessible to plugins (#12708)
* 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.
2020-09-10 12:30:56 +01:00
Richard Fine d2d9750a5b Fix #5753: Entertainers make themselves happy instead of the guests
After identifying guests that are near an entertainer, modify the guest's HappinessTarget and TimeInQueue values instead of the entertainer's own values.
2020-09-08 16:40:29 -04:00
Simon Jarrett e66aff5116 Adding mwnciau to contributors.md 2020-08-18 17:03:36 +01:00
ryan-bello c2efa230dd Added ryan-bello to contributors.md 2020-08-17 23:04:53 -04:00
TELK ea5aebe08c
Update telk5093's name (#12660) 2020-08-12 19:01:46 +02:00
Arran Ireland 89e4714198
Close #12331: Use CoordsXY in track_remove_station_element (#12609)
* 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.
2020-08-09 07:25:44 +01:00
quale 96475e2eb0 Added myself to contributors.md 2020-08-05 18:08:34 +02:00
Łukasz Pękalski 0f78d452a4
Part of #12497: Remove extra SPRITE_INDEX_NULL check (#12538)
* 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
2020-08-02 08:28:11 +01:00
Sidney fbdd1042b8
Fix #12486: `set-rct2` has a broken g1.dat check 2020-07-28 22:32:28 +02:00
Lars Sørensen a55f1947bd
Add Danish translation and LPSGizmo to contributors.md (#12507) 2020-07-28 11:49:19 +02:00
chaitanyathengdi 33a88fbdbd
Fix #10946: On-ride photo profit assumes every guest buys one (#12285)
* 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
2020-07-25 07:19:51 +01:00
rdbaris a2493af9ce
Part of #11159 (purge malloc() & free()) (#11893)
* Used smart pointers

* Changed functions to take vector as input
2020-07-16 22:35:30 +01:00
michael coates 01d0287ee2
Close #12253: Refactor Vehicle sound to remove goto (#12267)
* Refactor Vehicle Scream Sound goto

* updated contributors
2020-07-15 07:48:47 +01:00
Helio Santos 54acc20a77 Add heliobatimarqui contributors.md
Inserted my name on contributors file
2020-07-09 10:57:19 -07:00
Jimver efb876f2b5
Edit Jimver contributions 2020-07-09 14:20:44 +02:00
Jim 0248621502
Increase handyman randomness in queue (#12145)
* Increase randomness when handyman is on queue path

* Add myself to contributors

* Refactor hex variable probabilities

* Add check if queue is connected to a ride

* Update changelog

* Bump network version

* Update replays

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-07-08 19:48:08 +01:00
Michał Janiszewski f862935723
Update janisozaur team role 2020-07-08 08:07:46 +02:00
Gymnasiast 9a9ab47856
Remove Twitch from the rest of the code 2020-05-28 09:28:32 +02:00
hdpoliveira d511d3f820
Add hdpoliveira as a contributor (#11591) 2020-05-01 23:59:46 -03:00
tylerleamon 30e6b475a9
Fix #5451: Guests scream on every descent, no matter how small 2020-05-01 22:05:52 +02:00
Mustapha Elghoul b138cb46ba
Name Flags in PeepThoughtToActionMap 2020-04-22 18:50:53 +02:00
ThomasZ 401504aff9 Fix #11075: SpriteListHead Refactor
Refactor "for (spriteIndex = gSpriteListHead[SPRITE_LIST_PEEP]; spriteIndex != SPRITE_INDEX_NULL; spriteIndex = nextSpriteIndex)" like for loops across files with replacing them by FOR_ALL_PEEPS(sprite_index, peep). The same for FOR_ALL_STAFF, FOR_ALL_GUESTS where necessary.

modify incorrect codestyle

modifying incorrect codestyle of the first attempted PR of issue 11075 (missing space after FOR_ALL_GUEST, FOR_ALL_STUFF ...)

modify codestyle further

Forgot to add one more space, correcting it.

another codestyle correction

apparently there is someting wrong with src/openrct2/peep/Peeps.cpp adding a newline after i = 0;

event further modifying codestyle

changing i = 0; to int i = 0;

another codestyle modification, at this point just trying to pass CI clang

adding another newline

another modification
2020-04-18 10:31:02 +01:00
Aaron van Geffen 97f690ce6d Add Haruna Chinzei to list of Japanese translators. 2020-04-17 15:06:50 +02:00