Skip to content

Commit

Permalink
Персонализейшен оружия
Browse files Browse the repository at this point in the history
  • Loading branch information
Schrodinger71 committed Mar 7, 2024
1 parent 4b04113 commit b93f0e7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
1 change: 0 additions & 1 deletion Content.Shared/Weapons/Ranged/Components/GunComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ public sealed partial class GunComponent : Component
/// </summary>
//[DataField("gunOwner"), ViewVariables(VVAccess.ReadWrite)]
public EntityUid? GunOwner = null;

}

[Flags]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ private void OnAltVerb(EntityUid uid, GunComponent component, GetVerbsEvent<Alte
};

args.Verbs.Add(verb);

}

private SelectiveFire GetNextMode(GunComponent component)
Expand Down Expand Up @@ -99,6 +98,12 @@ private void SelectFire(EntityUid uid, GunComponent component, SelectiveFire fir
Dirty(uid, component);
}

/// <summary>
/// ADT, modern. This method makes weapon personal, making everyone except user not able to shoot with it.
/// </summary>
/// <param name="uid"></param>
/// <param name="component"></param>
/// <param name="user"></param>
private void MakeWeaponPersonal(EntityUid uid, GunComponent component, EntityUid? user = null)
{
if(component.GunOwner != null)
Expand Down
1 change: 1 addition & 0 deletions Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using Content.Shared.Gravity;
using Content.Shared.Hands;
using Content.Shared.Hands.Components;
using Content.Shared.Mobs.Components;
using Content.Shared.Popups;
using Content.Shared.Projectiles;
using Content.Shared.Tag;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
fireRate: 1.7
soundGunshot:
path: /Audio/Weapons/Guns/Gunshots/laser_cannon.ogg
personable: true
- type: ProjectileBatteryAmmoProvider
proto: BulletDisabler
fireCost: 60
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@
- type: Gun
soundGunshot:
path: /Audio/Weapons/Guns/Gunshots/ltrifle.ogg
personable: true
- type: ItemSlots
slots:
gun_magazine:
Expand Down

0 comments on commit b93f0e7

Please sign in to comment.