Bug #3085

Unwanted closures

Added by andythenorth over 6 years ago. Updated about 6 years ago.

Status:ClosedStart date:2010-07-09
Priority:LowDue date:
Assignee:-% Done:


Target version:0.7.3


(also reported by Macee in dev thread)

Simon Smith wrote:

Unwanted shutdowns: Coal (only) to a steel mill, the steel mill still shut down. Unfortunately I can't prove that one. Second, building materials to a builders yard, I've had three shutdowns (so far) in one game! The first two times a builders yard went I thought it was just insufficiently frequent supply delivery. Third time, I had a lorry delivering transferred cargo at a rate of around two shipments a month, and the yard /still/ went. And to rub salt in the wound I'd bought a second lorry to deal with the supply backlog days before the yard disappeared. I'm using OTTDr22855 and FIRS 0.7.0 beta1. Unfortunately the savegame exceeds the upload size limit. If you'd like me to try recreating the problem in a fresh game that isn't >7Mb please ask.

Incidentally, I believe another industry (accepting goods) shut down in the same town within a month or two of the builders yard going. Probably just a coincidence, but might be a 'shut down this industry' flag not getting cleared correctly and nobbling the builders' yard as well.

This game has also had some Iron Works and Forges appearing way late in the timeline. I started in 1930 so I'd expect to see some, but shouldn't they tend to be supplanted by the steel mills when they appear?

I like the new FIRS a great deal; my only minor gripe is the rather grim graphic you use for the Hotel. It looks more like a borstal to me, I'm sorry to say

Edit: Now that's just taking the mickey. Seven months after the disappearance of the last yard, and just after I'd built track to a new yard, /and/ just after the last train transferring the remaining supplies pulled out of the old station, it's built a brand new yard so close to the site of the old one it's still in the station catchment area. Has someone added a sense of humour to the game as an Easter egg??


Feature #1088: Indication of closure for all secondary industriesRejectedplanetmaker

Associated revisions

Revision 2731:779079aaabf3
Added by andythenorth about 6 years ago

Fix (possibly): prevent unwanted closures of secondary industry (patch by Radmir) (closes #3085)


#1 Updated by andythenorth over 6 years ago

  • Target version set to 188

#2 Updated by HeiRos over 6 years ago

My game also have some of this closures. I think the problem is sprites/nml/templates/produce_secondary.pnml. line 74

    73             /* Reset the closure countdown */

    74             STORE_PERM( (waiting_cargo_1 == 0 && waiting_cargo_1 == 0 && waiting_cargo_3 == 0) * LOAD_PERM(var_closure_counter), var_closure_counter),

Deliviering cargo_2 do not reset the var_closure_counter.

#3 Updated by Radmir over 6 years ago


--- a/sprites/nml/templates/check_secondary_production_level.pnml
+++ b/sprites/nml/templates/check_secondary_production_level.pnml
@@ -24,9 +24,9 @@
             STORE_PERM(0, var_input_cargo_3),
             transported_last_month_1 > 0 ||
             transported_last_month_2 > 0 ||
-            (current_date - var_date_received_1) < 30 ||
-            (current_date - var_date_received_2) < 30 ||
-            (current_date - var_date_received_3) < 30
+            (current_date - LOAD_PERM(var_date_received_1)) < 30 ||
+            (current_date - LOAD_PERM(var_date_received_2)) < 30 ||
+            (current_date - LOAD_PERM(var_date_received_3)) < 30
         ) {
     0: THIS_ID(increase_closure_counter);

#4 Updated by andythenorth over 6 years ago

  • Target version changed from 188 to 0.7.2

#5 Updated by andythenorth about 6 years ago

  • Status changed from New to Confirmed
  • Target version deleted (0.7.2)

#6 Updated by andythenorth about 6 years ago

  • Target version set to 0.7.3

#7 Updated by andythenorth about 6 years ago

Patch looks plausible. Am committing this. Thanks Radmir.

#8 Updated by andythenorth about 6 years ago

  • Status changed from Confirmed to Closed
  • % Done changed from 0 to 100

Applied in changeset 779079aaabf3.

Also available in: Atom PDF