Do not display missile units on hover

This commit is contained in:
Anuken
2022-10-20 09:33:15 -04:00
parent db09fa5932
commit 52ac26b56c
4 changed files with 12 additions and 2 deletions

View File

@@ -2934,7 +2934,7 @@ public class Blocks{
}}; }};
coreCitadel = new CoreBlock("core-citadel"){{ coreCitadel = new CoreBlock("core-citadel"){{
requirements(Category.effect, with(Items.silicon, 4000, Items.beryllium, 5000, Items.tungsten, 3000, Items.oxide, 2000)); requirements(Category.effect, with(Items.silicon, 4000, Items.beryllium, 5000, Items.tungsten, 3000, Items.oxide, 1000));
unitType = UnitTypes.incite; unitType = UnitTypes.incite;
health = 16000; health = 16000;
@@ -2943,6 +2943,7 @@ public class Blocks{
thrusterLength = 40/4f; thrusterLength = 40/4f;
armor = 10f; armor = 10f;
incinerateNonBuildable = true; incinerateNonBuildable = true;
buildCostMultiplier = 0.7f;
unitCapModifier = 15; unitCapModifier = 15;
researchCostMultipliers.put(Items.silicon, 0.5f); researchCostMultipliers.put(Items.silicon, 0.5f);
@@ -2950,7 +2951,7 @@ public class Blocks{
}}; }};
coreAcropolis = new CoreBlock("core-acropolis"){{ coreAcropolis = new CoreBlock("core-acropolis"){{
requirements(Category.effect, with(Items.beryllium, 8000, Items.silicon, 8000, Items.tungsten, 6000, Items.carbide, 5000, Items.oxide, 5000)); requirements(Category.effect, with(Items.beryllium, 8000, Items.silicon, 7000, Items.tungsten, 6000, Items.carbide, 5000, Items.oxide, 4000));
unitType = UnitTypes.emanate; unitType = UnitTypes.emanate;
health = 30000; health = 30000;
@@ -2959,6 +2960,7 @@ public class Blocks{
thrusterLength = 48/4f; thrusterLength = 48/4f;
armor = 15f; armor = 15f;
incinerateNonBuildable = true; incinerateNonBuildable = true;
buildCostMultiplier = 0.7f;
unitCapModifier = 15; unitCapModifier = 15;
researchCostMultipliers.put(Items.silicon, 0.4f); researchCostMultipliers.put(Items.silicon, 0.4f);

View File

@@ -141,6 +141,11 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
return rotation; return rotation;
} }
@Override
public boolean displayable(){
return type.hoverable;
}
@Override @Override
@Replace @Replace
public boolean isSyncHidden(Player player){ public boolean isSyncHidden(Player player){

View File

@@ -215,6 +215,8 @@ public class UnitType extends UnlockableContent{
/** if false, RTS AI controlled units do not automatically attack things while moving. This is automatically assigned. */ /** if false, RTS AI controlled units do not automatically attack things while moving. This is automatically assigned. */
autoFindTarget = true, autoFindTarget = true,
/** whether this unit has a hover tooltip */
hoverable = true,
/** if true, this modded unit always has a -outline region generated for its base. Normally, outlines are ignored if there are no top = false weapons. */ /** if true, this modded unit always has a -outline region generated for its base. Normally, outlines are ignored if there are no top = false weapons. */
alwaysCreateOutline = false, alwaysCreateOutline = false,
/** if true, this unit has a square shadow. */ /** if true, this unit has a square shadow. */

View File

@@ -28,6 +28,7 @@ public class MissileUnitType extends UnitType{
bounded = false; bounded = false;
trailLength = 7; trailLength = 7;
hidden = true; hidden = true;
hoverable = false;
speed = 4f; speed = 4f;
lifetime = 60f * 1.7f; lifetime = 60f * 1.7f;
rotateSpeed = 2.5f; rotateSpeed = 2.5f;