Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/wizards/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
VigersRay committed Dec 24, 2024
2 parents 5167ac6 + 8fcfca6 commit d8547bf
Show file tree
Hide file tree
Showing 11 changed files with 523 additions and 447 deletions.
19 changes: 10 additions & 9 deletions Content.Client/Lobby/UI/Loadouts/LoadoutContainer.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,18 @@ public LoadoutContainer(ProtoId<LoadoutPrototype> proto, bool disabled, Formatte

if (_protoManager.TryIndex(proto, out var loadProto))
{
var ent = _entManager.System<LoadoutSystem>().GetFirstOrNull(loadProto);
var ent = loadProto.DummyEntity ?? _entManager.System<LoadoutSystem>().GetFirstOrNull(loadProto);

if (ent != null)
{
_entity = _entManager.SpawnEntity(ent, MapCoordinates.Nullspace);
Sprite.SetEntity(_entity);
if (ent == null)
return;

var spriteTooltip = new Tooltip();
spriteTooltip.SetMessage(FormattedMessage.FromUnformatted(_entManager.GetComponent<MetaDataComponent>(_entity.Value).EntityDescription));
TooltipSupplier = _ => spriteTooltip;
}
_entity = _entManager.SpawnEntity(ent, MapCoordinates.Nullspace);
Sprite.SetEntity(_entity);

var spriteTooltip = new Tooltip();
spriteTooltip.SetMessage(FormattedMessage.FromUnformatted(_entManager.GetComponent<MetaDataComponent>(_entity.Value).EntityDescription));

TooltipSupplier = _ => spriteTooltip;
}
}

Expand Down
11 changes: 11 additions & 0 deletions Content.Server/Administration/Managers/AdminManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,17 @@ private async void LoginAdminMaybe(ICommonSession session)
}

private async Task<(AdminData dat, int? rankId, bool specialLogin)?> LoadAdminData(ICommonSession session)
{
var result = await LoadAdminDataCore(session);

// Make sure admin didn't disconnect while data was loading.
if (session.Status != SessionStatus.InGame)
return null;

return result;
}

private async Task<(AdminData dat, int? rankId, bool specialLogin)?> LoadAdminDataCore(ICommonSession session)
{
var promoteHost = IsLocal(session) && _cfg.GetCVar(CCVars.ConsoleLoginLocal)
|| _promotedPlayers.Contains(session.UserId)
Expand Down
3 changes: 3 additions & 0 deletions Content.Shared/Clothing/LoadoutSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ public static string GetJobPrototype(string? loadout)

public string GetName(LoadoutPrototype loadout)
{
if (loadout.DummyEntity is not null && _protoMan.TryIndex<EntityPrototype>(loadout.DummyEntity, out var proto))
return proto.Name;

if (_protoMan.TryIndex(loadout.StartingGear, out var gear))
{
return GetName(gear);
Expand Down
6 changes: 6 additions & 0 deletions Content.Shared/Preferences/Loadouts/LoadoutPrototype.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ public sealed partial class LoadoutPrototype : IPrototype, IEquipmentLoadout
* You can either use an existing StartingGearPrototype or specify it inline to avoid bloating yaml.
*/

/// <summary>
/// An entity whose sprite, name and description is used for display in the interface. If null, tries to get the proto of the item from gear (if it is a single item).
/// </summary>
[DataField]
public EntProtoId? DummyEntity;

[DataField]
public ProtoId<StartingGearPrototype>? StartingGear;

Expand Down
14 changes: 7 additions & 7 deletions Resources/Changelog/Changelog.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
Entries:
- author: AutoOtter
changes:
- message: Greatly reduced meteorite wall health for easier cleanup and repair.
type: Tweak
id: 7251
time: '2024-08-30T23:24:13.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/31651
- author: slarticodefast
changes:
- message: The revenant can now fly through walls again.
Expand Down Expand Up @@ -3937,3 +3930,10 @@
id: 7750
time: '2024-12-23T23:24:54.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/34027
- author: TheShuEd
changes:
- message: You can now select candles in trinkets loadout
type: Add
id: 7751
time: '2024-12-24T00:24:19.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/33193
Loading

0 comments on commit d8547bf

Please sign in to comment.