Unlock core units on respawn
This commit is contained in:
@@ -1697,6 +1697,7 @@ public class UnitTypes implements ContentList{
|
|||||||
engineOffset = 6f;
|
engineOffset = 6f;
|
||||||
hitSize = 8f;
|
hitSize = 8f;
|
||||||
commandLimit = 3;
|
commandLimit = 3;
|
||||||
|
alwaysUnlocked = true;
|
||||||
|
|
||||||
weapons.add(new Weapon("small-basic-weapon"){{
|
weapons.add(new Weapon("small-basic-weapon"){{
|
||||||
reload = 17f;
|
reload = 17f;
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import arc.graphics.g2d.*;
|
|||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
import arc.math.geom.*;
|
import arc.math.geom.*;
|
||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
|
import mindustry.*;
|
||||||
import mindustry.annotations.Annotations.*;
|
import mindustry.annotations.Annotations.*;
|
||||||
import mindustry.content.*;
|
import mindustry.content.*;
|
||||||
import mindustry.core.*;
|
import mindustry.core.*;
|
||||||
@@ -71,6 +72,10 @@ public class CoreBlock extends StorageBlock{
|
|||||||
unit.spawnedByCore(true);
|
unit.spawnedByCore(true);
|
||||||
unit.add();
|
unit.add();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(state.isCampaign() && player == Vars.player){
|
||||||
|
block.unitType.unlock();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user