OpenRCT2/src/openrct2/Cheats.h

140 lines
3.4 KiB
C
Raw Normal View History

/*****************************************************************************
* Copyright (c) 2014-2024 OpenRCT2 developers
*
* For a complete list of all authors, please refer to contributors.md
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
*
* OpenRCT2 is licensed under the GNU General Public License version 3.
*****************************************************************************/
#pragma once
2015-06-26 23:40:09 +02:00
#include "common.h"
enum class StaffSpeedCheat
{
None,
Frozen,
Fast,
};
2024-03-03 22:44:15 +01:00
struct CheatsState
{
bool SandboxMode;
bool DisableClearanceChecks;
bool DisableSupportLimits;
bool ShowAllOperatingModes;
bool ShowVehiclesFromOtherTrackTypes;
bool UnlockOperatingLimits;
bool DisableBrakesFailure;
bool DisableAllBreakdowns;
bool BuildInPauseMode;
bool IgnoreRideIntensity;
bool DisableVandalism;
bool DisableLittering;
bool NeverendingMarketing;
bool FreezeWeather;
bool DisableTrainLengthLimit;
bool DisablePlantAging;
bool DisableRideValueAging;
bool EnableChainLiftOnAllTrack;
bool AllowArbitraryRideTypeChanges;
bool IgnoreResearchStatus;
bool EnableAllDrawableTrackPieces;
bool AllowTrackPlaceInvalidHeights;
bool AllowRegularPathAsQueue;
bool AllowSpecialColourSchemes;
bool MakeAllDestructible;
StaffSpeedCheat SelectedStaffSpeed;
};
enum class CheatType : int32_t
2018-06-22 23:25:16 +02:00
{
SandboxMode,
DisableClearanceChecks,
DisableSupportLimits,
ShowAllOperatingModes,
ShowVehiclesFromOtherTrackTypes,
DisableTrainLengthLimit,
EnableChainLiftOnAllTrack,
FastLiftHill,
DisableBrakesFailure,
DisableAllBreakdowns,
UnlockAllPrices,
BuildInPauseMode,
IgnoreRideIntensity,
DisableVandalism,
DisableLittering,
NoMoney,
AddMoney,
SetMoney,
ClearLoan,
SetGuestParameter,
GenerateGuests,
RemoveAllGuests,
GiveAllGuests,
SetGrassLength,
WaterPlants,
DisablePlantAging,
FixVandalism,
RemoveLitter,
SetStaffSpeed,
RenewRides,
MakeDestructible,
FixRides,
ResetCrashStatus,
TenMinuteInspections,
WinScenario,
ForceWeather,
FreezeWeather,
OpenClosePark,
HaveFun,
SetForcedParkRating,
NeverEndingMarketing,
AllowArbitraryRideTypeChanges,
OwnAllLand,
DisableRideValueAging,
IgnoreResearchStatus,
EnableAllDrawableTrackPieces,
2019-10-15 16:34:21 +02:00
CreateDucks,
2019-10-15 16:48:45 +02:00
RemoveDucks,
AllowTrackPlaceInvalidHeights,
2022-04-05 19:35:42 +02:00
NoCapOnQueueLengthDummy, // Removed; this dummy exists only for deserialisation parks that had it saved
AllowRegularPathAsQueue,
Extend color selection dropdown with more colors (#19446) * Setup for extended palette * Define order for color picker cells * Init G2 Palettes in ColoursInitMaps * Add Glass Palettes * Use special sprite for Invisible color * Set up new cheat for special colors * Add glass palettes to palette_to_g1_offset * Add entries for new colors in TranslucentWindowPalettes * Finish implementation of special colors cheat * Some cleanup * New colors almost work * Correct g2 palette loading indices * Invisible color sprite displays properly * Repaint works with large scenery and walls * Prevent random shop items from overflowing to junk palettes * More cleanup * Fix glass palettes * Add mapping of new colors to original colors for UI themes * Fix junk palettes for random shop items * Fix missing highlight color in software renderer * Convert small scenery support flag to allow use of new colors * Progress on displaying new colors in software renderer * Fix invisible color scheme sprite * Formatting cleanup * Resolve comparison of integer expressions of different signedness * Index g2 palette maps to fix visible chain lift * Progress on fixing new colors in software renderer * Fix station and support colors * Fix dropdown selected index * Get invisible color (mostly) working in software renderer * Use forceBmp for palette resources * Remove test function definition left in by mistake * Remove some obsolete range checks for original color values * Add changelog entry * Reorder color dropdown based on NE user feedback * Some cleanup * Further cleanup * Formatting * Add include for GetPaletteMapIndexForColour * Fix a couple things I broke * Fix function placement * Revert "Add include for GetPaletteMapIndexForColour" This reverts commit 0af9611e6656d792adb7a36efe7dbf3387a4a759. * Use color constants for color order list * Make remappable colors contiguous * turn off clang format for ordered color list * Appease clang * Use all colors for random shop item animation * Improvements to palette map resources * Fix chain lifts again + adjustments to a few colors * Update changelog and contributors.md * Revert changes to S4 and S6 importers which are no longer needed * Bump network, plugin, and minimum park versions * Revert "Progress on displaying new colors in software renderer" This reverts commit 337602e4a78a67f828d9c524138a1cb79b2c91dc. * Remove unnecessary comment --------- Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com>
2023-04-06 09:36:07 +02:00
AllowSpecialColourSchemes,
RemoveParkFences,
Count,
2016-02-02 01:04:39 +01:00
};
2018-06-22 23:25:16 +02:00
enum
{
GUEST_PARAMETER_HAPPINESS,
GUEST_PARAMETER_ENERGY,
GUEST_PARAMETER_HUNGER,
GUEST_PARAMETER_THIRST,
GUEST_PARAMETER_NAUSEA,
GUEST_PARAMETER_NAUSEA_TOLERANCE,
2020-04-25 15:34:43 +02:00
GUEST_PARAMETER_TOILET,
GUEST_PARAMETER_PREFERRED_RIDE_INTENSITY
2016-02-02 01:04:39 +01:00
};
2018-06-22 23:25:16 +02:00
enum
{
OBJECT_MONEY,
OBJECT_PARK_MAP,
OBJECT_BALLOON,
OBJECT_UMBRELLA
2016-02-02 01:04:39 +01:00
};
constexpr auto kCheatsGiveGuestsMoney = 1000.00_GBP;
constexpr int kCheatsTramIncrement = 250;
constexpr int kCheatsDuckIncrement = 20;
constexpr int kCheatsStaffFastSpeed = 0xFF;
constexpr int kCheatsStaffNormalSpeed = 0x60;
constexpr int kCheatsStaffFreezeSpeed = 0;
2016-02-02 01:04:39 +01:00
void CheatsReset();
const char* CheatsGetName(CheatType cheatType);
void CheatsSet(CheatType cheatType, int64_t param1 = 0, int64_t param2 = 0);
void CheatsSerialise(class DataSerialiser& ds);