mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-24 05:21:15 -08:00
Hidden sector difficulty definition
This commit is contained in:
parent
e658a430f4
commit
f325e37ce9
2 changed files with 5 additions and 4 deletions
|
|
@ -65,7 +65,7 @@ public class SectorSubmissions{
|
|||
registerSerpuloSector(20, "Namero", "https://discord.com/channels/391020510269669376/1379926794114961634/1406768731471872162");
|
||||
registerSerpuloSector(162, "Bravo Tizmo", "https://discord.com/channels/391020510269669376/1379926884606808247/1443239231366500415");
|
||||
registerSerpuloSector(230, "Jamespire", "https://discord.com/channels/391020510269669376/1379926927585841163/1442675816084406305");
|
||||
registerSerpuloSector(240, "hhhi17", "https://discord.com/channels/391020510269669376/1253758616117186590/1253758616117186590");
|
||||
registerSerpuloSector(240, "hhhi17", "https://discord.com/channels/391020510269669376/1253758616117186590/1253758616117186590", -1, 8f);
|
||||
|
||||
/* UNUSED SECTORS:
|
||||
registerHiddenSectors(serpulo,
|
||||
|
|
@ -80,10 +80,10 @@ public class SectorSubmissions{
|
|||
}
|
||||
|
||||
static void registerSerpuloSector(int id, String author, String mapFileLink){
|
||||
registerSerpuloSector(id, author, mapFileLink, -1);
|
||||
registerSerpuloSector(id, author, mapFileLink, -1, 0f);
|
||||
}
|
||||
|
||||
static void registerSerpuloSector(int id, String author, String mapFileLink, int captureWave){
|
||||
static void registerSerpuloSector(int id, String author, String mapFileLink, int captureWave, float difficulty){
|
||||
Planet planet = Planets.serpulo;
|
||||
Sector sector = planet.sectors.get(id);
|
||||
MapSubmission sub = threadMap.get(sector, MapSubmission::new);
|
||||
|
|
@ -94,6 +94,7 @@ public class SectorSubmissions{
|
|||
var preset = new SectorPreset("sector-" + planet.name + "-" + id, "hidden-serpulo/" + id, planet, id);
|
||||
|
||||
preset.requireUnlock = false;
|
||||
if(difficulty > 0f) preset.difficulty = difficulty;
|
||||
|
||||
if(captureWave > 0){
|
||||
preset.captureWave = captureWave;
|
||||
|
|
|
|||
|
|
@ -340,7 +340,7 @@ public class Planet extends UnlockableContent{
|
|||
sum += 0.88f;
|
||||
}
|
||||
|
||||
sector.threat = sector.preset == null || !sector.preset.requireUnlock ?
|
||||
sector.threat = sector.preset == null || (!sector.preset.requireUnlock && sector.preset.difficulty == 0f) ?
|
||||
Math.max(Math.min(sum / 5f, 1.2f), 0.3f) : //low threat sectors are pointless
|
||||
Mathf.clamp(sector.preset.difficulty / 10f);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue