Fixed logic IDs not loading / Accelerator animation tweaks

This commit is contained in:
Anuken
2025-02-08 16:04:04 -05:00
parent f8b6600fe7
commit ebaf88e80d
3 changed files with 21 additions and 6 deletions

View File

@@ -23,6 +23,7 @@ import static mindustry.Vars.*;
public class GlobalVars{
public static final int ctrlProcessor = 1, ctrlPlayer = 2, ctrlCommand = 3;
public static final ContentType[] lookableContent = {ContentType.block, ContentType.unit, ContentType.item, ContentType.liquid, ContentType.team};
public static final ContentType[] writableLookableContent = {ContentType.block, ContentType.unit, ContentType.item, ContentType.liquid};
/** Global random state. */
public static final Rand rand = new Rand();
@@ -155,7 +156,7 @@ public class GlobalVars{
if(ids.exists()){
//read logic ID mapping data (generated in ImagePacker)
try(DataInputStream in = new DataInputStream(ids.readByteStream())){
for(ContentType ctype : lookableContent){
for(ContentType ctype : writableLookableContent){
short amount = in.readShort();
logicIdToContent[ctype.ordinal()] = new UnlockableContent[amount];
contentIdToLogicId[ctype.ordinal()] = new int[Vars.content.getBy(ctype).size];