Merge remote-tracking branch 'refs/remotes/wizards/master'
This commit is contained in:
commit
d8547bf089
11 changed files with 536 additions and 460 deletions
|
|
@ -36,17 +36,18 @@ public sealed partial class LoadoutContainer : BoxContainer
|
|||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -408,6 +408,17 @@ namespace Content.Server.Administration.Managers
|
|||
}
|
||||
|
||||
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)
|
||||
|
|
|
|||
|
|
@ -90,6 +90,9 @@ public sealed class LoadoutSystem : EntitySystem
|
|||
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
@ -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
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -28,7 +28,7 @@
|
|||
back:
|
||||
- ClothingNeckHeadphones
|
||||
|
||||
# Plushies
|
||||
# Toys
|
||||
- type: loadout
|
||||
id: PlushieLizard
|
||||
storage:
|
||||
|
|
@ -41,6 +41,15 @@
|
|||
back:
|
||||
- PlushieSpaceLizard
|
||||
|
||||
- type: loadout
|
||||
id: ThreeCandles
|
||||
dummyEntity: LoadoutDummyCandles
|
||||
storage:
|
||||
back:
|
||||
- CandleRed
|
||||
- CandleBlue
|
||||
- CandleGreenSmall
|
||||
|
||||
# Smokeables
|
||||
- type: loadout
|
||||
id: Lighter
|
||||
|
|
|
|||
9
Resources/Prototypes/Loadouts/dummy_entities.yml
Normal file
9
Resources/Prototypes/Loadouts/dummy_entities.yml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
- type: entity
|
||||
id: LoadoutDummyCandles
|
||||
categories: [ HideSpawnMenu ]
|
||||
name: three candles
|
||||
description: A set of three colorful candles for secret rituals!
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Misc/candles.rsi
|
||||
state: loadout
|
||||
|
|
@ -10,6 +10,7 @@
|
|||
- Headphones
|
||||
- PlushieLizard
|
||||
- PlushieSpaceLizard
|
||||
- ThreeCandles
|
||||
- Lighter
|
||||
- CigPackGreen
|
||||
- CigPackRed
|
||||
|
|
|
|||
BIN
Resources/Textures/Objects/Misc/candles.rsi/loadout.png
Normal file
BIN
Resources/Textures/Objects/Misc/candles.rsi/loadout.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 406 B |
|
|
@ -10,6 +10,9 @@
|
|||
{
|
||||
"name": "stand-small"
|
||||
},
|
||||
{
|
||||
"name": "loadout"
|
||||
},
|
||||
{
|
||||
"name": "stand-big"
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue