Replace seconds by ticks
This commit is contained in:
@@ -25,11 +25,11 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Maximum number of crates.")]
|
||||
public readonly int Maximum = 255;
|
||||
|
||||
[Desc("Average time (seconds) between crate spawn.")]
|
||||
public readonly int SpawnInterval = 180;
|
||||
[Desc("Average time (ticks) between crate spawn.")]
|
||||
public readonly int SpawnInterval = 180 * 25;
|
||||
|
||||
[Desc("Delay (in seconds) before the first crate spawns.")]
|
||||
public readonly int InitialSpawnDelay = 300;
|
||||
[Desc("Delay (in ticks) before the first crate spawns.")]
|
||||
public readonly int InitialSpawnDelay = 300 * 25;
|
||||
|
||||
[Desc("Which terrain types can we drop on?")]
|
||||
public readonly HashSet<string> ValidGround = new HashSet<string> { "Clear", "Rough", "Road", "Ore", "Beach" };
|
||||
@@ -72,7 +72,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
this.info = info;
|
||||
this.self = self;
|
||||
|
||||
ticks = info.InitialSpawnDelay * 25;
|
||||
ticks = info.InitialSpawnDelay;
|
||||
}
|
||||
|
||||
public void Tick(Actor self)
|
||||
@@ -82,7 +82,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
if (--ticks <= 0)
|
||||
{
|
||||
ticks = info.SpawnInterval * 25;
|
||||
ticks = info.SpawnInterval;
|
||||
|
||||
var toSpawn = Math.Max(0, info.Minimum - crates)
|
||||
+ (crates < info.Maximum ? 1 : 0);
|
||||
|
||||
Reference in New Issue
Block a user