Skip to content

Commit

Permalink
Merge pull request #248 from Mu0n/Mousinations
Browse files Browse the repository at this point in the history
Mousinations
  • Loading branch information
Mu0n committed Jul 12, 2019
2 parents e1d1645 + 8a0b7ac commit 36cf65c
Show file tree
Hide file tree
Showing 224 changed files with 3,019 additions and 275 deletions.
5 changes: 5 additions & 0 deletions mic/src/mic/AnnouncementOnLog.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import VASSAL.tools.io.FileArchive;
import com.google.common.collect.Lists;
import mic.ota.*;
import org.omg.CORBA.Environment;

import javax.imageio.ImageIO;
import javax.swing.*;
Expand Down Expand Up @@ -135,6 +136,8 @@ private void checkForUpdate() {
versionLabel.setFont(new Font("Serif", Font.PLAIN, 20));
JLabel versionLabel2 = new JLabel(msg);
JLabel versionLabel3 = new JLabel("The latest version available for download is " + line);
JLabel disclaimLabel = new JLabel("This X-Wing Second Edition Vassal module is UNOFFICIAL.");
JLabel disclaimLabel2 = new JLabel("It is not endorsed by Fantasy Flight Games and Asmodee.");
JLabel checkLabel = new JLabel("The module is about to check for additional content.");
JLabel checkLabel2 = new JLabel("The Content Checker button will flash black if it finds any.");
JLabel checkLabel3 = new JLabel("Click on it to download the missing components.");
Expand All @@ -158,6 +161,8 @@ private void checkForUpdate() {
labelPanel.add(versionLabel);
labelPanel.add(versionLabel2);
labelPanel.add(versionLabel3);
labelPanel.add(disclaimLabel);
labelPanel.add(disclaimLabel2);

labelPanel.add(Box.createRigidArea(new Dimension(0,8)));
labelPanel.add(new JSeparator());
Expand Down
26 changes: 25 additions & 1 deletion mic/src/mic/AutoRangeFinder.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ public class AutoRangeFinder extends Decorator implements EditablePiece {
private static final int backArcOption = 4;
private static final int mobileSideArcOption = 5;
private static final int bullseyeArcOption = 6;
private static final int backAftArcOption = 7;
private static final int leftArcOption = 8;
private static final int rightArcOption = 9;

public static final String ID = "auto-range-finder";

Expand All @@ -79,9 +82,12 @@ public class AutoRangeFinder extends Decorator implements EditablePiece {
.put("CTRL SHIFT F", frontArcOption) //primary arc
.put("CTRL SHIFT L", turretArcOption) //turret/TL
.put("CTRL SHIFT N", frontAuxArcOption) //front pairs of aux arc (YV-666, Auzituck)
.put("ALT SHIFT N", backAftArcOption)
.put("CTRL SHIFT V", backArcOption) //back aux arc
.put("ALT SHIFT F", mobileSideArcOption) //mobile turret arc, must detect which one is selected on the ship
.put("CTRL SHIFT X", bullseyeArcOption) //bullseye arc
.put("CTRL SHIFT G", leftArcOption) //left arc
.put("ALT SHIFT G", rightArcOption) //right arc
.put("F5", 12)
.put("F6", 13)
.build();
Expand Down Expand Up @@ -145,6 +151,9 @@ private int getKeystrokeToOptions(KeyStroke keyStroke) {
return -1;
}

void SayNotImplementedYet(){
logToChat("The auto-range for this arc has not yet been implemented yet.");
}
public Command keyEvent(KeyStroke stroke) {

ArrayList<RangeFindings> rfindings = new ArrayList<RangeFindings>(); //findings compiled here
Expand Down Expand Up @@ -283,7 +292,10 @@ private void figureOutAutoRange(BumpableWithShape b, ArrayList<RangeFindings> rf
bestLine = findBestLineInSimpleArcs(D1, D2, D3, 3);
break;
case frontAuxArcOption:
if(twoPointOh == false) bestLine = findBestLineInFrontAuxArcs(D1, D2, D3, 3);
if(twoPointOh == false) {
//bestLine = findBestLineInFrontAuxArcs(D1, D2, D3, 3);
SayNotImplementedYet();
}
else findBestLineInFullFrontArc(D1, D2, D3, 3);;
break;
case mobileSideArcOption:
Expand All @@ -292,6 +304,18 @@ private void figureOutAutoRange(BumpableWithShape b, ArrayList<RangeFindings> rf
case bullseyeArcOption:
bestLine = findBestLineInBullseye(D1, D2, D3, 3);
break;
case backAftArcOption:
//bestLine = findBestLineInBackAuxArcs(D1, D2, D3, 3);
SayNotImplementedYet();
break;
case leftArcOption:
//bestLine = findBestLineInLeftArc(D1, D2, D3, 3);
SayNotImplementedYet();
break;
case rightArcOption:
//bestLine = findBestLineInRightArc(D1, D2, D3, 3);
SayNotImplementedYet();
break;
}

if (bestLine == null) return;
Expand Down
12 changes: 7 additions & 5 deletions mic/src/mic/AutoRangeForTokens.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ enum ImagesUsedForRanges {
Debris6("Debris6_r1","Debris6_r2","Debris6_TL", -5, -3),
Cargo("Cloud_Debris_range1","","", 0, 0),
SpareParts("","","", 0, 0),
SeismicCharge("Mine_Explosion","","",0 ,0),
ProtonBomb("Mine_Explosion","","",0 ,0),
ThermalDetonators("Mine_Explosion","","",0 ,0),
IonBombs("Mine_Explosion","","",0 ,0),
Bomblet("Mine_Explosion","","",0 ,0);
SeismicCharge("Mine_Explosion","Mine_Explosion2","Mine_Explosion3",0 ,0),
ProtonBomb("Mine_Explosion","Mine_Explosion2","Mine_Explosion3",0 ,0),
ThermalDetonators("Mine_Explosion","Mine_Explosion2","Mine_Explosion3",0 ,0),
IonBombs("Mine_Explosion","Mine_Explosion2","Mine_Explosion3",0 ,0),
Bomblet("Mine_Explosion","Mine_Explosion2","Mine_Explosion3",0 ,0),
ElectroProton("Mine_Explosion","Mine_Explosion2","Mine_Explosion3",0,0);

private final String r1Img;
private final String r2Img;
Expand Down Expand Up @@ -133,6 +134,7 @@ public class AutoRangeForTokens extends Decorator implements EditablePiece {
.put("Thermal Detonators", ImagesUsedForRanges.ThermalDetonators)
.put("Ion Bombs", ImagesUsedForRanges.IonBombs)
.put("Bomblet", ImagesUsedForRanges.Bomblet)
.put("Electro-Proton Bomb", ImagesUsedForRanges.ElectroProton)
.build();

public AutoRangeForTokens() {
Expand Down
4 changes: 3 additions & 1 deletion mic/src/mic/BombSpawner.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ enum BombToken {
BuzzDroidSwarm("Buzz Droid Swarm", "Remote", "13069", 0.0f, 53.0f),
DRK1ProbeDroid("DRK-1 Probe Droid", "Remote", "13068", 0.0f, 62.0f),
CargoDebris("Cargo", "Debris", "12871", 0.0f, 82.5f),
SpareParts("Spare Parts", "Debris", "13071", 0.0f, -43.5f);
SpareParts("Spare Parts", "Debris", "13071", 0.0f, -43.5f),
ElectroProton("Electro-Proton Bomb","Bomb","13116", 0.0f, 40.0f);

private final String bombName;
private final String bombType;
Expand Down Expand Up @@ -170,6 +171,7 @@ public class BombSpawner extends Decorator implements EditablePiece {
.put("CTRL R", BombToken.DRK1ProbeDroid)
.put("CTRL G", BombToken.CargoDebris)
.put("CTRL A", BombToken.SpareParts)
.put("CTRL E", BombToken.ElectroProton)
.build();

public BombSpawner() {
Expand Down
3 changes: 3 additions & 0 deletions mic/src/mic/MouseGUIDrawable.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ public abstract class MouseGUIDrawable {
public int totalWidth = 0;
public int totalHeight = 0;

public int currentGUIElementBeingEdited = 0;
public int currentPage = 2; //currently only used for the ship mouse GUI, but could be used by others

}
Loading

0 comments on commit 36cf65c

Please sign in to comment.