mirror of
https://gitgud.io/Ed86/rjw-whoring.git
synced 2024-08-15 00:03:25 +00:00
28 lines
No EOL
638 B
C#
28 lines
No EOL
638 B
C#
using Verse;
|
|
using RimWorld;
|
|
|
|
|
|
namespace rjwwhoring
|
|
{
|
|
|
|
public class RoomRoleWorker_Brothel : RoomRoleWorker
|
|
{
|
|
public override float GetScore(Room room)
|
|
{
|
|
int num = 0;
|
|
var allContainedThings = room.ContainedAndAdjacentThings;
|
|
foreach (var thing in allContainedThings)
|
|
{
|
|
var building_Bed = thing as Building_Bed;
|
|
if (building_Bed?.def.building.bed_humanlike == true)
|
|
{
|
|
if (building_Bed.ForPrisoners) return 0;
|
|
if (building_Bed.IsAllowedForWhoringAll()) num++;
|
|
}
|
|
}
|
|
if (num < 1) return 0;
|
|
return num * 110001; // higher than guest beds or "regular" beds when counting barracks
|
|
}
|
|
}
|
|
|
|
} |