Changeset 318 for trunk/LocalPlayer/Term.pas
- Timestamp:
- Mar 19, 2021, 12:32:32 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Term.pas
r316 r318 752 752 for emix := 0 to MyRO.nEnemyModel - 1 do 753 753 with MyRO.EnemyModel[emix] do 754 if Tribe[Owner].ModelPicture[mix].HGr = HGrSystemthen754 if not Assigned(Tribe[Owner].ModelPicture[mix].HGr) then 755 755 InitEnemyModel(emix); 756 756 end; … … 835 835 while MyData.ToldModels < MyRO.nModel do 836 836 begin { new Unit class available } 837 if (ModelPicture[MyData.ToldModels].HGr <> HGrSystem) and837 if Assigned(ModelPicture[MyData.ToldModels].HGr) and 838 838 (MyModel[MyData.ToldModels].Kind <> mkSelfDeveloped) then 839 839 begin // save picture of DevModel 840 840 ModelPicture[MyData.ToldModels + 1] := ModelPicture[MyData.ToldModels]; 841 841 ModelName[MyData.ToldModels + 1] := ModelName[MyData.ToldModels]; 842 ModelPicture[MyData.ToldModels].HGr := HGrSystem842 ModelPicture[MyData.ToldModels].HGr := nil; 843 843 end; 844 if ModelPicture[MyData.ToldModels].HGr = HGrSystemthen844 if not Assigned(ModelPicture[MyData.ToldModels].HGr) then 845 845 InitMyModel(MyData.ToldModels, true); 846 846 { only run if no researched model } … … 873 873 Server(cSetModelName + (Length(ModelNameInfo.NewName) + 1 + 4 + 3) 874 874 div 4, me, 0, ModelNameInfo); 875 end 875 end; 876 876 end; 877 877 if MyModel[MyData.ToldModels].Kind = mkSettler then … … 1043 1043 DraftDlg.ShowNewContent(wmModal); 1044 1044 if DraftDlg.ModalResult <> mrOK then 1045 Tribe[me].ModelPicture[MyRO.nModel].HGr := HGrSystem1045 Tribe[me].ModelPicture[MyRO.nModel].HGr := nil 1046 1046 end; 1047 1047 until (ChosenResearch <> adMilitary) or (DraftDlg.ModalResult = mrOK); … … 2785 2785 ItsMeAgain(p1); 2786 2786 for mix := 0 to MyRO.nModel - 1 do 2787 if Tribe[me].ModelPicture[mix].HGr = HGrSystemthen2787 if not Assigned(Tribe[me].ModelPicture[mix].HGr) then 2788 2788 InitMyModel(mix, true); 2789 2789 end; … … 3075 3075 begin 3076 3076 CurrentMoveInfo.DoShow := false; 3077 if not idle and ( Tribe[Owner].ModelPicture[mix].HGr = HGrSystem) then3077 if not idle and (not Assigned(Tribe[Owner].ModelPicture[mix].HGr)) then 3078 3078 InitEnemyModel(emix); 3079 3079 … … 3270 3270 begin 3271 3271 ToLoc := dLoc(FromLoc, dx, dy); 3272 if Tribe[Owner].ModelPicture[mix].HGr = HGrSystemthen3272 if not Assigned(Tribe[Owner].ModelPicture[mix].HGr) then 3273 3273 InitEnemyModel(emix); 3274 3274 … … 3403 3403 if TribeOriginal[NewPlayer] then 3404 3404 Tribe[NewPlayer].ModelName[mix] := NewName; 3405 end 3406 end 3405 end; 3406 end; 3407 3407 end; 3408 3408 … … 4859 4859 4860 4860 // treasury section 4861 ImageOp_BCC(TopBar, Templates.Data, xTreasurySection + 8, 1, 145, 1, 36, 36,4861 ImageOp_BCC(TopBar, Templates.Data, Point(xTreasurySection + 8, 1), TreasuryIcon.BoundsRect, 4862 4862 $40A040, $4030C0); 4863 4863 s := IntToStr(TrueMoney); … … 4866 4866 if MyRO.Government <> gAnarchy then 4867 4867 begin 4868 ImageOp_BCC(TopBar, Templates.Data, xTreasurySection + 48, 22, 124, 1, 14, 14,4868 ImageOp_BCC(TopBar, Templates.Data, Point(xTreasurySection + 48, 22), ChangeIcon.BoundsRect, 4869 4869 $0000C0, $0080C0); 4870 4870 if TaxSum >= 0 then … … 4877 4877 4878 4878 // research section 4879 ImageOp_BCC(TopBar, Templates.Data, xResearchSection + 8, 1, 145, 75, 36, 36,4879 ImageOp_BCC(TopBar, Templates.Data, Point(xResearchSection + 8, 1), ResearchIcon.BoundsRect, 4880 4880 $FF0000, $00FFE0); 4881 4881 if MyData.FarTech <> adNexus then … … 4928 4928 if (MyData.FarTech <> adNexus) and (ScienceSum > 0) then 4929 4929 begin 4930 ImageOp_BCC(TopBar, Templates.Data, xResearchSection + 48 + CostFactor + 11,4931 22 , 124, 1, 14, 14, $0000C0, $0080C0);4930 ImageOp_BCC(TopBar, Templates.Data, Point(xResearchSection + 48 + CostFactor + 11, 4931 22), ChangeIcon.BoundsRect, $0000C0, $0080C0); 4932 4932 s := Format(Phrases.Lookup('TECHGAIN'), [ScienceSum]); 4933 4933 LoweredTextOut(TopBar.Canvas, -1, MainTexture, xResearchSection + 48 + … … 5353 5353 MyRO.EnemyModel[emix].mix, MouseLoc) >= rExecuted) then 5354 5354 begin 5355 if Tribe[p1].ModelPicture[MyRO.EnemyModel[emix].mix].HGr = HGrSystemthen5355 if not Assigned(Tribe[p1].ModelPicture[MyRO.EnemyModel[emix].mix].HGr) then 5356 5356 InitEnemyModel(emix); 5357 5357 m2 := TMenuItem.Create(m); … … 6447 6447 SumCities(TaxSum, ScienceSum); 6448 6448 for i := 0 to MyRO.nModel - 1 do 6449 if Tribe[me].ModelPicture[i].HGr = HGrSystemthen6449 if not Assigned(Tribe[me].ModelPicture[i].HGr) then 6450 6450 InitMyModel(i, True); 6451 6451
Note:
See TracChangeset
for help on using the changeset viewer.