Added hint & tooltip for derelict structures
This commit is contained in:
@@ -1352,6 +1352,7 @@ hint.placeTurret = Place \uf861 [accent]Turrets[] to defend your base from enemi
|
||||
hint.breaking = [accent]Right-click[] and drag to break blocks.
|
||||
hint.breaking.mobile = Activate the \ue817 [accent]hammer[] in the bottom right and tap to break blocks.\n\nHold down your finger for a second and drag to break in a selection.
|
||||
hint.blockInfo = View information of a block by selecting it in the [accent]build menu[], then selecting the [accent][[?][] button at the right.
|
||||
hint.derelict = [accent]Derelict[] structures are broken remnants of old bases that no longer function.\n\nThese structures can be [accent]deconstructed[] for resources.
|
||||
hint.research = Use the \ue875 [accent]Research[] button to research new technology.
|
||||
hint.research.mobile = Use the \ue875 [accent]Research[] button in the \ue88c [accent]Menu[] to research new technology.
|
||||
hint.unitControl = Hold [accent][[L-ctrl][] and [accent]click[] to control friendly units or turrets.
|
||||
@@ -1403,6 +1404,7 @@ liquid.slag.description = Refined in separators into constituent metals, or spra
|
||||
liquid.oil.description = Used in advanced material production and as incendiary ammunition.
|
||||
liquid.cryofluid.description = Used as coolant in reactors, turrets and factories.
|
||||
|
||||
block.derelict = [lightgray] Derelict
|
||||
block.resupply-point.description = Resupplies nearby units with copper ammunition. Not compatible with units that require battery power.
|
||||
block.armored-conveyor.description = Moves items forward. Does not accept inputs from the sides.
|
||||
block.illuminator.description = Emits light.
|
||||
|
||||
@@ -2032,7 +2032,7 @@ public class Blocks implements ContentList{
|
||||
size = 5;
|
||||
reloadTime = 140f;
|
||||
chargeTime = 100f;
|
||||
range = 500f;
|
||||
range = 600f;
|
||||
maxPayloadSize = 3.5f;
|
||||
consumes.power(6f);
|
||||
}};
|
||||
|
||||
@@ -1071,7 +1071,9 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
}
|
||||
|
||||
public String getDisplayName(){
|
||||
return block.localizedName;
|
||||
return team == Team.derelict ?
|
||||
block.localizedName + "\n" + Core.bundle.get("block.derelict"):
|
||||
block.localizedName;
|
||||
}
|
||||
|
||||
public TextureRegion getDisplayIcon(){
|
||||
|
||||
@@ -12,6 +12,7 @@ import arc.struct.*;
|
||||
import arc.util.*;
|
||||
import mindustry.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.game.EventType.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.input.*;
|
||||
@@ -54,6 +55,12 @@ public class HintsFragment extends Fragment{
|
||||
hints.remove(hint);
|
||||
}else if(hint != null){
|
||||
display(hint);
|
||||
}else{
|
||||
//moused over a derelict structure
|
||||
var build = world.buildWorld(Core.input.mouseWorldX(), Core.input.mouseWorldY());
|
||||
if(build != null && build.team == Team.derelict){
|
||||
events.add("derelictmouse");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -157,6 +164,7 @@ public class HintsFragment extends Fragment{
|
||||
conveyorPathfind(() -> control.input.block == Blocks.titaniumConveyor, () -> Core.input.keyRelease(Binding.diagonal_placement) || (mobile && Core.settings.getBool("swapdiagonal"))),
|
||||
boost(visibleDesktop, () -> !player.dead() && player.unit().type.canBoost, () -> Core.input.keyDown(Binding.boost)),
|
||||
blockInfo(() -> true, () -> ui.content.isShown()),
|
||||
derelict(() -> ui.hints.events.contains("derelictmouse"), () -> false),
|
||||
command(() -> state.rules.defaultTeam.data().units.size > 3 && !net.active(), () -> player.unit().isCommanding()),
|
||||
payloadPickup(() -> !player.unit().dead && player.unit() instanceof Payloadc p && p.payloads().isEmpty(), () -> player.unit() instanceof Payloadc p && p.payloads().any()),
|
||||
payloadDrop(() -> !player.unit().dead && player.unit() instanceof Payloadc p && p.payloads().any(), () -> player.unit() instanceof Payloadc p && p.payloads().isEmpty()),
|
||||
|
||||
Reference in New Issue
Block a user