Commit Graph

28 Commits

Author SHA1 Message Date
Gymnasiast c158854a7f
Move Park into namespace, add other park-related things to struct 2024-04-04 18:14:27 +02:00
Peter Froud d1f740c786
Change "Could not find X" to "No X" 2024-03-30 17:12:54 +01:00
Duncan 4b6ba80a46
Move cheats to struct in GameState_t 2024-03-03 22:44:15 +01:00
Harry Hopkinson 14f0479c94
Refactor constants/macros (#21483)
* Refactor constants in AudioMixer.h

* Refactor constants in Map.h

* Rename kMinimumLandHeight_BIG to kMinimumLandZ
2024-03-01 20:23:29 +00:00
Peter Froud 40a7fa70fc
Fix empty error messages (#21351)
* Add `STR_ERR_CANT_CHANGE_PARK_ENTRANCE_FEE`

* Add `STR_ERR_TRACK_ON_THIS_TILE_NEEDS_WATER`

* Return existing `GameAction::Result`

* Add `STR_ERR_ACTION_INVALID_FOR_THAT_STAFF_TYPE`

I am open to suggestions for a different message!
Originally this was going to be STR_ERR_WRONG_STAFF_TYPE
but I thought that was confusing because the game
action arguments do not specify a staff type. We
want it to mean "the staff ID you specified is the
wrong StaffType for this game action".

* Refactor `StaffSetColour()` to return `Result`

* Remove unnecessary arguments when `Status` is `Ok`

* Refactor `SwapTileElements()` to return `Result`

Also add STR_ERR_CANT_SWAP_TILE_ELEMENT_WITH_ITSELF

* Format code

* Use `STR_ERR_CANT_CHANGE_PARK_ENTRANCE_FEE` in title

* Format code using Github web editor

* Format indentation
2024-02-19 20:58:04 -03:00
Matt fc1b580074
Merge pull request #21244 from pfroud/add-error-strings
Add error strings to reduce how many `GameActions::Result`s have `STR_NONE, STR_NONE`
2024-01-29 18:02:37 +02:00
Hielke Morsink 13351d996e #21193: Move gParkFlags to GameState_t, refactor uses
Also changed a few instances where GetGameState was called inside the same function.
The change in Peep.cpp is needed because of a function conflict. FormatStringID exists both in the global and in the OpenRCT2 namespace.
2024-01-22 16:31:35 +01:00
Peter Froud 4145f851da Run clang-format 2024-01-22 02:29:08 -08:00
Peter Froud 9299a80a58 Add descriptive error strings for null checks 2024-01-22 01:21:14 -08:00
James103 1d8dc111f1
Replace 2023 with 2024 in copyright headers (#21139)
Replace all instances of the year 2023 with 2024 in all copyright headers
2024-01-01 12:52:28 +01:00
Michael Steenbeek 448c8fafd0
Rename base_height, clearance_height and owner 2023-01-19 20:36:30 +01:00
Hielke Morsink 6b7dc8fcdb
Rename snake_case functions in openrct2/src folder
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-01-17 13:24:51 +01:00
James103 73738bbdc8
Replace 2022 with 2023 in copyright headers
Replace all instances of the year 2022 with 2023 in all copyright headers
2023-01-01 11:58:01 +01:00
Stephan Spengler bd6e572dbc
add all game actions and their documentation to plugin API (#18826) 2022-12-16 21:38:45 +00:00
Duncan 406b73d904
Remove final snakes from map and world (#18304) 2022-10-12 09:14:45 -03:00
Duncan 7dd8989e70
Next chunk of World/Map.h snakes (#18296)
* Next chunk of World/Map.h snakes

* Apply clang-format
2022-10-12 06:35:20 +01:00
Duncan 67bbc8560d
Code style: Remove snakes from everything world apart from Map.h (#18273)
* Remove remaining snakes from world (outside of map)

* Initial few desnaking of Map.h
2022-10-11 19:39:24 +01:00
duncanspumpkin 3e8dc1b2ac Remove snakes from the foopaths 2022-10-04 20:08:14 +01:00
73 b9e677945d
Replace 20XX with 2022 (#18158)
* Replace 2020 with 2022

Replace all 2020 headers with 2022

* replace other years with 2022

add missing years
2022-10-01 08:42:14 +01:00
Gymnasiast d3fd31c611
Rename rct_string_id to StringId 2022-07-31 22:30:13 +02:00
Ted John 454bfb0a8f Refactor map size to allow for rectangle maps 2022-02-14 23:15:59 +00:00
ζeh Matt 83b911b193
#15634: Refactor passing GameActions::Result by copy (#15951)
* Refactor to result GameActions::Result as copy instead of unique_ptr

* Remove alias GameActions::Result::Ptr

* Remove MakeResult wrapper

* Remove type forwarder in TileInspector
2021-11-24 07:35:08 +00:00
ζeh Matt d8a255562a
Refactor explicit constructor usage in WaterSetHeightAction 2021-10-27 04:32:06 +03:00
ζeh Matt 7a30169c28
Refactor out construction clearance into a new compilation unit 2021-10-20 22:21:54 +03:00
ζeh Matt 7fc49fca39
Replace StringVariant with std::variant 2021-10-20 16:35:58 +03:00
Duncan 940cab87d3
Map size refactors from NSF (#15112)
* Support large map sizes

* Fix top spin painting

* Fix crooked house

* Increase bb size

* Decrease limit back

* Clang format

* Remove asserts and apply review comments

* Fix rebase mistake

Co-authored-by: Ted John <ted@brambles.org>
2021-08-16 20:51:16 +01:00
Tulio Leao 9ef4931982
Move remaining game actions logic from header to source (#13573)
* Moving all definitions from R...Actions to source

* Moving all definitions from S...Actions to source

* Moving all definitions from T...Actions to source

* Moving all definitions from W...Actions to source
2020-12-12 07:18:38 +00:00
Adam f09b14ef2b
Split actions hpp files into separate h and cpp files (#13548)
* Split up SmallSceneryPlace/Remove

Added undo function for Remove Scenery

* Refactor: Balloon and Banner actions hpp=>h/cpp

* Refactor: rename all action *.hpp files to *.cpp

This is preparation for separation in later commits. Note that without
the complete set of commits in this branch, the code will not build.

* Refactor Clear, Climate, Custom, and Footpath actions hpp=>h/cpp

* VSCode: add src subdirectories to includePath

* Refactor Guest actions hpp=>h/cpp

* Refactor Land actions hpp=>h/cpp

* Refactor LargeScenery actions hpp=>h/cpp

* Refactor Load, Maze, Network actions hpp=>h/cpp

* Refactor Park actions hpp=>h/cpp

* Refactor/style: move private function declarations in actions *.h

Previous action .h files included private function declarations with
private member variables, before public function declarations. This
commit re-orders the header files to the following order:
- public member variables
- private member variables
- public functions
- private functions

* Refactor Pause action hpp=>h/cpp

* Refactor Peep, Place, Player actions hpp=>h/cpp

* Refactor Ride actions hpp=>h/cpp

* Refactor Scenario, Set*, Sign* actions hpp=>h/cpp

* Refactor SmallScenerySetColourAction hpp=>h/cpp

* Refactor Staff actions hpp=>h/cpp

* Refactor Surface, Tile, Track* actions hpp=>h/cpp

* Refactor Wall and Water actions hpp=>h/cpp

* Fix various includes and other compile errors

Update includes for tests.
Move static function declarations to .h files
Add explicit includes to various files that were previously implicit
(the required header was a nested include in an action hpp file, and the
action .h file does not include that header)
Move RideSetStatus string enum to the cpp file to avoid unused imports

* Xcode: modify project file for actions refactor

* Cleanup whitespace and end-of-file newlines

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-12-10 06:39:10 +00:00