Difference between revisions of "User:PigeonGuru/Sandbox"

From RimWorld Wiki
Jump to navigation Jump to search
Line 13: Line 13:
  
 
<!-- <div style="background:gold">[[File:LongRangeMineralScanner.png|25px]]<span style="color:navy">[[User:Yoshida Keiji|'''Yoshida Keiji''']]</span>([[User_talk:Yoshida_Keiji|Let's talk]][[File:beer b.png|25px]])[[File:LongRangeMineralScanner.png|25px]]</div> -->
 
<!-- <div style="background:gold">[[File:LongRangeMineralScanner.png|25px]]<span style="color:navy">[[User:Yoshida Keiji|'''Yoshida Keiji''']]</span>([[User_talk:Yoshida_Keiji|Let's talk]][[File:beer b.png|25px]])[[File:LongRangeMineralScanner.png|25px]]</div> -->
 +
 +
=== datamined ===
 +
 +
namespace RimWorld.Planet
 +
{
 +
public static class CaravanTicksPerMoveUtility
 +
{
 +
private const int DownedPawnMoveTicks = 450;
 +
 +
public const float CellToTilesConversionRatio = 190f;
 +
 +
public const int DefaultTicksPerMove = 2500;
 +
 +
public static int GetTicksPerMove(Caravan caravan)
 +
{
 +
if (caravan == null)
 +
{
 +
return 2500;
 +
}
 +
return CaravanTicksPerMoveUtility.GetTicksPerMove(caravan.PawnsListForReading);
 +
}
 +
 +
public static int GetTicksPerMove(List<Pawn> pawns)
 +
{
 +
if (pawns.Any<Pawn>())
 +
{
 +
float num = 0f;
 +
for (int i = 0; i < pawns.Count; i++)
 +
{
 +
int num2 = (!pawns[i].Downed) ? pawns[i].TicksPerMoveCardinal : 450;
 +
num += (float)num2 / (float)pawns.Count;
 +
}
 +
num *= 190f;
 +
return Mathf.Max(Mathf.RoundToInt(num), 1);
 +
}
 +
return 2500;
 +
}
 +
}
 +
}

Revision as of 13:29, 29 September 2017

template

http://rimworldwiki.com/index.php?title=Template:Nav/guides

save file

C:\Users\%username%\AppData\LocalLow\Ludeon Studios\RimWorld by Ludeon Studios\Saves

°C

PigeonGuru, Strategist { talk | contribs }



datamined

namespace RimWorld.Planet { public static class CaravanTicksPerMoveUtility { private const int DownedPawnMoveTicks = 450;

public const float CellToTilesConversionRatio = 190f;

public const int DefaultTicksPerMove = 2500;

public static int GetTicksPerMove(Caravan caravan) { if (caravan == null) { return 2500; } return CaravanTicksPerMoveUtility.GetTicksPerMove(caravan.PawnsListForReading); }

public static int GetTicksPerMove(List<Pawn> pawns) { if (pawns.Any<Pawn>()) { float num = 0f; for (int i = 0; i < pawns.Count; i++) { int num2 = (!pawns[i].Downed) ? pawns[i].TicksPerMoveCardinal : 450; num += (float)num2 / (float)pawns.Count; } num *= 190f; return Mathf.Max(Mathf.RoundToInt(num), 1); } return 2500; } } }