- Changed TfrmMain.BuildTileList to use all available static tiles
- Added static tile id checking to the random preset loading
This commit is contained in:
parent
73e704e5fa
commit
365fa72dc9
|
@ -350,7 +350,7 @@
|
||||||
</Linking>
|
</Linking>
|
||||||
<Other>
|
<Other>
|
||||||
<CompilerMessages>
|
<CompilerMessages>
|
||||||
<IgnoredMessages idx5024="True"/>
|
<IgnoredMessages idx4079="True" idx4080="True" idx4081="True" idx5024="True" idx5028="True"/>
|
||||||
</CompilerMessages>
|
</CompilerMessages>
|
||||||
<CustomOptions Value="-FE../bin/
|
<CustomOptions Value="-FE../bin/
|
||||||
-dNoLogging"/>
|
-dNoLogging"/>
|
||||||
|
|
|
@ -966,7 +966,7 @@ var
|
||||||
tiles: TDOMNodeList;
|
tiles: TDOMNodeList;
|
||||||
tileNode: PVirtualNode;
|
tileNode: PVirtualNode;
|
||||||
tileInfo: PTileInfo;
|
tileInfo: PTileInfo;
|
||||||
i: Integer;
|
i, id: Integer;
|
||||||
begin
|
begin
|
||||||
if cbRandomPreset.ItemIndex > -1 then
|
if cbRandomPreset.ItemIndex > -1 then
|
||||||
begin
|
begin
|
||||||
|
@ -976,11 +976,13 @@ begin
|
||||||
for i := 0 to tiles.Count - 1 do
|
for i := 0 to tiles.Count - 1 do
|
||||||
begin
|
begin
|
||||||
tile := TDOMElement(tiles[i]);
|
tile := TDOMElement(tiles[i]);
|
||||||
if tile.NodeName = 'Tile' then
|
if (tile.NodeName = 'Tile') and
|
||||||
|
TryStrToInt(tile.AttribStrings['ID'], id) and
|
||||||
|
(id < FLandscape.MaxStaticID + $4000) then
|
||||||
begin
|
begin
|
||||||
tileNode := vdtRandom.AddChild(nil);
|
tileNode := vdtRandom.AddChild(nil);
|
||||||
tileInfo := vdtRandom.GetNodeData(tileNode);
|
tileInfo := vdtRandom.GetNodeData(tileNode);
|
||||||
tileInfo^.ID := StrToInt(tile.AttribStrings['ID']);
|
tileInfo^.ID := id;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -2416,8 +2418,9 @@ var
|
||||||
tileInfo: PTileInfo;
|
tileInfo: PTileInfo;
|
||||||
filter: string;
|
filter: string;
|
||||||
begin
|
begin
|
||||||
|
maxID := $3FFF;
|
||||||
if cbTerrain.Checked then minID := $0 else minID := $4000;
|
if cbTerrain.Checked then minID := $0 else minID := $4000;
|
||||||
if cbStatics.Checked then maxID := $7FFF else maxID := $3FFF;
|
if cbStatics.Checked then maxID := maxID + FLandscape.MaxStaticID;
|
||||||
filter := AnsiLowerCase(UTF8ToISO_8859_1(edFilter.Text));
|
filter := AnsiLowerCase(UTF8ToISO_8859_1(edFilter.Text));
|
||||||
|
|
||||||
node := vdtTiles.GetFirstSelected;
|
node := vdtTiles.GetFirstSelected;
|
||||||
|
|
Loading…
Reference in New Issue