-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
20d641b
commit 2443048
Showing
64 changed files
with
626 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# Expanded Industries | ||
Current version - 1.7 Build 1\ | ||
Some content for people to enjoy! | ||
Current version - 1.7 Build 2 (Preview build)\ | ||
Some content for people to enjoy!\ | ||
\ | ||
Special thanks to Siede for making the WhitelistDrill class :D |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Oops, something went wrong.
Oops, something went wrong.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Diff not rendered.
File renamed without changes
Oops, something went wrong.
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package ExpandedIndustries.ai; | ||
|
||
import ExpandedIndustries.ai.types.RepairUnitAI; | ||
import mindustry.ai.UnitCommand; | ||
|
||
public class EICommands{ | ||
public static final UnitCommand | ||
healUnitsCommand = new UnitCommand("heal-units", "units", u -> new RepairUnitAI()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package ExpandedIndustries.ai.types; | ||
|
||
import arc.util.*; | ||
import mindustry.entities.*; | ||
import mindustry.entities.units.*; | ||
import mindustry.gen.*; | ||
import mindustry.world.meta.BlockFlag; | ||
|
||
|
||
public class RepairUnitAI extends AIController { | ||
public static float retreatDelay = Time.toSeconds * 3f; | ||
private float retreatTimer; | ||
|
||
@Override | ||
public void updateTargeting() { | ||
target = Units.closest(unit.team, unit.x, unit.y, Unit::damaged); | ||
} | ||
|
||
@Override | ||
public void updateMovement(){ | ||
if(target != null){ | ||
if(!unit.within(target, unit.type.range)){ | ||
moveTo(target, unit.type.range * 0.9f , 50f); | ||
unit.controlWeapons(true); | ||
}else unit.controlWeapons(false); | ||
unit.lookAt(target); | ||
retreatTimer = 0f; | ||
}else if((retreatTimer += Time.delta) >= retreatDelay){ | ||
var retreatTarget = targetFlag(unit.x, unit.y, BlockFlag.repair, false); | ||
if(retreatTarget == null) retreatTarget = unit.closestCore(); | ||
moveTo(retreatTarget, (unit.type.range / 2)); | ||
} | ||
} | ||
} |
Oops, something went wrong.