Skip to content

Commit d3ccbaa

Browse files
committed
paralell attacks
1 parent 513c791 commit d3ccbaa

7 files changed

Lines changed: 719 additions & 363 deletions

File tree

.idea/.idea.Zero-K/.idea/projectSettingsUpdater.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Shared/PlasmaShared/GlobalConst.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ static void SetMode(ModeType newMode)
210210
public const int PostVoteHideThreshold = -6;
211211
public const bool OnlyAdminsSeePostVoters = false;
212212
public const int PlanetWarsMinutesToAttackIfNoOption = 2;
213-
public const int PlanetWarsMinutesToAttack = 20;
214-
public const int PlanetWarsMinutesToAccept = 5;
213+
public const int PlanetWarsMinutesToAttack = 5;
214+
public const int PlanetWarsMinutesToAccept = 10;
215215
public const int PlanetWarsDropshipsStayForMinutes = 2*60;
216216
public const int PlanetWarsMaxTeamsize = 4;
217217
public const double PlanetWarsDefenderWinKillCcMultiplier = 0.2;

Shared/PlasmaShared/Utils.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,12 +537,18 @@ public static Thread SafeThread(Action action)
537537

538538

539539
public static U Get<T, U>(this IDictionary<T, U> dict, T key)
540-
where U : class
541540
{
542541
U val = default(U);
543542
if (key != null) dict.TryGetValue(key, out val);
544543
return val;
545544
}
545+
546+
public static U GetOrDefault<T, U>(this IDictionary<T, U> dict, T key, U defaultValue)
547+
{
548+
U val = defaultValue;
549+
if (key != null) dict.TryGetValue(key, out val);
550+
return val;
551+
}
546552

547553

548554
public static List<T> Shuffle<T>(this IEnumerable<T> source)

ZkLobbyServer/SpringieInterface/BattleResultHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ private static void ProcessPlanetWars(SpringBattleContext result, ZkLobbyServer.
184184
if (winNum > 1) winNum = null;
185185
}
186186

187-
PlanetWarsTurnHandler.EndTurn(result.LobbyStartContext.Map,
187+
PlanetWarsTurnHandler.ProcessBattleResult(result.LobbyStartContext.Map,
188188
result.OutputExtras,
189189
db,
190190
winNum,

0 commit comments

Comments
 (0)