Fixed CI / Fixed exponentially increasing broken blocks

This commit is contained in:
Anuken 2020-11-25 10:15:14 -05:00
parent 5fd66d38bb
commit eaa7b04c3d
6 changed files with 29 additions and 3 deletions

View File

@ -21,6 +21,8 @@ jobs:
- name: Update docs
run: |
cd ../
git config --global user.email "cli@github.com"
git config --global user.name "Github Actions"
git clone --depth=1 https://github.com/MindustryGame/docs.git
cp -a Mindustry/core/build/docs/javadoc/. docs/
cd docs

View File

@ -15,6 +15,7 @@ jobs:
- name: Run unit tests
run: ./gradlew test
- name: Trigger BE build
if: ${{ github.repository == Anuken/Mindustry }}
run: |
git clone --depth=1 --branch=master https://github.com/Anuken/MindustryBuilds ../MindustryBuilds
cd ../MindustryBuilds

View File

@ -1216,7 +1216,7 @@ public class Blocks implements ContentList{
requirements(Category.power, with(Items.lead, 100, Items.silicon, 75, Items.phaseFabric, 25, Items.plastanium, 75, Items.thorium, 50));
size = 2;
powerProduction = 4.5f;
itemDuration = 60 * 15f;
itemDuration = 60 * 14f;
}};
solarPanel = new SolarGenerator("solar-panel"){{

View File

@ -286,7 +286,8 @@ public abstract class SaveVersion extends SaveFileReader{
public void writeEntities(DataOutput stream) throws IOException{
//write team data with entities.
Seq<TeamData> data = state.teams.getActive().and(Team.sharded.data());
Seq<TeamData> data = state.teams.getActive().copy();
if(!data.contains(Team.sharded.data())) data.add(Team.sharded.data());
stream.writeInt(data.size);
for(TeamData team : data){
stream.writeInt(team.team.id);
@ -313,12 +314,23 @@ public abstract class SaveVersion extends SaveFileReader{
public void readEntities(DataInput stream) throws IOException{
int teamc = stream.readInt();
for(int i = 0; i < teamc; i++){
Team team = Team.get(stream.readInt());
TeamData data = team.data();
int blocks = stream.readInt();
data.blocks.clear();
data.blocks.ensureCapacity(Math.min(blocks, 1000));
var reads = Reads.get(stream);
var set = new IntSet();
for(int j = 0; j < blocks; j++){
data.blocks.addLast(new BlockPlan(stream.readShort(), stream.readShort(), stream.readShort(), content.block(stream.readShort()).id, TypeIO.readObject(Reads.get(stream))));
short x = stream.readShort(), y = stream.readShort(), rot = stream.readShort(), bid = stream.readShort();
var obj = TypeIO.readObject(reads);
//cannot have two in the same position
if(set.add(Point2.pack(x, y))){
data.blocks.addLast(new BlockPlan(x, y, rot, content.block(bid).id, obj));
}
}
}

View File

@ -140,6 +140,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
return this;
}
rebuildButtons();
mode = look;
selected = hovered = launchSector = null;
launching = false;

View File

@ -0,0 +1,10 @@
Only a few days left until stable 6.0 release now. The campaign should now be playable; I've done a playthrough and fixed all the bugs and irregularities I encountered.
Aside from internal modding API changes and potential bugfixes, 6.0 should not have any more additions.
- Added basalt boulder decoration block
- Added hint about generator use & power transfer
- Made power node placement smarter
- Buffed Lancer turret
Campaign: