Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ private void OnPreloadStart(PostGameMapLoad ev)
return;
}

SetupLavalands();
// Grasslands update
// SetupLavalands()
SetupLavalandsLimited(_config.GetCVar(CCVars.LavalandMaxLands), _config.GetCVar(CCVars.LavalandForceMap));
}

private void OnRoundStart(RoundStartAttemptEvent ev)
Expand Down Expand Up @@ -163,6 +165,38 @@ public void SetupLavalands()
}
}
}

/// <summary>
/// Setup a number of instances of LavalandMapPrototype, up to a certain cap, with the option to force only a specific map by name
/// </summary>
public void SetupLavalandsLimited(int maxLands = 1, string forceMap = "")
{
var counter = 0;
var whitelisted = !(string.IsNullOrEmpty(forceMap));

foreach (var lavaland in _proto.EnumeratePrototypes<LavalandMapPrototype>())
{
if (counter < maxLands & !whitelisted)
{
if (!SetupLavalandPlanet(out _, lavaland))
{
Log.Error($"Failed to load lavaland planet: {lavaland.ID}");
}

counter += 1;
}
else if (whitelisted)
{
if (lavaland.ID == forceMap)
{
if (!SetupLavalandPlanet(out _, lavaland))
{
Log.Error($"Failed to load lavaland planet: {lavaland.ID}");
}
}
}
}
}

public bool SetupLavalandPlanet(out Entity<LavalandMapComponent>? lavaland, LavalandMapPrototype prototype, int? seed = null)
{
Expand Down
11 changes: 11 additions & 0 deletions Content.Shared/_Lavaland/CCVar/CCVars.Lavaland.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,15 @@ public sealed partial class CCVars

public static readonly CVarDef<bool> AllowDuplicatePkaModules =
CVarDef.Create("modkit.dupes_enabled", true, CVar.REPLICATED | CVar.SERVER);


/// Grasslands Update

/// Sets the maximum number of mining planets to be loaded per shift
public static readonly CVarDef<int> LavalandMaxLands =
CVarDef.Create("lavaland.max_lands", 1, CVar.REPLICATED | CVar.SERVER);

/// Forces only a specific map to load. Set to "" to return to random.
public static readonly CVarDef<string> LavalandForceMap =
CVarDef.Create("lavaland.force_map", "", CVar.REPLICATED | CVar.SERVER);
}
8 changes: 8 additions & 0 deletions Resources/Audio/_DEN/Unrefined/attributions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# SPDX-FileCopyrightText: 2025 Shaman
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- files: ["necromancer_theme.ogg"]
license: "MIT"
copyright: "By Gawdayumeet"
source: "https://denstation.net/"
Binary file not shown.
5 changes: 4 additions & 1 deletion Resources/ConfigPresets/TheDen/defaultden.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ maxcharacterslots = 100
[hub]
# Set to true to show this server on the public server list
# Before enabling this, read: https://docs.spacestation14.io/hosts/hub-rules
advertise = true
# advertise = true
# Comma-separated list of tags, useful for categorizing your server.
tags = "18+,lang:en-US,rp:med,region:am_n_e,no_tag_infer"
# Comma-separated list of URLs of hub servers to advertise to.
Expand Down Expand Up @@ -101,3 +101,6 @@ space_wind = false

[reclaimer]
allow_gibbing = false

[lavaland]
max_lands = 1
8 changes: 8 additions & 0 deletions Resources/Locale/en-US/_DEN/Unrefined/grasslands.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Lavaland-style planet names
lavaland-planet-name-grasslands = The Grasslands

# Planet ruin names
grasslands-ruin-smallruin = Small Ruin
grasslands-ruin-dungeonchapel = Ruined Chapel
grasslands-ruin-dungeonforge = Ruined Forge
grasslands-ruin-dungeoncastle = Ruined Castle
4,816 changes: 4,816 additions & 0 deletions Resources/Maps/_DEN/Unrefined/grasslands_base.yml

Large diffs are not rendered by default.

Loading
Loading