/** * Wrapper function to get the GoodsEntry's internal structure while * some of the variables itself are private. * @return the saveload description for GoodsEntry. */ const SaveLoad *GetGoodsDesc() { static const SaveLoad goods_desc[] = { SLEG_CONDVAR( _waiting_acceptance, SLE_UINT16, 0, 67), SLE_CONDVAR(GoodsEntry, acceptance_pickup, SLE_UINT8, 68, SL_MAX_VERSION), SLE_CONDNULL(2, 51, 67), SLE_VAR(GoodsEntry, days_since_pickup, SLE_UINT8), SLE_VAR(GoodsEntry, rating, SLE_UINT8), SLEG_CONDVAR( _cargo_source, SLE_FILE_U8 | SLE_VAR_U16, 0, 6), SLEG_CONDVAR( _cargo_source, SLE_UINT16, 7, 67), SLEG_CONDVAR( _cargo_source_xy, SLE_UINT32, 44, 67), SLEG_CONDVAR( _cargo_days, SLE_UINT8, 0, 67), SLE_VAR(GoodsEntry, last_speed, SLE_UINT8), SLE_VAR(GoodsEntry, last_age, SLE_UINT8), SLEG_CONDVAR( _cargo_feeder_share, SLE_FILE_U32 | SLE_VAR_I64, 14, 64), SLEG_CONDVAR( _cargo_feeder_share, SLE_INT64, 65, 67), SLE_CONDLST(GoodsEntry, cargo.packets, REF_CARGO_PACKET, 68, SL_MAX_VERSION), SLE_END() }; return goods_desc; }
SLE_CONDVAR(Town, time_until_rebuild, SLE_UINT16, 54, SL_MAX_VERSION), SLE_CONDVAR(Town, grow_counter, SLE_UINT16, 54, SL_MAX_VERSION), SLE_CONDVAR(Town, growth_rate, SLE_FILE_I16 | SLE_VAR_U16, 54, 164), SLE_CONDVAR(Town, growth_rate, SLE_UINT16, 165, SL_MAX_VERSION), SLE_VAR(Town, fund_buildings_months, SLE_UINT8), SLE_VAR(Town, road_build_months, SLE_UINT8), SLE_CONDVAR(Town, exclusivity, SLE_UINT8, 2, SL_MAX_VERSION), SLE_CONDVAR(Town, exclusive_counter, SLE_UINT8, 2, SL_MAX_VERSION), SLE_CONDVAR(Town, larger_town, SLE_BOOL, 56, SL_MAX_VERSION), SLE_CONDVAR(Town, layout, SLE_UINT8, 113, SL_MAX_VERSION), SLE_CONDLST(Town, psa_list, REF_STORAGE, 161, SL_MAX_VERSION), SLE_CONDVAR(Town, cargo_produced, SLE_UINT32, 166, SL_MAX_VERSION), /* reserve extra space in savegame here. (currently 30 bytes) */ SLE_CONDNULL(30, 2, SL_MAX_VERSION), SLE_END() }; static const SaveLoad _town_supplied_desc[] = { SLE_CONDVAR(TransportedCargoStat<uint32>, old_max, SLE_UINT32, 165, SL_MAX_VERSION), SLE_CONDVAR(TransportedCargoStat<uint32>, new_max, SLE_UINT32, 165, SL_MAX_VERSION), SLE_CONDVAR(TransportedCargoStat<uint32>, old_act, SLE_UINT32, 165, SL_MAX_VERSION), SLE_CONDVAR(TransportedCargoStat<uint32>, new_act, SLE_UINT32, 165, SL_MAX_VERSION),
SLE_CONDNULL(2, 0, 25), ///< last-vehicle SLE_CONDVAR(Station, last_vehicle_type, SLE_UINT8, 26, SL_MAX_VERSION), SLE_CONDNULL(2, 3, 25), ///< custom station class and id SLE_CONDVAR(Station, build_date, SLE_FILE_U16 | SLE_VAR_I32, 3, 30), SLE_CONDVAR(Station, build_date, SLE_INT32, 31, SL_MAX_VERSION), SLE_CONDREF(Station, bus_stops, REF_ROADSTOPS, 6, SL_MAX_VERSION), SLE_CONDREF(Station, truck_stops, REF_ROADSTOPS, 6, SL_MAX_VERSION), /* Used by newstations for graphic variations */ SLE_CONDVAR(Station, random_bits, SLE_UINT16, 27, SL_MAX_VERSION), SLE_CONDVAR(Station, waiting_triggers, SLE_UINT8, 27, SL_MAX_VERSION), SLE_CONDVAR(Station, num_specs, SLE_UINT8, 27, SL_MAX_VERSION), SLE_CONDLST(Station, loading_vehicles, REF_VEHICLE, 57, SL_MAX_VERSION), /* reserve extra space in savegame here. (currently 32 bytes) */ SLE_CONDNULL(32, 2, SL_MAX_VERSION), SLE_END() }; static uint16 _waiting_acceptance; static uint16 _cargo_source; static uint32 _cargo_source_xy; static uint16 _cargo_days; static Money _cargo_feeder_share; static const SaveLoad _station_speclist_desc[] = { SLE_CONDVAR(StationSpecList, grfid, SLE_UINT32, 27, SL_MAX_VERSION),