Add NewGRF object property for flood-resistance

Does not imply being able to be built on water
This commit is contained in:
Jonathan G Rennison
2021-12-05 21:32:57 +00:00
parent 06fa1ae332
commit 24fb390e9f
6 changed files with 11 additions and 1 deletions

View File

@@ -4309,6 +4309,11 @@ static ChangeInfoResult ObjectChangeInfo(uint id, int numinfo, int prop, const G
}
break;
case A0RPI_OBJECT_FLOOD_RESISTANT:
if (MappedPropertyLengthMismatch(buf, 1, mapping_entry)) break;
SB(spec->ctrl_flags, OBJECT_CTRL_FLAG_FLOOD_RESISTANT, 1, (buf->ReadByte() != 0 ? 1 : 0));
break;
default:
ret = HandleAction0PropertyDefault(buf, prop);
break;