Bugfixes
This commit is contained in:
@@ -27,7 +27,7 @@ allprojects{
|
|||||||
appName = 'Mindustry'
|
appName = 'Mindustry'
|
||||||
gdxVersion = '1.9.10'
|
gdxVersion = '1.9.10'
|
||||||
roboVMVersion = '2.3.8-SNAPSHOT'
|
roboVMVersion = '2.3.8-SNAPSHOT'
|
||||||
steamworksVersion = '1e1bd5c7c042f8eb0c23a6daaa373d562f82539a'
|
steamworksVersion = '891ed912791e01fe9ee6237a6497e5212b85c256'
|
||||||
arcHash = null
|
arcHash = null
|
||||||
|
|
||||||
debugged = {
|
debugged = {
|
||||||
|
|||||||
@@ -65,15 +65,20 @@ public class ConsumePower extends Consume{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the amount of power which is requested for the given block and entity.
|
* Retrieves the amount of power which is requested for the given block and entity.
|
||||||
* @param block The block which needs power.
|
|
||||||
* @param entity The entity which contains the power module.
|
* @param entity The entity which contains the power module.
|
||||||
* @return The amount of power which is requested per tick.
|
* @return The amount of power which is requested per tick.
|
||||||
*/
|
*/
|
||||||
public float requestedPower(TileEntity entity){
|
public float requestedPower(TileEntity entity){
|
||||||
|
if(entity.tile.entity == null) return 0f;
|
||||||
if(buffered){
|
if(buffered){
|
||||||
return (1f-entity.power.satisfaction)*capacity;
|
return (1f-entity.power.satisfaction)*capacity;
|
||||||
}else{
|
}else{
|
||||||
return usage * Mathf.num(entity.block.shouldConsume(entity.tile));
|
try{
|
||||||
|
return usage * Mathf.num(entity.block.shouldConsume(entity.tile));
|
||||||
|
}catch(Exception e){
|
||||||
|
//HACK an error will only happen with a bar that is checking its requested power, and the entity is null/a different class
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -142,6 +142,16 @@ PackrConfig.Platform.values().each{ platform ->
|
|||||||
into "build/packr/output/"
|
into "build/packr/output/"
|
||||||
rename("msvcr100.dll", "MSVCR100.dll")
|
rename("msvcr100.dll", "MSVCR100.dll")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(versionModifier.contains("steam")){
|
||||||
|
copy{
|
||||||
|
from zipTree("build/packr/output/jre/desktop.jar").matching{
|
||||||
|
include "steamworks4j${platform == PackrConfig.Platform.Windows64 ? '64' : ''}.dll"
|
||||||
|
include "steam_api${platform == PackrConfig.Platform.Windows64 ? '64' : ''}.dll"
|
||||||
|
}
|
||||||
|
into "build/packr/output/"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
copy{
|
copy{
|
||||||
|
|||||||
Reference in New Issue
Block a user