Save rotation of repair points (#4586)

This commit is contained in:
Patrick 'Quezler' Mounier 2021-02-04 16:23:17 +01:00 committed by GitHub
parent 9f510f61c7
commit a6c3ebc467
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,7 @@ import arc.math.*;
import arc.math.geom.*;
import arc.struct.*;
import arc.util.*;
import arc.util.io.*;
import mindustry.annotations.Annotations.*;
import mindustry.entities.*;
import mindustry.gen.*;
@ -123,5 +124,26 @@ public class RepairPoint extends Block{
public BlockStatus status(){
return Mathf.equal(efficiency(), 0f, 0.01f) ? BlockStatus.noInput : cons.status();
}
@Override
public void write(Writes write){
super.write(write);
write.f(rotation);
}
@Override
public void read(Reads read, byte revision){
super.read(read, revision);
if(revision >= 1){
rotation = read.f();
}
}
@Override
public byte version(){
return 1;
}
}
}