Commits vergleichen

..

11 Commits

Autor SHA1 Nachricht Datum
c702acb9d8 Merge pull request 'Update EventFight.hasFinished' (#69) from UpdateEventFight into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Reviewed-on: #69
Reviewed-by: Lixfel <lixfel@steamwar.de>
2024-08-03 15:35:08 +02:00
yoyosource
14bea165c5 Update EventFight.hasFinished
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
2024-08-03 15:29:33 +02:00
Lixfel
d000b8687d Fix logGetId
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Signed-off-by: Lixfel <git-5w3l@lixfel.de>
2024-07-06 15:12:16 +02:00
Lixfel
1237a699ba Fix SWCommand with 0 args, Add SWException option to get ID
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Signed-off-by: Lixfel <git-5w3l@lixfel.de>
2024-07-05 10:07:22 +02:00
Lixfel
e76473e0be Fix SWCommand with 0 args
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Signed-off-by: Lixfel <git-5w3l@lixfel.de>
2024-07-03 22:17:39 +02:00
Lixfel
0caf885959 Add TICKET_LOG, Update dependencies
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Signed-off-by: Lixfel <git-5w3l@lixfel.de>
2024-07-03 22:05:46 +02:00
20c22c47f9 Merge pull request 'Kleiner Fehler' (#68) from chaoscaot-patch-1 into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Reviewed-on: #68
Reviewed-by: Lixfel <lixfel@steamwar.de>
2024-03-16 00:45:27 +01:00
0c35be1fec Kleiner Fehler
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
2024-03-15 22:40:53 +01:00
Chaoscaot
0bc349fc64 Kleiner Fehler
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
2024-03-15 22:39:41 +01:00
a473e59048 Merge pull request 'Configurable Spectate port to allow multiple concurrent Spectate servers' (#66) from spectate into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Reviewed-on: #66
Reviewed-by: YoyoNow <jwsteam@nidido.de>
2024-03-13 13:11:38 +01:00
3c889efe9e Configurable Spectate port to allow multiple concurrent Spectate servers
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
2024-03-09 21:22:24 +01:00
11 geänderte Dateien mit 23 neuen und 183 gelöschten Zeilen

Datei anzeigen

@ -74,15 +74,15 @@ repositories {
}
dependencies {
compileOnly 'org.projectlombok:lombok:1.18.22'
testCompileOnly 'org.projectlombok:lombok:1.18.22'
annotationProcessor 'org.projectlombok:lombok:1.18.22'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.22'
compileOnly 'org.projectlombok:lombok:1.18.32'
testCompileOnly 'org.projectlombok:lombok:1.18.32'
annotationProcessor 'org.projectlombok:lombok:1.18.32'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.32'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.hamcrest:hamcrest:2.2'
compileOnly 'org.xerial:sqlite-jdbc:3.36.0'
compileOnly 'org.xerial:sqlite-jdbc:3.46.0.0'
}
task buildResources {

Datei anzeigen

@ -1,35 +0,0 @@
/*
* This file is a part of the SteamWar software.
*
* Copyright (C) 2024 SteamWar.de-Serverteam
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package de.steamwar.network.packets.api;
import de.steamwar.network.packets.NetworkPacket;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Getter
public class BauStatusRequestPacket extends NetworkPacket {
private static final long serialVersionUID = 1442956004669738962L;
private int playerId;
}

Datei anzeigen

@ -1,29 +0,0 @@
/*
* This file is a part of the SteamWar software.
*
* Copyright (C) 2024 SteamWar.de-Serverteam
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package de.steamwar.network.packets.api;
import de.steamwar.network.packets.NetworkPacket;
import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
public class EventReloadPacket extends NetworkPacket {
private static final long serialVersionUID = 1814658967167959572L;
}

Datei anzeigen

@ -1,29 +0,0 @@
/*
* This file is a part of the SteamWar software.
*
* Copyright (C) 2024 SteamWar.de-Serverteam
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package de.steamwar.network.packets.client;
import de.steamwar.network.packets.NetworkPacket;
public class AnvilInventoryCallbackPacket extends NetworkPacket {
private static final long serialVersionUID = 9000793526796115661L;
private int player;
private String text;
}

Datei anzeigen

@ -1,40 +0,0 @@
/*
* This file is a part of the SteamWar software.
*
* Copyright (C) 2024 SteamWar.de-Serverteam
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package de.steamwar.network.packets.server;
import de.steamwar.network.packets.NetworkPacket;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Getter
public class AnvilInventoryPacket extends NetworkPacket {
private static final long serialVersionUID = -2283899431463763871L;
private String title;
private int player;
private String defaultText;
private String item;
}

Datei anzeigen

@ -1,40 +0,0 @@
/*
* This file is a part of the SteamWar software.
*
* Copyright (C) 2024 SteamWar.de-Serverteam
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package de.steamwar.network.packets.server.api;
import de.steamwar.network.packets.NetworkPacket;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import java.util.List;
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Getter
public class BauStatusResponsePacket extends NetworkPacket {
private static final long serialVersionUID = 4338519342870271560L;
private int player;
private boolean serverStatus;
private List<Integer> onlinePlayers;
}

Datei anzeigen

@ -87,6 +87,7 @@ public class Event {
private final SchematicType schemType;
@Field
private final boolean publicSchemsOnly;
@Deprecated
@Field
private final boolean spectateSystem;

Datei anzeigen

@ -84,8 +84,12 @@ public class EventFight implements Comparable<EventFight> {
private final int teamRed;
@Getter
@Field
@Deprecated
private final int kampfleiter;
@Getter
@Field
private final int spectatePort;
@Getter
@Field(def = "0")
private int ergebnis;
@Field(nullable = true)
@ -103,7 +107,7 @@ public class EventFight implements Comparable<EventFight> {
}
public boolean hasFinished() {
return fight != 0;
return fight != 0 || ergebnis != 0;
}
public void reschedule() {

Datei anzeigen

@ -31,7 +31,7 @@ import java.util.stream.Collectors;
public class Referee {
private static final Table<Referee> table = new Table<>(Referee.class);
private static final SelectStatement<Referee> byEvent = table.select("eventID");
private static final SelectStatement<Referee> byEvent = table.selectFields("eventID");
public static Set<Integer> get(int eventID) {
return byEvent.listSelect(eventID).stream().map(referee -> referee.userID).collect(Collectors.toSet());

Datei anzeigen

@ -38,7 +38,7 @@ public class SWException {
private static final String SERVER_NAME = new File(CWD).getName();
private static final Table<SWException> table = new Table<>(SWException.class, "Exception");
private static final Statement insert = table.insertFields("server", "message", "stacktrace");
private static final Statement insert = table.insertFields(true, "server", "message", "stacktrace");
@Field(keys = {Table.PRIMARY}, autoincrement = true)
private final int id;
@ -52,10 +52,17 @@ public class SWException {
private final String stacktrace;
public static void log(String message, String stacktrace){
insert.update(SERVER_NAME, generateMessage(message), stacktrace);
}
public static int logGetId(String message, String stacktrace) {
return insert.insertGetKey(SERVER_NAME, generateMessage(message), stacktrace);
}
private static String generateMessage(String message) {
StringBuilder msgBuilder = new StringBuilder(message);
SQLWrapper.impl.additionalExceptionMetadata(msgBuilder);
msgBuilder.append("\nCWD: ").append(CWD);
insert.update(SERVER_NAME, msgBuilder.toString(), stacktrace);
return msgBuilder.toString();
}
}

Datei anzeigen

@ -42,6 +42,7 @@ public enum UserPerm {
RESTRICTED_MODS,
COLOR_CHAT,
TEAM,
TICKET_LOG,
BUILD,
CHECK,
MODERATION,