1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-21 14:02:59 +01:00
Commit Graph

292 Commits

Author SHA1 Message Date
Ted John
f7bbaed7f5 Increment plugin API version 2021-02-18 18:10:29 +00:00
Ted John
3f5698b1e0 Fix REPL write line on Linux 2021-02-16 20:24:51 +00:00
Ted John
17450c236e Increment plugin API and update changelog 2021-02-08 22:28:59 +00:00
Ted John
d2a97ab43c Implement scenario select window 2021-02-08 22:27:28 +00:00
Cory Sanin
456202b0f5 Feature: Use allowed_hosts when creating listening socket 2021-02-06 16:47:56 +01:00
Matt
1aa75f04b7 Add templated version for tile element insertion and cleanup code 2021-02-05 12:22:34 +02:00
Matt
71174b8de7 Make the insertion of tile elements type explicit 2021-02-04 19:00:59 +02:00
Michael Steenbeek
e3a1af3d05 Use getters/setters for track type and direction 2021-01-30 15:16:17 +01:00
Ted John
c2eb6d4153 Improve plugin API and type definitions 2021-01-28 20:52:17 +00:00
Ted John
4d8faee062 Increment plugin API version 2021-01-27 00:28:59 +00:00
Ted John
19f0d8dfe9 Fix #13842: News is imported incorrectly 2021-01-20 12:35:11 +01:00
skdltmxn
7ef4d7762f Refactor to avoid unnecessary copies (#13736)
* Refactor to avoid unnecessary copies

* Fix dangling references
2021-01-11 18:14:15 -03:00
Duncan
d5ada2dca1 Remove type from SpriteBase (#13735)
* Move type field into sub structures

* Use type for misc_type

* Use type for l_type

* Rename to SubType

* Rename SpriteGeneric to MiscEntity

* Rename generic to misc

* Add extra nullptr checks for compilers that cant understand

* Make review changes

* Increment network version

* Update replays
2021-01-10 15:14:34 +00:00
Michael Steenbeek
1da6ae6b51 Merge pull request #13710 from skdltmxn/refactor/string_view
Refactor/string view
2021-01-10 13:37:01 +01:00
skdltmxn
b0a8ebc808 Refactor to use push_back more efficient (#13726) 2021-01-08 20:59:55 +00:00
Basssiiie
1abb81ef81 Re-add 'edgesAndCorners' support for footpaths (#13720) 2021-01-07 19:15:23 +00:00
skdltmxn
e1cfa8693f Use c_str() instead of data() 2021-01-07 04:28:19 +09:00
skdltmxn
c093a50f3f Refactor to use string_view more properly 2021-01-07 01:52:10 +09:00
ζeh Matt
30aea2bb2a Merge pull request #13667 from ZehMatt/refactor/invalidation
Simplify object invalidation automatically when possible
2021-01-03 20:10:15 +02:00
Sadret
d22c2edee5 Implement #13384: Expose all TileElement data to plugin API 2021-01-03 18:42:21 +01:00
Ted John
6fb7921dbd [Plugin] Add context.setInterval and context.setTimeout 2021-01-03 16:08:35 +01:00
Matt
19b63a1825 Refactor logic of MoveTo to always imply invalidation 2021-01-02 16:22:28 +02:00
Matt
efa1db826e Refactor invalidation logic to be generic to the callee 2021-01-02 16:22:28 +02:00
Matt
cb719a6e10 Add missing case statements for entity scripting 2021-01-02 15:31:26 +02:00
Matt
5f2945d238 Refactor MISC_SPRITE to strong enum 2021-01-02 15:30:44 +02:00
Bas
918bd015b5 Increment plugin version, update changelog 2020-12-29 15:49:26 +01:00
Bas
7848a39e6c Rename car 'move' method to 'travelBy' 2020-12-29 15:41:27 +01:00
Bas
7d819c0714 Remove unnecessary Invalidates from plugin car.move() method 2020-12-29 15:41:26 +01:00
Bas
e44c17957b Replace track position setter with new move method 2020-12-29 15:41:26 +01:00
Bas
32bccf4a7c Run clang-format on ScEntity.hpp 2020-12-29 15:41:25 +01:00
Bas
d5a9881f91 Add track progress property to vehicles 2020-12-29 15:41:25 +01:00
Mike Jones
4e991beb8d Closes #12419: Merge MISC_COMMAND and GAME_COMMAND into strong enum (#13103)
Merge MISC_COMMAND and GAME_COMMAND enums

Cleanup
2020-12-22 20:53:37 -03:00
Cory Sanin
c28a1fc2bc Fix: Docker build failure (#13605) 2020-12-18 10:20:57 +01:00
Cory Sanin
82fd8506ad Feature: Add allowed_hosts to plugin section of config 2020-12-17 22:25:05 +01: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
Ted John
5a849ededf Fix plugin crash when nested scope occurs (#13556) 2020-12-09 22:38:15 -03:00
Ted John
687fd6d9f4 Increment plugin API version 2020-12-05 18:32:28 +00:00
Ted John
be8736ffaa Fix: #13509 [Plugin] Add ability to format strings 2020-12-05 18:26:35 +00:00
Ted John
acaa72cce8 Add more park attributes to plugin API 2020-12-05 18:26:34 +00:00
Ted John
b1403db509 Fix #13495: Add properties for park value, guests and company value 2020-12-05 18:26:34 +00:00
Ted John
d58d834925 Merge pull request #13212 from IntelOrca/new-format-string
Eradicate all coded format tokens. All internal strings now contain raw tokens such as `{STRINGID}` and `{RED}`. New iterators have been created to iterate the tokens and the UTF-8 codepoints.

Formatting strings has been re-written and a new template version is available.
2020-12-04 13:56:54 +00:00
Łukasz Pękalski
3de233c796 Close #12395: Refactor PeepItem to use strong enum (#13311)
* refactor: integrated PEEP_ITEM into SHOP_ITEM

* refactor: converted merged enum to flag

Only former occurrences of PEEP_ITEM

* cleanUp: code cleaned after merging

* refactor: converted ShopItem to strong enum

code reformatting

* refactor: ShopItem enum items renamed

code formatted

* refactor: new getter and setter functions for Item...Flags

* refactor: replaced all occurrences of ItemStandardFlags

with appropriate getter and setter functions.
COMPARE_FIELD macro needs to be commented out or the flag has to stay public.

* refactor: all occurrences of ItemExtraFlags replaced

with proper function calls. COMPARE_FIELD macro issue not resolved.

* refactor: introduced new variable for unified item flags

* refactor: adapted accessor functions

accessor functions were modified to accommodate both standard and extra ShopItem flags

* refactor: ItemExtraFlags accessor functions are replaced

with general functions

* refactor: reverted to original uint32_t flag variables

* refactor: implemented suggested changes

* refactor: integrate additional comments

* refactor: incorporated requested changes

* refactor: incorporated requested changes

added static_cast<PeepThoughtType> in lines 1572 and 1590
2020-12-03 21:15:59 -03:00
Ted John
55dc985c57 Fix #13469: Exception thrown from plugin in context.subscribe (#13470)
Throw a JavaScript exception, not a C++ exception when invalid parameters are passed to subscribe.
2020-11-28 14:03:15 +01:00
Ted John
b6a688e540 Refactor format tokens 2020-11-27 18:54:57 +00:00
Nick
67f5ce62b3 Plugins - return result from StaffHireAction (#13459)
* Added some scripting glue to StaffHireNewAction

* Update src/openrct2/scripting/ScriptEngine.cpp

Co-authored-by: Ted John <ted@brambles.org>

* Update plugin api version

Co-authored-by: Ted John <ted@brambles.org>
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-11-26 16:37:07 -03:00
Duncan
b5101d085d Add further plugin visitors for actions (#13458)
* Add further plugin visitors for actions

* Update PLUGIN_API_VERSION

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-11-26 16:13:10 -03:00
Duncan
9451578cad Fix #13454. Use File class so that utf8 paths understood (#13455) 2020-11-25 13:37:07 +00:00
maksimdrachov
1815a094bb Fix #13426: Typo in "repay loan" 2020-11-19 19:45:40 +01:00
Łukasz Pękalski
7648feeba2 Close #12427: Refactor OBJECT_TYPE to use strong enum 2020-11-11 16:07:01 +01:00
Łukasz Pękalski
832fd69822 refactor: changed ObjectType enum to strong enum
code does not compile yet
2020-11-11 16:07:01 +01:00