Skip to content

Commit b2a5faa

Browse files
Merge pull request #1622 from ss14Starlight/starlight-dev
Starlight dev
2 parents 540ec90 + 2ef56a6 commit b2a5faa

572 files changed

Lines changed: 388846 additions & 2807000 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-test-debug.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ name: Build & Test Debug
22

33
on:
44
push:
5-
branches: [ master, staging, stable, Starlight ]
5+
branches: [ master, staging, stable, Starlight, starlight-dev ]
66
merge_group:
77
pull_request:
88
types: [ opened, reopened, synchronize, ready_for_review ]
9-
branches: [ master, staging, stable, Starlight ]
9+
branches: [ master, staging, stable, Starlight, starlight-dev ]
1010

1111
jobs:
1212
build:

.vscode/launch.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"program": "${workspaceFolder}/bin/Content.Client/Content.Client.dll",
1212
"args": [],
1313
"console": "internalConsole",
14-
"stopAtEntry": false
14+
"stopAtEntry": false,
15+
"preLaunchTask": "build"
1516
},
1617
{
1718
"name": "Client (Compatibility renderer)",
@@ -29,7 +30,8 @@
2930
"program": "${workspaceFolder}/bin/Content.Server/Content.Server.dll",
3031
"args": [],
3132
"console": "integratedTerminal",
32-
"stopAtEntry": false
33+
"stopAtEntry": false,
34+
"preLaunchTask": "build"
3335
},
3436
{
3537
"name": "YAML Linter",
@@ -52,4 +54,4 @@
5254
"preLaunchTask": "build"
5355
}
5456
]
55-
}
57+
}

Content.Client/Silicons/StationAi/StationAiOverlay.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System.Numerics;
1+
using System.Numerics;
22
using Content.Shared.Movement.Components;
33
using Content.Shared.Silicons.StationAi;
44
using Robust.Client.Graphics;
@@ -73,6 +73,10 @@ protected override void Draw(in OverlayDrawArgs args)
7373
var lookups = _entManager.System<EntityLookupSystem>();
7474
var xforms = _entManager.System<SharedTransformSystem>();
7575

76+
var color = Color.White; // 🌟Starlight🌟
77+
if (stationAiOverlay is not null) // 🌟Starlight🌟
78+
color = color.WithAlpha(stationAiOverlay.Alfa); // 🌟Starlight🌟
79+
7680
if (_accumulator <= 0f)
7781
{
7882
_accumulator = MathF.Max(0f, _accumulator + _updateRate);

Content.Client/UserInterface/Systems/Character/Windows/CharacterWindow.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<ui:CharacterOverviewControl Name="CharacterInfo" Access="Public"/>
1212
<ui:CharacterICInfoControl Name="InfoIC" Access="Public"/>
1313
<ui:CharacterOOCInfoControl Name="InfoOOC" Access="Public"/>
14+
<ui:CharacterBackgroundInfoControl Name="InfoBackground" Access="Public"/>
1415
</TabContainer>
1516
</ScrollContainer>
1617
</windows:CharacterWindow>

Content.Client/UserInterface/Systems/Character/Windows/CharacterWindow.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ public CharacterWindow()
1414
CharacterInfoTabs.SetTabTitle(0, Loc.GetString("character-info-objectives"));
1515
CharacterInfoTabs.SetTabTitle(1, Loc.GetString("character-info-ic"));
1616
CharacterInfoTabs.SetTabTitle(2, Loc.GetString("character-info-ooc"));
17+
CharacterInfoTabs.SetTabTitle(3, Loc.GetString("character-info-background"));
1718
}
1819
}

Content.Client/UserInterface/Systems/Ghost/Controls/Roles/MakeGhostRoleWindow.xaml.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,30 @@ public MakeGhostRoleWindow()
6969
_prototypeManager.EnumeratePrototypes<GhostRoleRaffleSettingsPrototype>();
7070

7171
var idx = 0;
72+
var raffleDefault = -1; //Starlight raffle default
7273
foreach (var raffleProto in raffleProtos)
7374
{
7475
_rafflePrototypes.Add(raffleProto);
7576
var s = raffleProto.Settings;
7677
var label =
7778
$"{raffleProto.ID} (initial {s.InitialDuration}s, max {s.MaxDuration}s, join adds {s.JoinExtendsDurationBy}s)";
79+
#region Starlight raffle by default
80+
if (raffleProto.Default)
81+
raffleDefault = idx;
82+
#endregion
7883
RaffleButton.AddItem(label, idx++);
7984
}
8085

8186
MakeButton.OnPressed += OnMakeButtonPressed;
8287
RaffleButton.OnItemSelected += OnRaffleButtonItemSelected;
88+
89+
#region Starlight raffle by default
90+
if (raffleDefault != -1)
91+
{
92+
RaffleButton.Select(raffleDefault);
93+
OnRaffleButtonItemSelected(new OptionButton.ItemSelectedEventArgs(raffleDefault, RaffleButton));
94+
}
95+
#endregion
8396
}
8497

8598
private void OnRaffleDurationChanged(ValueChangedEventArgs args)

Content.Client/_Starlight/Antags/Abductor/AbductorCameraConsoleWindow.xaml.cs

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<ui:CharacterBackgroundInfoControl
2+
xmlns="https://spacestation14.io"
3+
xmlns:ui="clr-namespace:Content.Client._Starlight.Character.Info.UI"
4+
xmlns:ui1="clr-namespace:Content.Client._Starlight.Character.UI">
5+
<BoxContainer Orientation="Vertical" VerticalExpand="True">
6+
<Label Text="No background." Name="BackgroundLabel"/>
7+
<Label Name="Background" Access="Public"/>
8+
</BoxContainer>
9+
</ui:CharacterBackgroundInfoControl>
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
using System.Text.RegularExpressions;
2+
using Content.Shared._Starlight.Character.Info.Components;
3+
using Content.Shared.Mind;
4+
using Content.Shared.Roles.Jobs;
5+
using Content.Shared.Tag;
6+
using Robust.Client.AutoGenerated;
7+
using Robust.Client.UserInterface;
8+
using Robust.Client.UserInterface.XAML;
9+
10+
namespace Content.Client._Starlight.Character.Info.UI;
11+
12+
[GenerateTypedNameReferences]
13+
public sealed partial class CharacterBackgroundInfoControl : Control
14+
{
15+
public CharacterBackgroundInfoControl()
16+
{
17+
RobustXamlLoader.Load(this);
18+
}
19+
20+
public void SetCharacter(EntityUid? target, IEntityManager entityManager, EntityUid? viewer = null)
21+
{
22+
if (!target.HasValue)
23+
{
24+
ClearCharacter();
25+
return;
26+
}
27+
if (entityManager.TryGetComponent<TagComponent>(target, out var comp))
28+
{
29+
if (comp == null) return;
30+
31+
BackgroundLabel.Text = "No background.";
32+
33+
foreach (var tag in comp.Tags)
34+
{
35+
if (tag.ToString().EndsWith("TraitBackground", StringComparison.Ordinal))
36+
{
37+
Background.Text = Loc.GetString(ToLocale(tag.ToString()));
38+
BackgroundLabel.Text = "Background:";
39+
break;
40+
}
41+
}
42+
}
43+
}
44+
45+
static string ToLocale(string input)
46+
{
47+
input = input.Replace("TraitBackground", "");
48+
string kebab = Regex.Replace(input, "([a-z])([A-Z])", "$1-$2").ToLower();
49+
return $"trait-background-{kebab}-name";
50+
}
51+
52+
public void ClearCharacter()
53+
{
54+
Background.Text = null;
55+
}
56+
}

Content.Client/_Starlight/Character/Info/UI/CharacterInspectWindow.xaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
<BoxContainer Orientation="Vertical">
1212
<ui:CharacterOOCInfoControl Access="Public" Name="OOCInfo"/>
1313
</BoxContainer>
14+
<BoxContainer Orientation="Vertical">
15+
<ui:CharacterBackgroundInfoControl Access="Public" Name="BackgroundInfo"/>
16+
</BoxContainer>
1417
</TabContainer>
1518

1619
</ScrollContainer>

0 commit comments

Comments
 (0)