Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
0bc2e9f
Companies (#132)
ark1368 Apr 15, 2025
6eec825
Revert "Companies (#132)" (#134)
ark1368 Apr 15, 2025
c6a9117
Player Companies (#145)
ark1368 Apr 16, 2025
a767afb
Company Patches (#150)
ark1368 Apr 17, 2025
b09a4f5
Quick Company Change (#167)
ark1368 Apr 18, 2025
41f808f
Company Patches (#206)
ark1368 Apr 22, 2025
92fd21d
Supplement for companies (#236)
HacksLua Apr 25, 2025
73f3086
Duran Ship (#262)
LukeZurg22 Apr 27, 2025
d29358c
TSFMC revamp DO NOT MERGE yet (#320)
starch70 May 2, 2025
6ef3b06
Chat Popups [Port] (#361)
ark1368 May 6, 2025
09f7f6a
Lethal Company (#374)
ark1368 May 7, 2025
b53f1e7
USSP (#495)
starch70 May 18, 2025
e0a3d27
company updates
fenndragon Nov 21, 2025
943990a
Update chemdrobe.ftl
fenndragon Nov 28, 2025
af34c3e
Update bruiseomat.ftl
fenndragon Nov 28, 2025
4336381
fixes
fenndragon Nov 28, 2025
b2e9e1b
Update pirate-bounties.ftl
fenndragon Nov 28, 2025
1e1f8f7
rsi fixes
fenndragon Nov 28, 2025
baad647
Update options-menu.ftl
fenndragon Nov 28, 2025
806fe57
Update meta.json
fenndragon Nov 28, 2025
9614221
Update fortunes.yml
fenndragon Nov 28, 2025
3c98f56
nfsd gyro rsi
fenndragon Nov 28, 2025
42d7dc9
rsi hotfix
fenndragon Nov 28, 2025
b45c328
Update thrusters_nfsd.yml
fenndragon Nov 28, 2025
c25569f
fixes
fenndragon Nov 28, 2025
5d779ed
fixes
fenndragon Nov 28, 2025
ca6f1d3
fixes
fenndragon Nov 28, 2025
b7c71cd
Update fortunes.yml
fenndragon Nov 28, 2025
0c62498
Update captain_id.yml
fenndragon Nov 28, 2025
99eef94
Update captain_id.yml
fenndragon Nov 28, 2025
60cc3b9
Update Resources/Prototypes/_NF/Entities/Clothing/OuterClothing/softs…
fenndragon Nov 28, 2025
abf1781
Update Resources/Prototypes/_Mono/Entities/Objects/Weapons/Guns/Rifle…
fenndragon Nov 28, 2025
6ca4b03
Update Resources/Prototypes/_Mono/Entities/Structures/Machines/ftldri…
fenndragon Nov 28, 2025
fed205e
Update Resources/Prototypes/_Mono/Shipyard/Nfsd/mayhem.yml
fenndragon Nov 28, 2025
7877c65
Initial plan
Copilot Nov 28, 2025
6625513
Merge pull request #544 from fenndragon/copilot/sub-pr-522
fenndragon Nov 28, 2025
d212fe7
Update prisoner_id.yml
fenndragon Nov 28, 2025
1d620a6
Revert "[WIP] WIP Address feedback from review on Factions V1 PR"
BlueNexus Nov 28, 2025
c30cadc
Merge pull request #546 from fenndragon/revert-544-copilot/sub-pr-522
BlueNexus Nov 29, 2025
f0d2c0e
Merge branch 'company' of https://github.com/fenndragon/HardLight int…
fenndragon Nov 29, 2025
e752f40
Merge branch 'company' of https://github.com/fenndragon/HardLight int…
fenndragon Nov 29, 2025
f1cdd95
fixes
fenndragon Nov 29, 2025
9daf9bf
Update pirate_ids.yml
fenndragon Nov 29, 2025
5196278
Update space_law.yml
fenndragon Nov 29, 2025
a056a4e
Update hats.yml
fenndragon Nov 29, 2025
a99f1df
fixes
fenndragon Nov 29, 2025
06579c2
Update softsuits.yml
fenndragon Nov 29, 2025
93e8dd2
Create chitinid.yml
fenndragon Nov 29, 2025
aa4562d
Revert "Create chitinid.yml"
fenndragon Nov 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 3 additions & 18 deletions .github/mapchecker/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@
"DoNotMap",
"DEBUG",
"Admeme",
"CaptainSabre",
"ClothingBeltSheath",
"MagazinePistolHighCapacity",
"MagazinePistolHighCapacityRubber",
"EncryptionKeyCommand",
"SurveillanceCameraWireless",
"CrewMonitoringServer",
"APCHighCapacity",
"APCSuperCapacity",
"APCHyperCapacity",
Expand All @@ -36,30 +31,20 @@
],
"Custom": [
],
"Security": [ # These matchers are illegal unless the ship is part of the security shipyard.
"Security", # Anything with the word security in it should also only be appearing on security ships.
"Plastitanium", # Plastitanium walls should only be appearing on security ships.
"Kammerer", # Opportunity
"HighSecDoor",
"ShuttleGun",
"Security": [
],
"Syndicate": [
"Plastitanium", # And also on blackmarket ships cause syndicate.
"ShuttleGun",
],
"BlackMarket": [
"Plastitanium", # And also on blackmarket ships cause syndicate.
"ShuttleGun",
],
"Sr": [
],
"Medical": [
],
"Ussp": [
],
# It is assumed that mapped instances of plastitanium, security gear, etc. are deemed acceptable
"PointOfInterest": [
"Plastitanium",
"Security",
"HighSecDoor",
"WallPlastitaniumIndestructible",
"WallPlastitaniumDiagonalIndestructible",
"PlastititaniumWindowIndestructible",
Expand Down
56 changes: 56 additions & 0 deletions Content.Client/Lobby/ClientPreferencesManager.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
using System.Linq;
using Content.Shared._Mono.Company;
using Content.Shared.Preferences;
using Robust.Client;
using Robust.Client.Player;
using Robust.Shared.Network;
using Robust.Shared.Utility;
using Robust.Shared.Prototypes;

namespace Content.Client.Lobby
{
Expand Down Expand Up @@ -60,6 +62,19 @@ public void SelectCharacter(int slot)
public void UpdateCharacter(ICharacterProfile profile, int slot)
{
var collection = IoCManager.Instance!;

// Verify company exists if this is a humanoid profile
if (profile is HumanoidCharacterProfile humanoidProfile)
{
var protoManager = IoCManager.Resolve<IPrototypeManager>();
if (!string.IsNullOrEmpty(humanoidProfile.Company) &&
humanoidProfile.Company != "None" &&
!protoManager.HasIndex<CompanyPrototype>(humanoidProfile.Company))
{
profile = humanoidProfile.WithCompany("None");
}
}

profile.EnsureValid(_playerManager.LocalSession!, collection);
var characters = new Dictionary<int, ICharacterProfile>(Preferences.Characters) {[slot] = profile};
Preferences = new PlayerPreferences(characters, Preferences.SelectedCharacterIndex, Preferences.AdminOOCColor);
Expand Down Expand Up @@ -111,6 +126,47 @@ private void HandlePreferencesAndSettings(MsgPreferencesAndSettings message)
Preferences = message.Preferences;
Settings = message.Settings;

// Check if any character profiles have invalid companies and fix them
if (Preferences != null)
{
var protoManager = IoCManager.Resolve<IPrototypeManager>();
var needsUpdate = false;
var characters = new Dictionary<int, ICharacterProfile>();

foreach (var (slot, profile) in Preferences.Characters)
{
var updatedProfile = profile;

if (profile is HumanoidCharacterProfile humanoidProfile &&
!string.IsNullOrEmpty(humanoidProfile.Company) &&
humanoidProfile.Company != "None" &&
!protoManager.HasIndex<CompanyPrototype>(humanoidProfile.Company))
{
updatedProfile = humanoidProfile.WithCompany("None");
needsUpdate = true;
}

characters[slot] = updatedProfile;
}

if (needsUpdate)
{
Preferences = new PlayerPreferences(characters, Preferences.SelectedCharacterIndex, Preferences.AdminOOCColor);

// Update the selected character on the server if needed
var selectedIndex = Preferences.SelectedCharacterIndex;
if (characters.TryGetValue(selectedIndex, out var selectedProfile))
{
var msg = new MsgUpdateCharacter
{
Profile = selectedProfile,
Slot = selectedIndex
};
_netManager.ClientSendMessage(msg);
}
}
}

OnServerDataLoaded?.Invoke();
}
}
Expand Down
28 changes: 28 additions & 0 deletions Content.Client/Lobby/LobbyUIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Content.Client.Lobby.UI;
using Content.Client.Players.PlayTimeTracking;
using Content.Client.Station;
using Content.Shared._Mono.Company;
using Content.Shared.CCVar;
using Content.Shared.Clothing;
using Content.Shared.GameTicking;
Expand Down Expand Up @@ -185,13 +186,40 @@ private void RefreshLobbyPreview()
PreviewPanel.SetSprite(EntityUid.Invalid);
PreviewPanel.SetSummaryText(string.Empty);
PreviewPanel.SetBankBalanceText(string.Empty); // Frontier
PreviewPanel.SetCompanyText(string.Empty); // Company Display
return;
}

// Verify company exists, if not set it to "None"
if (!string.IsNullOrEmpty(humanoid.Company) &&
humanoid.Company != "None" &&
!_prototypeManager.HasIndex<CompanyPrototype>(humanoid.Company))
{
// Create a new profile with the company set to "None"
humanoid = humanoid.WithCompany("None");

// Update the character in preferences
if (_preferencesManager.Preferences != null)
{
_preferencesManager.UpdateCharacter(humanoid, _preferencesManager.Preferences.SelectedCharacterIndex);
}
}

var dummy = LoadProfileEntity(humanoid, null, true);
PreviewPanel.SetSprite(dummy);
PreviewPanel.SetSummaryText(humanoid.Summary);
PreviewPanel.SetBankBalanceText(humanoid.BankBalanceText); // Frontier

// Company Display
var companyId = humanoid.Company;
if (_prototypeManager.TryIndex<CompanyPrototype>(companyId, out var company))
{
PreviewPanel.SetCompanyText($"Company: [color={company.Color.ToHex()}]{company.Name}[/color]");
}
else
{
PreviewPanel.SetCompanyText($"Company: [color=yellow]{companyId}[/color]");
}
}

private void RefreshProfileEditor()
Expand Down
12 changes: 12 additions & 0 deletions Content.Client/Lobby/UI/HumanoidProfileEditor.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,18 @@
<BoxContainer Name="TraitsList" Orientation="Vertical" />
</ScrollContainer>
</BoxContainer>
<BoxContainer Orientation="Vertical" Margin="10">
<!-- Company -->
<ScrollContainer VerticalExpand="True">
<BoxContainer Orientation="Vertical">
<BoxContainer Margin="10" Orientation="Horizontal" HorizontalExpand="True">
<Label Text="{Loc 'humanoid-profile-editor-company-label'}" />
<Control HorizontalExpand="True"/>
<OptionButton Name="CompanyButton" HorizontalAlignment="Right" />
</BoxContainer>
</BoxContainer>
</ScrollContainer>
</BoxContainer>
<BoxContainer Name="MarkingsTab" Orientation="Vertical" Margin="10">
<!-- Markings -->
<ScrollContainer VerticalExpand="True">
Expand Down
Loading
Loading