Fixed coal in core / Fixed build events not triggering

This commit is contained in:
Anuken 2018-10-13 08:49:54 -04:00
parent c0e3a1f3ef
commit c526997aba
3 changed files with 5 additions and 5 deletions

View File

@ -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()));
}
});

View File

@ -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);

View File

@ -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();
}