Fixed generator time not saving / 128 compat break
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package mindustry.core;
|
package mindustry.core;
|
||||||
|
|
||||||
import arc.*;
|
import arc.*;
|
||||||
|
import arc.audio.*;
|
||||||
import arc.func.*;
|
import arc.func.*;
|
||||||
import arc.graphics.*;
|
import arc.graphics.*;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
@@ -159,8 +160,6 @@ public class NetClient implements ApplicationListener{
|
|||||||
clientPacketReliable(type, contents);
|
clientPacketReliable(type, contents);
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO enable in build 129
|
|
||||||
/*
|
|
||||||
@Remote(variants = Variant.both, unreliable = true)
|
@Remote(variants = Variant.both, unreliable = true)
|
||||||
public static void sound(Sound sound, float volume, float pitch, float pan){
|
public static void sound(Sound sound, float volume, float pitch, float pan){
|
||||||
if(sound == null) return;
|
if(sound == null) return;
|
||||||
@@ -173,7 +172,7 @@ public class NetClient implements ApplicationListener{
|
|||||||
if(sound == null) return;
|
if(sound == null) return;
|
||||||
|
|
||||||
sound.at(x, y, pitch, volume);
|
sound.at(x, y, pitch, volume);
|
||||||
}*/
|
}
|
||||||
|
|
||||||
@Remote(variants = Variant.both, unreliable = true)
|
@Remote(variants = Variant.both, unreliable = true)
|
||||||
public static void effect(Effect effect, float x, float y, float rotation, Color color){
|
public static void effect(Effect effect, float x, float y, float rotation, Color color){
|
||||||
|
|||||||
@@ -61,16 +61,25 @@ public class PowerGenerator extends PowerDistributor{
|
|||||||
return powerProduction * productionEfficiency;
|
return powerProduction * productionEfficiency;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public byte version(){
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void write(Writes write){
|
public void write(Writes write){
|
||||||
super.write(write);
|
super.write(write);
|
||||||
write.f(productionEfficiency);
|
write.f(productionEfficiency);
|
||||||
|
write.f(generateTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void read(Reads read, byte revision){
|
public void read(Reads read, byte revision){
|
||||||
super.read(read, revision);
|
super.read(read, revision);
|
||||||
productionEfficiency = read.f();
|
productionEfficiency = read.f();
|
||||||
|
if(revision >= 1){
|
||||||
|
generateTime = read.f();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user