Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkborderman committed Aug 23, 2024
0 parents commit e870981
Show file tree
Hide file tree
Showing 24 changed files with 97 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* text eol=lf
*.jar binary
* linguist-detectable
18 changes: 18 additions & 0 deletions .github/workflows/github-repo-info.yml
Original file line number Diff line number Diff line change
@@ -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 }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.gradle/
build/

# artifacts
jars/
bins/
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"java.project.sourcePaths": ["src"],
"java.project.referencedLibraries": ["libs/*.jar"]
}
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) 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.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Starsector-HullRecoverable

Make all non-station hulls recoverable in Starsector.
Binary file added libs/commons-compiler-jdk.jar
Binary file not shown.
Binary file added libs/commons-compiler.jar
Binary file not shown.
Binary file added libs/fs.common_obf.jar
Binary file not shown.
Binary file added libs/fs.sound_obf.jar
Binary file not shown.
Binary file added libs/janino.jar
Binary file not shown.
Binary file added libs/jinput.jar
Binary file not shown.
Binary file added libs/jogg-0.0.7.jar
Binary file not shown.
Binary file added libs/jorbis-0.0.15.jar
Binary file not shown.
Binary file added libs/json.jar
Binary file not shown.
Binary file added libs/log4j-1.2.9.jar
Binary file not shown.
Binary file added libs/lwjgl.jar
Binary file not shown.
Binary file added libs/lwjgl_util.jar
Binary file not shown.
Binary file added libs/starfarer.api.jar
Binary file not shown.
Binary file added libs/starfarer_obf.jar
Binary file not shown.
Binary file added libs/xstream-1.4.10.jar
Binary file not shown.
12 changes: 12 additions & 0 deletions metadata.yml
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions mod_info.json
Original file line number Diff line number Diff line change
@@ -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"
}
20 changes: 20 additions & 0 deletions src/mod/hullrecoverable/HullRecoverableModPlugin.java
Original file line number Diff line number Diff line change
@@ -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");
}
}
}
}
}

0 comments on commit e870981

Please sign in to comment.