:trollface:
This commit is contained in:
parent
efc005da7d
commit
772fa23067
|
|
@ -83,7 +83,7 @@ public sealed class PresetIdCardSystem : EntitySystem
|
|||
_cardSystem.TryChangeJobDepartment(uid, job);
|
||||
|
||||
// DeltaV #1425 - Attempt to use virtual job information before using job information
|
||||
_prototypeManager.TryIndex<StatusIconPrototype>(id.VirtualJobIcon ?? string.Empty, out var virtualJobIcon);
|
||||
_prototypeManager.TryIndex<JobIconPrototype>(id.VirtualJobIcon ?? string.Empty, out var virtualJobIcon);
|
||||
if (_prototypeManager.TryIndex(job.Icon, out var jobIcon))
|
||||
_cardSystem.TryChangeJobIcon(uid, virtualJobIcon ?? jobIcon);
|
||||
// End of DeltaV code
|
||||
|
|
|
|||
|
|
@ -48,7 +48,8 @@ public sealed class FugitiveRule : StationEventSystem<FugitiveRuleComponent>
|
|||
foreach (var xform in consoles)
|
||||
{
|
||||
var report = Spawn(comp.ReportPaper, xform.Coordinates);
|
||||
_paper.SetContent(report, comp.Report);
|
||||
var paper = Comp<PaperComponent>(report);
|
||||
_paper.SetContent((report, paper), comp.Report);
|
||||
}
|
||||
|
||||
// prevent any possible funnies
|
||||
|
|
|
|||
|
|
@ -352,12 +352,7 @@ namespace Content.Server.GameTicking
|
|||
Log.Debug($"Unable to find loadout prototype for {items.Prototype}");
|
||||
continue;
|
||||
}
|
||||
if (!_prototypeManager.TryIndex(loadoutProto.Equipment, out var startingGear))
|
||||
{
|
||||
Log.Debug($"Unable to find starting gear {loadoutProto.Equipment} for loadout {loadoutProto}");
|
||||
continue;
|
||||
}
|
||||
var entProtoId = startingGear.GetGear("id");
|
||||
var entProtoId = loadoutProto.Equipment.GetGear("id");
|
||||
if (!_prototypeManager.TryIndex<EntityPrototype>(entProtoId, out var idProto))
|
||||
{
|
||||
Log.Debug($"Unable to find prototype for {startingGear} for starting gear {loadoutProto.Equipment} for loadout {loadoutProto}");
|
||||
|
|
@ -365,12 +360,7 @@ namespace Content.Server.GameTicking
|
|||
}
|
||||
if (idProto.TryGetComponent<PdaComponent>(out var pdaComponent, _componentFactory) && pdaComponent.IdCard != null)
|
||||
{
|
||||
ProtoId<EntityPrototype> idProtoId = pdaComponent.IdCard;
|
||||
if (!_prototypeManager.TryIndex<EntityPrototype>(idProtoId, out idProto))
|
||||
{
|
||||
Log.Warning($"Unable to find an idCard in {idProto}");
|
||||
return false;
|
||||
}
|
||||
idProto = _prototypeManager.Index(pdaComponent.IdCard);
|
||||
}
|
||||
|
||||
if (!idProto.TryGetComponent<PresetIdCardComponent>(out var idComponent, _componentFactory))
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace Content.Server.Psionics
|
|||
{
|
||||
public sealed class PsionicInvisibilitySystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly VisibilitySystem _visibilitySystem = default!;
|
||||
[Dependency] private readonly VisibilitySystem _visibility = default!;
|
||||
[Dependency] private readonly PsionicInvisibilityPowerSystem _invisSystem = default!;
|
||||
[Dependency] private readonly NpcFactionSystem _npcFactonSystem = default!;
|
||||
[Dependency] private readonly SharedEyeSystem _eye = default!;
|
||||
|
|
@ -82,22 +82,24 @@ namespace Content.Server.Psionics
|
|||
|
||||
private void OnInvisInit(EntityUid uid, PsionicallyInvisibleComponent component, ComponentInit args)
|
||||
{
|
||||
var visibility = EntityManager.EnsureComponent<VisibilityComponent>(uid);
|
||||
var visibility = EnsureComp<VisibilityComponent>(uid);
|
||||
var ent = (uid, visibility);
|
||||
|
||||
_visibilitySystem.AddLayer(uid, visibility, (int) VisibilityFlags.PsionicInvisibility, false);
|
||||
_visibilitySystem.RemoveLayer(uid, visibility, (int) VisibilityFlags.Normal, false);
|
||||
_visibilitySystem.RefreshVisibility(uid, visibility);
|
||||
_visibility.AddLayer(ent, (int) VisibilityFlags.PsionicInvisibility, false);
|
||||
_visibility.RemoveLayer(ent, (int) VisibilityFlags.Normal, false);
|
||||
_visibility.RefreshVisibility(ent);
|
||||
}
|
||||
|
||||
|
||||
private void OnInvisShutdown(EntityUid uid, PsionicallyInvisibleComponent component, ComponentShutdown args)
|
||||
{
|
||||
if (TryComp<VisibilityComponent>(uid, out var visibility))
|
||||
{
|
||||
_visibilitySystem.RemoveLayer(uid, visibility, (int) VisibilityFlags.PsionicInvisibility, false);
|
||||
_visibilitySystem.AddLayer(uid, visibility, (int) VisibilityFlags.Normal, false);
|
||||
_visibilitySystem.RefreshVisibility(uid, visibility);
|
||||
}
|
||||
if (!TryComp<VisibilityComponent>(uid, out var visibility))
|
||||
return;
|
||||
|
||||
var ent = (uid, visibility);
|
||||
_visibility.RemoveLayer(ent, (int) VisibilityFlags.PsionicInvisibility, false);
|
||||
_visibility.AddLayer(ent, (int) VisibilityFlags.Normal, false);
|
||||
_visibility.RefreshVisibility(ent);
|
||||
}
|
||||
|
||||
private void OnEyeInit(EntityUid uid, EyeComponent component, ComponentInit args)
|
||||
|
|
|
|||
Loading…
Reference in New Issue