Skip to content

Commit 95284fe

Browse files
authored
Merge pull request #30 from JiroCab/experimental
i forgot to a !
2 parents e391106 + 8016d32 commit 95284fe

File tree

7 files changed

+11
-7
lines changed

7 files changed

+11
-7
lines changed

mod.hjson

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ main: "olupis.NyfalisMain"
1414
#the mod description as seen in the mod dialog
1515
description: "(\u26A0Work in progress\u26A0)\n Yet another planet mod \nThat does it's best to give the player(s) a bit of something new,\n with a minor hint of what the base game has to offer, focus on RTS controls, and pain on top"
1616

17-
subtitle: "Yet another planet mod, v1.7.4"
17+
subtitle: "Yet another planet mod, v1.7.5"
1818

1919
#the mod version
20-
version: 1.7.4
20+
version: 1.7.5
2121

2222
#the minimum game build required to run this mod
2323
minGameVersion: 136

src/olupis/NyfalisMain.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class NyfalisMain extends Mod{
4444

4545
@Override
4646
public void loadContent(){
47-
incompatible = (Version.number == 7 && Objects.equals(Version.type, "official"));
47+
incompatible = !(Version.number == 7 && Objects.equals(Version.type, "official"));
4848

4949
NyfalisShaders.LoadShaders();
5050
NyfalisShaders.LoadCacheLayer(); //idk when to load this so it 1st -Rushie

src/olupis/content/NyfalisUnits.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,10 @@ public static void LoadUnits() {
249249
itemCapacity = 15;
250250
strafePenalty = 0.35f; //Aero Tree has lower strafe pen, something about they're deigned for it
251251

252-
lowAltitude = flying = canCircleTarget = alwaysShootWhenMoving = faceTarget = true;
252+
lowAltitude = flying = canCircleTarget = alwaysShootWhenMoving = faceTarget = waveHunts = true;
253253
constructor = UnitEntity::create;
254254

255+
255256
aiController = WaveAiHandler::new;
256257
defaultCommand = NyfalisUnitCommands.circleCommand;
257258
abilities.add(new OrblessEnergyFieldAbillity(45f, 40f, 200f){{

src/olupis/world/ai/SearchAndDestroyFlyingAi.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ public class SearchAndDestroyFlyingAi extends FlyingAI {
2424
/*Allow the ai to seek new targets or pick one and idle*/
2525
public boolean updateTargeting = false;
2626

27+
public boolean circleBombing = false;
28+
2729
public SearchAndDestroyFlyingAi(boolean suicideOnSuicideUnits){
2830
this.suicideOnTarget = suicideOnSuicideUnits;
2931
}
@@ -57,7 +59,7 @@ public void updateMovement(){
5759
/*screw crawlers in particular*/
5860
float range = (suicideOnSuicideUnits && suicideOnTarget) ? 0f : Math.min(unit.range() -5f, 5f) ;
5961

60-
if(unit.type.circleTarget){
62+
if(unit.type.circleTarget || circleBombing && (target instanceof Building || (target instanceof Unit p && p.isGrounded()))){
6163
circleAttack(120f);
6264
}else if (compensateTargetSpeed){
6365
float moveSpd = target instanceof Unit tar ? unit.within(tarVec, range) ?tar.moving() ?Math.min(tar.speed(), unit.speed()): Mathf.lerp(unit.speed(), 0, 1f) : unit.speed() : unit.speed();

src/olupis/world/ai/WaveAiHandler.java

+1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ public void huntingAi(NyfalisUnitType nyf){
8282
if(nyf.waveHunts){
8383
SearchAndDestroyFlyingAi ai = new SearchAndDestroyFlyingAi();
8484
ai.updateTargeting = true;
85+
ai.circleBombing = nyf.AiCircleBomb;
8586
fallback = ai;
8687
}
8788
}

src/olupis/world/blocks/unit/Replicator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ public void write(Writes write){
242242
public void read(Reads read, byte revision){
243243
super.read(read, revision);
244244

245-
if(revision < 2) config = spawnableUnits.get(read.i());
245+
if(revision <= 1) config = spawnableUnits.get(read.i());
246246
else config = Vars.content.getByName(ContentType.unit, read.str());
247247

248248
dynamicDelay = read.f();

src/olupis/world/entities/units/NyfalisUnitType.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
public class NyfalisUnitType extends UnitType {
3434
/*Custom RTS commands*/
3535
public boolean canCircleTarget = false, canHealUnits = false, canGuardUnits = false, canMend = false, canDeploy = false, canDash = false, canCharge = false,
36-
constructHideDefault = false, customMineAi = false, waveHunts = false, cantMove = false;
36+
constructHideDefault = false, customMineAi = false, waveHunts = false, cantMove = false, AiCircleBomb = false;
3737
/*Makes (legged) units boost automatically regardless of Ai*/
3838
public boolean alwaysBoostOnSolid = false;
3939
/*Replace Move Command to a custom one*/

0 commit comments

Comments
 (0)