Lets see...
You know the SlaveMarket class? Well I changed the shopping-for-slaves screen to be able use any class that implements the following:
- buy_girl() buys the currently selected girl.
- girl contains the currently selected girl.
- girlfin passes the screen the object that contains get_price(), get_whore_price() and get_upkeep() for the currently girl.
(Used so the slave market, jail and runawaymanager can specify their own prices. The jail currently uses girl.fin.get_price() / 2) - girls_list The list of the girls in the jail.
- index The index of the current girl in the list.
- next_index() Steps to the next girl.
- previous_index() Steps to the previous girl.
- set_girl(girl) Sets to a specific girl.
Both RunawayManager and CityJail implement these methods / properties so can be passed to the shopping screen so it can use them as if they were an instance of the SlaveMarket class.
RunawayManager automatically adds girls to it that trigger runaway states while training and manages their availablity in the jail and look around events. You access the RunawayManager in the jail screen by going
Cells>Browse Escapees. You can manually add a girl to the RunawayManager (there by making them runaway) by calling
pytfall.ra.add(girl), and remove them with
pytfall.ra.remove(girl). If you want to check whether or not a girl can/successfully does runaway use:
pytfall.ra.can_escape(girl, location, guards_if_not_from_location=None, girlmod_dict_for_events=None, traits_to_help_escape=None, traits_to_hinder_escape=["Restrained"], use_BE=True, simulate_or_enter_BE=True, be_kwargs=dict())
Returns
(success, detail), where
success is true/false and
detail is "caught" and "defeated" for an unsuccessful attempt with and without fighting respectively, or "escaped" and "fought" for a successful attempt.
To add / remove a girl from the normal jail use
jail.add_prisoner(girl) /
jail.remove_prisoner(girl). It can be accessed by
Cells>Browse Prisoners. Aside from that its interface is the same.
There is also an event trigger called "browse_jail_cells" accessed through
Cells>Browse Cells.