From 6cc55abaf93e6d22e92ac2212b67ae0af52dbc68 Mon Sep 17 00:00:00 2001 From: frosch Date: Wed, 25 Oct 2017 15:38:19 +0000 Subject: [PATCH] (svn r27929) -Cleanup: Remove unused Industry::random_triggers --- src/industry.h | 1 - src/newgrf_industries.cpp | 2 +- src/saveload/industry_sl.cpp | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/industry.h b/src/industry.h index 5e5d046880..9b185efc4b 100644 --- a/src/industry.h +++ b/src/industry.h @@ -66,7 +66,6 @@ struct Industry : IndustryPool::PoolItem<&_industry_pool> { Date last_cargo_accepted_at; ///< Last day cargo was accepted by this industry byte selected_layout; ///< Which tile layout was used when creating the industry - byte random_triggers; ///< Triggers for the random uint16 random; ///< Random value used for randomisation of all kinds of things PersistentStorage *psa; ///< Persistent storage for NewGRF industries. diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp index f0c8dd3b77..9f227a9f58 100644 --- a/src/newgrf_industries.cpp +++ b/src/newgrf_industries.cpp @@ -380,7 +380,7 @@ static uint32 GetCountAndDistanceOfClosestInstance(byte param_setID, byte layout /* virtual */ uint32 IndustriesScopeResolver::GetTriggers() const { - return this->industry != NULL ? this->industry->random_triggers : 0; + return 0; } /* virtual */ void IndustriesScopeResolver::StorePSA(uint pos, int32 value) diff --git a/src/saveload/industry_sl.cpp b/src/saveload/industry_sl.cpp index c5ddadfdd0..b28730e3c3 100644 --- a/src/saveload/industry_sl.cpp +++ b/src/saveload/industry_sl.cpp @@ -57,7 +57,7 @@ static const SaveLoad _industry_desc[] = { SLEG_CONDARR(_old_ind_persistent_storage.storage, SLE_UINT32, 16, 76, 160), SLE_CONDREF(Industry, psa, REF_STORAGE, 161, SL_MAX_VERSION), - SLE_CONDVAR(Industry, random_triggers, SLE_UINT8, 82, SL_MAX_VERSION), + SLE_CONDNULL(1, 82, 196), // random_triggers SLE_CONDVAR(Industry, random, SLE_UINT16, 82, SL_MAX_VERSION), SLE_CONDNULL(32, 2, 143), // old reserved space