General Tso
Panzer General
I needed a way to determine if God & Kings is present so I could disable certain controls in my mod. I found something that looks like it will work so I thought I would post what I found in case anybody else was looking for the same thing. I would also be interested in seeing if it works as expected on other people's systems. Especially those who do not have Gods & Kings. Here's the code if anybody else is interested.
I found the original code in UI\FrontEnd\PremiumContentMenu.lua
Code:
for _, id in ipairs(ContentManager.GetAllPackageIDs()) do
print("\n-----------------------------------------------------------------------------------------");
print("id = ", id);
local description = Locale.Lookup(ContentManager.GetPackageDescription(id));
print("description = ", description);
local isActive = ContentManager.IsActive(id, ContentType.GAMEPLAY);
print("isActive = ", isActive);
if id == "0E3751A1-F840-4E1B-9706-519BF484E59D" then
print("Expansion is present!");
end
end
I found the original code in UI\FrontEnd\PremiumContentMenu.lua