Skip to content
aubergine10 edited this page Dec 6, 2015 · 3 revisions

##Overview

This property only applies to [Prisoner](Prisoner (Entity)) entities and indicates whether they have a library book in their cell (as far as I can tell).

##Syntax

-- get:
local cellBook = somePrisoner.BookInCell

-- set:
somePrisoner.BookInCell = [true|false] -- does not work

##Example

Set literacy need to 0 for any prisoner that has book in cell:

local prisoners = this.GetNearbyObjects( 'Prisoner', 5000 )

for prisoner in next, prisoners do
  if prisoner.BookInCell then
    prisoner.Needs.Literacy = 0
  end
end

##Notes

I'm not 100% sure that "book" is a library book, it could mean something completely different, such as when a prisoner is first assigned a cell, or being escorted to a cell, or shackled in their cell waiting for transfer to solitary. If you find out, please let us know via the Issues tab above.

##See Also

^ Open "Pages" to Search



Guides:

  • [Lua Basics](Lua Basics Guide)
  • [Save-Load Cycle](Save-Load Cycle Guide)

[Globals](Object Globals):

  • [Game](Game (Global))
  • [me](me (Global))
  • [Object](Object (Global))
  • [this](this (Global))

[Events](Object Events):

Psuedo-Types:

  • [Rotation table](Rotation table)
  • [Id table](Id table)
  • [Location table](Location table)
  • [Velocity table](Velocity table)

[Methods](Object Methods):

[Properties](Object Properties):

Clone this wiki locally