Update from PR

This commit is contained in:
2025-04-20 20:40:19 +02:00
parent 83c20729fa
commit 3df84a7dad
+4 -17
View File
@@ -202,23 +202,10 @@ class FightServer extends DevServer {
FightServer() { FightServer() {
super() super()
doFirst { doFirst {
{ if (checkSchemID != 0) dParams.put("checkSchemID", "$checkSchemID")
int count = 0 if (prepareSchemID != 0) dParams.put("prepareSchemID", "$prepareSchemID")
if (checkSchemID != 0) count++ if (replay != 0) dParams.put("replay", "$replay")
if (prepareSchemID != 0) count++ if (eventKampfID != 0) dParams.put("fightID", "$eventKampfID")
if (replay != 0) count++
if (eventKampfID != 0) count++
if (count > 1) {
throw new GradleException("You can only set one of 'checkSchemID', 'prepareSchemID', 'replay' and 'eventKampfID'")
}
if (checkSchemID != 0) dParams.put("checkSchemID", "$checkSchemID")
if (prepareSchemID != 0) dParams.put("prepareSchemID", "$prepareSchemID")
if (replay != 0) dParams.put("replay", "$replay")
if (eventKampfID != 0) dParams.put("fightID", "$eventKampfID")
}
if (blueLeader != null && redLeader == null || blueLeader == null && redLeader != null) {
logger.log(LogLevel.WARN, "Please provide both a blue and a red leader. If this is intended ignore this message!")
}
if (blueLeader != null) dParams.put("blueLeader", blueLeader.toString()) if (blueLeader != null) dParams.put("blueLeader", blueLeader.toString())
if (redLeader != null) dParams.put("redLeader", redLeader.toString()) if (redLeader != null) dParams.put("redLeader", redLeader.toString())
if (config != null) dParams.put("config", config) if (config != null) dParams.put("config", config)