Only show ship is lost messages if lost for a significant time

This commit is contained in:
Jonathan G Rennison
2020-09-07 18:24:49 +01:00
parent 8824130b66
commit ff12051ee1
6 changed files with 26 additions and 4 deletions

View File

@@ -12,6 +12,7 @@
#include "../newgrf_roadtype.h"
#include "../date_func.h"
#include "../timetable.h"
#include "../ship.h"
/* Helper for filling property tables */
#define NIP(prop, base, variable, type, name) { name, (ptrdiff_t)cpp_offsetof(base, variable), cpp_sizeof(base, variable), prop, type }
@@ -149,6 +150,12 @@ class NIHVehicle : public NIHelper {
t->wait_counter, t->reverse_distance, t->tunnel_bridge_signal_num, t->speed_restriction);
print(buffer);
}
if (v->type == VEH_SHIP) {
const Ship *s = Ship::From(v);
seprintf(buffer, lastof(buffer), " Lost counter: %u",
s->lost_count);
print(buffer);
}
if (HasBit(v->vehicle_flags, VF_SEPARATION_ACTIVE)) {
std::vector<TimetableProgress> progress_array = PopulateSeparationState(v);