Skip to content

Commit

Permalink
1.0.0
Browse files Browse the repository at this point in the history
Hotfix
  • Loading branch information
PureTilt committed Jan 8, 2022
1 parent affde3b commit a070dfc
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

*/out/
QoLPack/out/
*.rar
*.zip
13 changes: 8 additions & 5 deletions QoLPack/QoLPack.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
#All settings can be changed while game is running
#This will apply on new combat
#If system folds shield deploy if after system ends in it was on while you activated the system

#If system folds shield deploy it after system ends if it was deployed when you activated the system
"EnableAutoShieldOnAfterSystem":true,
#Press RMB while overloaded/venting to deploy shield right after overload/venting ends

#Press RMB while overloaded/venting to deploy shield/activate phase cloak right after overload/venting ends
"EnableAutoShieldOnAfterOverload":true,

#Settings for shield auto targetting, controls shield for you
Expand All @@ -15,7 +17,6 @@
"DefaultShieldSnapMode":1,
#Saves selected mode between combat ecnounters
"SaveModeBetweenEncounters":false,

# Key IDs are numbers and can be found here:
# https://minecraft.fandom.com/index.php?title=Key_codes/Keyboard1&action=render
#default 59 F1
Expand All @@ -28,13 +29,15 @@
"direction":62,
#to set to none press key of currently active mode

#System Notify
#System Notify settings
"EnableSystemNotify":true,
#default 30
"TextSize":30,
#Color is in RGBA, set alpha (last number) to 0 to NOT ovverride
"OnTextColor":[0,255,0,0],
"OffeTextColor":[255,0,0,0],

#Shows system notify on player ship (dont forget that you can change it between combat without rebooting game (i would add button for it but there not enough keyboard to add bind for everything))
"AllowForPlayerShip":false,

#For this to apply you need to reload save
"EnableClock":true,
Expand Down
Binary file modified QoLPack/jars/QoLPack.jar
Binary file not shown.
1 change: 1 addition & 0 deletions QoLPack/jars/src/data/plugins/qolp_RMCAfterOverload.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public void processInputPreCoreControls(float amount, List<InputEventAPI> events
ShipAPI player = engine.getPlayerShip();
if (!player.getFluxTracker().isOverloadedOrVenting()) return;
for (InputEventAPI e : events) {
if (e.isConsumed()) continue;
if (e.isRMBDownEvent()){
activateRMC = !activateRMC;
}
Expand Down
1 change: 1 addition & 0 deletions QoLPack/jars/src/data/plugins/qolp_shieldSnapping.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public void processInputPreCoreControls(float amount, List<InputEventAPI> events
if (engine.getPlayerShip() == null) return;
for (InputEventAPI e : events) {
if (e.isKeyDownEvent()) {
if (e.isConsumed()) continue;
if (e.getEventValue() == snapIfTarget) {
if (mode.equals(shieldMods.snapIfTarget)) mode = shieldMods.none;
else mode = shieldMods.snapIfTarget;
Expand Down
11 changes: 10 additions & 1 deletion QoLPack/jars/src/data/plugins/qolp_systemNotify.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,40 @@ public class qolp_systemNotify extends BaseEveryFrameCombatPlugin {
positiveTextColor = Misc.getPositiveHighlightColor(),
negativeTextColor = Misc.getNegativeHighlightColor();

boolean allowPlayer = false;

public static final String ID = "qolp_AutoShieldAfterOverload";
public static final String SETTINGS_PATH = "QoLPack.ini";

@Override
public void init(CombatEngineAPI engine) {
this.engine = engine;
Color temp;
boolean enable = true;
try {
JSONObject cfg = Global.getSettings().getMergedJSONForMod(SETTINGS_PATH, ID);
textSize = cfg.getInt("TextSize");
enable = cfg.getBoolean("EnableSystemNotify");
allowPlayer = cfg.getBoolean("AllowForPlayerShip");
temp = getColor(cfg.getJSONArray("OnTextColor"));
if (temp.getAlpha() != 0) positiveTextColor = temp;
temp = getColor(cfg.getJSONArray("OffTextColor"));
if (temp.getAlpha() != 0) negativeTextColor = temp;
} catch (IOException | JSONException e) {
e.printStackTrace();
}
if (!enable){
engine.removePlugin(this);
}
}

@Override
public void advance(float amount, List<InputEventAPI> events) {
if (engine == null) return;
if (Global.getCurrentState().equals(GameState.TITLE)) return;
for (ShipAPI ship : engine.getShips()) {
if (ship == engine.getPlayerShip()) continue;
if (ship == engine.getPlayerShip() && !allowPlayer) continue;
if (ship.getHullSize().equals(ShipAPI.HullSize.FIGHTER)) continue;
if (shipsAlreadyReporter.contains(ship)) continue;
if (ship.getSystem() != null && ship.getSystem().isActive()) {
engine.addFloatingText(ship.getLocation(), ship.getSystem().getDisplayName(), textSize, positiveTextColor, ship, 2f, 0.75f);
Expand Down

0 comments on commit a070dfc

Please sign in to comment.