From 3d98de34eb826b9b866a45e434e37265bf6b9ac1 Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 3 Jun 2020 12:19:27 -0400 Subject: [PATCH] Thermal -> AttributeSmelter --- .../production/silicon-crucible-top.png | Bin 0 -> 418 bytes .../blocks/production/silicon-crucible.png | Bin 0 -> 1882 bytes core/src/mindustry/content/Blocks.java | 4 ++-- ...rmalSmelter.java => AttributeSmelter.java} | 20 +++++++++--------- gradle.properties | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) create mode 100644 core/assets-raw/sprites/blocks/production/silicon-crucible-top.png create mode 100644 core/assets-raw/sprites/blocks/production/silicon-crucible.png rename core/src/mindustry/world/blocks/production/{ThermalSmelter.java => AttributeSmelter.java} (60%) diff --git a/core/assets-raw/sprites/blocks/production/silicon-crucible-top.png b/core/assets-raw/sprites/blocks/production/silicon-crucible-top.png new file mode 100644 index 0000000000000000000000000000000000000000..36cc10b0898c488ce7f1d12662d042d2d2f49467 GIT binary patch literal 418 zcmeAS@N?(olHy`uVBq!ia0y~yU`POA4mJh`hDS5XEf^RW7>k44ofy`glX=O&z!>A{ z;uumf=j~0$ASOcr)(a0fzf7u9+q>i*L-=L^cbBZRU*$FV%L9I#oUY{A&&U7)28)AB z8}?i6-#>4?ZCzDW=GS>qt$%YriqG}R5dL!QXncw0Le~>lkJi`x`}O(w?d{7;G#)Or zIuNTT{(t#>(+lexvbpbWXsKiMabr9x60jzoQG55?*>c=h*Ebkm6W{glQUAp!G6rqU z5iH??jA^@jm>IfcHYI!9-Kp~A)?fZ5@9qW{z5VrQcqL(|d%bXa;mYJA zk7ACCOt5m}IdS!~Rh1H##~WOCv{Iz{=alejNt#m|38iR z7&I=ui>})?*L(E_&Fb&ETRCTyRNW2go{*V*MEC2SK0n#~dkfk44ofy`glX=O&z%JtH z;uumf=WVQQj!dY4T)fj{jX(j3lhcHYPekNt2zWGjOm*=JTH-OWDP*CGh(qEjj-4jF zzAY<+0$Y?^yF@yds>D7~Q&&;C@U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kIiwHrYZGM~T9D!8d-g3g;t z&xrx0_qGO3=w|8r#2a*}W8v=WVG%xs+diM0davZ=IXTOf&zV&&cPu^S)o8^yDf38B z>QaZP4MCSXROg0YoAQLG+E95x;u($%iB&99X1VFS+;c^jp?KqsZk^CDu1zJ53%g_Q z-%xSgx%AYdq<78zdj3X9>lCm5Ih3Tk==ZBvQ*YJ%*5f=Y6Lh&_vZM@B^ck1qk z1xw=VG^>Lq;Rju^B~2Ulcu;lKDv`_mWszR6;;L1U@ftZr4t?m zPjQhlRGZCwlHJmSWsX&`oy0uvNeVOFrc^DGSBRVAy;df3kImdDzjM0&<%y-as+FE5 z%w?5TrCNtrZ+~&-_bzViUAA$ijt=MEx4JXpBYf&&R#|Ozh&`r$lKsgXr)yry%k1=~ zM#+hRX>-p^3la}J8f~ME3 zxfYtTFg)>Aex|Z86v9wi7{TPUd4-D*FCJV=NVW(*iq7u8g zPo0Xt8RmN?P&Z-1qXR#bp82;-3vs7woI}z z^jQ1JsdlP2$CDa|oT~+1C|pC^w5XWZQZuwXQ2k9)iHOWm3Ux(p;b-*d~=YOWXX8TQ(|LDmxFfcH9y85}Sb4q9e0Jzv%zW@LL literal 0 HcmV?d00001 diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 2a5bb80e56..e01f969822 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -485,7 +485,7 @@ public class Blocks implements ContentList{ consumes.power(0.50f); }}; - siliconCrucible = new ThermalSmelter("silicon-crucible"){{ + siliconCrucible = new AttributeSmelter("silicon-crucible"){{ requirements(Category.crafting, ItemStack.with(Items.titanium, 120, Items.metaglass, 80, Items.plastanium, 35, Items.silicon, 60)); craftEffect = Fx.smeltsmoke; outputItem = new ItemStack(Items.silicon, 5); @@ -495,7 +495,7 @@ public class Blocks implements ContentList{ hasLiquids = false; flameColor = Color.valueOf("ffef99"); itemCapacity = 30; - heatBoostScale = 0.15f; + boostScale = 0.15f; consumes.items(new ItemStack(Items.coal, 3), new ItemStack(Items.sand, 6), new ItemStack(Items.pyratite, 1)); consumes.power(4f); diff --git a/core/src/mindustry/world/blocks/production/ThermalSmelter.java b/core/src/mindustry/world/blocks/production/AttributeSmelter.java similarity index 60% rename from core/src/mindustry/world/blocks/production/ThermalSmelter.java rename to core/src/mindustry/world/blocks/production/AttributeSmelter.java index 2769ffc640..be61e1ab7a 100644 --- a/core/src/mindustry/world/blocks/production/ThermalSmelter.java +++ b/core/src/mindustry/world/blocks/production/AttributeSmelter.java @@ -5,21 +5,21 @@ import mindustry.graphics.*; import mindustry.ui.*; import mindustry.world.meta.*; -/** A smelter that gains efficiency from heat tiles. */ -public class ThermalSmelter extends GenericSmelter{ +/** A smelter that gains efficiency from attribute tiles. */ +public class AttributeSmelter extends GenericSmelter{ public Attribute attribute = Attribute.heat; public float baseEfficiency = 1f; - public float heatBoostScale = 1f; + public float boostScale = 1f; public float maxHeatBoost = 1f; - public ThermalSmelter(String name){ + public AttributeSmelter(String name){ super(name); } @Override public void drawPlace(int x, int y, int rotation, boolean valid){ drawPlaceText(Core.bundle.format("bar.efficiency", - (int)((baseEfficiency + Math.min(maxHeatBoost, heatBoostScale * sumAttribute(attribute, x, y))) * 100f)), x, y, valid); + (int)((baseEfficiency + Math.min(maxHeatBoost, boostScale * sumAttribute(attribute, x, y))) * 100f)), x, y, valid); } @Override @@ -37,22 +37,22 @@ public class ThermalSmelter extends GenericSmelter{ public void setStats(){ super.setStats(); - stats.add(BlockStat.tiles, attribute, heatBoostScale); + stats.add(BlockStat.tiles, attribute, boostScale); } - public class HeatedSmelterEntity extends SmelterEntity{ - public float heat = 0.0f; + public class AttributeSmelterEntity extends SmelterEntity{ + public float attrsum; @Override public float efficiency(){ - return (baseEfficiency + Math.min(maxHeatBoost, heatBoostScale * heat)) * super.efficiency(); + return (baseEfficiency + Math.min(maxHeatBoost, boostScale * attrsum)) * super.efficiency(); } @Override public void placed(){ super.placed(); - heat = sumAttribute(attribute, tile.x, tile.y); + attrsum = sumAttribute(attribute, tile.x, tile.y); } } } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 034844c294..6d96d5473a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=aa4a38bc30126833c245cd07cab0f19ebb43e10c +archash=1fc9e8ef5ecca01e058eab1ff4d7fd673aa5431d