Campaign changes

This commit is contained in:
Anuken
2020-11-13 11:33:31 -05:00
parent 4e7d6e9a9d
commit 0908176079
76 changed files with 137 additions and 49 deletions
Binary file not shown.
+2
View File
@@ -0,0 +1,2 @@
mschxś-ŃŠ! EouÔŮťBŰÇ~„/ý#™†Ept_mÁăą W…)‡Ť0םÖĆôŔň¤şrÜ[,pp˙ÜZl!ÇcókÉ/z†ĺr4bÜjIý2%ß_„%…Jěźmľ–W‚©!˝
€;pęGŹk…VNf żJjŞ›ŇĐ8ŹPK¨G8&~m3bfŘÔçźqkľˇ•'ćÄća¦ăbú/(Ű×[¨=[)»
+1
View File
@@ -0,0 +1 @@
mschxM‘Ϋn„ E7^ΖλΎφ"JƒΨi?ΎµηΐKCdλή$β•S›Ζp(·Ύ³ο–’U ΕΡxoU»rΪJ>hΔD½ΙΓaΡ*κ υW j‰>ΰξύ—N»Ση¦ΆYδµδv’ώ©©»xeεΆ] ζύ$ν9¨97Ήxχ©ΏIαόIθw^‘Ξ―jωµΣa¬΅IylΪςπTΎJ”5¨RPDuΎ*ΟΤάhΈQήA4©‘P3n,ΗEF Ρ‚WP·Υυ‹‚ΎκϊΉ.MSΠ“εδ ²lθ$>g-JF—qΟΕGΖΔhι$t}Ζ1ς«ZΪ+XγΞF}Ζΐθω―r6fι1K%†T
+2
View File
@@ -0,0 +1,2 @@
mschxś-Ź[nĂ EŻń;nÓ8űŕ«+Bö(BÂ`i”˝'qăŻ3sď!pÁU ˛j!taĄ)zúĹ0SĽ^Łv␍ÍٞúľČÉŮ?z:Ź18ŁĽ\•%#yşët[ČF\V÷ /­›é¨Ł'ł×Ć`Đ‘ÜÝO`
|C¨p†hxßQĄ°NaÁŰŽ6+}Vú¤”čpJ]—•>ă”1$TřBÓ•Ű{űl/ľa·¬ůÍ3Š?kţ­ř”4A
Binary file not shown.
Binary file not shown.
+2
View File
@@ -0,0 +1,2 @@
mschxśMŤÍ „géÄj˘'ź˘ß[bL*4c|{gCB`vg?á Úč_vńq
ů†aŰ”źky¦8 [Z|WĂ‚ľR8Ý})!ç5}BcšĂî4>O°;ĹŚ7ͱ(…Ë_ŕNW4Ü\m•®JŹF ¬ĹŔ°“†"®btk! Ęho:v]5ůBëNÉľćŇ=Nôw–6‡¶;í,tŚJ óÁ,;
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,2 +0,0 @@
mschxœMŽan„ Š®ºmMÿöŠètC‚`ºí‰{Š]:àŸ& ïñ˜¤Óázh·ª`öÝÒWiS‡Oa!Ìw)(úŽA/ѼzcÿÉyw”6Í¢Ö`¬å^)ÜHE'¾]¼¶j!ƒùL7Â{4Q;“6µx÷E?Ü¡L{y¢œ_‰½ú̇±†“êØÈ–ðÁ…¶$ÊŽ†ˆ¶êj7CÃn‹6ÿŠŽõѳ!Ot-G+ĉæë oíÀè†.?ó£dò␍—Ìœkr/‰Ô8N4@Ϩƒd41úSq± c%
ÆÄÉM
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
mschxśMŹkNě0 …OÓ6íL°üa)ě ´Ö©MJšňX;‚Á®ď•Hä|Ž}l'8ŕ¶@ú™pőä—e˘‡üâĂů„váŤ>cÂi ´Í}ö“ź&Ü­qę“[ú@“cďL°3…‘î‡8?okö1¸3J}ćÍsź3ĄO—řNÉ…8şy›˛wK˘u…MűpfÜX‰Ó{Ďpô‘S?ě-ř9ăć3ş?ĂŃůLł[ă–Âőä_7?ş-€Gč*v+%o^5`8Ô˘t˙E;jQßhťŃ:ŁąR•ĄÜ$nQVŚEÍh!ÚćraűBņËŰwŮ y-ăF:U:şâc‡Q”ŠJQ+,ŠŁ‘é•<^p@qd÷é¸b4ŠV,ąćŚ©ĺă{»ĘŞĘŞĘ˛Ę´ęPŃhżF•ŤüMŔ#%ČĘŽ}+7)ŮÁą>8÷ ÚßWI
@@ -0,0 +1 @@
mschxœ%]! öOã³gØC$‘DÀ°`âím)ý˜a†âŠMÁd—¶Ó¿Br-z‹åô®µPqo±¹{:|Éßð+·O}äŽgï7.±…tœ¥W0×Ò¹<0Žâa 4Ý5Ã@kL¤câ7#Q 2 VâJ†e_FØJز­0Kgµ°`(L#ß-TÑ´Bz›˜;%ÉÜIiVù
@@ -0,0 +1 @@
mschxś=ŃÍŽ›0†áăŹĂßĘt™ŕ:şęŞWŕÉXٍ DŕĚĎťw×ÚĽRĹâáűŹŕ µ|ĎDOîÍËÓO·®×wţĽ{;˙đÓů6ş))ź]F·Ľz9®sĽnnňŁÔ.>ügXÜ%Ě‹”·ű¸úá2O/÷k{ąŹáúîŇŁzM“‡W?ůe+šŰüOó‹˙?űBęEä·HŻ]BĂ,”ĐŔ zŮmgd;š‰¨"iŘSć$”–T@IYx¤lI|ŁěyY 4ěÁŔPBŹĐÁ6zźf¦WW°ŁÔ¤”†dáHY*¨)R 'ĘŽÔĂ“l«R°ÔĐ z3u: qo MĘI†dI©"5¤–ÔA/jź–*YB X( Zč —LĄĎr0`ÓęŽif˘‚Zč ® ŹżŰěďźxčďm’şŢúµĎ?č
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
mschxśMPŰnë |IâKëćáüÄ‘řŠJçú!›VH,Ś›ćŰ›w­w–™ťÝĹ8â±@ĺÔYăĎéĹ™xú§ĆčĂőôÔĹę€nŇËĚŤwŔäڵčLÔgąř5ŚĂEE*ú#†{ ‹±fôN.gm)áMTάgIö]_YÓŽ«Ťć]Ąún™}ĐrzY0Ś^Y9jy]ß4ÚŮ_ŘŢůIăń-řŐMň5/K§·*ČY9mqüu‘Ěč}šŐŐz5ýĚţ{‚ůC␍T˘ !P– ␍ď(СdAYV„
"A␍±#ěPě ‰ě’/ťâŔPšmŰľ ¶ŻmCɬ`v#÷Iî“ĚŤ\U&Ă}TťGŐyTťűÔŘŞíFďzŔŹô]nŇ&5Z†{ôé%‚Ö}zEË•Ę \¬CŞ@>­gčA_“%(3T ÚL¶™lł˝Oż!Á˘»7=Ň!9dmČÚµ!iߌTys
Binary file not shown.
@@ -0,0 +1,3 @@
mschxœ%Žknà „ÇØIü¨äV9×È␍ú;¢xS!a@€“úîMÝ%F¬¾Ñ>fzÆ©™p¾~:“¯¥}ŽëõbU$ %MÈÆ;à␍ãCeŠ’~rT:ûˆ^/6›»*ú#yA9²’Õ7ϧà#É)%ŒÚ++5¹Ímáꘌ5Ú;™f²ì‹18Zf•–S4Öb0™f™ü5áô¥2w­èƒðÎO„÷ VëÕ$ÙçN+Ÿ1(åíuÞ
àŒýU¢ü
mIŠR«uâ80ŽGF‹úÄ©2ш–U…º€›;FÝÖÛßöÜ~·'§ÇbØ3xb`´ÕË_ Û ݾ¼+Ëÿ©•UÊ
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
mschxœ%] „‡ŸÖ³øàm|3U‰i¢­ÁãíevJš& »1zÄezVŒó}9¿×ÇÔNØßêûÚæ×6¯ /Ó¶ÕöÃއ״ÔGŸv¯‡mýÖà}N?Qäì¨Ìv¶1x™Y(„%½"ž"ÈLBfÒ³´ë' }! vCd•Þ*bLðŽAªA*éM‰õˆ( IÕ²Ì|¤’™Ìz!''x™Y(L–Þµ³!Á&`Íï8šÝþ Ú
@@ -0,0 +1 @@
mschxśEĎmjĂ0 ŕ×ůtÚ´ěů»Ó F–ÎŘĹi»ŃnŮIcóX‘,ËxAŻaă¸zśĂ-ľoa˝/~ŢÓ7űmĘáţ)5 ýE=ĄřĺżSF™ÓţđnKˇűý‚ţ#‡ůć‡˙ŞŐÇ™«ÂĂŻĂ–ö<y\V?}Ž1Lă2Ě9, €WZhˇ'tPŠv-´& G´F#PNN8ń9Ť3HÎ*ĆV(„R¨ ,QWĎ®§ŢA˝9éŞçóůFëÇđJ'jOWYÚkľˇގ,␍u䎡¬T\É´<g!sÔ“r%ç@´Ô—pBÇĎ®ä\-4B+8ˇN™) [đł*ôŚ"č?G†ŻĽHt•Üő/˘Ü/ĐG6‹
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
mschxœ%ÎÝ0 à³EÑK_;ßÇhp lËFßÞÎ^,_Û%§Eƒ›†õÃJ¸¹Ù?_ƒ[>ìÖ¸Ú‰ò˜\Ü\ð@␍[~qžöuØÜØOÉ- êöš1ø7}CB7§!¾ÜF}L”3Z.×>‡=àΔ‚âBk¦ƒs…2\qg`¸W-Á
•P ¡ŽÂIh…3”e.e-k+Î0Pé’Öñ„ÓþwÔåp(ßøžx&
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+7
View File
@@ -537,6 +537,12 @@ sectors.nonelaunch = [lightgray]none (sun)
sectors.rename = Rename Sector sectors.rename = Rename Sector
sector.missingresources = [scarlet]Insufficient Core Resources sector.missingresources = [scarlet]Insufficient Core Resources
threat.low = Low
threat.medium = Medium
threat.high = High
threat.extreme = Extreme
threat.eradication = Eradication
planet.serpulo.name = Serpulo planet.serpulo.name = Serpulo
#TODO better name #TODO better name
planet.sun.name = Sun planet.sun.name = Sun
@@ -554,6 +560,7 @@ sector.overgrowth.name = Overgrowth
sector.tarFields.name = Tar Fields sector.tarFields.name = Tar Fields
sector.saltFlats.name = Salt Flats sector.saltFlats.name = Salt Flats
sector.fungalPass.name = Fungal Pass sector.fungalPass.name = Fungal Pass
sector.biomassResearchFacility.name = Biomass Research Facility
#unused #unused
#sector.crags.name = Crags #sector.crags.name = Crags
Binary file not shown.
Binary file not shown.
Binary file not shown.
+3 -3
View File
@@ -1179,7 +1179,7 @@ public class Blocks implements ContentList{
size = 2; size = 2;
floating = true; floating = true;
ambientSound = Sounds.hum; ambientSound = Sounds.hum;
ambientSoundVolume = 0.04f; ambientSoundVolume = 0.06f;
}}; }};
steamGenerator = new BurnerGenerator("steam-generator"){{ steamGenerator = new BurnerGenerator("steam-generator"){{
@@ -1217,13 +1217,13 @@ public class Blocks implements ContentList{
solarPanel = new SolarGenerator("solar-panel"){{ solarPanel = new SolarGenerator("solar-panel"){{
requirements(Category.power, with(Items.lead, 10, Items.silicon, 15)); requirements(Category.power, with(Items.lead, 10, Items.silicon, 15));
powerProduction = 0.07f; powerProduction = 0.08f;
}}; }};
largeSolarPanel = new SolarGenerator("solar-panel-large"){{ largeSolarPanel = new SolarGenerator("solar-panel-large"){{
requirements(Category.power, with(Items.lead, 100, Items.silicon, 145, Items.phaseFabric, 15)); requirements(Category.power, with(Items.lead, 100, Items.silicon, 145, Items.phaseFabric, 15));
size = 3; size = 3;
powerProduction = 0.95f; powerProduction = 1f;
}}; }};
thoriumReactor = new NuclearReactor("thorium-reactor"){{ thoriumReactor = new NuclearReactor("thorium-reactor"){{
+1
View File
@@ -358,6 +358,7 @@ public class Bullets implements ContentList{
shootEffect = Fx.shootBig; shootEffect = Fx.shootBig;
pierceCap = 2; pierceCap = 2;
pierceBuilding = true; pierceBuilding = true;
knockback = 0.7f;
}}; }};
standardIncendiaryBig = new BasicBulletType(7f, 60, "bullet"){{ standardIncendiaryBig = new BasicBulletType(7f, 60, "bullet"){{
@@ -8,7 +8,7 @@ import static mindustry.content.Planets.*;
public class SectorPresets implements ContentList{ public class SectorPresets implements ContentList{
public static SectorPreset public static SectorPreset
groundZero, groundZero,
craters, frozenForest, ruinousShores, stainedMountains, tarFields, fungalPass, craters, biomassFacility, frozenForest, ruinousShores, stainedMountains, tarFields, fungalPass,
saltFlats, overgrowth, saltFlats, overgrowth,
impact0078, desolateRift, nuclearComplex; impact0078, desolateRift, nuclearComplex;
@@ -31,6 +31,11 @@ public class SectorPresets implements ContentList{
difficulty = 2; difficulty = 2;
}}; }};
biomassFacility = new SectorPreset("biomassResearchFacility", serpulo, 81){{
captureWave = 20;
difficulty = 3;
}};
craters = new SectorPreset("craters", serpulo, 18){{ craters = new SectorPreset("craters", serpulo, 18){{
captureWave = 20; captureWave = 20;
difficulty = 2; difficulty = 2;
@@ -50,7 +55,7 @@ public class SectorPresets implements ContentList{
difficulty = 4; difficulty = 4;
}}; }};
overgrowth = new SectorPreset("overgrowth", serpulo, 22){{ overgrowth = new SectorPreset("overgrowth", serpulo, 134){{
difficulty = 5; difficulty = 5;
}}; }};
+19 -12
View File
@@ -115,7 +115,7 @@ public class TechTree implements ContentList{
node(Items.titanium, with(Items.graphite, 3000, Items.copper, 7000, Items.lead, 7000), () -> { node(Items.titanium, with(Items.graphite, 3000, Items.copper, 7000, Items.lead, 7000), () -> {
node(pneumaticDrill, () -> { node(pneumaticDrill, () -> {
node(Items.sporePod, with(Items.coal, 4000, Items.graphite, 4000, Items.lead, 4000), () -> { node(Items.sporePod, with(Items.coal, 4000, Items.graphite, 4000, Items.lead, 4000), () -> {
node(cultivator, () -> { node(cultivator, Seq.with(new SectorComplete(biomassFacility)), () -> {
}); });
}); });
@@ -524,24 +524,31 @@ public class TechTree implements ContentList{
}); });
}); });
node(stainedMountains, Seq.with( node(biomassFacility, Seq.with(
new SectorComplete(frozenForest), new SectorComplete(frozenForest),
new Research(pneumaticDrill),
new Research(powerNode), new Research(powerNode),
new Research(steamGenerator) new Research(steamGenerator),
new Research(scatter),
new Research(graphitePress)
), () -> { ), () -> {
node(fungalPass, Seq.with( node(stainedMountains, Seq.with(
new SectorComplete(stainedMountains), new SectorComplete(biomassFacility),
new Research(groundFactory), new Research(pneumaticDrill),
new Research(door),
new Research(siliconSmelter) new Research(siliconSmelter)
), () -> { ), () -> {
node(nuclearComplex, Seq.with( node(fungalPass, Seq.with(
new SectorComplete(fungalPass), new SectorComplete(stainedMountains),
new Research(thermalGenerator), new Research(groundFactory),
new Research(laserDrill) new Research(door),
new Research(siliconSmelter)
), () -> { ), () -> {
node(nuclearComplex, Seq.with(
new SectorComplete(fungalPass),
new Research(thermalGenerator),
new Research(laserDrill)
), () -> {
});
}); });
}); });
}); });
+7
View File
@@ -80,6 +80,13 @@ public class Logic implements ApplicationListener{
state.wavetime = state.rules.waveSpacing; state.wavetime = state.rules.waveSpacing;
SectorDamage.applyCalculatedDamage(); SectorDamage.applyCalculatedDamage();
//make sure damaged buildings are counted
for(Tile tile : world.tiles){
if(tile.build != null && tile.build.damaged()){
indexer.notifyTileDamaged(tile.build);
}
}
} }
//reset values //reset values
@@ -381,7 +381,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
} }
//remove units spawned by the core //remove units spawned by the core
if(spawnedByCore && !isPlayer()){ if(spawnedByCore && !isPlayer() && !dead){
Call.unitDespawn(self()); Call.unitDespawn(self());
} }
} }
+1 -1
View File
@@ -124,7 +124,7 @@ public class SectorInfo{
//assign new wave patterns when the version changes //assign new wave patterns when the version changes
if(waveVersion != Waves.waveVersion && state.rules.sector.preset == null){ if(waveVersion != Waves.waveVersion && state.rules.sector.preset == null){
state.rules.spawns = Waves.generate(state.rules.sector.baseCoverage); state.rules.spawns = Waves.generate(state.rules.sector.threat);
} }
CoreBuild entity = state.rules.defaultTeam.core(); CoreBuild entity = state.rules.defaultTeam.core();
+3 -3
View File
@@ -285,7 +285,7 @@ public class Waves{
for(int i = start; i < cap;){ for(int i = start; i < cap;){
int f = i; int f = i;
int next = rand.random(8, 16) + curTier * 4; int next = rand.random(8, 16) + (int)Mathf.lerp(4f, 0f, difficulty) + curTier * 4;
float shieldAmount = Math.max((i - shieldStart) * shieldsPerWave, 0); float shieldAmount = Math.max((i - shieldStart) * shieldsPerWave, 0);
int space = start == 0 ? 1 : rand.random(1, 2); int space = start == 0 ? 1 : rand.random(1, 2);
@@ -296,8 +296,8 @@ public class Waves{
unitAmount = f == start ? 1 : 6 / (int)scaling[ctier]; unitAmount = f == start ? 1 : 6 / (int)scaling[ctier];
begin = f; begin = f;
end = f + next >= cap ? never : f + next; end = f + next >= cap ? never : f + next;
max = 14; max = 13;
unitScaling = (difficulty < 0.4f ? rand.random(2f, 4f) : rand.random(1f, 3f)) * scaling[ctier]; unitScaling = (difficulty < 0.4f ? rand.random(2.5f, 4f) : rand.random(1f, 4f)) * scaling[ctier];
shields = shieldAmount; shields = shieldAmount;
shieldScaling = shieldsPerWave; shieldScaling = shieldsPerWave;
spacing = space; spacing = space;
@@ -401,7 +401,6 @@ public class DesktopInput extends InputHandler{
ui.schematics.hide(); ui.schematics.hide();
}else{ }else{
ui.schematics.show(); ui.schematics.show();
ui.schematics.focusSearchField();
} }
} }
@@ -13,6 +13,7 @@ import mindustry.gen.*;
import mindustry.type.*; import mindustry.type.*;
import mindustry.world.*; import mindustry.world.*;
import mindustry.world.blocks.defense.*; import mindustry.world.blocks.defense.*;
import mindustry.world.blocks.distribution.*;
import mindustry.world.blocks.power.*; import mindustry.world.blocks.power.*;
import mindustry.world.blocks.production.*; import mindustry.world.blocks.production.*;
import mindustry.world.meta.*; import mindustry.world.meta.*;
@@ -38,9 +39,6 @@ public class BaseGenerator{
Mathf.rand.setSeed(sector.id); Mathf.rand.setSeed(sector.id);
//TODO limit base size
float costBudget = 1000;
Seq<Block> wallsSmall = content.blocks().select(b -> b instanceof Wall && b.size == 1 && b.buildVisibility == BuildVisibility.shown && !(b instanceof Door)); Seq<Block> wallsSmall = content.blocks().select(b -> b instanceof Wall && b.size == 1 && b.buildVisibility == BuildVisibility.shown && !(b instanceof Door));
Seq<Block> wallsLarge = content.blocks().select(b -> b instanceof Wall && b.size == 2 && b.buildVisibility == BuildVisibility.shown && !(b instanceof Door)); Seq<Block> wallsLarge = content.blocks().select(b -> b instanceof Wall && b.size == 2 && b.buildVisibility == BuildVisibility.shown && !(b instanceof Door));
@@ -51,10 +49,12 @@ public class BaseGenerator{
//TODO proper difficulty selection //TODO proper difficulty selection
float bracket = difficulty; float bracket = difficulty;
float bracketRange = 0.2f; float bracketRange = 0.2f;
float baseChance = Mathf.lerp(0.7f, 1.9f, difficulty);
int wallAngle = 70; //180 for full coverage int wallAngle = 70; //180 for full coverage
double resourceChance = 0.5; double resourceChance = 0.5 * baseChance;
double nonResourceChance = 0.0005; double nonResourceChance = 0.0005 * baseChance;
BasePart coreschem = bases.cores.getFrac(bracket); BasePart coreschem = bases.cores.getFrac(bracket);
int passes = difficulty < 0.4 ? 1 : difficulty < 0.8 ? 2 : 3;
Block wall = wallsSmall.getFrac(bracket), wallLarge = wallsLarge.getFrac(bracket); Block wall = wallsSmall.getFrac(bracket), wallLarge = wallsLarge.getFrac(bracket);
@@ -69,20 +69,22 @@ public class BaseGenerator{
} }
} }
//random schematics for(int i = 0; i < passes; i++){
pass(tile -> { //random schematics
if(!tile.block().alwaysReplace) return; pass(tile -> {
if(!tile.block().alwaysReplace) return;
if(((tile.overlay().asFloor().itemDrop != null || (tile.drop() != null && Mathf.chance(nonResourceChance))) if(((tile.overlay().asFloor().itemDrop != null || (tile.drop() != null && Mathf.chance(nonResourceChance)))
|| (tile.floor().liquidDrop != null && Mathf.chance(nonResourceChance * 2))) && Mathf.chance(resourceChance)){ || (tile.floor().liquidDrop != null && Mathf.chance(nonResourceChance * 2))) && Mathf.chance(resourceChance)){
Seq<BasePart> parts = bases.forResource(tile.drop() != null ? tile.drop() : tile.floor().liquidDrop); Seq<BasePart> parts = bases.forResource(tile.drop() != null ? tile.drop() : tile.floor().liquidDrop);
if(!parts.isEmpty()){ if(!parts.isEmpty()){
tryPlace(parts.getFrac(bracket + Mathf.range(bracketRange)), tile.x, tile.y, team); tryPlace(parts.getFrac(bracket + Mathf.range(bracketRange)), tile.x, tile.y, team);
}
}else if(Mathf.chance(nonResourceChance)){
tryPlace(bases.parts.getFrac(bracket + Mathf.range(bracketRange)), tile.x, tile.y, team);
} }
}else if(Mathf.chance(nonResourceChance)){ });
tryPlace(bases.parts.getFrac(bracket + Mathf.range(bracketRange)), tile.x, tile.y, team); }
}
});
//replace walls with the correct type (disabled) //replace walls with the correct type (disabled)
if(false) if(false)
@@ -100,6 +102,15 @@ public class BaseGenerator{
if(tile.block().alwaysReplace){ if(tile.block().alwaysReplace){
boolean any = false; boolean any = false;
for(Point2 p : Geometry.d4){
Tile o = tiles.get(tile.x + p.x, tile.y + p.y);
//do not block payloads
if(o != null && (o.block() instanceof PayloadConveyor || o.block() instanceof PayloadAcceptor)){
return;
}
}
for(Point2 p : Geometry.d8){ for(Point2 p : Geometry.d8){
if(Angles.angleDist(Angles.angle(p.x, p.y), spawn.angleTo(tile)) > wallAngle){ if(Angles.angleDist(Angles.angle(p.x, p.y), spawn.angleTo(tile)) > wallAngle){
continue; continue;
@@ -19,7 +19,7 @@ public abstract class PlanetGenerator extends BasicGenerator implements HexMeshe
boolean any = false; boolean any = false;
float noise = Noise.snoise3(tile.v.x, tile.v.y, tile.v.z, 0.001f, 0.5f); float noise = Noise.snoise3(tile.v.x, tile.v.y, tile.v.z, 0.001f, 0.5f);
if(noise > 0.028){ if(noise > 0.027){
any = true; any = true;
} }
@@ -232,6 +232,10 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
ores.add(Blocks.oreThorium); ores.add(Blocks.oreThorium);
} }
if(rand.chance(0.25)){
ores.add(Blocks.oreScrap);
}
FloatSeq frequencies = new FloatSeq(); FloatSeq frequencies = new FloatSeq();
for(int i = 0; i < ores.size; i++){ for(int i = 0; i < ores.size; i++){
frequencies.add(rand.random(-0.09f, 0.01f) - i * 0.01f); frequencies.add(rand.random(-0.09f, 0.01f) - i * 0.01f);
@@ -250,6 +254,10 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
break; break;
} }
} }
if(ore == Blocks.oreScrap && rand.chance(0.33)){
floor = Blocks.metalFloorDamaged;
}
}); });
trimDark(); trimDark();
@@ -326,7 +334,7 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
} }
}); });
float difficulty = sector.baseCoverage; float difficulty = sector.threat;
ints.clear(); ints.clear();
ints.ensureCapacity(width * height / 4); ints.ensureCapacity(width * height / 4);
@@ -417,7 +425,11 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
state.rules.winWave = sector.info.winWave = 10 + 5 * (int)Math.max(difficulty * 10, 1); state.rules.winWave = sector.info.winWave = 10 + 5 * (int)Math.max(difficulty * 10, 1);
} }
float waveTimeDec = 0.4f;
state.rules.waveSpacing = Mathf.lerp(60 * 65 * 2, 60f * 60f * 1f, Math.max(difficulty - waveTimeDec, 0f) / 0.8f);
state.rules.waves = sector.info.waves = true; state.rules.waves = sector.info.waves = true;
state.rules.enemyCoreBuildRadius = 600f;
//TODO better waves //TODO better waves
state.rules.spawns = Waves.generate(difficulty); state.rules.spawns = Waves.generate(difficulty);
+1 -1
View File
@@ -186,7 +186,7 @@ public class Planet extends UnlockableContent{
sum += 2f; sum += 2f;
} }
sector.baseCoverage = sector.preset == null ? Mathf.clamp(sum / 5f) : Mathf.clamp(sector.preset.difficulty / 10f); sector.threat = sector.preset == null ? Mathf.clamp(sum / 5f) : Mathf.clamp(sector.preset.difficulty / 10f);
} }
} }
+12 -1
View File
@@ -2,6 +2,8 @@ package mindustry.type;
import arc.*; import arc.*;
import arc.func.*; import arc.func.*;
import arc.graphics.*;
import arc.math.*;
import arc.math.geom.*; import arc.math.geom.*;
import arc.struct.*; import arc.struct.*;
import arc.util.*; import arc.util.*;
@@ -28,7 +30,7 @@ public class Sector{
public SectorInfo info = new SectorInfo(); public SectorInfo info = new SectorInfo();
/** Number 0-1 indicating the difficulty based on nearby bases. */ /** Number 0-1 indicating the difficulty based on nearby bases. */
public float baseCoverage; public float threat;
public boolean generateEnemyBase; public boolean generateEnemyBase;
public Sector(Planet planet, Ptile tile){ public Sector(Planet planet, Ptile tile){
@@ -54,6 +56,15 @@ public class Sector{
} }
} }
/** Displays threat as a formatted string. */
public String displayThreat(){
float step = 0.25f;
String color = Tmp.c1.set(Color.white).lerp(Color.scarlet, Mathf.round(threat, step)).toString();
String[] threats = {"low", "medium", "high", "extreme", "eradication"};
int index = Math.min((int)(threat / step), threats.length - 1);
return "[#" + color + "]" + Core.bundle.get("threat." + threats[index]);
}
/** @return whether this sector can be landed on at all. /** @return whether this sector can be landed on at all.
* Only sectors adjacent to non-wave sectors can be landed on. */ * Only sectors adjacent to non-wave sectors can be landed on. */
public boolean unlocked(){ public boolean unlocked(){
@@ -153,9 +153,9 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
public void renderSectors(Planet planet){ public void renderSectors(Planet planet){
//draw all sector stuff //draw all sector stuff
if(!debugSelect && selectAlpha > 0.01f){ if(selectAlpha > 0.01f){
for(Sector sec : planet.sectors){ for(Sector sec : planet.sectors){
if(canSelect(sec) || sec.unlocked()){ if(canSelect(sec) || sec.unlocked() || debugSelect){
Color color = Color color =
sec.hasBase() ? Tmp.c2.set(Team.sharded.color).lerp(Team.crux.color, sec.hasEnemyBase() ? 0.5f : 0f) : sec.hasBase() ? Tmp.c2.set(Team.sharded.color).lerp(Team.crux.color, sec.hasEnemyBase() ? 0.5f : 0f) :
@@ -389,7 +389,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
stable.add(sector.save != null ? sector.save.getPlayTime() : "@sectors.unexplored").row(); stable.add(sector.save != null ? sector.save.getPlayTime() : "@sectors.unexplored").row();
if(sector.isAttacked() || !sector.hasBase()){ if(sector.isAttacked() || !sector.hasBase()){
stable.add("[accent]Difficulty: " + (int)(sector.baseCoverage * 10)).row(); stable.add("[accent]Threat: " + sector.displayThreat()).row();
} }
//TODO put most info in submenu //TODO put most info in submenu
@@ -283,6 +283,17 @@ public class SchematicsDialog extends BaseDialog{
Core.scene.setKeyboardFocus(searchField); Core.scene.setKeyboardFocus(searchField);
} }
@Override
public Dialog show(){
super.show();
if(Core.app.isDesktop()){
focusSearchField();
}
return this;
}
public static class SchematicImage extends Image{ public static class SchematicImage extends Image{
public float scaling = 16f; public float scaling = 16f;
public float thickness = 4f; public float thickness = 4f;
@@ -16,7 +16,7 @@ public class GenericSmelter extends GenericCrafter{
public GenericSmelter(String name){ public GenericSmelter(String name){
super(name); super(name);
ambientSound = Sounds.smelter; ambientSound = Sounds.smelter;
ambientSoundVolume = 0.06f; ambientSoundVolume = 0.07f;
} }
public class SmelterBuild extends GenericCrafterBuild{ public class SmelterBuild extends GenericCrafterBuild{