Add NewGRF signal style flag to draw on both sides

This commit is contained in:
Jonathan G Rennison
2024-02-27 19:18:50 +00:00
parent 55410152a2
commit 7e0acd686e
16 changed files with 92 additions and 26 deletions

View File

@@ -4255,6 +4255,15 @@ static ChangeInfoResult SignalsChangeInfo(uint id, int numinfo, int prop, const
break;
}
case A0RPI_SIGNALS_STYLE_BOTH_SIDES: {
if (MappedPropertyLengthMismatch(buf, 1, mapping_entry)) break;
uint8_t value = buf->ReadByte();
if (_cur.grffile->current_new_signal_style != nullptr) {
SB(_cur.grffile->current_new_signal_style->style_flags, NSSF_BOTH_SIDES, 1, (value != 0 ? 1 : 0));
}
break;
}
default:
ret = HandleAction0PropertyDefault(buf, prop);
break;