Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
fc5a397097
Commit
ac91c77584
@ -43,27 +43,5 @@ sourceSets {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly 'org.projectlombok:lombok:1.18.22'
|
compileOnly swdep('SpigotCore')
|
||||||
testCompileOnly 'org.projectlombok:lombok:1.18.22'
|
|
||||||
annotationProcessor 'org.projectlombok:lombok:1.18.22'
|
|
||||||
testAnnotationProcessor 'org.projectlombok:lombok:1.18.22'
|
|
||||||
|
|
||||||
implementation 'org.atteo.classindex:classindex:3.11'
|
|
||||||
testImplementation 'org.atteo.classindex:classindex:3.11'
|
|
||||||
annotationProcessor 'org.atteo.classindex:classindex:3.11'
|
|
||||||
testAnnotationProcessor 'org.atteo.classindex:classindex:3.11'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
task buildResources {
|
|
||||||
doLast {
|
|
||||||
File from = new File("${buildDir}/classes/java/main/META-INF/annotations/de.steamwar.bausystem.linkage.ProcessorImplementation")
|
|
||||||
File to = new File("${buildDir}/classes/java/main/META-INF/services/javax.annotation.processing.Processor")
|
|
||||||
to.delete()
|
|
||||||
to.parentFile.mkdirs()
|
|
||||||
to.createNewFile()
|
|
||||||
for (String s : from.readLines()) {
|
|
||||||
to.append(s + "\n")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
classes.finalizedBy(buildResources)
|
|
@ -30,7 +30,6 @@ import java.io.Writer;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ProcessorImplementation
|
|
||||||
@SupportedAnnotationTypes("de.steamwar.bausystem.linkage.Linked")
|
@SupportedAnnotationTypes("de.steamwar.bausystem.linkage.Linked")
|
||||||
public class LinkageProcessor extends AbstractProcessor {
|
public class LinkageProcessor extends AbstractProcessor {
|
||||||
|
|
||||||
|
@ -1,27 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2019,2020,2021 yoyosource
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package de.steamwar.bausystem.linkage;
|
|
||||||
|
|
||||||
import org.atteo.classindex.IndexAnnotated;
|
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
@IndexAnnotated
|
|
||||||
@Retention(RetentionPolicy.CLASS)
|
|
||||||
@Target({ElementType.TYPE})
|
|
||||||
public @interface ProcessorImplementation {
|
|
||||||
}
|
|
@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* This file is a part of the SteamWar software.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2022 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.linkage.types;
|
||||||
|
|
||||||
|
import de.steamwar.linkage.LinkageType;
|
||||||
|
import de.steamwar.linkage.plan.BuildPlan;
|
||||||
|
import de.steamwar.linkage.plan.MethodBuilder;
|
||||||
|
|
||||||
|
import javax.lang.model.element.TypeElement;
|
||||||
|
|
||||||
|
public class BauGuiItem_GENERIC implements LinkageType {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String method() {
|
||||||
|
return "linkGUIItems";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void generateCode(BuildPlan buildPlan, MethodBuilder methodBuilder, String s, TypeElement typeElement) {
|
||||||
|
buildPlan.addImport("de.steamwar.bausystem.features.gui.BauGUI");
|
||||||
|
methodBuilder.addLine("BauGUI.addItem(" + s + ");");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* This file is a part of the SteamWar software.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2022 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.linkage.types;
|
||||||
|
|
||||||
|
import de.steamwar.linkage.LinkageType;
|
||||||
|
import de.steamwar.linkage.plan.BuildPlan;
|
||||||
|
import de.steamwar.linkage.plan.MethodBuilder;
|
||||||
|
|
||||||
|
import javax.lang.model.element.TypeElement;
|
||||||
|
|
||||||
|
public class BoundingBoxLoader_GENERIC implements LinkageType {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String method() {
|
||||||
|
return "linkBoundingBox";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void generateCode(BuildPlan buildPlan, MethodBuilder method, String instance, TypeElement typeElement) {
|
||||||
|
method.addLine(instance + ".load();");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* This file is a part of the SteamWar software.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2022 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.linkage.types;
|
||||||
|
|
||||||
|
import de.steamwar.linkage.LinkageType;
|
||||||
|
import de.steamwar.linkage.plan.BuildPlan;
|
||||||
|
import de.steamwar.linkage.plan.MethodBuilder;
|
||||||
|
|
||||||
|
import javax.lang.model.element.TypeElement;
|
||||||
|
|
||||||
|
public class ConfigConverter_GENERIC implements LinkageType {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String method() {
|
||||||
|
return "link";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void generateCode(BuildPlan buildPlan, MethodBuilder methodBuilder, String s, TypeElement typeElement) {
|
||||||
|
buildPlan.addImport("de.steamwar.bausystem.configplayer.Config");
|
||||||
|
methodBuilder.addLine("Config.addConfigConverter(" + s + ");");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* This file is a part of the SteamWar software.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2022 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.linkage.types;
|
||||||
|
|
||||||
|
import de.steamwar.linkage.LinkageType;
|
||||||
|
import de.steamwar.linkage.plan.BuildPlan;
|
||||||
|
import de.steamwar.linkage.plan.MethodBuilder;
|
||||||
|
|
||||||
|
import javax.lang.model.element.TypeElement;
|
||||||
|
|
||||||
|
public class PanzernAlgorithm_GENERIC implements LinkageType {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String method() {
|
||||||
|
return "linkPanzern";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void generateCode(BuildPlan buildPlan, MethodBuilder methodBuilder, String s, TypeElement typeElement) {
|
||||||
|
buildPlan.addImport("de.steamwar.bausystem.features.slaves.panzern.Panzern");
|
||||||
|
methodBuilder.addLine("Panzern.add(" + s + ");");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* This file is a part of the SteamWar software.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2022 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.linkage.types;
|
||||||
|
|
||||||
|
import de.steamwar.linkage.LinkageType;
|
||||||
|
import de.steamwar.linkage.plan.BuildPlan;
|
||||||
|
import de.steamwar.linkage.plan.MethodBuilder;
|
||||||
|
|
||||||
|
import javax.lang.model.element.TypeElement;
|
||||||
|
|
||||||
|
public class SmartPlaceBehaviour_GENERIC implements LinkageType {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String method() {
|
||||||
|
return "linkPanzern";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void generateCode(BuildPlan buildPlan, MethodBuilder methodBuilder, String s, TypeElement typeElement) {
|
||||||
|
buildPlan.addImport("de.steamwar.bausystem.features.smartplace.SmartPlaceListener");
|
||||||
|
methodBuilder.addLine("SmartPlaceListener.add(" + s + ");");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* This file is a part of the SteamWar software.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2022 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.linkage.types;
|
||||||
|
|
||||||
|
import de.steamwar.linkage.LinkageType;
|
||||||
|
import de.steamwar.linkage.plan.BuildPlan;
|
||||||
|
import de.steamwar.linkage.plan.MethodBuilder;
|
||||||
|
|
||||||
|
import javax.lang.model.element.TypeElement;
|
||||||
|
|
||||||
|
public class SpecialCommand_GENERIC implements LinkageType {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String method() {
|
||||||
|
return "linkScriptCommands";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void generateCode(BuildPlan buildPlan, MethodBuilder methodBuilder, String s, TypeElement typeElement) {
|
||||||
|
buildPlan.addImport("de.steamwar.bausystem.features.script.ScriptExecutor");
|
||||||
|
methodBuilder.addLine("ScriptExecutor.SPECIAL_COMMANDS.add(" + s + ");");
|
||||||
|
}
|
||||||
|
}
|
@ -51,11 +51,6 @@ dependencies {
|
|||||||
annotationProcessor 'org.projectlombok:lombok:1.18.22'
|
annotationProcessor 'org.projectlombok:lombok:1.18.22'
|
||||||
testAnnotationProcessor 'org.projectlombok:lombok:1.18.22'
|
testAnnotationProcessor 'org.projectlombok:lombok:1.18.22'
|
||||||
|
|
||||||
implementation 'org.atteo.classindex:classindex:3.11'
|
|
||||||
testImplementation 'org.atteo.classindex:classindex:3.11'
|
|
||||||
annotationProcessor 'org.atteo.classindex:classindex:3.11'
|
|
||||||
testAnnotationProcessor 'org.atteo.classindex:classindex:3.11'
|
|
||||||
|
|
||||||
implementation project(":BauSystem_Linkage")
|
implementation project(":BauSystem_Linkage")
|
||||||
annotationProcessor project(":BauSystem_Linkage")
|
annotationProcessor project(":BauSystem_Linkage")
|
||||||
|
|
||||||
|
@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* This file is a part of the SteamWar software.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2022 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.bausystem.features.slaves.laufbau;
|
||||||
|
|
||||||
|
public interface BoundingBoxLoader {
|
||||||
|
|
||||||
|
void load();
|
||||||
|
}
|
In neuem Issue referenzieren
Einen Benutzer sperren