punish v6.8.18.0
This commit is contained in:
commit
e786325cda
322 changed files with 554232 additions and 0 deletions
|
@ -0,0 +1,22 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Questionable.GameStructs;
|
||||
|
||||
[StructLayout(LayoutKind.Explicit, Size = 1280)]
|
||||
internal struct AgentSatisfactionSupply2
|
||||
{
|
||||
[FieldOffset(112)]
|
||||
public ushort CurrentSatisfaction;
|
||||
|
||||
[FieldOffset(114)]
|
||||
public ushort MaxSatisfaction;
|
||||
|
||||
public int CalculateTurnInsToNextRank(int maxTurnIns)
|
||||
{
|
||||
if (MaxSatisfaction == 0)
|
||||
{
|
||||
return maxTurnIns;
|
||||
}
|
||||
return maxTurnIns * (MaxSatisfaction - CurrentSatisfaction) / MaxSatisfaction;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue