Hint for upgrading units

This commit is contained in:
Anuken
2025-07-24 18:40:31 -04:00
parent 3ceb705cb5
commit 40d459b1b6
4 changed files with 6 additions and 0 deletions

View File

@@ -2061,6 +2061,7 @@ hint.waveFire = [accent]Wave[] turrets with water as ammunition will automatical
hint.generator = :combustion-generator: [accent]Combustion Generators[] burn coal and transmit power to adjacent blocks.\n\nPower transmission range can be extended with :power-node: [accent]Power Nodes[].
hint.guardian = [accent]Guardian[] units are armored. Weak ammo such as [accent]Copper[] and [accent]Lead[] is [scarlet]not effective[].\n\nUse higher tier turrets or :graphite: [accent]Graphite[] :duo:Duo/:salvo:Salvo ammunition to take Guardians down.
hint.coreUpgrade = Cores can be upgraded by [accent]placing higher-tier cores over them[].\n\nPlace a :core-foundation: [accent]Foundation[] core over the :core-shard: [accent]Shard[] core. Make sure it is free from nearby obstructions.
hint.cannotUpgrade = A [red]:tree:[] icon over a payload unit indicates that its upgraded version is not researched yet.\n\nUnit upgrades must be researched in the [accent]:tree: tech tree[] before they can be produced in reconstructors.
hint.presetLaunch = Gray [accent]landing zone sectors[], such as [accent]Frozen Forest[], can be launched to from anywhere. They do not require capture of nearby territory.\n\n[accent]Numbered sectors[], such as this one, are [accent]optional[].
hint.presetDifficulty = This sector has a [scarlet]high enemy threat level[].\nLaunching to such sectors is [accent]not recommended[] without proper technology and preparation.
hint.coreIncinerate = After the core is filled to capacity with an item, any extra items of that type it receives will be [accent]incinerated[].

View File

@@ -17,6 +17,7 @@ public class EventType{
//events that occur very often
public enum Trigger{
shock,
cannotUpgrade,
openConsole,
blastFreeze,
impactPower,

View File

@@ -81,6 +81,8 @@ public class HintsFragment{
}
});
Events.run(Trigger.cannotUpgrade, () -> events.add("cannotupgrade"));
Events.on(ResetEvent.class, e -> {
placedBlocks.clear();
events.clear();
@@ -186,6 +188,7 @@ public class HintsFragment{
generator(() -> control.input.block == Blocks.combustionGenerator, () -> ui.hints.placedBlocks.contains(Blocks.combustionGenerator)),
rebuildSelect(() -> state.rules.defaultTeam.data().plans.size >= 10, () -> control.input.isRebuildSelecting()),
guardian(() -> state.boss() != null && isSerpulo() && state.boss().armor >= 4, () -> state.boss() == null),
cannotUpgrade(() -> ui.hints.events.contains("cannotupgrade"), () -> false),
factoryControl(() -> !(state.isCampaign() && state.rules.sector.preset == SectorPresets.onset) &&
state.rules.defaultTeam.data().getBuildings(Blocks.tankFabricator).size + state.rules.defaultTeam.data().getBuildings(Blocks.groundFactory).size > 0, () -> ui.hints.events.contains("factorycontrol")),
coreUpgrade(() -> state.isCampaign() && state.rules.sector.planet == Planets.serpulo && Blocks.coreFoundation.unlocked()

View File

@@ -223,6 +223,7 @@ public class Reconstructor extends UnitBlock{
if(!upgrade.unlockedNowHost() && !team.isAI()){
//flash "not researched"
pay.showOverlay(Icon.tree);
Events.fire(Trigger.cannotUpgrade);
}
if(upgrade.isBanned()){