Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Redstonneur1256 committed Mar 7, 2023
0 parents commit 6cfabd0
Show file tree
Hide file tree
Showing 22 changed files with 865 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build for release
on:
release:
types: [ published ]
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8
cache: gradle

- name: Set permissions
run: chmod +x gradlew

- name: Build artifacts
run: ./gradlew --no-daemon :shadowJar
env:
GITHUB_VERSION: ${{ github.event.release.tag_name }}

- name: Upload artifact to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/libs/SeamlessDisplays.jar
asset_name: SeamlessDisplays.jar
asset_content_type: application/zip
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.gradle/
.idea/
.run/
build/
private.gradle
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Redstonneur1256

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
6 changes: 6 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Seamless displays
A Mindustry mod to remove logic displays border.

Modifies logic so that draw calls affect all linked displays relative to the flushed one.

Depends on [ModLib](https://github.com/Redstonneur1256/Mindustry-ModLib) for Mixins.
Binary file added assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions assets/mod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "seamless-displays",
"displayName": "Seamless displays",
"author": "Redstonneur1256",
"description": "Removes logic display border and link them together",
"repo": "Redstonneur1256/SeamlessDisplays",
"version": "@version@",
"build": "@build@",
"built": "@built@",
"minGameVersion": "142",
"main": "fr.redstonneur1256.sd.SeamlessDisplays",
"hidden": true
}
15 changes: 15 additions & 0 deletions assets/seamless-displays.mixins.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"required": true,
"minVersion": "0.8",
"compatibilityLevel": "JAVA_8",
"package": "fr.redstonneur1256.sd.mixins",
"mixins": [
"logic.LogicDisplayBuildMixin",
"logic.LogicExecutorMixin",
"logic.instructions.DrawFlushInstructionMixin",
"logic.instructions.DrawInstructionMixin"
],
"injectors": {
"defaultRequire": 1
}
}
57 changes: 57 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import org.apache.tools.ant.filters.ReplaceTokens

import java.time.Instant

plugins {
id 'java-library'
id 'com.github.johnrengelman.shadow' version '7.1.2'
}

group 'fr.redstonneur1256'
version System.getenv('GITHUB_VERSION') ?: 'dev'

tasks.withType(JavaCompile).configureEach {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
options.encoding = 'UTF-8'
}

sourceSets {
main {
java.srcDirs = ['src']
resources.srcDirs = ['assets']
}
test {
java.srcDirs = ['src']
resources.srcDirs = ['assets']
}
}

repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
maven { url 'https://repo.spongepowered.org/repository/maven-public/' }
}

dependencies {
compileOnly "com.github.Anuken.Arc:arc-core:$mindustryVersion"
compileOnly "com.github.Anuken.MindustryJitpack:core:$mindustryVersion"
compileOnly "com.github.Redstonneur1256.Mindustry-ModLib:Mod:$modlibVersion"
}

processResources {
filesMatching((Iterable<String>) ['mod.json']) {
filter(ReplaceTokens, tokens: [
version: version,
build : System.getenv('GITHUB_SHA') ?: 'dev',
built : Instant.now().toString()
])
}
outputs.upToDateWhen { false }
}

shadowJar.archiveName('SeamlessDisplays.jar')

if(file('private.gradle').exists()) {
apply from: 'private.gradle'
}
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mindustryVersion=v142
modlibVersion=1.3.3
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 6cfabd0

Please sign in to comment.