Extending Laundry job to custom beds

Discussion about Mods for Prison Architect

Moderator: NBJeff

User avatar
Nomaki
level0
Posts: 6
Joined: Tue Sep 30, 2014 12:37 am

Extending Laundry job to custom beds

Postby Nomaki » Wed Oct 14, 2015 12:00 am

I'm attempting to implement some other beds into the game, and need to add them to the laundry production system.

I've searched all through the main.dat core files and can't find any reference to the laundry system jobs, moving prisoner uniforms from the laundry basket to the beds; nor does the action language string "Move Prisoner Uniform to Cell" exist anywhere in the files.

Has anyone done this before, or have any idea if adding to the laundry system is even possible?
User avatar
Brento666
level3
level3
Posts: 290
Joined: Wed Sep 02, 2015 9:23 pm

Re: Extending Laundry job to custom beds

Postby Brento666 » Wed Oct 14, 2015 12:52 am

Hey Nomaki, I've also seen the gaps in the laundry rules... It must be like cooking; a separate complex script, not running in/through the production system of the game.

Like with modding we can't do allot of complex things with the api, also the devs (apparently) sometimes need to resort to alternate/custom means...

Anywho... Laundry; you could have a production rule asking for prison uniforms I guess, but getting sheets cleaned like proper taken, washed and returned... It made me a little sad to move on from my endeavor, I now just get someone over the come and scrub the bed (a simple custom job)... and change the subtype to clean on complete.

Have you tried throwing down allot of rules like dirty-sheets in washer and clean-sheets to bed? (Not sure if I tried all that much after not seeing the connecting lines in Laundry)
User avatar
Nomaki
level0
Posts: 6
Joined: Tue Sep 30, 2014 12:37 am

Re: Extending Laundry job to custom beds

Postby Nomaki » Wed Oct 14, 2015 8:29 pm

Brento666 wrote:Anywho... Laundry; you could have a production rule asking for prison uniforms I guess, but getting sheets cleaned like proper taken, washed and returned... It made me a little sad to move on from my endeavor, I now just get someone over the come and scrub the bed (a simple custom job)... and change the subtype to clean on complete.

Have you tried throwing down allot of rules like dirty-sheets in washer and clean-sheets to bed? (Not sure if I tried all that much after not seeing the connecting lines in Laundry)


Howdy Brento! I haven't tried making any custom production rules, as I wasn't sure if I was just somehow overlooking a "laundry_stuff_totally.txt" file or system, but I'll have a tinker around now and see if I can get anything set up to achieve that.

Failing that, would it be possible to get some pointers for implementing your bed-scrubbing job you mentioned? Would be massively appreciated!
User avatar
Brento666
level3
level3
Posts: 290
Joined: Wed Sep 02, 2015 9:23 pm

Re: Extending Laundry job to custom beds

Postby Brento666 » Thu Oct 15, 2015 3:41 am

Ey! No problem!
(have pleeenty of janitors there always busy/or use worker/doctor... prisonuniform gets waved around like an 'orange sponge' as a real cheap placeholder for a custom sponge or sheet)

Code: Select all

from jobs.text:
BEGIN Job
   Name                    CleanSheets
   JobTime                 1
   Tool                    PrisonerUniform
   Worker                  Janitor
END

Code: Select all

from bed script I create the job on certain state point once and let the 'callback' ( JobComplete_CustomJobName() ) handle the subtype revert to clean:

...
if this.Clean == false or this.SubType ~= 0 then--choose which check you need
    this.CreateJob("CleanSheets")
end
....

function JobComplete_CleanSheets()
    --Echo("Sheets Cleaned")
    this.SubType = 0
    this.Clean = true
end


Hope you've got some timing and/or state scripted object/sprites ready; then something like above should fit right in (for now)... GL!
Roytulin
level1
level1
Posts: 10
Joined: Tue Dec 05, 2017 9:10 am

Re: Extending Laundry job to custom beds

Postby Roytulin » Sun Jan 28, 2018 9:55 am

Oh my gosh, Brento666, I may have just found something relevant to my problem!

I’m looking to get clean clothes delivered to a custom bed, any way to do it? The conversation above kind of confused me so :p

I have tried using production rules to induce said devlievery, but the janitors deliver a clothes stack instead of split clothes, and the prisoners can’t use those.

I think it may only be achievable with lua scripting, but after reading two contradicting guides I still have no clue how it works. Any assistance you can offer on that?

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 7 guests