Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add leather addon #1720

Draft
wants to merge 26 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2b08623
Adding ware workflow, buildings and menus for leather addon
ottml Dec 1, 2024
327aba1
Fix formatting
ottml Dec 1, 2024
56790b6
Add distribution tab for ham and make gui more general
ottml Dec 1, 2024
131f464
Add compatibilty code
ottml Dec 1, 2024
dddc893
Add direct transport route
ottml Dec 1, 2024
94f5625
Add fixed animations from leather_bobs.lst
ottml Dec 1, 2024
4c45d10
Skinner goes out to get skins from carcass if he has no pigs (natural…
ottml Dec 7, 2024
245cb1b
LeatherAddon military (1): Add SetArmorAllowed game command
ottml Dec 8, 2024
f0adbcf
fixup! Skinner goes out to get skins from carcass if he has no pigs (…
ottml Dec 8, 2024
4173c08
LeatherAddon military (2): Add logic for armor in military building a…
ottml Dec 8, 2024
264b5d6
LeatherAddon military (3): Add armor gui elements to military building
ottml Dec 8, 2024
817e3c1
fixup! LeatherAddon military (2): Add logic for armor in military bui…
ottml Dec 8, 2024
727adb9
Add test for SetArmorAllowed
ottml Dec 8, 2024
c0546ba
fixup! Add compatibilty code
ottml Dec 8, 2024
70485bb
Add compatibility code for ChangeDistribution and increase game comma…
ottml Dec 8, 2024
fb8639d
fixup! Adding ware workflow, buildings and menus for leather addon
ottml Dec 8, 2024
ea18d5f
fixup! Adding ware workflow, buildings and menus for leather addon
ottml Dec 8, 2024
0340c20
fixup! Add fixed animations from leather_bobs.lst
ottml Dec 10, 2024
55c25c8
fixup! Skinner goes out to get skins from carcass if he has no pigs (…
ottml Dec 10, 2024
0ceb01c
fixup! LeatherAddon military (2): Add logic for armor in military bui…
ottml Dec 11, 2024
592231a
fixup! Adding ware workflow, buildings and menus for leather addon
ottml Dec 11, 2024
1e7cea9
fixup! LeatherAddon military (2): Add logic for armor in military bui…
ottml Dec 11, 2024
f5db3a7
fixup! Add fixed animations from leather_bobs.lst
ottml Dec 11, 2024
de07029
fixup! Adding ware workflow, buildings and menus for leather addon
ottml Dec 14, 2024
8d77cd3
fixup! Add fixed animations from leather_bobs.lst
ottml Dec 14, 2024
1b8743f
fixup! Adding ware workflow, buildings and menus for leather addon
ottml Dec 14, 2024
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
Binary file added data/RTTR/assets/addons/0x01000001/AFR_ICON.LST
Binary file not shown.
Binary file added data/RTTR/assets/addons/0x01000001/AFR_Z.LST
Binary file not shown.
Binary file added data/RTTR/assets/addons/0x01000001/JAP_ICON.LST
Binary file not shown.
Binary file added data/RTTR/assets/addons/0x01000001/JAP_Z.LST
Binary file not shown.
Binary file added data/RTTR/assets/addons/0x01000001/ROM_ICON.LST
Binary file not shown.
Binary file added data/RTTR/assets/addons/0x01000001/ROM_Z.LST
Binary file not shown.
Binary file added data/RTTR/assets/addons/0x01000001/VIK_ICON.LST
Binary file not shown.
Binary file added data/RTTR/assets/addons/0x01000001/VIK_Z.LST
Binary file not shown.
Binary file added data/RTTR/assets/addons/0x01000001/WAFR_Z.LST
Binary file not shown.
Binary file added data/RTTR/assets/addons/0x01000001/WJAP_Z.LST
Binary file not shown.
Binary file added data/RTTR/assets/addons/0x01000001/WROM_Z.LST
Binary file not shown.
Binary file added data/RTTR/assets/addons/0x01000001/WVIK_Z.LST
Binary file not shown.
Binary file added data/RTTR/assets/addons/0x01000001/bab_icon.lst
Binary file not shown.
Binary file added data/RTTR/assets/addons/0x01000001/bab_z.lst
Binary file not shown.
Binary file added data/RTTR/assets/addons/0x01000001/wbab_z.lst
Binary file not shown.
Binary file added data/RTTR/assets/base/leather_bobs.lst
Binary file not shown.
4 changes: 4 additions & 0 deletions libs/s25main/BuildingRegister.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later

#include "BuildingRegister.h"
#include "LeatherLoader.h"
#include "SerializedGameData.h"
#include "WineLoader.h"
#include "buildings/noBuildingSite.h"
Expand Down Expand Up @@ -41,6 +42,9 @@ void BuildingRegister::Deserialize(SerializedGameData& sgd)
if(sgd.GetGameDataVersion() < 11 && wineaddon::isWineAddonBuildingType(bld))
continue;

if(sgd.GetGameDataVersion() < 12 && leatheraddon::isLeatherAddonBuildingType(bld))
continue;

if(BuildingProperties::IsUsual(bld))
sgd.PopObjectContainer(buildings[bld], GO_Type::NobUsual);
}
Expand Down
35 changes: 27 additions & 8 deletions libs/s25main/GamePlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "FindWhConditions.h"
#include "GameInterface.h"
#include "GlobalGameSettings.h"
#include "LeatherLoader.h"
#include "RoadSegment.h"
#include "SerializedGameData.h"
#include "TradePathCache.h"
Expand Down Expand Up @@ -136,6 +137,8 @@ void GamePlayer::LoadStandardDistribution()
distribution[GoodType::Stones].client_buildings.push_back(BuildingType::Catapult);
distribution[GoodType::Grapes].client_buildings.push_back(BuildingType::Winery);
distribution[GoodType::Wine].client_buildings.push_back(BuildingType::Temple);
distribution[GoodType::Skins].client_buildings.push_back(BuildingType::Tannery);
distribution[GoodType::Leather].client_buildings.push_back(BuildingType::LeatherWorks);

// Waren mit mehreren möglichen Zielen erstmal nullen, kann dann im Fenster eingestellt werden
for(const auto i : helpers::enumRange<GoodType>())
Expand Down Expand Up @@ -264,6 +267,9 @@ void GamePlayer::Deserialize(SerializedGameData& sgd)
if(sgd.GetGameDataVersion() < 11 && wineaddon::isWineAddonGoodType(i))
continue;

if(sgd.GetGameDataVersion() < 12 && leatheraddon::isLeatherAddonGoodType(i))
continue;

Distribution& dist = distribution[i];
helpers::popContainer(sgd, dist.percent_buildings);
if(sgd.GetGameDataVersion() < 7)
Expand All @@ -282,15 +288,24 @@ void GamePlayer::Deserialize(SerializedGameData& sgd)

useCustomBuildOrder_ = sgd.PopBool();

if(sgd.GetGameDataVersion() < 11)
if(sgd.GetGameDataVersion() < 12)
{
std::vector<BuildingType> build_order_raw(build_order.size() - 3);
auto countOfNotAvailableBuildingsInSaveGame = sgd.GetGameDataVersion() < 11 ? 6 : 3;
std::vector<BuildingType> build_order_raw(build_order.size() - countOfNotAvailableBuildingsInSaveGame);
helpers::popContainer(sgd, build_order_raw, true);
build_order_raw.insert(build_order_raw.end(),
{BuildingType::Vineyard, BuildingType::Winery, BuildingType::Temple});

if(sgd.GetGameDataVersion() < 11)
build_order_raw.insert(build_order_raw.end(),
{BuildingType::Vineyard, BuildingType::Winery, BuildingType::Temple});

if(sgd.GetGameDataVersion() < 12)
build_order_raw.insert(build_order_raw.end(),
{BuildingType::Skinner, BuildingType::Tannery, BuildingType::LeatherWorks});

std::copy(build_order_raw.begin(), build_order_raw.end(), build_order.begin());

std::vector<uint8_t> transportPrio_raw(transportPrio.size() - 2);
auto countOfNotAvailableGoodsInSaveGame = sgd.GetGameDataVersion() < 11 ? 5 : 3;
std::vector<uint8_t> transportPrio_raw(transportPrio.size() - countOfNotAvailableGoodsInSaveGame);
helpers::popContainer(sgd, transportPrio_raw, true);
std::copy(transportPrio_raw.begin(), transportPrio_raw.end(), transportPrio.begin());
} else
Expand All @@ -306,13 +321,17 @@ void GamePlayer::Deserialize(SerializedGameData& sgd)
helpers::popContainer(sgd, tools_ordered);
tools_ordered_delta = {};

if(sgd.GetGameDataVersion() < 11)
if(sgd.GetGameDataVersion() < 12)
{
std::vector<unsigned int> global_inventory_good_raw(global_inventory.goods.size() - 2);
auto countOfNotAvailableGoodsInSaveGame = sgd.GetGameDataVersion() < 11 ? 5 : 3;
std::vector<unsigned int> global_inventory_good_raw(global_inventory.goods.size()
- countOfNotAvailableGoodsInSaveGame);
helpers::popContainer(sgd, global_inventory_good_raw, true);
std::copy(global_inventory_good_raw.begin(), global_inventory_good_raw.end(), global_inventory.goods.begin());

std::vector<unsigned int> global_inventory_people_raw(global_inventory.people.size() - 3);
auto countOfNotAvailableJobsInSaveGame = sgd.GetGameDataVersion() < 11 ? 6 : 3;
std::vector<unsigned int> global_inventory_people_raw(global_inventory.people.size()
- countOfNotAvailableJobsInSaveGame);
helpers::popContainer(sgd, global_inventory_people_raw, true);
std::copy(global_inventory_people_raw.begin(), global_inventory_people_raw.end(),
global_inventory.people.begin());
Expand Down
3 changes: 2 additions & 1 deletion libs/s25main/GlobalGameSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ void GlobalGameSettings::registerAllAddons()
AddonToolOrdering,
AddonTrade,
AddonAutoFlags,
AddonWine
AddonWine,
AddonLeather
>;
// clang-format on
using namespace boost::mp11;
Expand Down
89 changes: 89 additions & 0 deletions libs/s25main/LeatherLoader.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
// Copyright (C) 2024 Settlers Freaks (sf-team at siedler25.org)
//
// SPDX-License-Identifier: GPL-2.0-or-later

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

#include "LeatherLoader.h"
#include "GlobalGameSettings.h"
#include "Loader.h"
#include "addons/const_addons.h"
#include "ogl/glArchivItem_Bitmap.h"
#include "ogl/glTexturePacker.h"
#include "world/GameWorldBase.h"

namespace leatheraddon {

bool isLeatherAddonBuildingType(BuildingType bld)
{
return bld == BuildingType::Skinner || bld == BuildingType::Tannery || bld == BuildingType::LeatherWorks;
}

bool isLeatherAddonGoodType(GoodType good)
{
return good == GoodType::Skins || good == GoodType::Leather || good == GoodType::Armor;
}

bool isLeatherAddonJobType(Job job)
{
return job == Job::Skinner || job == Job::Tanner || job == Job::LeatherWorker;
}

helpers::EnumArray<unsigned, BobTypes> bobIndex = {0, 21, 69, 117, 125, 173, 221, 244, 292, 340, 388,
436, 484, 532, 582, 628, 629, 630, 630, 631, 631, 632,
633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643};

ITexture* GetWareTex(const GoodType good)
{
switch(good)
{
case GoodType::Skins: return LOADER.GetImageN("leather_bobs", bobIndex[BobTypes::SKINS_WARE_ICON]);
case GoodType::Leather: return LOADER.GetImageN("leather_bobs", bobIndex[BobTypes::LEATHER_WARE_ICON]);
case GoodType::Armor: return LOADER.GetImageN("leather_bobs", bobIndex[BobTypes::ARMOR_WARE_ICON]);
default: return nullptr;
}
}

ITexture* GetWareStackTex(const GoodType good)
{
switch(good)
{
case GoodType::Skins: return LOADER.GetImageN("leather_bobs", bobIndex[BobTypes::SKINS_WARE_ON_GROUND_OF_FLAG]);
case GoodType::Leather:
return LOADER.GetImageN("leather_bobs", bobIndex[BobTypes::LEATHER_WARE_ON_GROUND_OF_FLAG]);
case GoodType::Armor: return LOADER.GetImageN("leather_bobs", bobIndex[BobTypes::ARMOR_WARE_ON_GROUND_OF_FLAG]);
default: return nullptr;
}
}

ITexture* GetWareDonkeyTex(const GoodType good)
{
switch(good)
{
case GoodType::Skins:
return LOADER.GetImageN("leather_bobs", bobIndex[BobTypes::DONKEY_BOAT_CARRYING_SKINS_WARE]);
case GoodType::Leather:
return LOADER.GetImageN("leather_bobs", bobIndex[BobTypes::DONKEY_BOAT_CARRYING_LEATHER_WARE]);
case GoodType::Armor:
return LOADER.GetImageN("leather_bobs", bobIndex[BobTypes::DONKEY_BOAT_CARRYING_ARMOR_WARE]);
default: return nullptr;
}
}

ITexture* GetJobTex(Job job)
{
switch(job)
{
case Job::Skinner: return LOADER.GetImageN("leather_bobs", bobIndex[BobTypes::SKINNER_JOB_ICON]);
case Job::Tanner: return LOADER.GetImageN("leather_bobs", bobIndex[BobTypes::TANNER_JOB_ICON]);
case Job::LeatherWorker: return LOADER.GetImageN("leather_bobs", bobIndex[BobTypes::LEATHERWORKER_JOB_ICON]);
default: return nullptr;
}
}

bool isAddonActive(const GameWorldBase& gwb)
{
return gwb.GetGGS().isEnabled(AddonId::LEATHER);
}

} // namespace leatheraddon
74 changes: 74 additions & 0 deletions libs/s25main/LeatherLoader.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
// Copyright (C) 2024 Settlers Freaks (sf-team at siedler25.org)
//
// SPDX-License-Identifier: GPL-2.0-or-later

///////////////////////////////////////////////////////////////////////////////
#pragma once

#include "helpers/EnumArray.h"
#include "ogl/glSmartBitmap.h"
#include "gameTypes/BuildingType.h"
#include "gameTypes/GoodTypes.h"
#include "gameTypes/JobTypes.h"

class glArchivItem_Bitmap;
class glTexturePacker;
class GameWorldBase;

namespace leatheraddon {

bool isLeatherAddonBuildingType(BuildingType bld);
bool isLeatherAddonGoodType(GoodType good);
bool isLeatherAddonJobType(Job job);

enum class BobTypes
{
SKINNER_SKINNING_ANIMAL_CARCASS_ANIMATION,
SKINNER_WALKING,
SKINNER_CARRYING_SKINS,
TANNERY_WORK_WINDOW_ANIMATION,
TANNER_WALKING,
TANNER_CARRYING_LEATHER_IN_OUT,
LEATHERWORKS_WORK_WINDOW_ANIMATION,
LEATHERWORKER_WALKING,
LEATHERWORKER_CARRYING_ARMOR_IN_OUT,
THIN_CARRIER_CARRYING_SKINS,
FAT_CARRIER_CARRYING_SKINS,
THIN_CARRIER_CARRYING_LEATHER,
FAT_CARRIER_CARRYING_LEATHER,
THIN_CARRIER_CARRYING_ARMOR,
FAT_CARRIER_CARRYING_ARMOR,
DISTRIBUTION_OF_PIGS_ICON,
SKINS_WARE_ICON,
LEATHER_WARE_ICON,
LEATHERWORKING_WARES_TRANSPORT_PRIORITY_TREE_ICON,
ARMOR_WARE_ICON,
ARMOR_DELIVER_ICON,
DISABLE_DELIVERY_ARMOR_ICON,
SKINNER_JOB_ICON,
TANNER_JOB_ICON,
LEATHERWORKER_JOB_ICON,
SKINS_WARE_ON_GROUND_OF_FLAG,
DONKEY_BOAT_CARRYING_SKINS_WARE,
LEATHER_WARE_ON_GROUND_OF_FLAG,
DONKEY_BOAT_CARRYING_LEATHER_WARE,
ARMOR_WARE_ON_GROUND_OF_FLAG,
DONKEY_BOAT_CARRYING_ARMOR_WARE,
STOP_COINS_X_SIGN_OVERRIDE,
STOP_ARMOR_X_SIGN
};

constexpr auto maxEnumValue(BobTypes)
{
return BobTypes::STOP_ARMOR_X_SIGN;
}

extern helpers::EnumArray<unsigned, BobTypes> bobIndex;

ITexture* GetWareTex(GoodType good);
ITexture* GetWareStackTex(GoodType good);
ITexture* GetWareDonkeyTex(GoodType good);
ITexture* GetJobTex(Job job);
bool isAddonActive(const GameWorldBase& gwb);

} // namespace leatheraddon
31 changes: 31 additions & 0 deletions libs/s25main/Loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
///////////////////////////////////////////////////////////////////////////////

#include "Loader.h"
#include "LeatherLoader.h"
#include "ListDir.h"
#include "RttrConfig.h"
#include "Settings.h"
Expand Down Expand Up @@ -185,6 +186,8 @@ ITexture* Loader::GetWareTex(GoodType ware)
{
if(wineaddon::isWineAddonGoodType(ware))
return wineaddon::GetWareTex(ware);
else if(leatheraddon::isLeatherAddonGoodType(ware))
return leatheraddon::GetWareTex(ware);
else
return GetMapTexture(WARES_TEX_MAP_OFFSET + rttr::enum_cast(ware));
}
Expand All @@ -193,6 +196,8 @@ ITexture* Loader::GetWareStackTex(GoodType ware)
{
if(wineaddon::isWineAddonGoodType(ware))
return wineaddon::GetWareStackTex(ware);
else if(leatheraddon::isLeatherAddonGoodType(ware))
return leatheraddon::GetWareStackTex(ware);
else
return GetMapTexture(WARE_STACK_TEX_MAP_OFFSET + rttr::enum_cast(ware));
}
Expand All @@ -201,6 +206,8 @@ ITexture* Loader::GetWareDonkeyTex(GoodType ware)
{
if(wineaddon::isWineAddonGoodType(ware))
return wineaddon::GetWareDonkeyTex(ware);
if(leatheraddon::isLeatherAddonGoodType(ware))
return leatheraddon::GetWareDonkeyTex(ware);
else
return GetMapTexture(WARES_DONKEY_TEX_MAP_OFFSET + rttr::enum_cast(ware));
}
Expand All @@ -209,6 +216,8 @@ ITexture* Loader::GetJobTex(Job job)
{
if(wineaddon::isWineAddonJobType(job))
return wineaddon::GetJobTex(job);
else if(leatheraddon::isLeatherAddonJobType(job))
return leatheraddon::GetJobTex(job);
else
return (job == Job::CharBurner) ? GetTextureN("io_new", 5) : GetMapTexture(2300 + rttr::enum_cast(job));
}
Expand Down Expand Up @@ -512,6 +521,9 @@ bool Loader::LoadFilesAtGame(const std::string& mapGfxPath, bool isWinterGFX, co
if(!LoadResources({"wine_bobs"}))
return false;

if(!LoadResources({"leather_bobs"}))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to condition those on the enabled addons? Feels wasteful but maybe the remaining code can't handle those to not be present?

The idea was also to integrate those with the "regular" files and have them be loaded automatically if the addon is enable (see the above TODO and initResourceFolders (addon argument)). Do you see any sensible archive for that?

return false;

const bfs::path mapGFXFile = config_.ExpandPath(mapGfxPath);
if(!Load(mapGFXFile, pal5))
return false;
Expand Down Expand Up @@ -875,6 +887,7 @@ void Loader::fillCaches()
throw std::runtime_error("carrier not found");

libsiedler2::Archiv wine_bob_carrier = GetArchive("wine_bobs");
libsiedler2::Archiv leather_bob_carrier = GetArchive("leather_bobs");

for(bool fat : {true, false})
{
Expand Down Expand Up @@ -907,6 +920,24 @@ void Loader::fillCaches()
wineaddon::bobIndex[fat ? wineaddon::BobTypes::FAT_CARRIER_CARRYING_WINE :
wineaddon::BobTypes::THIN_CARRIER_CARRYING_WINE]
+ static_cast<unsigned>(imgDir))));
} else if(leatheraddon::isLeatherAddonGoodType(ware))
{
leatheraddon::BobTypes carrierEnum;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be an extra function (leather ware->leather bob index)? I'd also suggest an assertion as it currently isn't directly clear, that carrierEnum will always be initialized

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

if(ware == GoodType::Skins)
carrierEnum = fat ? leatheraddon::BobTypes::FAT_CARRIER_CARRYING_SKINS :
leatheraddon::BobTypes::THIN_CARRIER_CARRYING_SKINS;

if(ware == GoodType::Leather)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those should be else-ifs for better readability

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

carrierEnum = fat ? leatheraddon::BobTypes::FAT_CARRIER_CARRYING_LEATHER :
leatheraddon::BobTypes::THIN_CARRIER_CARRYING_LEATHER;

if(ware == GoodType::Armor)
carrierEnum = fat ? leatheraddon::BobTypes::FAT_CARRIER_CARRYING_ARMOR :
leatheraddon::BobTypes::THIN_CARRIER_CARRYING_ARMOR;

const unsigned bodyIdx = static_cast<unsigned>(imgDir) * 8 + ani_step;
bmp.add(dynamic_cast<glArchivItem_Bitmap_Player*>(
leather_bob_carrier.get(leatheraddon::bobIndex[carrierEnum] + bodyIdx)));
} else
{
bmp.add(dynamic_cast<glArchivItem_Bitmap_Player*>(bob_carrier->getBody(fat, imgDir, ani_step)));
Expand Down
10 changes: 9 additions & 1 deletion libs/s25main/SerializedGameData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include "figures/nofGeologist.h"
#include "figures/nofHunter.h"
#include "figures/nofIronfounder.h"
#include "figures/nofLeatherWorker.h"
#include "figures/nofMetalworker.h"
#include "figures/nofMiller.h"
#include "figures/nofMiner.h"
Expand All @@ -51,7 +52,9 @@
#include "figures/nofScout_Free.h"
#include "figures/nofScout_LookoutTower.h"
#include "figures/nofShipWright.h"
#include "figures/nofSkinner.h"
#include "figures/nofStonemason.h"
#include "figures/nofTanner.h"
#include "figures/nofTempleServant.h"
#include "figures/nofTradeDonkey.h"
#include "figures/nofTradeLeader.h"
Expand Down Expand Up @@ -102,7 +105,8 @@
/// 9: Drop serialization of node BQ
/// 10: troop_limits state introduced to military buildings
/// 11:: wineaddon added, three new building types and two new goods
static const unsigned currentGameDataVersion = 11;
/// 12:: leatheraddon added, three new building types and three new goods
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Increase version below too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added compat code and increased version :)

static const unsigned currentGameDataVersion = 12;
// clang-format on

std::unique_ptr<GameObject> SerializedGameData::Create_GameObject(const GO_Type got, const unsigned obj_id)
Expand Down Expand Up @@ -180,6 +184,10 @@ std::unique_ptr<GameObject> SerializedGameData::Create_GameObject(const GO_Type
RTTR_CREATE_GO(GO_Type::NofTempleservant, nofTempleServant);
RTTR_CREATE_GO(GO_Type::Grapefield, noGrapefield);
RTTR_CREATE_GO(GO_Type::NobTemple, nobTemple);
RTTR_CREATE_GO(GO_Type::NofSkinner, nofSkinner);
RTTR_CREATE_GO(GO_Type::NofTanner, nofTanner);
RTTR_CREATE_GO(GO_Type::NofLeatherWorker, nofLeatherWorker);

case GO_Type::Nothing: RTTR_Assert(false); break;
#undef RTTR_CREATE_GO
}
Expand Down
Loading
Loading