Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
4931674
feature: Adds Space Sectors
Koollan May 3, 2026
03fcd97
Merge branch 'master' into persistence_testing
michaelchessall May 3, 2026
3dbfe19
update config preset
michaelchessall May 3, 2026
51b1ab3
fix load failing
michaelchessall May 3, 2026
5539356
add circuit boards to lathe
michaelchessall May 3, 2026
cf47153
disable hscroll in message board content
michaelchessall May 3, 2026
31b4574
Revert "Remove unnecessary networking"
michaelchessall May 4, 2026
bafaf04
Moved movement penalty threshold to starving, not peckish.
Zetaplx May 4, 2026
f245f9a
Halved base thirst and hunger decay rates.
Zetaplx May 4, 2026
4dde39f
Reduced penalty for overfed and overthirst to 1.1, down from 1.2
Zetaplx May 4, 2026
15f5224
Updated Diona body to match relative thirst and hunger decay rates
Zetaplx May 4, 2026
0a5d4e0
fix errors
michaelchessall May 4, 2026
f5e1b8a
feat: Customizable Sectors V1 with Configurable Events
Koollan May 5, 2026
0516b53
fix sniper market
michaelchessall May 5, 2026
3f48a33
Merge pull request #327 from Zetaplx/hunger-tweaks
michaelchessall May 5, 2026
bd3281c
Artifact Glue Rebalance
Zetaplx May 5, 2026
206fccb
Makes glass phoron shards give significantly less phoron...
Zetaplx May 5, 2026
dc4524e
remove dead pixels from logo
michaelchessall May 5, 2026
9d299b5
remove random money from salvage, research.
michaelchessall May 5, 2026
3a90ac3
Merge branch 'persistence_testing' of https://github.com/michaelchess…
michaelchessall May 5, 2026
3a69955
Hotfix: CreateEntry.xaml.cs error
Zetaplx May 6, 2026
f3ac031
Node Research Value Update
Zetaplx May 6, 2026
c64e320
Merge pull request #330 from Zetaplx/messageboard-error-hotfix
michaelchessall May 6, 2026
209cf49
Merge branch 'persistence_testing' into artifact-glue-rebalance
michaelchessall May 6, 2026
36af976
Merge pull request #329 from Zetaplx/artifact-glue-rebalance
michaelchessall May 6, 2026
6912ded
Merge pull request #328 from Koollan/sectors_v1
michaelchessall May 6, 2026
c1ea849
update trade stations
michaelchessall May 6, 2026
43f46e6
Merge branch 'master' into persistence_testing
michaelchessall May 6, 2026
65d0bf5
make meta records not network
michaelchessall May 6, 2026
2b05189
Update CrewMetaRecordsComponent.cs
michaelchessall May 7, 2026
0a3340a
Tape recorders can be controlled with signals
Wolfkey-SomeoneElseTookMyUsername May 7, 2026
96bfc7d
Merge branch 'persistence_testing' into artifact-testing
michaelchessall May 7, 2026
42855cd
trade stations never unanchor
michaelchessall May 8, 2026
0baf755
nerf salvage magnet
michaelchessall May 8, 2026
2e2481b
nerf omnizine
michaelchessall May 8, 2026
88f12dc
Merge pull request #331 from Zetaplx/artifact-testing
michaelchessall May 8, 2026
24edcc8
Merge pull request #332 from Wolfkey-SomeoneElseTookMyUsername/tape_r…
michaelchessall May 8, 2026
2532616
fix xenoarch protos
michaelchessall May 8, 2026
1616a2a
Merge branch 'persistence_testing' of https://github.com/michaelchess…
michaelchessall May 8, 2026
3e096bc
add doafter to hypospray
michaelchessall May 9, 2026
de338d9
remove unnecessary tags
michaelchessall May 9, 2026
65d6bbd
Fix hunterstation bounties
Summerly56 May 10, 2026
5090041
Merge pull request #338 from Summerly56/fixhunterbounties
michaelchessall May 10, 2026
8afbba1
Artifact Spawn Tether Bugfix
Zetaplx May 10, 2026
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
@@ -0,0 +1,35 @@
<DefaultWindow xmlns="https://spacestation14.io"
Title="{Loc 'admin-sector-title'}"
MinWidth="520">
<BoxContainer Orientation="Vertical" SeparationOverride="6" Margin="6 6 6 6">
<BoxContainer Orientation="Horizontal" SeparationOverride="6">
<Label Text="{Loc 'admin-sector-sector-label'}" VerticalAlignment="Center"/>
<OptionButton Name="SectorSelector" HorizontalExpand="True"/>
<Label Text="{Loc 'admin-sector-weather-id-label'}" VerticalAlignment="Center"/>
<OptionButton Name="WeatherIdSelector" HorizontalExpand="True"/>
</BoxContainer>
<BoxContainer Orientation="Horizontal" SeparationOverride="6">
<Button Name="SetWeatherButton" Text="{Loc 'admin-sector-set-weather'}" HorizontalExpand="True"/>
<Button Name="ClearWeatherButton" Text="{Loc 'admin-sector-clear-weather'}" HorizontalExpand="True"/>
</BoxContainer>

<BoxContainer Orientation="Horizontal" SeparationOverride="6">
<Label Text="{Loc 'admin-sector-name-label'}" VerticalAlignment="Center"/>
<LineEdit Name="SectorNameEdit" HorizontalExpand="True"/>
<Button Name="SetSectorNameButton" Text="{Loc 'admin-sector-set-name'}" HorizontalExpand="True"/>
<Button Name="ClearSectorNameButton" Text="{Loc 'admin-sector-clear-name'}" HorizontalExpand="True"/>
</BoxContainer>

<Label Text="{Loc 'admin-sector-radius-header'}" Margin="0 6 0 0"/>
<BoxContainer Orientation="Horizontal" SeparationOverride="6">
<Label Text="{Loc 'admin-sector-center-radius-label'}" VerticalAlignment="Center"/>
<LineEdit Name="CenterRadiusEdit" Text="1250" HorizontalExpand="True"/>
<Button Name="SetCenterRadiusButton" Text="{Loc 'admin-sector-set-center-radius'}" HorizontalExpand="True"/>
</BoxContainer>
<BoxContainer Orientation="Horizontal" SeparationOverride="6">
<Label Text="{Loc 'admin-sector-max-radius-label'}" VerticalAlignment="Center"/>
<LineEdit Name="MaxRadiusEdit" Text="50000" HorizontalExpand="True"/>
<Button Name="SetMaxRadiusButton" Text="{Loc 'admin-sector-set-max-radius'}" HorizontalExpand="True"/>
</BoxContainer>
</BoxContainer>
</DefaultWindow>
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
using System.Globalization;
using System.Linq;
using Content.Shared.CCVar;
using Content.Shared.Sectors;
using Content.Shared.Sectors.Prototypes;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Configuration;
using Robust.Shared.Console;
using Robust.Shared.Prototypes;

namespace Content.Client.Administration.UI.Tabs.AdminTab;

[GenerateTypedNameReferences]
public sealed partial class AdminSectorWindow : DefaultWindow
{
[Dependency] private readonly IConsoleHost _console = default!;
[Dependency] private readonly IConfigurationManager _configuration = default!;
[Dependency] private readonly IPrototypeManager _prototypes = default!;

public AdminSectorWindow()
{
RobustXamlLoader.Load(this);
IoCManager.InjectDependencies(this);

var sectors = Enum.GetNames<SpaceSector>();
for (var i = 0; i < sectors.Length; i++)
{
var sector = sectors[i];
SectorSelector.AddItem(sector);
SectorSelector.SetItemMetadata(i, sector);
}

var weatherPrototypes = _prototypes.EnumeratePrototypes<SectorWeatherPrototype>()
.Select(p => p.ID)
.OrderBy(id => id)
.ToList();

for (var i = 0; i < weatherPrototypes.Count; i++)
{
var weatherId = weatherPrototypes[i];
var displayName = weatherId;
if (_prototypes.TryIndex<SectorWeatherPrototype>(weatherId, out var proto) &&
!string.IsNullOrWhiteSpace(proto.Name))
{
displayName = Loc.GetString(proto.Name);
}
WeatherIdSelector.AddItem(displayName);
WeatherIdSelector.SetItemMetadata(i, weatherId);
}

WeatherIdSelector.OnItemSelected += args => WeatherIdSelector.SelectId(args.Id);

SectorSelector.OnItemSelected += args =>
{
SectorSelector.SelectId(args.Id);
UpdateSectorNameEdit();
};
SectorSelector.SelectId(0);
if (weatherPrototypes.Count > 0)
WeatherIdSelector.SelectId(0);
UpdateSectorNameEdit();

SetWeatherButton.OnPressed += _ => ApplyWeather();
ClearWeatherButton.OnPressed += _ => ClearWeather();
SetSectorNameButton.OnPressed += _ => SetSectorName();
ClearSectorNameButton.OnPressed += _ => ClearSectorName();
SetCenterRadiusButton.OnPressed += _ => SetCVarRadius("sector.center_radius", CenterRadiusEdit.Text);
SetMaxRadiusButton.OnPressed += _ => SetCVarRadius("sector.max_radius", MaxRadiusEdit.Text);
}

private string SelectedSector => SectorSelector.SelectedMetadata as string ?? SpaceSector.Center.ToString();

private void ApplyWeather()
{
var weatherId = WeatherIdSelector.SelectedMetadata as string;
if (string.IsNullOrWhiteSpace(weatherId))
return;

_console.ExecuteCommand($"sudo sectorweather {SelectedSector} {weatherId}");
}

private void ClearWeather()
{
_console.ExecuteCommand($"sudo sectorweather {SelectedSector} clear");
}

private void SetSectorName()
{
var name = SectorNameEdit.Text.Trim();
if (string.IsNullOrWhiteSpace(name))
return;

SetStringCVar(GetSectorNameCVarName(), name);
}

private void ClearSectorName()
{
SetStringCVar(GetSectorNameCVarName(), string.Empty);
SectorNameEdit.Text = string.Empty;
}

private void SetCVarRadius(string cvarName, string radiusText)
{
if (!float.TryParse(radiusText, NumberStyles.Float, CultureInfo.InvariantCulture, out var radius))
return;

_console.ExecuteCommand($"sudo cvar {cvarName} {radius.ToString(CultureInfo.InvariantCulture)}");
}

private void SetStringCVar(string cvarName, string value)
{
var escaped = value.Replace("\\", "\\\\").Replace("\"", "\\\"");
_console.ExecuteCommand($"sudo cvar {cvarName} \"{escaped}\"");
}

private void UpdateSectorNameEdit()
{
SectorNameEdit.Text = _configuration.GetCVar(GetSectorNameCVarDef());
}

private string GetSectorNameCVarName()
{
return GetSectorNameCVarDef().Name;
}

private CVarDef<string> GetSectorNameCVarDef()
{
if (!Enum.TryParse<SpaceSector>(SelectedSector, out var sector))
sector = SpaceSector.Center;

return SharedSectorSystem.GetSectorNameCVar(sector);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<cc:CommandButton Command="permissions" Text="{Loc admin-player-actions-window-permissions}" />
<cc:CommandButton Command="announceui" Text="{Loc admin-player-actions-window-announce}"/>
<cc:UICommandButton Command="callshuttle" Text="{Loc admin-player-actions-window-shuttle}" WindowType="{x:Type at:AdminShuttleWindow}"/>
<cc:UICommandButton Command="sectorweather" Text="{Loc admin-player-actions-window-sector-tools}" WindowType="{x:Type at:AdminSectorWindow}"/>
<cc:CommandButton Command="adminlogs" Text="{Loc admin-player-actions-window-admin-logs}"/>
<cc:CommandButton Command="faxui" Text="{Loc admin-player-actions-window-admin-fax}"/>
<cc:CommandButton Command="achatwindow" Text="{Loc admin-player-actions-window-admin-chat}"/>
Expand Down
5 changes: 5 additions & 0 deletions Content.Client/MessageBoard/UI/CreateEntry.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;

namespace Content.Client.MessageBoard.UI;
[GenerateTypedNameReferences]
Expand All @@ -13,5 +14,9 @@ public enum EntryType : byte

public EntryType CurrentEntryType = EntryType.Public;

public CreateEntry()
{
RobustXamlLoader.Load(this);
}
}

4 changes: 2 additions & 2 deletions Content.Client/MessageBoard/UI/EntryWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
</BoxContainer>
<customControls:HSeparator Margin="5 10 5 10"/>
<PanelContainer StyleIdentifier="PaperEditBackground" MinHeight="300" HorizontalExpand="True">
<ScrollContainer HorizontalExpand="True" VerticalExpand="True">
<ScrollContainer HorizontalExpand="True" VerticalExpand="True" HScrollEnabled="False">
<BoxContainer HorizontalExpand="True" VerticalExpand="True" Orientation="Vertical" Margin="5 10 5 10">
<RichTextLabel Name="MainContentLabel" Access="Public" HorizontalExpand="True" VerticalExpand="True" VerticalAlignment="Top"/>
<RichTextLabel Name="MainContentLabel" Access="Public" VerticalAlignment="Top"/>
</BoxContainer>
</ScrollContainer>
</PanelContainer>
Expand Down
6 changes: 3 additions & 3 deletions Content.Client/MessageBoard/UI/MessageBoard.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
MinSize="600 690">
<BoxContainer Orientation="Vertical">
<ScrollContainer VerticalExpand="True">
<TabContainer>
<TabContainer Name="BoardTabContainer">
<BoxContainer Orientation="Vertical" Name="PublicBoard">
<Button Text="Create A New Entry" Name="CreateEntryPublicButton" Access="Public" />
<PanelContainer VerticalExpand="True"
Expand All @@ -26,13 +26,13 @@
</ScrollContainer>
</PanelContainer>
</BoxContainer>
<BoxContainer Orientation="Vertical" Name="DirectMessages">
<!--<BoxContainer Orientation="Vertical" Name="DirectMessages">
<Label Text="Send Message: " StyleClasses="LabelKeyText"/>
<BoxContainer Orientation="Horizontal" HorizontalExpand="True">
<LineEdit Name="SendMessageLE" PlaceHolder="Recipient Name" HorizontalExpand="True"/>
<Button Text="Compose Message" Name="SendMessageButton" Access="Public" />
</BoxContainer>
</BoxContainer>
</BoxContainer>-->
</TabContainer>
</ScrollContainer>
</BoxContainer>
Expand Down
1 change: 1 addition & 0 deletions Content.Client/MessageBoard/UI/MessageBoard.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public MessageBoard(EntityUid owner, IEntityManager entMan, IPrototypeManager pr
_spriteSystem = spriteSystem;
_owner = owner;
Title = entMan.GetComponent<MetaDataComponent>(owner).EntityName;
BoardTabContainer.SetTabTitle(0, "Public Board");
}

}
56 changes: 56 additions & 0 deletions Content.Client/Sectors/Overlays/SectorEventOverlay.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
using System.Numerics;
using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Shared.Enums;
using Robust.Shared.Prototypes;

namespace Content.Client.Sectors.Overlays;

public sealed class SectorEventOverlay : Overlay
{
private static readonly ProtoId<ShaderPrototype> ShaderProto = "SectorEventTint";

[Dependency] private readonly IEntityManager _entities = default!;
[Dependency] private readonly IPlayerManager _players = default!;
[Dependency] private readonly IPrototypeManager _prototypes = default!;

private readonly ShaderInstance _shader;

public Color TintColor = Color.Transparent;
public float TintNoiseStrength;

public override OverlaySpace Space => OverlaySpace.WorldSpace;
public override bool RequestScreenTexture => true;

public SectorEventOverlay()
{
IoCManager.InjectDependencies(this);
_shader = _prototypes.Index(ShaderProto).InstanceUnique();
}

protected override bool BeforeDraw(in OverlayDrawArgs args)
{
if (TintColor.A <= 0f)
return false;

if (!_entities.TryGetComponent(_players.LocalEntity, out EyeComponent? eyeComp))
return false;

return args.Viewport.Eye == eyeComp.Eye;
}

protected override void Draw(in OverlayDrawArgs args)
{
if (ScreenTexture == null)
return;

_shader.SetParameter("SCREEN_TEXTURE", ScreenTexture);
_shader.SetParameter("tintColor", new Vector4(TintColor.R, TintColor.G, TintColor.B, TintColor.A));
_shader.SetParameter("noiseStrength", Math.Clamp(TintNoiseStrength, 0f, 1f));

var handle = args.WorldHandle;
handle.UseShader(_shader);
handle.DrawRect(args.WorldBounds, Color.White);
handle.UseShader(null);
}
}
89 changes: 89 additions & 0 deletions Content.Client/Sectors/Systems/SectorEventVisualsSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
using Content.Client.Sectors.Overlays;
using Content.Shared.Sectors;
using Content.Shared.Sectors.Events;
using Content.Shared.Sectors.Prototypes;
using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Shared.Prototypes;

namespace Content.Client.Sectors.Systems;

public sealed class SectorEventVisualsSystem : EntitySystem
{
[Dependency] private readonly IOverlayManager _overlays = default!;
[Dependency] private readonly IPlayerManager _players = default!;
[Dependency] private readonly IPrototypeManager _prototypes = default!;
[Dependency] private readonly SharedSectorSystem _sectors = default!;

private readonly Dictionary<SpaceSector, string> _activeWeather = new();
private SectorEventOverlay _overlay = default!;

private Color _targetTintColor = Color.Transparent;
private float _targetAlpha;
private float _currentAlpha;
private float _targetNoiseStrength;
private float _currentNoiseStrength;

private const float FadeSpeed = 0.1f;

public override void Initialize()
{
base.Initialize();

_overlay = new SectorEventOverlay();
_overlays.AddOverlay(_overlay);

SubscribeNetworkEvent<SectorWeatherStateUpdateEvent>(OnWeatherStateUpdated);
}

public override void Shutdown()
{
base.Shutdown();
_overlays.RemoveOverlay(_overlay);
}

public override void Update(float frameTime)
{
base.Update(frameTime);

if (_players.LocalEntity is not { } player)
{
_targetAlpha = 0f;
_targetNoiseStrength = 0f;
}
else
{
var sector = _sectors.GetSector(player);
if (!_activeWeather.TryGetValue(sector, out var weatherId) ||
!_prototypes.TryIndex<SectorWeatherPrototype>(weatherId, out var weather))
{
_targetAlpha = 0f;
_targetNoiseStrength = 0f;
}
else
{
var color = weather.ScreenTintColor;
var strength = Math.Clamp(weather.ScreenTintStrength, 0f, 1f);
_targetTintColor = color;
_targetAlpha = color.A * strength;
_targetNoiseStrength = weather.ScreenTintNoiseStrength;
}
}

var t = Math.Min(1f, frameTime * FadeSpeed);
_currentAlpha += (_targetAlpha - _currentAlpha) * t;
_currentNoiseStrength += (_targetNoiseStrength - _currentNoiseStrength) * t;

_overlay.TintColor = _targetTintColor.WithAlpha(_currentAlpha);
_overlay.TintNoiseStrength = _currentNoiseStrength;
}

private void OnWeatherStateUpdated(SectorWeatherStateUpdateEvent ev)
{
_activeWeather.Clear();
foreach (var (sector, weatherId) in ev.ActiveWeather)
{
_activeWeather[sector] = weatherId;
}
}
}
Loading
Loading