Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into drone-ai-fix
Browse files Browse the repository at this point in the history
# Conflicts:
#	build.gradle.kts
#	src/omaloon/ai/DroneAI.java
#	src/omaloon/ai/drone/AttackDroneAI.java
#	src/omaloon/ai/drone/UtilityDroneAI.java
#	src/omaloon/entities/abilities/DroneAbility.java
  • Loading branch information
Zelaux committed Feb 6, 2025
2 parents f650408 + 630d512 commit a9072c4
Show file tree
Hide file tree
Showing 209 changed files with 11,212 additions and 8,095 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Bug report
description: Submit an issue that you have found while playing Omaloon.
labels: ["bug"]
labels: [ "bug" ]

body:
- type: dropdown
Expand Down
89 changes: 89 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions .run/Omaloon [debug jar].run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Omaloon [debug jar]" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="env">
<map>
<entry key="lombok.plugin.debug_sleep" value="3600"/>
</map>
</option>
<option name="executionName"/>
<option name="externalProjectPath" value="$PROJECT_DIR$"/>
<option name="externalSystemIdString" value="GRADLE"/>
<option name="scriptParameters" value="--stacktrace"/>
<option name="taskDescriptions">
<list/>
</option>
<option name="taskNames">
<list>
<option value="jar"/>
</list>
</option>
<option name="vmOptions"/>
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<method v="2"/>
</configuration>
</component>
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
[![Total Downloads](https://img.shields.io/github/downloads/xStaBUx/Omaloon-mod-public/total?color=7289da&label&logo=docusign&logoColor=white&style=for-the-badge)](https://github.com/xStaBUx/Omaloon-mod-public/releases)

> An ambitious [Mindustry](https://github.com/Anuken/Mindustry) mod
developed by [stabu](https://github.com/stabu-dev) and [uujuju](https://github.com/uujuju1).
Mod aimed at expanding a campaign by adding a new star system.
> developed by [stabu](https://github.com/stabu-dev) and [uujuju](https://github.com/uujuju1).
> Mod aimed at expanding a campaign by adding a new star system.
## Building from Source

Expand All @@ -22,21 +22,25 @@ Mod aimed at expanding a campaign by adding a new star system.
### Setup

1. Clone the repository:

```bash
git clone -b master --single-branch https://github.com/xstabux/Omaloon
```

2. Set up environment variables:

- Set `ANDROID_SDK_ROOT` or `ANDROID_HOME` to your Android SDK installation path (required for Android builds)

### Building

For Desktop:

```bash
gradlew jar
```

For Android:

```bash
gradlew dex
```
Expand All @@ -46,38 +50,47 @@ The built mod will be in the `build/libs` directory.
### Running

To test the mod directly:

```bash
gradlew runClient
```

This Mindustry client uses the `run` directory to store its data.

## Contributing

### Bug Reports

- Submit bug reports in the [Issues](https://github.com/xStaBUx/Omaloon-mod-public/issues) section
- Include detailed steps to reproduce the issue
- Mention your game version and mod version

### Feature Suggestions

- Join our [Discord server](https://discord.gg/bNMT82Hswb) to suggest new content
- Provide examples and specific arguments why your suggestion should be added to Omaloon
- The Issues section is reserved for bug reports only

### Game-play Feedback

- Share your thoughts on game-play and balancing in our Discord
- Provide specific examples and reasoning for balance changes

### Pull Requests

- Improve Omaloon's code/sprites/localization and propose these changes to us by creating a [Pull Request](https://github.com/stabu-dev/Omaloon/pulls).
- Make sure your code works properly and doesn't cause any issues.
- Provide specific reasoning why your Pull Request should be accepted.

## Credits

### Developers

- stabu - Lead Dev
- uujuju - Dev

### Contributors

- randomguy - Weathers code
- zelaux - Arc library, some code
- saigononozomi - Music
Expand Down
56 changes: 56 additions & 0 deletions annotations/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
println("Hello from gradle")
apply plugin: "java"

tasks.withType(JavaCompile).tap{
configureEach{
options.fork = true
options.compilerArgs += [
'--add-exports', 'jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED',
'--add-exports', 'jdk.compiler/com.sun.tools.javac.code.Symbol=ALL-UNNAMED',
'--add-exports', 'jdk.compiler/com.sun.tools.javac.code.Type=ALL-UNNAMED',
'--add-exports', 'jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED',
'--add-exports', 'jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED',
'--add-exports', 'jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED',
'--add-exports', 'jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED',
'--add-exports', 'jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED',
'--add-exports', 'jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED',
'--add-exports', 'jdk.compiler/com.sun.tools.javac.tree.JCTree=ALL-UNNAMED',
'--add-exports', 'jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED',
'--add-exports', 'jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED',
]
}
}
repositories{
// Necessary Maven repositories to pull dependencies from.
mavenCentral()

maven{ url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven{ url "https://oss.sonatype.org/content/repositories/releases/" }
maven{ url "https://raw.githubusercontent.com/GlennFolker/EntityAnnoMaven/main" }

// Use Zelaux's non-buggy repository for release Mindustry and Arc builds.
maven{ url "https://raw.githubusercontent.com/Zelaux/MindustryRepo/master/repository" }
maven{ url "https://raw.githubusercontent.com/Zelaux/Repo/master/repository" }
}

/*tasks.withType(JavaCompile){
options.debug = true
options.fork = true
options.compilerArgs.add("-g")
options.forkOptions.jvmArgs.add(
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5008"
)
}*/
dependencies{
implementation asmLib.invoke(":annotations:lombok-plugin-starter")


compileOnly "org.jetbrains:annotations:24.0.1"

implementation "com.github.javaparser:javaparser-symbol-solver-core:$jparcerVersion"

compileOnly "org.projectlombok:lombok:$lombokVersion"
annotationProcessor "org.projectlombok:lombok:$lombokVersion"//,asmLib.invoke(":annotations:lombok-plugin-starter")
implementation "one.util:streamex:$streamExVersion"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
package bytelogic.lombok.hierarchy;

import bytelogic.lombok.hierarchy.info.*;
import bytelogic.lombok.util.*;
import lombok.javac.*;
import lombok.*;
import one.util.streamex.*;
import org.jetbrains.annotations.*;

import java.util.*;
import java.util.function.*;

public class CollectedHierarchyInfo{
public static final String JAVA_LANG_OBJECT = "java.lang.Object";
public static final InterfaceInfo interfacesRoot = new InterfaceInfo("?interfacesRoot?", "?interfacesRoot?");
static ClassInfo javaLangObject = new ClassInfo(JAVA_LANG_OBJECT, JAVA_LANG_OBJECT);
static Map<String, ClassInfo> classInfoMap;
static Map<String, InterfaceInfo> interfacesInfoMap;

public static ClassInfo classInfo(String className){
return classInfoMap.get(className);
}

public static InterfaceInfo interfaceInfo(String name){
return interfacesInfoMap.get(name);
}

public static EntryStream<String, InterfaceInfo> interfaces(){
return EntryStream.of(interfacesInfoMap)
.removeKeys(it -> it.equals(interfacesRoot.name));
}

public static EntryStream<String, ClassInfo> classes(){
return EntryStream.of(classInfoMap);
}


@NotNull
public static ArrayList<ClassInfo> collectAllImpl(InterfaceInfo interfaceInfo){
ArrayList<InterfaceInfo> allSubTypes = collectAllSub(interfaceInfo);
val classInfoStream = allSubTypes
.stream()
.map(it -> it.impltypes.values())
.flatMap(Collection::stream)
.distinct()
.toArray(ClassInfo[]::new);
;

ArrayList<ClassInfo> implementedClasses = new ArrayList<>();
Set<String> visitedNames = new HashSet<>();
class Visitor{
static void visit(Set<String> visitedNames, ClassInfo info, ArrayList<ClassInfo> targetCollection){
if(!visitedNames.add(info.name)) return;
targetCollection.add(info);
for(ClassInfo value : info.subtypes.values()){
visit(visitedNames, value, targetCollection);
}
}
}
for(ClassInfo info : classInfoStream){
Visitor.visit(visitedNames, info, implementedClasses);
}
return implementedClasses;
}

@NotNull
public static ArrayList<InterfaceInfo> collectAllSub(InterfaceInfo interfaceInfo){
ArrayList<InterfaceInfo> allSubTypes = new ArrayList<>();
//noinspection unchecked
BiConsumer<String, InterfaceInfo> visitor = new BiConsumer<>(){

Set<String> visitedNames = new HashSet<>();

@Override
public void accept(String name, InterfaceInfo info){
if(!visitedNames.add(info.name)) return;
allSubTypes.add(info);
info.subtypes.forEach(this);
}
};
visitor.accept(interfaceInfo.name, interfaceInfo);
return allSubTypes;
}

public static ClassInfo classInfo(JavacNode typeNode){
return classInfo(Util.canonicalFullname(typeNode));
}

public static ClassInfo classInfoOrThrown(JavacNode typeNode){
String mirrorName = Util.canonicalFullname(typeNode);
ClassInfo classInfo = classInfo(mirrorName);
if(classInfo == null) throw new RuntimeException("Cannot find info for class " + mirrorName);
return classInfo;
}

public static InterfaceInfo interfaceInfo(JavacNode typeNode){
return interfaceInfo(Util.canonicalFullname(typeNode));
}

public static InterfaceInfo interfaceInfoOrThrown(JavacNode typeNode){
String string = Util.canonicalFullname(typeNode);
InterfaceInfo interfaceInfo = interfaceInfo(string);
if(interfaceInfo == null) throw new RuntimeException("Cannot find info for interface " + string);
return interfaceInfo;
}
}
Loading

0 comments on commit a9072c4

Please sign in to comment.