Storing bleach on tables

Discussion about Mods for Prison Architect

Moderator: NBJeff

muahaa_the_french
level1
level1
Posts: 49
Joined: Thu Aug 15, 2013 6:16 pm

Storing bleach on tables

Postby muahaa_the_french » Mon Feb 02, 2015 11:31 pm

Here's the code:

BEGIN ProductionRule
Rule Storage
Material Bleach
Room CleaningCupboard
Distribution Nearest
Container Table
Condition NotLoaded
END

The workers properly store the bleach on tables, but then go back and pick it up and put it on the floor, after which it is put back on the table in an endless loop.

I am assuming this is because the original production rule in productions.txt is still being loaded, telling workers to randomly put the bleach anywhere in the cleaning cupboard. any ideas?
GamingBud
level2
level2
Posts: 194
Joined: Mon Dec 29, 2014 8:33 pm

Re: Storing bleach on tables

Postby GamingBud » Mon Feb 02, 2015 11:38 pm

Maybe make another the same production rule as the one doing that in the PA files, but instead add Condition NotLoaded at the end. Therefore if the bleach is in the deliveries then it will go to the table or floor, and then go to the table and not be touched again.
muahaa_the_french
level1
level1
Posts: 49
Joined: Thu Aug 15, 2013 6:16 pm

Re: Storing bleach on tables

Postby muahaa_the_french » Mon Feb 02, 2015 11:41 pm

Still happens. MADDENING.

BEGIN ProductionRule
Rule Storage
Material Bleach
Room CleaningCupboard
Distribution Nearest
Container Table
Condition NotLoaded
END

BEGIN ProductionRule
Rule Storage
Material Bleach
Room CleaningCupboard
Distribution Random
Condition NotLoaded
END
Puman
level1
level1
Posts: 48
Joined: Fri Aug 29, 2014 1:21 pm

Re: Storing bleach on tables

Postby Puman » Mon Feb 02, 2015 11:52 pm

muahaa_the_french wrote:Still happens. MADDENING.
END

Well, the original production item will always exist, and it has no rule to check whether it is loaded. You should be able to turn of the behaviour by adding the loaded rule to the original game production.txt file. But then it won't be possible to distribute as a mod. :|

It is kind of a bug (oversimplification) in the original file.
muahaa_the_french
level1
level1
Posts: 49
Joined: Thu Aug 15, 2013 6:16 pm

Re: Storing bleach on tables

Postby muahaa_the_french » Mon Feb 02, 2015 11:54 pm

Is there a way to do this with a lua script or will the job always be created?

Perhaps auto-canceling "move bleach to cleaningcupboard" jobs before they can be assigned would be the way to go.
muahaa_the_french
level1
level1
Posts: 49
Joined: Thu Aug 15, 2013 6:16 pm

Re: Storing bleach on tables

Postby muahaa_the_french » Mon Feb 02, 2015 11:56 pm

While leaving the newly introduced move bleach to table rule unmodified.

The downside is that Cleaning Cupboards would never accept more bleach than is able to be stored, but that works just fine too.

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 5 guests