1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 05:23:04 +01:00
Commit Graph

71 Commits

Author SHA1 Message Date
Basssiiie
23bae61b7a Add new plugin API properties to entity, ride and park 2021-08-11 13:54:00 +02:00
ZehMatt
29e5ec634c Add litter entity to scripting 2021-08-07 22:28:48 +03:00
ZehMatt
900f9c9190 Apply code review 2021-08-07 20:33:43 +03:00
ZehMatt
aa2b7d9972 Deprecate peeps property in scripting for Car entity 2021-08-05 17:16:42 +03:00
ZehMatt
a7bef5442b Allow plugins to target a specific API version 2021-08-05 17:16:42 +03:00
ZehMatt
af102e391e Return correct entity type, API breaking change 2021-08-05 17:16:42 +03:00
ZxBiohazardZx
36b2742c19 Change Vehicle Rotation namings in accordance with OpenRCT2 Codestyle (#14616)
* Code Refactor: Rename vehicle_sprite_type to Pitch 

In some of the issues the vehicle_sprite_type is used to check for properties in regards to the pitch of the vehicle.Similarly bank_rotation is used to provide information on the Roll property. This is not in alignment with the https://github.com/OpenRCT2/OpenRCT2/wiki/Coding-Style and makes it harder to refactor other elements of the codebase and makes for undesired nested logics.

This PR also includes the change from rename bank_rotation to Roll in alignment with the OpenRCT2 Coding Style


Related to PullRequest #11956

* Apply formatting

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2021-05-12 12:38:46 +01:00
Duncan
0a47d2157a Use more specific types where appropriate (#14388)
It takes marginally more time to get a Peep than a Guest/Staff so may as well go straight to the correct type
2021-03-25 08:44:25 +00:00
Duncan
977d05ba29 Entity type5: Remove peep assigned type (#14380)
* Remove users of AssignedPeepType

* Remove AssignedPeepType

Field no longer required due to changes to EntityType

* Move enum to the RCT12 header

* Increment network version

* Update replays
2021-03-24 08:54:05 +00:00
Duncan
df7a284822 Entity type 2: Remove sprite_identifier (#14334)
* Start changing the underlying type

* Further work

* Complete refactor

* Further cleanup

* Remove pointless check

* Increment network and plugin versions

* Add defaults

* Further defaults

* Fix test paint

* Update replays
2021-03-17 08:04:41 +00:00
Felix
78785fffbe Add plugin API for vehicle g-forces 2021-03-06 23:25:26 +01:00
Michał Janiszewski
67b61478cf Reduce inclusion of EntityList.h 2021-02-25 10:56:27 +01:00
ζeh Matt
c9ca066e94 Merge pull request #14024 from ZehMatt/refactor/coords-peep-destination
Use CoordsXY for for some types
2021-02-21 15:33:52 +02:00
Duncan
2b26e423e4 Remove AsGuest and AsStaff duplicated functions 2021-02-21 13:23:31 +01:00
Matt
965041b437 Remove direct access to DirectionX and DirectionY 2021-02-21 09:52:33 +02:00
Michael Steenbeek
e3a1af3d05 Use getters/setters for track type and direction 2021-01-30 15:16:17 +01: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
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
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
ju-pinheiro
a31c958004 Adding missing SpriteIdentifier enumerations to switch statements 2020-10-27 18:52:56 -03:00
ju-pinheiro
bb16ca075b Close #12450: Refactor SPRITE_IDENTIFIER to use strong enum 2020-10-27 13:26:27 -03:00
Vinicius Sa
4d28901cb0 Refactor PeepSpriteType to use strong enum
Issue: 12396
2020-10-07 17:34:21 -03:00
Vinicius Sa
bd8c633ea3 Close #12394: Refactor PeepNauseaTolerance to use strong enum (#13106) 2020-10-05 22:13:44 -03:00
Łukasz Pękalski
d1cd2e08b5 Close #12388, refactor PeepState to use strong enum (#12927)
* Close #12388, refactor:PeepState to use strong enum

* refactor: refactored file PlayTests.cpp

* refactor: change PEEP_STATE_ to PeepState:: and camel case after merging

chore: code reformatting
2020-09-28 15:51:49 -03:00
ryan-bello
cc2bb33892 changed enum STAFF_TYPE to strong enum StaffType, moved it to Peep.h 2020-08-17 22:59:02 -04:00
ryan-bello
54a33cbde8 renamed StaffType to AssignedStaffType 2020-08-17 20:16:09 -04:00
Arran Ireland
4de58e1fd4 Close #12440: Refactor VEHICLE_STATUS to use strong enum (#12606)
* Close #12440: Refactor VEHICLE_STATUS to use strong enum

* Fix code formatting for VEHICLE_STATUS refactoring

* Refactor VehicleStatus enum to be inside Vehicle

This commit moves VehicleStatus inside Vehicle,
renamed as Status.
2020-08-09 06:24:25 +01:00
Duncan
3de2de9814 Reduce use of get_sprite (#12382)
* Reduce use of get_sprite

* Update src/openrct2/world/Sprite.cpp

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-07-25 18:03:14 +01:00
Matt
fa2bd4cad6 Refactor PeepType to use strong enum 2020-07-25 11:54:37 +02:00
duncanspumpkin
904e6c6987 Implement GetSprite and use it in a number of places
This will eventually replace all of the get_sprite and try_get_sprite calls

Further use of GetSprite

Use GetSprite in all remaining easy to use functions

Correct formatting

Rename GetSprite to GetEntity

Make suggested changes

Remove const to allow for building

Fix crashes due to next sprite
2020-06-16 20:21:56 +01:00
hdpoliveira
a3fe90c250 Create SpriteBase::Invalidate methods (#11948) 2020-06-14 15:18:07 -03:00
Tulio Leao
e54a3d89f2 Rename some Peep member variables to use TitleCase (#11931)
* Rename Peep::destination_tolerance to use TitleCase

* Rename Peep::destination_y to use TitleCase

* Rename Peep::destination_x to use TitleCase

* Rename Peep::trousers_colour to use Title Case

* Rename Peep::tshirt_colour to use TitleCase

* Rename Peep::no_of_rides to use Title Case

* Rename Peep::staff_type to use TitleCase

* Rename Peep::type to use TitleCase

* Rename Peep::sprite_type to use TitleCase

* Rename Peep::sub_state to use TitleCase

* Rename Peep::state to use TitleCase

* Rename Peep::outside_of_park to use TitleCase

* Rename Peep::next_flags to use TitleCase

* Rename Peep::name to use TitleCase

* Rename Peep::NoOfRides to GuestNoOfRides

* Rename Peep::Type to AssignedPeepType

* Rename Peep::GuestNoOfRides to GuestNumRides
2020-06-14 06:31:08 +01:00
Ted John
a3aed8dce1 Update vehicle powered fields 2020-06-11 17:54:41 +01:00
Ted John
c5b2b2017a Add vehicle API for plugins 2020-06-11 17:54:36 +01:00
Tulio Leao
a993ad8408 Rename Peep::energy to Energy 2020-06-08 23:34:35 -03:00
Tulio Leao
1c59cc2aae Rename Peep::energy_target to EnergyTarget 2020-06-08 23:32:22 -03:00
Tulio Leao
92fbb9fc04 Rename Peep::happiness to Happiness 2020-06-08 23:30:27 -03:00
Tulio Leao
1b7223462f Rename Peep::happiness_target to use TitleCase 2020-06-08 23:27:47 -03:00
Tulio Leao
e387539802 Rename Peep::nausea to Nausea 2020-06-08 23:25:37 -03:00
Tulio Leao
71dc82e79a Rename Peep::nausea_target to NauseaTarget 2020-06-08 23:21:17 -03:00
Tulio Leao
533695cbe6 Rename Peep::hunger to Hunger 2020-06-08 23:18:12 -03:00
Tulio Leao
aad80d3390 Rename Peep::thirst to Thirst 2020-06-08 23:12:38 -03:00
Tulio Leao
3dd4adeb81 Rename Peep::toilet to Toilet 2020-06-08 23:10:18 -03:00