Improved build sync
This commit is contained in:
@@ -108,6 +108,8 @@ public interface BuilderTrait extends Entity{
|
||||
|
||||
if(applyChanges){
|
||||
getPlaceQueue().addLast(request);
|
||||
}else if(isBuilding()){
|
||||
getCurrentRequest().progress = progress;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -149,6 +151,10 @@ public interface BuilderTrait extends Entity{
|
||||
return;
|
||||
}
|
||||
}
|
||||
Tile tile = world.tile(place.x, place.y);
|
||||
if(tile != null && tile.entity instanceof BuildEntity){
|
||||
place.progress = tile.<BuildEntity>entity().progress;
|
||||
}
|
||||
getPlaceQueue().addLast(place);
|
||||
}
|
||||
}
|
||||
@@ -226,6 +232,8 @@ public interface BuilderTrait extends Entity{
|
||||
}
|
||||
|
||||
current.progress = entity.progress();
|
||||
}else{
|
||||
entity.progress = current.progress;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user