diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..2f04651 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +* text eol=lf +*.jar binary +* linguist-detectable diff --git a/.github/workflows/github-repo-info.yml b/.github/workflows/github-repo-info.yml new file mode 100644 index 0000000..585ab15 --- /dev/null +++ b/.github/workflows/github-repo-info.yml @@ -0,0 +1,18 @@ +name: Update Github repository information + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Update Github repo info + uses: Darkborderman/github-actions/github-repo-info@master + env: + YML_PATH: metadata.yml + GH_TOKEN: ${{ secrets.PAT_TOKEN }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f1310ad --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +.gradle/ +build/ + +# artifacts +jars/ +bins/ diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..1371c56 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "java.project.sourcePaths": ["src"], + "java.project.referencedLibraries": ["libs/*.jar"] +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8e45bda --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Darkborderman + +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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..30ebe58 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Starsector-HullRecoverable + +Make all non-station hulls recoverable in Starsector. diff --git a/libs/commons-compiler-jdk.jar b/libs/commons-compiler-jdk.jar new file mode 100644 index 0000000..0895869 Binary files /dev/null and b/libs/commons-compiler-jdk.jar differ diff --git a/libs/commons-compiler.jar b/libs/commons-compiler.jar new file mode 100644 index 0000000..46cd663 Binary files /dev/null and b/libs/commons-compiler.jar differ diff --git a/libs/fs.common_obf.jar b/libs/fs.common_obf.jar new file mode 100644 index 0000000..197e4f7 Binary files /dev/null and b/libs/fs.common_obf.jar differ diff --git a/libs/fs.sound_obf.jar b/libs/fs.sound_obf.jar new file mode 100644 index 0000000..73628c4 Binary files /dev/null and b/libs/fs.sound_obf.jar differ diff --git a/libs/janino.jar b/libs/janino.jar new file mode 100644 index 0000000..79b946d Binary files /dev/null and b/libs/janino.jar differ diff --git a/libs/jinput.jar b/libs/jinput.jar new file mode 100644 index 0000000..7c2b6b0 Binary files /dev/null and b/libs/jinput.jar differ diff --git a/libs/jogg-0.0.7.jar b/libs/jogg-0.0.7.jar new file mode 100644 index 0000000..1cbd1ad Binary files /dev/null and b/libs/jogg-0.0.7.jar differ diff --git a/libs/jorbis-0.0.15.jar b/libs/jorbis-0.0.15.jar new file mode 100644 index 0000000..4cf51f9 Binary files /dev/null and b/libs/jorbis-0.0.15.jar differ diff --git a/libs/json.jar b/libs/json.jar new file mode 100644 index 0000000..5ad8c80 Binary files /dev/null and b/libs/json.jar differ diff --git a/libs/log4j-1.2.9.jar b/libs/log4j-1.2.9.jar new file mode 100644 index 0000000..a6568b0 Binary files /dev/null and b/libs/log4j-1.2.9.jar differ diff --git a/libs/lwjgl.jar b/libs/lwjgl.jar new file mode 100644 index 0000000..82294e1 Binary files /dev/null and b/libs/lwjgl.jar differ diff --git a/libs/lwjgl_util.jar b/libs/lwjgl_util.jar new file mode 100644 index 0000000..97911ab Binary files /dev/null and b/libs/lwjgl_util.jar differ diff --git a/libs/starfarer.api.jar b/libs/starfarer.api.jar new file mode 100644 index 0000000..6402edd Binary files /dev/null and b/libs/starfarer.api.jar differ diff --git a/libs/starfarer_obf.jar b/libs/starfarer_obf.jar new file mode 100644 index 0000000..e1eb06b Binary files /dev/null and b/libs/starfarer_obf.jar differ diff --git a/libs/xstream-1.4.10.jar b/libs/xstream-1.4.10.jar new file mode 100644 index 0000000..4d7c5d0 Binary files /dev/null and b/libs/xstream-1.4.10.jar differ diff --git a/metadata.yml b/metadata.yml new file mode 100644 index 0000000..58657c2 --- /dev/null +++ b/metadata.yml @@ -0,0 +1,12 @@ +github: + description: Make all non-station hulls recoverable in Starsector. + enable_discussions: false + enable_issues: false + enable_projects: false + enable_wiki: false + homepage: https://github.com/DarkbordermanModding/Starsector-HullRecoverable + template: false + topics: + - mod + - starsector + - starsector-mod diff --git a/mod_info.json b/mod_info.json new file mode 100644 index 0000000..f55b0c9 --- /dev/null +++ b/mod_info.json @@ -0,0 +1,10 @@ +{ + "id": "darkborderman.hullrecoverable", + "name": "Hull recoverable", + "author": "Darkborderman", + "version": "0.0.0", + "description": "Make all non-station hulls recoverable in Starsector.", + "gameVersion": "0.97a-RC11", + "jars": ["jars/hullrecoverable.jar"], + "modPlugin": "mod.hullrecoverable.HullRecoverableModPlugin" +} diff --git a/src/mod/hullrecoverable/HullRecoverableModPlugin.java b/src/mod/hullrecoverable/HullRecoverableModPlugin.java new file mode 100644 index 0000000..48e4757 --- /dev/null +++ b/src/mod/hullrecoverable/HullRecoverableModPlugin.java @@ -0,0 +1,20 @@ +package mod.hullrecoverable; + +import com.fs.starfarer.api.BaseModPlugin; +import com.fs.starfarer.api.Global; +import com.fs.starfarer.api.combat.ShipHullSpecAPI; +import com.fs.starfarer.api.combat.ShipHullSpecAPI.ShipTypeHints; + + +public class HullRecoverableModPlugin extends BaseModPlugin { + + public void onGameLoad(boolean newGame) { + for(ShipHullSpecAPI shipHull: Global.getSettings().getAllShipHullSpecs()){ + if(shipHull.getHints().contains(ShipTypeHints.UNBOARDABLE)){ + if(!shipHull.getHints().contains(ShipTypeHints.STATION)){ + shipHull.addTag("auto_rec"); + } + } + } + } +}