Skip to content

Commit

Permalink
Wasteland Planet Biome (#128)
Browse files Browse the repository at this point in the history
remaining fixes and rules update
  • Loading branch information
Peptide90 committed Apr 17, 2024
1 parent 35ef97d commit 1e9e0e8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Content.Server/Parallax/BiomeSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ private void LoadChunk(

foreach (var decal in decals)
{
if (!_decals.TryAddDecal(decal.ID, new EntityCoordinates(gridUid, decal.Position), out var dec))
if (!_decals.TryAddDecal(decal.ID, new EntityCoordinates(gridUid, decal.Position), out var dec, decal.Color))
continue;

loadedDecals.Add(dec, indices);
Expand Down
3 changes: 3 additions & 0 deletions Content.Shared/Parallax/Biomes/Layers/BiomeDecalLayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,7 @@ public sealed partial class BiomeDecalLayer : IBiomeWorldLayer

[DataField("decals", required: true, customTypeSerializer:typeof(PrototypeIdListSerializer<DecalPrototype>))]
public List<string> Decals = new();

[DataField("color")]
public Color Color = Color.White;
}
6 changes: 3 additions & 3 deletions Content.Shared/Parallax/Biomes/SharedBiomeSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ private bool TryGetEntity(Vector2i indices, List<IBiomeLayer> layers, Tile tileR
/// Tries to get the relevant decals for this tile.
/// </summary>
public bool TryGetDecals(Vector2i indices, List<IBiomeLayer> layers, int seed, MapGridComponent grid,
[NotNullWhen(true)] out List<(string ID, Vector2 Position)>? decals)
[NotNullWhen(true)] out List<(string ID, Vector2 Position, Color Color)>? decals)
{
if (!TryGetBiomeTile(indices, layers, seed, grid, out var tileRef))
{
Expand Down Expand Up @@ -301,7 +301,7 @@ public bool TryGetDecals(Vector2i indices, List<IBiomeLayer> layers, int seed, M
return false;
}

decals = new List<(string ID, Vector2 Position)>();
decals = new List<(string ID, Vector2 Position, Color Color)>();

for (var x = 0; x < decalLayer.Divisions; x++)
{
Expand All @@ -314,7 +314,7 @@ public bool TryGetDecals(Vector2i indices, List<IBiomeLayer> layers, int seed, M
if (decalValue < decalLayer.Threshold)
continue;

decals.Add((Pick(decalLayer.Decals, (noiseCopy.GetNoise(indices.X, indices.Y, x + y * decalLayer.Divisions) + 1f) / 2f), index));
decals.Add((Pick(decalLayer.Decals, (noiseCopy.GetNoise(indices.X, indices.Y, x + y * decalLayer.Divisions) + 1f) / 2f), index, decalLayer.Color));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
targetNode: healingpowder
category: construction-category-medical
description: A pouch of healing powder.
show: true
icon:
sprite: Nuclear14/Objects/Specific/Medical/drugs.rsi
state: healingpowder
Expand Down
2 changes: 1 addition & 1 deletion Resources/ServerInfo/Rules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ This is the "short" form of the rules, which has all the information any regular

[color=#a4885c]4.1[/color] Avoid loot hoarding, this is a PvE game mode and not a PvP game mode. Players should work together to further the joint efforts of all involved and not focus solely on themselves.

[color=#a4885c]4.2[/color] Conforntration does not need to end in a firefight. This one should be obvious, not everything needs to be or turn into PvP. Let things influence your character, let people get away. Create conflict, create roleplay, do not play to win, play to have fun.
[color=#a4885c]4.2[/color] Confrontration does not need to end in a firefight. This one should be obvious, not everything needs to be or turn into PvP. Let things influence your character, let people get away. Create conflict, create roleplay, do not play to win, play to have fun.

[color=#a4885c]4.2e[/color] Follow escalation rules:
- You can defend yourself to the extent of protecting your own life.
Expand Down

0 comments on commit 1e9e0e8

Please sign in to comment.