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!ia0vp^2_VeD1|%QND7OGojKx9jP7LeL$-D%zV?13PLn`LH zz3CXlWGKLT;Q{BDNmXilm)v6r-z?znl9l$Wye5Bnz>kyDl|1_yfx1D!U~zD1!+xv% z`{%86M+@wr|Z!e6c(jW5w$=z8Mn(fXQyzdj$oy?uF!#>0hH2V(Wa z|1ZC9dSQJ-Huv2PEp@CuZj47o0@lPcYVV#qTaNqc`Ub;m;=3L`>c99z#-Ob^f+bv# zF>QAbGeeimreu%1J5`?C`pduM-QD1#x4#~(Tz-8?%$gZ(%$mBZ#M+U<5YyFBgY|a^A{# y#^fpeg4;#*`^Q;yuoj34CTu$m3Skgvu&iae(>cT8^u1O0KzvVEKbLh*2~7Z$wy{G1 literal 0 HcmV?d00001 diff --git a/core/assets-raw/sprites/blocks/production/silicon-crucible.png b/core/assets-raw/sprites/blocks/production/silicon-crucible.png new file mode 100644 index 0000000000000000000000000000000000000000..9e0f352606c2e9b1867abc455092cb4dfe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w6`wpc!o0LV#Cs1^B?!v{f55SN>5q#q8Nwx#D6_nykC1pvIVEo6#35Q6aDj&do zvAylB+Mf@0I#Ys#kSy$ZNs&->-nCJXiv*7H4N}sGp}W^sSWI!Y^Ujstbm`6>IjQFZ zB-4nc%1VJc0g`FNQe~w;m4H&yh$Wp@)|BK7dod%RVay0<7^(!6nnoXq7l`z{I198%MWso5~B zEXsM=*Jo$OUVZ)T$>+OwZaOn!)o6G^fN#8OS4G4KaGfL;t~8=#N-|ZJ>$-dd#Hu1{ zlW~|}gR%q+w;bFxQ6`y^Op!&osW7@S#O-?q{`n+y;K4(OCZE3__Tlfp{;cg^JnHTz zN5c_xUw$ciB31Yl^v7?%!{KL-G$t#A!FP{p-@pB)SNne8z`@{eRWo9gY*Os*^ws;g zAer9OhI&d8(;Z<(8$p<+|1e`i^J{X=$k|3EzlzO5cAYPnHtsH5*Je^uj&Mi-OVRdaKc}X+_c6oYr zD#8WZ^g|CzbAgSfv6(C^3BBztm|s{-eq5?LwLo3QC&>rooI=)0Bc?tsm0BO#isD>t za7iepIF~{~sn775=N>M-_hHs{v!^6WwwPltzLI@O=GNqdbEOeA);kKJH3R_UOC#na zp;ZI`($G;6mvnNH0?sA|dOV07*qoM6N<$g1FdPzW@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