Changeset 486 for trunk/LocalPlayer
- Timestamp:
- Dec 8, 2023, 8:25:31 PM (13 months ago)
- Location:
- trunk/LocalPlayer
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/ClientTools.pas
r447 r486 57 57 function IsMilReportNew(Enemy: Integer): Boolean; 58 58 function CutCityFoodSurplus(FoodSurplus: Integer; IsCityAlive: Boolean; 59 gov, size: Integer): Integer;59 gov, Size: Integer): Integer; 60 60 function CityTaxBalance(cix: Integer; const CityReport: TCityReportNew): Integer; 61 61 procedure SumCities(var TaxSum, ScienceSum: Integer); … … 233 233 234 234 function CutCityFoodSurplus(FoodSurplus: Integer; IsCityAlive: Boolean; 235 gov, size: Integer): Integer;235 gov, Size: Integer): Integer; 236 236 begin 237 237 Result := FoodSurplus; 238 238 if not IsCityAlive or (Result > 0) and ((gov = gFuture) or 239 ( size >= NeedAqueductSize) and (Result < 2)) then239 (Size >= NeedAqueductSize) and (Result < 2)) then 240 240 Result := 0; { no growth } 241 241 end; … … 253 253 (CityReport.Production > 0) then 254 254 Inc(Result, CityReport.Production); 255 if ((MyRO.Government = gFuture) or (MyCity[cix]. size >=255 if ((MyRO.Government = gFuture) or (MyCity[cix].Size >= 256 256 NeedAqueductSize) and (CityReport.FoodSurplus < 2)) and 257 257 (CityReport.FoodSurplus > 0) then … … 330 330 Owner := Me; 331 331 ID := MyCity[cix].ID; 332 size := MyCity[cix].size;332 Size := MyCity[cix].Size; 333 333 Flags := 0; 334 334 if MyCity[cix].Built[imPalace] > 0 then -
trunk/LocalPlayer/IsoEngine.pas
r469 r486 193 193 begin 194 194 // prepare age 2+3 cities 195 for age := 2 to 3 do196 for size := 0 to 3 do195 for Age := 2 to 3 do 196 for Size := 0 to 3 do 197 197 with Pictures[Age, Size] do 198 198 FindPosition(HGrCities, Size * (xxt * 2 + 1), (Age - 2) * (yyt * 3 + 1), … … 738 738 begin 739 739 Age := GetAge(CityInfo.Owner); 740 if CityInfo. size < 5 then740 if CityInfo.Size < 5 then 741 741 xGr := 0 742 else if CityInfo. size < 9 then742 else if CityInfo.Size < 9 then 743 743 xGr := 1 744 else if CityInfo. size < 13 then744 else if CityInfo.Size < 13 then 745 745 xGr := 2 746 746 else … … 793 793 yShield := Y - 2 * yyt + cpic.yShield; 794 794 end; 795 S := IntToStr(CityInfo. size);795 S := IntToStr(CityInfo.Size); 796 796 LabelLength := FOutput.Canvas.TextWidth(S); 797 797 FillRect(xShield, yShield, LabelLength + 4, 16, $000000); -
trunk/LocalPlayer/Select.pas
r474 r486 238 238 239 239 var 240 icon, ofs, X, Y, y0, lix, I, J, TextColor, Available, first, Test,241 FutureCount, growth, TrueFood, TrueProd: Integer;240 icon, ofs, X, Y, y0, lix, I, J, TextColor, Available, First, Test, 241 FutureCount, Growth, TrueFood, TrueProd: Integer; 242 242 CityReport: TCityReportNew; 243 243 mox: ^TModelInfo; … … 253 253 254 254 if Kind in [kCities, kCityEvents] then 255 with MyCity[lix]do255 with TCity(MyCity[lix]) do 256 256 begin 257 257 X := 104 - 76; … … 281 281 Font.Color := $000000; 282 282 S := IntToStr(MyCity[lix].Size); 283 TextOut(X - 4 - textwidth(S) div 2, Y, S);283 TextOut(X - 4 - TextWidth(S) div 2, Y, S); 284 284 end; 285 285 … … 402 402 ((Size < NeedAqueductSize) or (Built[imAqueduct] = 1) and 403 403 (Size < NeedSewerSize) or (Built[imSewer] = 1)); 404 Growth := CutCityFoodSurplus(CityReport.FoodSurplus, 405 (MyRO.Government <> gAnarchy) and (Flags and chCaptured = 0), 406 MyRO.Government, Size); 404 407 PaintRelativeProgressBar(Offscreen.Canvas, 1, X + 15 + CityNameSpace + 405 4, Y + 7, 68, TrueFood, CutCityFoodSurplus(CityReport.FoodSurplus, 406 (MyRO.Government <> gAnarchy) and (Flags and chCaptured = 0), 407 MyRO.Government, Size), CityReport.Storage, CanGrow, MainTexture); 408 4, Y + 7, 68, TrueFood, Growth, CityReport.Storage, CanGrow, MainTexture); 408 409 409 410 if Project <> cpImp + imTrGoods then … … 413 414 414 415 // production progress 415 growth := CityReport.Production;416 if ( growth < 0) or (MyRO.Government = gAnarchy) or416 Growth := CityReport.Production; 417 if (Growth < 0) or (MyRO.Government = gAnarchy) or 417 418 (Flags and chCaptured <> 0) then 418 growth := 0;419 Growth := 0; 419 420 PaintRelativeProgressBar(Offscreen.Canvas, 4, 420 X + CityNameSpace + 4 + 304 - 60 + 9, Y + 7, 68, TrueProd, growth,421 X + CityNameSpace + 4 + 304 - 60 + 9, Y + 7, 68, TrueProd, Growth, 421 422 CityReport.ProjectCost, True, MainTexture); 422 423 end; -
trunk/LocalPlayer/Term.pas
r485 r486 765 765 766 766 procedure ChooseModelPicture(P, mix, Code, Hash, Turn: Integer; 767 ForceNew, final: Boolean);767 ForceNew, Final: Boolean); 768 768 var 769 769 I: Integer; … … 796 796 IsNew := Tribe[P].ChooseModelPicture(Picture, Code, Turn, ForceNew); 797 797 end; 798 if final then798 if Final then 799 799 if not TribeOriginal[P] then 800 800 Tribe[P].SetModelPicture(Picture, IsNew)
Note:
See TracChangeset
for help on using the changeset viewer.