Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

fix buyable mode enum crap #568

Merged
merged 2 commits into from
Nov 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Lua/LuaAdapterDefinitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ namespace RTE {
#pragma region SceneObject Lua Adapters
struct LuaAdaptersSceneObject {
static float GetTotalValue(const SceneObject *luaSelfObject, int nativeModule, float foreignMult);
static int GetBuyableMode(const SceneObject *luaSelfObject);
};
#pragma endregion

Expand Down
6 changes: 6 additions & 0 deletions Lua/LuaAdapters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,12 @@ namespace RTE {
return luaSelfObject->GetTotalValue(nativeModule, foreignMult, 1.0F);
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

int LuaAdaptersSceneObject::GetBuyableMode(const SceneObject *luaSelfObject) {
return static_cast<int>(luaSelfObject->GetBuyableMode());
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

void LuaAdaptersActivity::SendMessage1(Activity *luaSelfObject, const std::string &message) {
Expand Down
5 changes: 3 additions & 2 deletions Lua/LuaBindingsEntities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1339,15 +1339,16 @@ namespace RTE {
.property("Team", &SceneObject::GetTeam, &SceneObject::SetTeam)
.property("PlacedByPlayer", &SceneObject::GetPlacedByPlayer, &SceneObject::SetPlacedByPlayer)
.property("Buyable", &SceneObject::IsBuyable)
.property("BuyableMode", &SceneObject::GetBuyableMode)

.property("BuyableMode", &LuaAdaptersSceneObject::GetBuyableMode)

.def("IsOnScenePoint", &SceneObject::IsOnScenePoint)
.def("GetGoldValue", &SceneObject::GetGoldValueOld)
.def("GetGoldValue", &SceneObject::GetGoldValue)
.def("SetGoldValue", &SceneObject::SetGoldValue)
.def("GetGoldValueString", &SceneObject::GetGoldValueString)

.def("GetTotalValue", &SceneObject::GetTotalValue)

.def("GetTotalValue", &LuaAdaptersSceneObject::GetTotalValue)

.enum_("BuyableMode")[
Expand Down