Dying industries

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

LaChupacabra
Engineer
Engineer
Posts: 11
Joined: 08 Nov 2019 23:54

Re: Dying industries

Post by LaChupacabra » 01 Dec 2019 22:47

milek7 wrote:
29 Nov 2019 15:16
Hi :)
...it is not core game code that decides when to close the industry, but this decision is delegated to the NewGRF itself,...
...There is one situation when game already does such thing and ignores closure request: when industry of this type is last on the map...
Hi Milek, nice to see you. :)
Well, then I still have my doubts. :D
andythenorth wrote:
29 Nov 2019 15:22
That can be done anyway - a closure period can be stored in a permanent register, and a message can be triggered once a month. :)
Regardless of whether it is defined by game or by addon, displaying messages several times when there are many industries on the map, would not be the best solution. It would be just like in life, where too many messages causes them to be ignored. These messages for the player are not particularly important - he is interested in a definite industry and not all on the map. Therefore, some message should be in the industry window.

However, just prolonging the closing period does not change much. If the player has already built the entire railway line and suddenly gets information about the fact that the steel mill will be closed, it does not matter whether it will be in a month or a year, if he can do nothing about it. Therefore, the game should check for any deliveries, and if so, the closing process should be canceled.


I don't know how it is written, I don't know how to write it, maybe it's stupid, but if it is the core that determines the time (method) of closure, I see it like this:

0. NewGRF sends information to the core about the closure of the factory

Current state: as I think
1. The core displays a message about the imminent closure of the factory
2. Start the countdown to closing / specify the closing date
3. nothing (countdown / checking date)
4. nothing (countdown / checking date)
5. After the specified time has elapsed / after reaching the specified date, i.e. At the end of this / the beginning of the next month, the core closes this factory

After change:
1. The core displays a message threatening to close the factory
2. Start the countdown to closing / specify the closing date
3. Adding information about the threat and the remaining time to the company window
4. Checking the deliveries to the enterprise at the end of each month
   a. If a delivery has been made, the enterprise closing process is canceled - the threat information is removed from the enterprise panel (Canceling the threat of closure works for primary industries.)
   b. If there were no deliveries, the time is counted down - the time in the hazard information is updated
5. After the specified time has elapsed / after reaching the specified date, i.e. At the end of this / the beginning of the next month, the core closes this factory


Ok, that's enough, I won't torment you with my theories anymore. :wink: I would prefer this patch to work for every industry, because this problem affects every industry, but if it is disproportionately difficult and/or time consuming, I will be happy if it is added even at NewGRF level.
I am sorry for may English. I know is bed.

Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 2 guests