Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Fixes / Исправления #41

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
  •  
  •  
  •  
6 changes: 4 additions & 2 deletions Content.Client/Doors/AirlockSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,14 @@ private void OnAppearanceChange(EntityUid uid, AirlockComponent comp, ref Appear
&& lights && (state == DoorState.Closed || state == DoorState.Welded);

emergencyLightsVisible = _appearanceSystem.TryGetData<bool>(uid, DoorVisuals.EmergencyLights, out var eaLights, args.Component) && eaLights;

unlitVisible =
(state == DoorState.Closing
|| state == DoorState.Opening
|| state == DoorState.Denying
|| (state == DoorState.Open && comp.OpenUnlitVisible)
|| (_appearanceSystem.TryGetData<bool>(uid, DoorVisuals.ClosedLights, out var closedLights, args.Component) && closedLights))
|| state == DoorState.Open && comp.OpenUnlitVisible
|| state == DoorState.Closed && comp.OpenUnlitVisible // WD EDIT
|| _appearanceSystem.TryGetData<bool>(uid, DoorVisuals.ClosedLights, out var closedLights, args.Component) && closedLights)
&& !boltedVisible && !emergencyLightsVisible;
}

Expand Down
12 changes: 7 additions & 5 deletions Content.Server/Administration/Commands/AdminWhoCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Content.Server.Administration.Commands;

[AdminCommand(AdminFlags.Admin)]
[AnyCommand] // WD EDIT
public sealed class AdminWhoCommand : IConsoleCommand
{
public string Command => "adminwho";
Expand All @@ -33,15 +33,17 @@ public void Execute(IConsoleShell shell, string argStr, string[] args)
var first = true;
foreach (var admin in adminMgr.ActiveAdmins)
{
if (!first)
sb.Append('\n');
first = false;

// WD EDIT START
var adminData = adminMgr.GetAdminData(admin)!;
DebugTools.AssertNotNull(adminData);

if (adminData.Stealth && !seeStealth)
continue;
// WD EDIT END

if (!first)
sb.Append('\n');
first = false;

sb.Append(admin.Name);
if (adminData.Title is { } title)
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Doors/Components/AirlockComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public sealed partial class AirlockComponent : Component
/// Whether the door lights should be visible.
/// </summary>
[DataField]
public bool OpenUnlitVisible = false;
public bool OpenUnlitVisible = true; // WD EDIT

/// <summary>
/// Whether the door should display emergency access lights.
Expand Down
1 change: 1 addition & 0 deletions Content.Shared/Prying/Components/PryingComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public record struct GetPryTimeModifierEvent
public readonly EntityUid User;
public float PryTimeModifier = 1.0f;
public float BaseTime = 5.0f;
public float Neglect = 5f; // WD EDIT

public GetPryTimeModifierEvent(EntityUid user)
{
Expand Down
11 changes: 9 additions & 2 deletions Content.Shared/Prying/Systems/PryingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,14 @@ private bool StartPry(EntityUid target, EntityUid user, EntityUid? tool, float t
var modEv = new GetPryTimeModifierEvent(user);

RaiseLocalEvent(target, ref modEv);
var doAfterArgs = new DoAfterArgs(EntityManager, user, TimeSpan.FromSeconds(modEv.BaseTime * modEv.PryTimeModifier / toolModifier), new DoorPryDoAfterEvent(), target, target, tool)

// WD EDIT START
var time = modEv.BaseTime * modEv.PryTimeModifier / toolModifier;

if (time <= modEv.Neglect)
time = 0;

var doAfterArgs = new DoAfterArgs(EntityManager, user, TimeSpan.FromSeconds(time), new DoorPryDoAfterEvent(), target, target, tool) // WD EDIT END
{
BreakOnDamage = true,
BreakOnUserMove = true,
Expand Down Expand Up @@ -167,7 +174,7 @@ private void OnDoAfter(EntityUid uid, DoorComponent door, DoorPryDoAfterEvent ar
return;
}

if (args.Used != null && comp != null)
if (args.Used != null && comp != null && door.State is not DoorState.Closing and not DoorState.Opening) // WD EDIT
{
_audioSystem.PlayPredicted(comp.UseSound, args.Used.Value, args.User);
}
Expand Down
2 changes: 2 additions & 0 deletions Content.Shared/Throwing/ThrownItemComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,7 @@ public sealed partial class ThrownItemComponent : Component
/// </summary>
[DataField]
public Vector2? OriginalScale = null;

public readonly List<EntityUid> Processed = new(); // WD EDIT
}
}
11 changes: 9 additions & 2 deletions Content.Shared/Throwing/ThrownItemSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,13 @@ private void HandleCollision(EntityUid uid, ThrownItemComponent component, ref S
if (args.OtherEntity == component.Thrower)
return;

// WD EDIT START
if (component.Processed.Contains(args.OtherEntity))
return;
// WD EDIT END

ThrowCollideInteraction(component, args.OurEntity, args.OtherEntity);
component.Processed.Add(args.OtherEntity); // WD EDIT
}

private void PreventCollision(EntityUid uid, ThrownItemComponent component, ref PreventCollideEvent args)
Expand Down Expand Up @@ -110,6 +116,7 @@ public void StopThrow(EntityUid uid, ThrownItemComponent thrownItemComponent)

EntityManager.EventBus.RaiseLocalEvent(uid, new StopThrowEvent { User = thrownItemComponent.Thrower }, true);
EntityManager.RemoveComponent<ThrownItemComponent>(uid);
thrownItemComponent.Processed.Clear(); // WD EDIT
}

public void LandComponent(EntityUid uid, ThrownItemComponent thrownItem, PhysicsComponent physics, bool playSound)
Expand Down Expand Up @@ -137,10 +144,10 @@ public void ThrowCollideInteraction(ThrownItemComponent component, EntityUid thr
_adminLogger.Add(LogType.ThrowHit, LogImpact.Low,
$"{ToPrettyString(thrown):thrown} thrown by {ToPrettyString(component.Thrower.Value):thrower} hit {ToPrettyString(target):target}.");

if (component.Thrower is not null)// Nyano - Summary: Gotta check if there was a thrower.
if (component.Thrower is not null)// Nyano - Summary: Gotta check if there was a thrower.
RaiseLocalEvent(target, new ThrowHitByEvent(component.Thrower.Value, thrown, target, component), true); // Nyano - Summary: Gotta update for who threw it.
else
RaiseLocalEvent(target, new ThrowHitByEvent(null, thrown, target, component), true); // Nyano - Summary: No thrower.
RaiseLocalEvent(target, new ThrowHitByEvent(null, thrown, target, component), true); // Nyano - Summary: No thrower.
RaiseLocalEvent(thrown, new ThrowDoHitEvent(thrown, target, component), true);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public sealed partial class ToolTileCompatibleComponent : Component
/// The time it takes to modify the tile.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public TimeSpan Delay = TimeSpan.FromSeconds(1);
public TimeSpan Delay = TimeSpan.FromSeconds(0); // WD EDIT

/// <summary>
/// Whether or not the tile being modified must be unobstructed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
suffix: Freezer
components:
- type: Sprite
sprite: Structures/Doors/Airlocks/Standard/freezer.rsi
sprite: _White/Structures/Doors/Airlocks/Standard/freezer.rsi # WD EDIT
- type: Wires
layoutId: AirlockService

Expand All @@ -14,7 +14,7 @@
suffix: Engineering
components:
- type: Sprite
sprite: Structures/Doors/Airlocks/Standard/engineering.rsi
sprite: _White/Structures/Doors/Airlocks/Standard/engineering.rsi # WD EDIT
- type: PaintableAirlock
department: Engineering
- type: Wires
Expand All @@ -26,15 +26,15 @@
suffix: Atmospherics
components:
- type: Sprite
sprite: Structures/Doors/Airlocks/Standard/atmospherics.rsi
sprite: _White/Structures/Doors/Airlocks/Standard/atmospherics.rsi # WD EDIT

- type: entity
parent: Airlock
id: AirlockCargo
suffix: Logistics # DeltaV - Logistics Department replacing Cargo
components:
- type: Sprite
sprite: Structures/Doors/Airlocks/Standard/cargo.rsi
sprite: _White/Structures/Doors/Airlocks/Standard/cargo.rsi # WD EDIT
- type: PaintableAirlock
department: Logistics
- type: Wires
Expand All @@ -46,7 +46,7 @@
suffix: Medical
components:
- type: Sprite
sprite: Structures/Doors/Airlocks/Standard/medical.rsi
sprite: _White/Structures/Doors/Airlocks/Standard/medical.rsi # WD EDIT
- type: PaintableAirlock
department: Medical
- type: Wires
Expand All @@ -58,7 +58,7 @@
suffix: Virology
components:
- type: Sprite
sprite: Structures/Doors/Airlocks/Standard/virology.rsi
sprite: _White/Structures/Doors/Airlocks/Standard/virology.rsi # WD EDIT

- type: entity
parent: AirlockMedical
Expand All @@ -71,7 +71,7 @@
suffix: Epistemics # DeltaV - Epistemics Department replacing Science
components:
- type: Sprite
sprite: Structures/Doors/Airlocks/Standard/science.rsi
sprite: _White/Structures/Doors/Airlocks/Standard/science.rsi # WD EDIT
- type: PaintableAirlock
department: Epistemics
- type: Wires
Expand All @@ -83,7 +83,7 @@
suffix: Command
components:
- type: Sprite
sprite: Structures/Doors/Airlocks/Standard/command.rsi
sprite: _White/Structures/Doors/Airlocks/Standard/command.rsi # WD EDIT
- type: WiresPanelSecurity
securityLevel: medSecurity
- type: PaintableAirlock
Expand All @@ -97,7 +97,7 @@
suffix: Security
components:
- type: Sprite
sprite: Structures/Doors/Airlocks/Standard/security.rsi
sprite: _White/Structures/Doors/Airlocks/Standard/security.rsi # WD EDIT
- type: PaintableAirlock
department: Security
- type: Wires
Expand All @@ -109,23 +109,23 @@
name: maintenance access
components:
- type: Sprite
sprite: Structures/Doors/Airlocks/Standard/maint.rsi
sprite: _White/Structures/Doors/Airlocks/Standard/maint.rsi # WD EDIT

- type: entity
parent: AirlockSecurity # if you get syndie door somehow it counts as sec
id: AirlockSyndicate
suffix: Syndicate
components:
- type: Sprite
sprite: Structures/Doors/Airlocks/Standard/syndicate.rsi
sprite: _White/Structures/Doors/Airlocks/Standard/syndicate.rsi # WD EDIT

- type: entity
parent: AirlockCargo
id: AirlockMining
suffix: Mining(Salvage)
components:
- type: Sprite
sprite: Structures/Doors/Airlocks/Standard/mining.rsi
sprite: _White/Structures/Doors/Airlocks/Standard/mining.rsi # WD EDIT
- type: Wires
layoutId: AirlockCargo

Expand All @@ -135,23 +135,23 @@
suffix: Central Command
components:
- type: Sprite
sprite: Structures/Doors/Airlocks/Standard/centcomm.rsi
sprite: _White/Structures/Doors/Airlocks/Standard/centcomm.rsi # WD EDIT

- type: entity
parent: Airlock
id: AirlockHatch
name: airtight hatch
components:
- type: Sprite
sprite: Structures/Doors/Airlocks/Standard/hatch.rsi
sprite: _White/Structures/Doors/Airlocks/Standard/hatch.rsi # WD EDIT

- type: entity
parent: Airlock
id: AirlockHatchMaintenance
name: maintenance hatch
components:
- type: Sprite
sprite: Structures/Doors/Airlocks/Standard/hatch_maint.rsi
sprite: _White/Structures/Doors/Airlocks/Standard/hatch_maint.rsi # WD EDIT

# Glass
- type: entity
Expand All @@ -160,7 +160,7 @@
suffix: Engineering
components:
- type: Sprite
sprite: Structures/Doors/Airlocks/Glass/engineering.rsi
sprite: _White/Structures/Doors/Airlocks/Glass/engineering.rsi # WD EDIT
- type: PaintableAirlock
department: Engineering
- type: Wires
Expand All @@ -172,23 +172,23 @@
suffix: Maintenance
components:
- type: Sprite
sprite: Structures/Doors/Airlocks/Glass/maint.rsi
sprite: _White/Structures/Doors/Airlocks/Glass/maint.rsi # WD EDIT

- type: entity
parent: AirlockEngineeringGlass
id: AirlockAtmosphericsGlass
suffix: Atmospherics
components:
- type: Sprite
sprite: Structures/Doors/Airlocks/Glass/atmospherics.rsi
sprite: _White/Structures/Doors/Airlocks/Glass/atmospherics.rsi # WD EDIT

- type: entity
parent: AirlockGlass
id: AirlockCargoGlass
suffix: Logistics # DeltaV - Logistics Department replacing Cargo
components:
- type: Sprite
sprite: Structures/Doors/Airlocks/Glass/cargo.rsi
sprite: _White/Structures/Doors/Airlocks/Glass/cargo.rsi # WD EDIT
- type: PaintableAirlock
department: Logistics
- type: Wires
Expand All @@ -200,7 +200,7 @@
suffix: Medical
components:
- type: Sprite
sprite: Structures/Doors/Airlocks/Glass/medical.rsi
sprite: _White/Structures/Doors/Airlocks/Glass/medical.rsi # WD EDIT
- type: PaintableAirlock
department: Medical
- type: Wires
Expand All @@ -217,15 +217,15 @@
suffix: Virology
components:
- type: Sprite
sprite: Structures/Doors/Airlocks/Glass/virology.rsi
sprite: _White/Structures/Doors/Airlocks/Glass/virology.rsi # WD EDIT

- type: entity
parent: AirlockGlass
id: AirlockScienceGlass
suffix: Epistemics # DeltaV - Epistemics Department replacing Science
components:
- type: Sprite
sprite: Structures/Doors/Airlocks/Glass/science.rsi
sprite: _White/Structures/Doors/Airlocks/Glass/science.rsi # WD EDIT
- type: PaintableAirlock
department: Epistemics
- type: Wires
Expand All @@ -237,7 +237,7 @@
suffix: Command
components:
- type: Sprite
sprite: Structures/Doors/Airlocks/Glass/command.rsi
sprite: _White/Structures/Doors/Airlocks/Glass/command.rsi # WD EDIT
- type: PaintableAirlock
department: Command
- type: WiresPanelSecurity
Expand All @@ -251,7 +251,7 @@
suffix: Security
components:
- type: Sprite
sprite: Structures/Doors/Airlocks/Glass/security.rsi
sprite: _White/Structures/Doors/Airlocks/Glass/security.rsi # WD EDIT
- type: PaintableAirlock
department: Security
- type: Wires
Expand All @@ -263,20 +263,20 @@
suffix: Syndicate
components:
- type: Sprite
sprite: Structures/Doors/Airlocks/Glass/syndicate.rsi
sprite: _White/Structures/Doors/Airlocks/Glass/syndicate.rsi # WD EDIT

- type: entity
parent: AirlockCargoGlass
id: AirlockMiningGlass
suffix: Mining(Salvage)
components:
- type: Sprite
sprite: Structures/Doors/Airlocks/Glass/mining.rsi
sprite: _White/Structures/Doors/Airlocks/Glass/mining.rsi # WD EDIT

- type: entity
parent: AirlockCommandGlass # see standard
id: AirlockCentralCommandGlass
suffix: Central Command
components:
- type: Sprite
sprite: Structures/Doors/Airlocks/Glass/centcomm.rsi
sprite: _White/Structures/Doors/Airlocks/Glass/centcomm.rsi # WD EDIT
Loading
Loading