Code:
GameEvents.CityCanConstruct.Add(function(iBuildingType)
if (iBuildingType == GameInfo.Buildings["BUILDING_MONUMENT_UP_FOOD"].ID) then
if (isUsingBUS == true) then
print("Cannot build Monument of Food")
return false;
end
end
if (iBuildingType == GameInfo.Buildings["BUILDING_MONUMENT_UP_LABOR"].ID) then
if (isUsingBUS == true) then
print("Cannot build Monument of Labor")
return false;
end
end
if (iBuildingType == GameInfo.Buildings["BUILDING_MONUMENT_UP_FAITH"].ID) then
if (isUsingBUS == true) then
print("Cannot build Monument of Faith")
return false;
end
end
if (iBuildingType == GameInfo.Buildings["BUILDING_MONUMENT_UP_RESEARCH"].ID) then
if (isUsingBUS == true) then
print("Cannot build Monument of Research")
return false;
end
end
if (iBuildingType == GameInfo.Buildings["BUILDING_MONUMENT_UP_MIGHT"].ID) then
if (isUsingBUS == true) then
print("Cannot build Monument of Might")
return false;
end
end
return true;
end);
--########################################################################
-- Detect active mods
-- Compatability addition by Xaragas from civfanatics
function HavingMods()
for _, mod in pairs(Modding.GetActivatedMods()) do
--Assumes that if this mod ID is activated then this is true? I believe?
if (mod.ID == e3fed66f-f129-45a4-abce-a5496dc2f0c5) then
isUsingBUS = true
end
end
end
isUsingBUS = false
HavingMods()
Using the source code from the 1066 scenario and Xaragas's Compatibility coding.. I've developed a sort of file which enforces that this mod is required before any modded buildings can be built... any LUA experts know if I am doing this correctly or on the right track?