Thalassicus
Bytes and Nibblers
Have you seen this before? I noticed in the patch they changed this:
to this...
Now... I know the "for x in y()" executes a sql select statement on the database, and normally if we do GameInfo.Buildings("SpecialistType = '" .. pSpecialistInfo.Type .. "'") the part in the parenthesis is the WHERE clause. I've never seen this curly brace format before, but I'm assuming it does the same thing with less typing hassle... can anyone confirm this?
Code:
for building in GameInfo.Buildings() do
local buildingID = building.ID;
if building.SpecialistType == pSpecialistInfo.Type then
if (pCity:IsHasBuilding(buildingID)) then
iGPPChange = iGPPChange + building.GreatPeopleRateChange * 100;
end
end
end
to this...
Code:
for building in GameInfo.Buildings{SpecialistType = pSpecialistInfo.Type} do
local buildingID = building.ID;
if (pCity:IsHasBuilding(buildingID)) then
iGPPChange = iGPPChange + building.GreatPeopleRateChange * 100;
end
end
Now... I know the "for x in y()" executes a sql select statement on the database, and normally if we do GameInfo.Buildings("SpecialistType = '" .. pSpecialistInfo.Type .. "'") the part in the parenthesis is the WHERE clause. I've never seen this curly brace format before, but I'm assuming it does the same thing with less typing hassle... can anyone confirm this?