From 22e72b1ecdbbe4884877aa30ad63bee8cb42dc00 Mon Sep 17 00:00:00 2001
From: Jonathan G Rennison All of the non-standard features listed below will automatically emit suitable feature tests, conditionals, etc. such that NewGRFs which use these features will work correctly
on OpenTTD versions which do not support these features, including standard trunk OpenTTD and older/other patchpack versions. All of the non-standard variables listed below will return 0 on OpenTTD versions which do not support these features/variables, including standard trunk OpenTTD and older/other patchpack versions.
@@ -151,6 +153,7 @@
Variables in the table below which are not supported by the version of OpenTTD being used return a value of 0.Builtin functions
Value Meaning OBJECT_EF_FLAG_ADJUST_Z Change z-position for the building sprite to the height of the edge
+ OBJECT_EF_FLAG_FOUNDATION_LOWER If the height of the edge is lower than the maximum height of the tile, build a foundation OBJECT_EF_FLAG_INCLINE_FOUNDATION Use inclined instead of a flat foundations where possible. (Slopes with one corner raised where the height of the edge is at the maximum height of the tile).
+ flood_resistant 0 or 1
@@ -159,6 +162,19 @@
This property can be used to enable flood resistance without enabling the object to be built on water.
Object variables
+
+
+ Variable Value range Comment
+ foundation_tile_slope SLOPE_XXX
+ Slope of the tile after any foundation has been applied.
+
+ foundation_change_tile_slope SLOPE_XXX
+ Slope of the tile after any foundation has been applied xor the slope of the underlying tile.
+ If this variable is non-zero a foundation is present.
+ This is useful for xoring with the tile_slope variable, because if this variable is unavailable then the result is still the underlying tile slope.
+ Replace new sprites
diff --git a/docs/newgrf-additions.html b/docs/newgrf-additions.html
index c5f607f096..797a295781 100644
--- a/docs/newgrf-additions.html
+++ b/docs/newgrf-additions.html
@@ -392,6 +392,8 @@
Type Number of sprites Comment 2 4 Change z-position for the building sprite to the height of the edge
+ 3 8 If the height of the edge is lower than the maximum height of the tile, build a foundation 4 10 Use inclined instead of a flat foundations where possible. (Slopes with one corner raised where the height of the edge is at the maximum height of the tile).
+ Support for this bit is indicated by the feature name: action0_object_flood_resistant, version 2.
This is indicated by the feature name: action0_object_edge_foundation_mode, version 1
@@ -465,6 +467,16 @@This is indicated by the feature name: varaction2_station_var42, version 1
This has the same format as bits 8-12 of object variable 41.
+This is indicated by the feature name: action0_object_edge_foundation_mode, version 2
+This has the same format as bits 8-12 of object variable 41, but has bits set only where the foundation slope differs from the underlying tile slope.
+ If this variable is non-zero a foundation is present.
+ This is useful for xoring with bits 8-12 of variable 41, because if this variable is unavailable then the result is still the underlying tile slope.
This is indicated by the feature name: action0_object_edge_foundation_mode, version 2
+Note that Action 3 feature 0E is not supported (does nothing) in standard OpenTTD.