From 3dd17474c5c86a1564d426ab73d006d345395b2b Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 10 May 2022 13:12:12 -0400 Subject: [PATCH] Fixed OpenGL vertex arrays / Fixed bullet shrink crop --- .../src/main/resources/classids.properties | 2 +- .../src/main/resources/revisions/latum/0.json | 1 + core/assets-raw/sprites/pack.json | 3 ++- core/assets/icons/icons.properties | 2 +- core/assets/logicids.dat | Bin 4401 -> 4408 bytes core/src/mindustry/content/UnitTypes.java | 9 ++++++--- core/src/mindustry/type/UnitType.java | 2 +- .../mindustry/type/unit/NeoplasmUnitType.java | 10 +++++++--- gradle.properties | 2 +- tools/src/mindustry/tools/Generators.java | 3 ++- 10 files changed, 22 insertions(+), 12 deletions(-) create mode 100644 annotations/src/main/resources/revisions/latum/0.json diff --git a/annotations/src/main/resources/classids.properties b/annotations/src/main/resources/classids.properties index 398f70acb6..110096dd1d 100644 --- a/annotations/src/main/resources/classids.properties +++ b/annotations/src/main/resources/classids.properties @@ -9,6 +9,7 @@ corvus=24 elude=45 flare=3 gamma=31 +latum=46 mace=4 manifold=36 mega=5 @@ -39,7 +40,6 @@ pulsar=19 quad=23 quasar=32 risso=20 -scuttler=35 spiroct=21 stell=43 timed=38 diff --git a/annotations/src/main/resources/revisions/latum/0.json b/annotations/src/main/resources/revisions/latum/0.json new file mode 100644 index 0000000000..545bb6c8ae --- /dev/null +++ b/annotations/src/main/resources/revisions/latum/0.json @@ -0,0 +1 @@ +{fields:[{name:abilities,type:"mindustry.entities.abilities.Ability[]"},{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:vel,type:arc.math.geom.Vec2},{name:x,type:float},{name:y,type:float}]} \ No newline at end of file diff --git a/core/assets-raw/sprites/pack.json b/core/assets-raw/sprites/pack.json index 252a508081..1c74544445 100644 --- a/core/assets-raw/sprites/pack.json +++ b/core/assets-raw/sprites/pack.json @@ -5,5 +5,6 @@ maxWidth: 4096, maxHeight: 4096, fast: true, - stripWhitespaceCenter: true + stripWhitespaceCenter: true, + ignoredWhitespaceStrings: ["effects/"] } diff --git a/core/assets/icons/icons.properties b/core/assets/icons/icons.properties index 3082d174ab..7ea4e3288f 100755 --- a/core/assets/icons/icons.properties +++ b/core/assets/icons/icons.properties @@ -397,7 +397,6 @@ 63303=fissile-matter|item-fissile-matter-ui 63302=dormant-cyst|item-dormant-cyst-ui 63301=neoplasm|liquid-neoplasm-ui -63300=scuttler|unit-scuttler-ui 63297=plasma-bore|block-plasma-bore-ui 63296=steam-vent|block-steam-vent-ui 63295=pressure-turbine|block-pressure-turbine-ui @@ -558,3 +557,4 @@ 63127=elude|unit-elude-ui 63126=refabricator|block-refabricator-ui 63125=prime-refabricator|block-prime-refabricator-ui +63124=latum|unit-latum-ui diff --git a/core/assets/logicids.dat b/core/assets/logicids.dat index accbae183d469c6bcc790e02edf2448e1e5e3723..3409bc6261b89d9c82be1c8f66852d8e79ff6208 100644 GIT binary patch delta 26 icmdm}v_olw5g((~W@EnHjBKnqi6y1Eo8R)gFaiK|!w9PY delta 19 bcmdm?v{7k;5g()FW@EnHjGMpmJ2L_RM5G3T diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index 6f1a34abc0..af9036ae1e 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -89,7 +89,7 @@ public class UnitTypes{ //region neoplasm - public static @EntityDef({Unitc.class, Crawlc.class}) UnitType scuttler; + public static @EntityDef({Unitc.class, Crawlc.class}) UnitType latum; //endregion @@ -3909,9 +3909,9 @@ public class UnitTypes{ //region erekir - neoplasm if(false) - scuttler = new NeoplasmUnitType("scuttler"){{ + latum = new NeoplasmUnitType("latum"){{ health = 20000; - armor = 17; + armor = 12; hitSize = 48f; omniMovement = false; rotateSpeed = 1.7f; @@ -3919,7 +3919,10 @@ public class UnitTypes{ drawCell = false; segments = 4; drawBody = false; + hidden = true; crushDamage = 2f; + aiController = HugAI::new; + targetAir = false; segmentScl = 4f; segmentPhase = 5f; diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index f975ea0b96..0861b42308 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -1462,7 +1462,7 @@ public class UnitType extends UnlockableContent{ if(healFlash){ Tmp.c1.set(Color.white).lerp(healColor, Mathf.clamp(unit.healTime - unit.hitTime)); } - Draw.mixcol(Tmp.c1, Math.max(unit.hitTime, Mathf.clamp(unit.healTime))); + Draw.mixcol(Tmp.c1, Math.max(unit.hitTime, !healFlash ? 0f : Mathf.clamp(unit.healTime))); if(unit.drownTime > 0 && unit.lastDrownFloor != null){ Draw.mixcol(Tmp.c1.set(unit.lastDrownFloor.mapColor).mul(0.83f), unit.drownTime * 0.9f); diff --git a/core/src/mindustry/type/unit/NeoplasmUnitType.java b/core/src/mindustry/type/unit/NeoplasmUnitType.java index 445a8056b6..f72006a8da 100644 --- a/core/src/mindustry/type/unit/NeoplasmUnitType.java +++ b/core/src/mindustry/type/unit/NeoplasmUnitType.java @@ -4,6 +4,7 @@ import mindustry.content.*; import mindustry.entities.abilities.*; import mindustry.graphics.*; import mindustry.type.*; +import mindustry.world.meta.*; /** This is just a preset. Contains no new behavior. */ public class NeoplasmUnitType extends UnitType{ @@ -13,10 +14,11 @@ public class NeoplasmUnitType extends UnitType{ outlineColor = Pal.neoplasmOutline; immunities.addAll(StatusEffects.burning, StatusEffects.melting); + envDisabled = Env.none; abilities.add(new RegenAbility(){{ - //fully regen in 30 seconds - percentAmount = 1f / (30f * 60f) * 100f; + //fully regen in 70 seconds + percentAmount = 1f / (70f * 60f) * 100f; }}); abilities.add(new LiquidExplodeAbility(){{ @@ -29,7 +31,9 @@ public class NeoplasmUnitType extends UnitType{ }}); //green flashing is unnecessary since they always regen - healFlash = false; + healFlash = true; + + healColor = Pal.neoplasm1; //TODO //- liquid regen ability diff --git a/gradle.properties b/gradle.properties index e64ccbfbc4..08b49886ed 100644 --- a/gradle.properties +++ b/gradle.properties @@ -25,4 +25,4 @@ org.gradle.caching=true #used for slow jitpack builds; TODO see if this actually works org.gradle.internal.http.socketTimeout=100000 org.gradle.internal.http.connectionTimeout=100000 -archash=b851f88b09 +archash=a8632d7bf2 diff --git a/tools/src/mindustry/tools/Generators.java b/tools/src/mindustry/tools/Generators.java index ff4dc97211..b3ab557622 100644 --- a/tools/src/mindustry/tools/Generators.java +++ b/tools/src/mindustry/tools/Generators.java @@ -572,6 +572,7 @@ public class Generators{ //draw each extra segment on top before it is saved as outline if(sample instanceof Crawlc){ for(int i = 0; i < type.segments; i++){ + //replace(type.segmentRegions[i], outline.get(get(type.segmentRegions[i]))); save(outline.get(get(type.segmentRegions[i])), type.name + "-segment-outline" + i); if(i > 0){ @@ -584,7 +585,7 @@ public class Generators{ //outline is currently never needed, although it could theoretically be necessary if(type.needsBodyOutline()){ save(image, type.name + "-outline"); - }else{ + }else if(type.segments == 0){ replace(type.name, type.segments > 0 ? get(type.segmentRegions[0]) : outline.get(get(type.region))); }