mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-26 23:50:18 +07:00
Fixed coal in core / Fixed build events not triggering
This commit is contained in:
parent
c0e3a1f3ef
commit
c526997aba
@ -160,8 +160,8 @@ public class Control extends Module{
|
||||
|
||||
Events.on(WorldLoadEvent.class, event -> threads.runGraphics(() -> Events.fire(new WorldLoadGraphicsEvent())));
|
||||
|
||||
Events.on(BlockBuildEvent.class, event -> {
|
||||
if(event.team == players[0].getTeam() && Recipe.getByResult(event.tile.block()) != null){
|
||||
Events.on(TileChangeEvent.class, event -> {
|
||||
if(event.tile.getTeam() == players[0].getTeam() && Recipe.getByResult(event.tile.block()) != null){
|
||||
unlocks.handleContentUsed(Recipe.getByResult(event.tile.block()));
|
||||
}
|
||||
});
|
||||
|
@ -247,7 +247,7 @@ public interface BuilderTrait extends Entity{
|
||||
|
||||
if(Mathf.chance(Timers.delta() * (0.06 - item.hardness * 0.01) * getMinePower())){
|
||||
|
||||
if(unit.distanceTo(core) < mineTransferRange && core.items.get(item) < core.tile.block().getMaximumAccepted(core.tile, item)){
|
||||
if(unit.distanceTo(core) < mineTransferRange && core.tile.block().acceptStack(item, 1, core.tile, unit) == 1){
|
||||
Call.transferItemTo(item, 1,
|
||||
tile.worldx() + Mathf.range(tilesize / 2f),
|
||||
tile.worldy() + Mathf.range(tilesize / 2f), core.tile);
|
||||
|
@ -146,9 +146,9 @@ public class DesktopInput extends InputHandler{
|
||||
|
||||
pollInput();
|
||||
|
||||
if(recipe != null && !Settings.getBool("desktop-place-help", false)){
|
||||
if(recipe != null && !Settings.getBool("desktop-place-help-2", false)){
|
||||
ui.showInfo("$text.construction.desktop");
|
||||
Settings.putBool("desktop-place-help", true);
|
||||
Settings.putBool("desktop-place-help-2", true);
|
||||
Settings.save();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user