Snitch sorter mod bugfix

Discussion about Mods for Prison Architect

Moderator: NBJeff

murgh
level2
level2
Posts: 232
Joined: Sat Jan 30, 2016 11:52 am

Snitch sorter mod bugfix

Postby murgh » Sat Jan 30, 2016 1:14 pm

I noticed the Snitch Sorter mod is some awesome handy tool, but with just one drawback: prisoners on death row who happen to be a snitch will get marked as protective custody - something which is definitely not wanted. To prevent this, an extra if/then is needed in the lua script handling the snitch sorting. Things work out perfectly again with this code:

Code: Select all

if prisoners~=nil then
   for name,dist in pairs( prisoners ) do
      if name.SnitchTimer~=0 then
         --Game.DebugOut("Prisoner is snitch");
         if name.Category~= "DeathRow" then
            Object.SetProperty(name,"Category",4);
         end
      end
   end
end


A much improved version of the Snitch Sorter can be found here viewtopic.php?f=88&t=59499 as being a part of a bigger mod.

p.s. Sorry, can't post on Steam discussions, so I thought I'd put this feedback in here instead. ;)

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 12 guests