Can someone please assist me in either finding the references or finishing this bit of code?
I am making a new crop. Its locked until utilitycrops tech is researched, but I also want to add a piece of code to say only unlock it if a specific mission sponsor is loaded.
I cant find any references in the environment to develop the if then statement for "IF MISSION SPONSOR = X" THEN UNLOCK.
function TechEffect:OnGameInit(city, tech)
LockCrop("Carrots", "UtilityCrops")
end
function TechEffect:OnResearchComplete(city, tech)
if tech.id == "UtilityCrops" then
UnlockCrop("Carrots", "UtilityCrops")
end
end
I am making a new crop. Its locked until utilitycrops tech is researched, but I also want to add a piece of code to say only unlock it if a specific mission sponsor is loaded.
I cant find any references in the environment to develop the if then statement for "IF MISSION SPONSOR = X" THEN UNLOCK.
function TechEffect:OnGameInit(city, tech)
LockCrop("Carrots", "UtilityCrops")
end
function TechEffect:OnResearchComplete(city, tech)
if tech.id == "UtilityCrops" then
UnlockCrop("Carrots", "UtilityCrops")
end
end