From 7c80af85e31e800a72a279340e58ea4c6c2c80d4 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 11 Dec 2020 19:28:03 -0500 Subject: [PATCH] Property cleanup --- core/src/mindustry/content/UnitTypes.java | 28 +++++++++++------------ core/src/mindustry/core/World.java | 4 ++-- core/src/mindustry/type/UnitType.java | 14 ++++++------ core/src/mindustry/type/Weapon.java | 4 ++-- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index d1a771621e..046ff3f378 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -760,7 +760,7 @@ public class UnitTypes implements ContentList{ ejectEffect = Fx.casing1; shootSound = Sounds.artillery; rotate = true; - occlusion = 8f; + shadow = 8f; recoil = 3f; bullet = new ArtilleryBulletType(2f, 12){{ @@ -827,7 +827,7 @@ public class UnitTypes implements ContentList{ ejectEffect = Fx.casing1; shootSound = Sounds.shootBig; rotate = true; - occlusion = 12f; + shadow = 12f; recoil = 3f; shots = 2; spacing = 17f; @@ -859,7 +859,7 @@ public class UnitTypes implements ContentList{ ejectEffect = Fx.casing3; shootSound = Sounds.artillery; rotate = true; - occlusion = 30f; + shadow = 30f; bullet = new ArtilleryBulletType(3f, 50){{ hitEffect = Fx.sapExplosion; @@ -1061,7 +1061,7 @@ public class UnitTypes implements ContentList{ bullet = missiles; shootSound = Sounds.missile; rotate = true; - occlusion = 6f; + shadow = 6f; }}, new Weapon("missiles-mount"){{ y = -8f; @@ -1072,7 +1072,7 @@ public class UnitTypes implements ContentList{ bullet = missiles; shootSound = Sounds.missile; rotate = true; - occlusion = 6f; + shadow = 6f; }}, new Weapon("large-bullet-mount"){{ y = 2f; @@ -1084,7 +1084,7 @@ public class UnitTypes implements ContentList{ ejectEffect = Fx.casing1; shootSound = Sounds.shootBig; rotate = true; - occlusion = 8f; + shadow = 8f; bullet = new BasicBulletType(7f, 50){{ width = 12f; height = 18f; @@ -1132,7 +1132,7 @@ public class UnitTypes implements ContentList{ reload = 45f; recoil = 4f; shootSound = Sounds.laser; - occlusion = 20f; + shadow = 20f; rotate = true; bullet = new LaserBulletType(){{ @@ -1152,7 +1152,7 @@ public class UnitTypes implements ContentList{ rotateSpeed = 2f; reload = 9f; shootSound = Sounds.shoot; - occlusion = 7f; + shadow = 7f; rotate = true; recoil = 0.5f; @@ -1167,7 +1167,7 @@ public class UnitTypes implements ContentList{ shake = 1f; shootSound = Sounds.shoot; rotate = true; - occlusion = 12f; + shadow = 12f; bullet = fragBullet; }}); }}; @@ -1519,7 +1519,7 @@ public class UnitTypes implements ContentList{ shootY = 7f; shake = 5f; recoil = 4f; - occlusion = 12f; + shadow = 12f; shots = 1; inaccuracy = 3f; @@ -1555,7 +1555,7 @@ public class UnitTypes implements ContentList{ x = 8.5f; y = -9f; - occlusion = 6f; + shadow = 6f; rotateSpeed = 4f; rotate = true; @@ -1611,7 +1611,7 @@ public class UnitTypes implements ContentList{ rotateSpeed = 4f; mirror = false; - occlusion = 20f; + shadow = 20f; shootY = 2f; recoil = 4f; @@ -1657,7 +1657,7 @@ public class UnitTypes implements ContentList{ shootY = 7f; shake = 2f; recoil = 3f; - occlusion = 12f; + shadow = 12f; ejectEffect = Fx.casing3; shootSound = Sounds.shootBig; @@ -1703,7 +1703,7 @@ public class UnitTypes implements ContentList{ shootY = 23f; shake = 6f; recoil = 10.5f; - occlusion = 50f; + shadow = 50f; shootSound = Sounds.railgun; shots = 1; diff --git a/core/src/mindustry/core/World.java b/core/src/mindustry/core/World.java index 45f014ad87..da1a574121 100644 --- a/core/src/mindustry/core/World.java +++ b/core/src/mindustry/core/World.java @@ -186,14 +186,14 @@ public class World{ /** * Call to signify the beginning of map loading. - * BuildinghangeEvents will not be fired until endMapLoad(). + * TileEvents will not be fired until endMapLoad(). */ public void beginMapLoad(){ generating = true; } /** - * Call to signify the end of map loading. Updates tile occlusions and sets up physics for the world. + * Call to signify the end of map loading. Updates tile proximities and sets up physics for the world. * A WorldLoadEvent will be fire. */ public void endMapLoad(){ diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index 3b42f7b61a..1af6b58584 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -106,7 +106,7 @@ public class UnitType extends UnlockableContent{ public Seq weapons = new Seq<>(); public TextureRegion baseRegion, legRegion, region, shadowRegion, cellRegion, - occlusionRegion, jointRegion, footRegion, legBaseRegion, baseJointRegion, outlineRegion; + softShadowRegion, jointRegion, footRegion, legBaseRegion, baseJointRegion, outlineRegion; public TextureRegion[] wreckRegions; protected @Nullable ItemStack[] cachedRequirements; @@ -351,7 +351,7 @@ public class UnitType extends UnlockableContent{ legBaseRegion = Core.atlas.find(name + "-leg-base", name + "-leg"); baseRegion = Core.atlas.find(name + "-base"); cellRegion = Core.atlas.find(name + "-cell", Core.atlas.find("power-cell")); - occlusionRegion = Core.atlas.find("circle-shadow"); + softShadowRegion = Core.atlas.find("circle-shadow"); outlineRegion = Core.atlas.find(name + "-outline"); shadowRegion = icon(Cicon.full); @@ -439,7 +439,7 @@ public class UnitType extends UnlockableContent{ drawPayload((Unit & Payloadc)unit); } - drawOcclusion(unit); + drawSoftShadow(unit); Draw.z(z - outlineSpace); @@ -501,11 +501,11 @@ public class UnitType extends UnlockableContent{ Draw.color(); } - public void drawOcclusion(Unit unit){ + public void drawSoftShadow(Unit unit){ Draw.color(0, 0, 0, 0.4f); float rad = 1.6f; float size = Math.max(region.width, region.height) * Draw.scl; - Draw.rect(occlusionRegion, unit, size * rad, size * rad); + Draw.rect(softShadowRegion, unit, size * rad, size * rad); Draw.color(); } @@ -580,8 +580,8 @@ public class UnitType extends UnlockableContent{ float wx = unit.x + Angles.trnsx(rotation, weapon.x, weapon.y) + Angles.trnsx(weaponRotation, 0, recoil), wy = unit.y + Angles.trnsy(rotation, weapon.x, weapon.y) + Angles.trnsy(weaponRotation, 0, recoil); - if(weapon.occlusion > 0){ - Drawf.shadow(wx, wy, weapon.occlusion); + if(weapon.shadow > 0){ + Drawf.shadow(wx, wy, weapon.shadow); } if(weapon.outlineRegion.found()){ diff --git a/core/src/mindustry/type/Weapon.java b/core/src/mindustry/type/Weapon.java index ec0c00da14..f98150c85d 100644 --- a/core/src/mindustry/type/Weapon.java +++ b/core/src/mindustry/type/Weapon.java @@ -50,8 +50,8 @@ public class Weapon{ public float x = 5f, y = 0f; /** random spread on the X axis */ public float xRand = 0f; - /** radius of occlusion drawn under the weapon; <0 to disable */ - public float occlusion = -1f; + /** radius of shadow drawn under the weapon; <0 to disable */ + public float shadow = -1f; /** fraction of velocity that is random */ public float velocityRnd = 0f; /** delay in ticks between shots */