Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guests In Restraints #104

Closed
Aviuz opened this issue Oct 9, 2017 · 2 comments
Closed

Guests In Restraints #104

Aviuz opened this issue Oct 9, 2017 · 2 comments
Projects

Comments

@Aviuz
Copy link

Aviuz commented Oct 9, 2017

Hello,

Guests are in restraints but they DO NOT show they are, because of method:

// RimWorld.RestraintsUtility
public static bool ShouldShowRestraintsInfo(Pawn pawn)
{
	return pawn.IsPrisonerOfColony && RestraintsUtility.InRestraints(pawn);
}

But they are slowed indeed:

// Verse.Pawn
private int TicksPerMove(bool diagonal)
{
	float num = this.GetStatValue(StatDefOf.MoveSpeed, true);
	if (RestraintsUtility.InRestraints(this))
	{
		num *= 0.35f;
	}
        (...)
}

I assume making lord NeverInRestraints property to true will solve this issue.

// RimWorld.RestraintsUtility
public static bool InRestraints(Pawn pawn)
{
	if (!pawn.Spawned)
	{
		return false;
	}
	if (pawn.HostFaction == null)
	{
		return false;
	}
	Lord lord = pawn.GetLord();
	return lord == null || lord.LordJob == null || !lord.LordJob.NeverInRestraints;
}

btw. great mod,
best wishes,
Avius

@Aviuz Aviuz changed the title Guest In Restraints Guests In Restraints Oct 9, 2017
@OrionFive
Copy link
Owner

Thanks for reporting this and including the solution!

@OrionFive
Copy link
Owner

It's fixed for the upcoming B18 version.

@OrionFive OrionFive added this to DONE in Hospitality Jan 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Hospitality
  
DONE
Development

No branches or pull requests

2 participants