Fixed #2917
This commit is contained in:
@@ -1544,7 +1544,7 @@ public class UnitTypes implements ContentList{
|
||||
xRand = 8f;
|
||||
shotDelay = 1f;
|
||||
|
||||
bullet = new MissileBulletType(4.2f, 25){{
|
||||
bullet = new MissileBulletType(4.2f, 30){{
|
||||
homingPower = 0.12f;
|
||||
width = 8f;
|
||||
height = 8f;
|
||||
@@ -1552,8 +1552,8 @@ public class UnitTypes implements ContentList{
|
||||
drag = -0.003f;
|
||||
homingRange = 80f;
|
||||
keepVelocity = false;
|
||||
splashDamageRadius = 25f;
|
||||
splashDamage = 25f;
|
||||
splashDamageRadius = 30f;
|
||||
splashDamage = 35f;
|
||||
lifetime = 56f;
|
||||
trailColor = Pal.bulletYellowBack;
|
||||
backColor = Pal.bulletYellowBack;
|
||||
|
||||
@@ -22,7 +22,7 @@ public abstract class UnlockableContent extends MappableContent{
|
||||
/** Whether this content is always unlocked in the tech tree. */
|
||||
public boolean alwaysUnlocked = false;
|
||||
/** Icons by Cicon ID.*/
|
||||
protected TextureRegion[] cicons = new TextureRegion[mindustry.ui.Cicon.all.length];
|
||||
protected TextureRegion[] cicons = new TextureRegion[Cicon.all.length];
|
||||
/** Unlock state. Loaded from settings. Do not modify outside of the constructor. */
|
||||
protected boolean unlocked;
|
||||
|
||||
|
||||
@@ -339,6 +339,14 @@ public class DefaultWaves{
|
||||
shieldScaling = shieldsPerWave;
|
||||
}});
|
||||
|
||||
//shift back waves on higher difficulty for a harder start
|
||||
int shift = Math.max((int)(difficulty * 15 - 5), 0);
|
||||
|
||||
for(SpawnGroup group : out){
|
||||
group.begin -= shift;
|
||||
group.end -= shift;
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -400,7 +400,8 @@ public class ResearchDialog extends BaseDialog{
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
//can always spend when locked
|
||||
return node.content.locked();
|
||||
}
|
||||
|
||||
void spend(TechNode node){
|
||||
@@ -414,7 +415,7 @@ public class ResearchDialog extends BaseDialog{
|
||||
ItemStack completed = node.finishedRequirements[i];
|
||||
|
||||
//amount actually taken from inventory
|
||||
int used = Math.min(req.amount - completed.amount, items.get(req.item));
|
||||
int used = Math.max(Math.min(req.amount - completed.amount, items.get(req.item)), 0);
|
||||
items.remove(req.item, used);
|
||||
completed.amount += used;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user