mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-28 15:57:59 +03:00
Option Flow.EnableFlyCheatItems()
Added Flow.EnableFlyCheatItems() function for choosing if flyCheat add items or not
This commit is contained in:
parent
0a8eb65de3
commit
2560634b94
6 changed files with 34 additions and 10 deletions
|
@ -70,6 +70,7 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
|
|||
* Added Flow.EnableHomeLevel() function.
|
||||
* Added Flow.IsStringPresent() function.
|
||||
* Added Flow.LensFlare() and Flow.Starfield() classes.
|
||||
* Added Flow.EnableFlyCheatItems() function for choosing if flyCheat add items or not
|
||||
* Added Inventory.GetUsedItem(), Inventory.SetUsedItem() and Inventory.ClearUsedItem() functions.
|
||||
* Added Input.KeyClearAll() function.
|
||||
* Added Moveable.GetJointRotation() and optional 'offset' parameter for Moveable.GetJointPosition().
|
||||
|
|
|
@ -888,8 +888,11 @@ void HandlePlayerFlyCheat(ItemInfo& item)
|
|||
{
|
||||
if (player.Context.Vehicle == NO_VALUE)
|
||||
{
|
||||
GivePlayerItemsCheat(item);
|
||||
GivePlayerWeaponsCheat(item);
|
||||
if (g_GameFlow->IsFlyCheatItemsEnabled())
|
||||
{
|
||||
GivePlayerItemsCheat(item);
|
||||
GivePlayerWeaponsCheat(item);
|
||||
}
|
||||
|
||||
if (player.Control.WaterStatus != WaterStatus::FlyCheat)
|
||||
{
|
||||
|
|
|
@ -32,6 +32,7 @@ public:
|
|||
virtual char const* GetString(const char* id) const = 0;
|
||||
|
||||
virtual bool IsFlyCheatEnabled() const = 0;
|
||||
virtual bool IsFlyCheatItemsEnabled() const = 0;
|
||||
virtual bool IsMassPickupEnabled() const = 0;
|
||||
virtual bool IsPointFilterEnabled() const = 0;
|
||||
virtual bool IsLaraInTitleEnabled() const = 0;
|
||||
|
|
|
@ -218,6 +218,7 @@ static constexpr char ScriptReserved_SetSecretCount[] = "SetSecretCount";
|
|||
static constexpr char ScriptReserved_SetTotalSecretCount[] = "SetTotalSecretCount";
|
||||
static constexpr char ScriptReserved_AddSecret[] = "AddSecret";
|
||||
static constexpr char ScriptReserved_EnableFlyCheat[] = "EnableFlyCheat";
|
||||
static constexpr char ScriptReserved_EnableFlyCheatItems[] = "EnableFlyCheatItems";
|
||||
static constexpr char ScriptReserved_EnableMassPickup[] = "EnableMassPickup";
|
||||
static constexpr char ScriptReserved_EnableLaraInTitle[] = "EnableLaraInTitle";
|
||||
static constexpr char ScriptReserved_EnableLevelSelect[] = "EnableLevelSelect";
|
||||
|
|
|
@ -96,6 +96,11 @@ Must be true or false
|
|||
// @tparam bool enabled True or false.
|
||||
tableFlow.set_function(ScriptReserved_EnableFlyCheat, &FlowHandler::EnableFlyCheat, this);
|
||||
|
||||
/// Enable or disable Item adding for fly cheat.
|
||||
// @function EnableFlyCheatItems()
|
||||
// @tparam bool enabled True or false.
|
||||
tableFlow.set_function(ScriptReserved_EnableFlyCheatItems, &FlowHandler::EnableFlyCheatItems, this);
|
||||
|
||||
/*** Enable or disable point texture filter.
|
||||
Must be true or false
|
||||
@function EnablePointFilter
|
||||
|
@ -557,6 +562,16 @@ void FlowHandler::EnableFlyCheat(bool enable)
|
|||
FlyCheat = enable;
|
||||
}
|
||||
|
||||
bool FlowHandler::IsFlyCheatItemsEnabled() const
|
||||
{
|
||||
return FlyCheatItems;
|
||||
}
|
||||
|
||||
void FlowHandler::EnableFlyCheatItems(bool flyCheatItems)
|
||||
{
|
||||
FlyCheatItems = flyCheatItems;
|
||||
}
|
||||
|
||||
bool FlowHandler::IsPointFilterEnabled() const
|
||||
{
|
||||
return PointFilter;
|
||||
|
|
|
@ -29,14 +29,15 @@ public:
|
|||
int FogInDistance = 0;
|
||||
int FogOutDistance = 0;
|
||||
|
||||
bool LevelSelect = true;
|
||||
bool HomeLevel = false;
|
||||
bool LoadSave = true;
|
||||
bool FlyCheat = true;
|
||||
bool PointFilter = false;
|
||||
bool MassPickup = true;
|
||||
bool LaraInTitle = false;
|
||||
bool DebugMode = false;
|
||||
bool LevelSelect = true;
|
||||
bool HomeLevel = false;
|
||||
bool LoadSave = true;
|
||||
bool FlyCheat = true;
|
||||
bool FlyCheatItems = true;
|
||||
bool PointFilter = false;
|
||||
bool MassPickup = true;
|
||||
bool LaraInTitle = false;
|
||||
bool DebugMode = false;
|
||||
|
||||
// Table for movesets.
|
||||
Animations Anims = {};
|
||||
|
@ -77,6 +78,8 @@ public:
|
|||
void SetTotalSecretCount(int secretsNumber);
|
||||
bool IsFlyCheatEnabled() const;
|
||||
void EnableFlyCheat(bool enable);
|
||||
bool IsFlyCheatItemsEnabled() const;
|
||||
void EnableFlyCheatItems(bool flyCheatItems);
|
||||
bool IsPointFilterEnabled() const;
|
||||
void EnablePointFilter(bool enable);
|
||||
bool IsMassPickupEnabled() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue