Fixed coal in core / Fixed build events not triggering
This commit is contained in:
@@ -160,8 +160,8 @@ public class Control extends Module{
|
|||||||
|
|
||||||
Events.on(WorldLoadEvent.class, event -> threads.runGraphics(() -> Events.fire(new WorldLoadGraphicsEvent())));
|
Events.on(WorldLoadEvent.class, event -> threads.runGraphics(() -> Events.fire(new WorldLoadGraphicsEvent())));
|
||||||
|
|
||||||
Events.on(BlockBuildEvent.class, event -> {
|
Events.on(TileChangeEvent.class, event -> {
|
||||||
if(event.team == players[0].getTeam() && Recipe.getByResult(event.tile.block()) != null){
|
if(event.tile.getTeam() == players[0].getTeam() && Recipe.getByResult(event.tile.block()) != null){
|
||||||
unlocks.handleContentUsed(Recipe.getByResult(event.tile.block()));
|
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(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,
|
Call.transferItemTo(item, 1,
|
||||||
tile.worldx() + Mathf.range(tilesize / 2f),
|
tile.worldx() + Mathf.range(tilesize / 2f),
|
||||||
tile.worldy() + Mathf.range(tilesize / 2f), core.tile);
|
tile.worldy() + Mathf.range(tilesize / 2f), core.tile);
|
||||||
|
|||||||
@@ -146,9 +146,9 @@ public class DesktopInput extends InputHandler{
|
|||||||
|
|
||||||
pollInput();
|
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");
|
ui.showInfo("$text.construction.desktop");
|
||||||
Settings.putBool("desktop-place-help", true);
|
Settings.putBool("desktop-place-help-2", true);
|
||||||
Settings.save();
|
Settings.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user