Add edge flood behaviour for land ground objects with no foundations
This commit is contained in:
@@ -304,7 +304,7 @@
|
|||||||
<tr><td>use_land_ground</td><td>0 or 1</td><td>
|
<tr><td>use_land_ground</td><td>0 or 1</td><td>
|
||||||
Sets whether to use the underlying ground as the object ground sprite, ignoring the ground sprite provided in the sprite layout.<br />
|
Sets whether to use the underlying ground as the object ground sprite, ignoring the ground sprite provided in the sprite layout.<br />
|
||||||
When enabled, the ground sprite will be bare ground, grass, snow, desert, etc. as if it were a clear ground tile.<br />
|
When enabled, the ground sprite will be bare ground, grass, snow, desert, etc. as if it were a clear ground tile.<br />
|
||||||
In edge foundation mode, the ground may be coast/shore when flooded.
|
In edge foundation mode, or when foundations are disabled, the ground may be coast/shore when flooded.
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr><td>edge_foundation_mode</td><td>[mode0, mode1, mode2, mode3]</td><td>
|
<tr><td>edge_foundation_mode</td><td>[mode0, mode1, mode2, mode3]</td><td>
|
||||||
Enables edge foundation mode for the object.<br />
|
Enables edge foundation mode for the object.<br />
|
||||||
|
@@ -583,7 +583,7 @@
|
|||||||
<h4 id="object_use_land_ground">Object uses land ground sprite (mappable property: object_use_land_ground)</h4>
|
<h4 id="object_use_land_ground">Object uses land ground sprite (mappable property: object_use_land_ground)</h4>
|
||||||
<p>This property sets whether to use the underlying ground as the object ground sprite, ignoring the ground sprite provided in the sprite layout.<br />
|
<p>This property sets whether to use the underlying ground as the object ground sprite, ignoring the ground sprite provided in the sprite layout.<br />
|
||||||
When enabled, the ground sprite will be bare ground, grass, snow, desert, etc. as if it were a clear ground tile.<br />
|
When enabled, the ground sprite will be bare ground, grass, snow, desert, etc. as if it were a clear ground tile.<br />
|
||||||
In edge foundation mode, the ground may be coast/shore when flooded.<br />
|
In edge foundation mode, or when foundations are disabled, the ground may be coast/shore when flooded.<br />
|
||||||
The property length is 1 byte. 0 is disabled (default). 1 is enabled.</p>
|
The property length is 1 byte. 0 is disabled (default). 1 is enabled.</p>
|
||||||
<p>This is indicated by the feature name: <font face="monospace">action0_object_use_land_ground</font>, version 1</p>
|
<p>This is indicated by the feature name: <font face="monospace">action0_object_use_land_ground</font>, version 1</p>
|
||||||
<h4 id="object_edge_foundation_mode">Enable object edge foundation mode (mappable property: object_edge_foundation_mode)</h4>
|
<h4 id="object_edge_foundation_mode">Enable object edge foundation mode (mappable property: object_edge_foundation_mode)</h4>
|
||||||
|
@@ -1247,6 +1247,11 @@ void DoFloodTile(TileIndex target)
|
|||||||
SetObjectGroundTypeDensity(target, OBJECT_GROUND_SHORE, 3);
|
SetObjectGroundTypeDensity(target, OBJECT_GROUND_SHORE, 3);
|
||||||
MarkTileDirtyByTile(target, VMDF_NOT_MAP_MODE);
|
MarkTileDirtyByTile(target, VMDF_NOT_MAP_MODE);
|
||||||
flooded = true;
|
flooded = true;
|
||||||
|
} else if ((spec->ctrl_flags & OBJECT_CTRL_FLAG_USE_LAND_GROUND) && (spec->flags & OBJECT_FLAG_HAS_NO_FOUNDATION)) {
|
||||||
|
SetWaterClass(target, WATER_CLASS_SEA);
|
||||||
|
SetObjectGroundTypeDensity(target, OBJECT_GROUND_SHORE, 3);
|
||||||
|
MarkTileDirtyByTile(target, VMDF_NOT_MAP_MODE);
|
||||||
|
flooded = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user