Merge branch 'master' of https://github.com/Anuken/Mindustry into 7.0-features
This commit is contained in:
@@ -165,6 +165,7 @@ abstract class PayloadComp implements Posc, Rotc, Hitboxc, Unitc{
|
||||
if(!u.isAdded()) u.team.data().updateCount(u.type, -1);
|
||||
u.add();
|
||||
u.unloaded();
|
||||
Events.fire(new PayloadDropEvent(self(), u));
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -177,6 +178,7 @@ abstract class PayloadComp implements Posc, Rotc, Hitboxc, Unitc{
|
||||
if(on != null && Build.validPlace(tile.block, tile.team, tx, ty, tile.rotation, false)){
|
||||
int rot = (int)((rotation + 45f) / 90f) % 4;
|
||||
payload.place(on, rot);
|
||||
Events.fire(new PayloadDropEvent(self(), tile));
|
||||
|
||||
if(getControllerName() != null){
|
||||
payload.build.lastAccessed = getControllerName();
|
||||
|
||||
@@ -238,6 +238,24 @@ public class EventType{
|
||||
}
|
||||
}
|
||||
|
||||
public static class PayloadDropEvent{
|
||||
public final Unit carrier;
|
||||
public final @Nullable Unit unit;
|
||||
public final @Nullable Building build;
|
||||
|
||||
public PayloadDropEvent(Unit carrier, Unit unit){
|
||||
this.carrier = carrier;
|
||||
this.unit = unit;
|
||||
this.build = null;
|
||||
}
|
||||
|
||||
public PayloadDropEvent(Unit carrier, Building build){
|
||||
this.carrier = carrier;
|
||||
this.build = build;
|
||||
this.unit = null;
|
||||
}
|
||||
}
|
||||
|
||||
public static class UnitControlEvent{
|
||||
public final Player player;
|
||||
public final @Nullable Unit unit;
|
||||
|
||||
@@ -762,9 +762,6 @@ public class SettingsMenuDialog extends BaseDialog{
|
||||
}
|
||||
|
||||
public static class AreaTextSetting extends TextSetting{
|
||||
String def;
|
||||
Cons<String> changed;
|
||||
|
||||
public AreaTextSetting(String name, String def, Cons<String> changed){
|
||||
super(name, def, changed);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ public class PointDefenseTurret extends ReloadTurret{
|
||||
public final int timerTarget = timers++;
|
||||
public float retargetTime = 5f;
|
||||
|
||||
public @Load("block-@size") TextureRegion baseRegion;
|
||||
public @Load(value = "@-base", fallback = "block-@size") TextureRegion baseRegion;
|
||||
|
||||
public Color color = Color.white;
|
||||
public Effect beamEffect = Fx.pointBeam;
|
||||
|
||||
Reference in New Issue
Block a user