change components, remake system
This commit is contained in:
@@ -179,12 +179,6 @@ public sealed partial class GunComponent : Component
|
||||
[DataField]
|
||||
public bool ResetOnHandSelected = true;
|
||||
|
||||
/// <summary>
|
||||
/// For flamehider module | WD EDIT
|
||||
/// </summary>
|
||||
[DataField, AutoNetworkedField]
|
||||
public bool canUseEffect;
|
||||
|
||||
/// <summary>
|
||||
/// The base value for how fast the projectile moves.
|
||||
/// </summary>
|
||||
@@ -237,7 +231,7 @@ public sealed partial class GunComponent : Component
|
||||
// WD START
|
||||
|
||||
public EntityUid? Target;
|
||||
|
||||
|
||||
[DataField("forceThrowingAngle")]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool ForceThrowingAngle;
|
||||
|
||||
@@ -476,9 +476,7 @@ public abstract partial class SharedGunSystem : EntitySystem
|
||||
|
||||
protected void MuzzleFlash(EntityUid gun, AmmoComponent component, EntityUid? user = null)
|
||||
{
|
||||
TryComp<GunComponent>(gun, out var gunComponent); // WD EDIT
|
||||
|
||||
var attemptEv = new GunMuzzleFlashAttemptEvent(gunComponent!.canUseEffect); // WD EDIT
|
||||
var attemptEv = new GunMuzzleFlashAttemptEvent();
|
||||
RaiseLocalEvent(gun, ref attemptEv);
|
||||
if (attemptEv.Cancelled)
|
||||
return;
|
||||
@@ -560,14 +558,6 @@ public abstract partial class SharedGunSystem : EntitySystem
|
||||
|
||||
RefreshModifiers(weapon);
|
||||
}
|
||||
|
||||
public void setUseEffect(EntityUid weapon, bool state)
|
||||
{
|
||||
TryComp<GunComponent>(weapon, out var gunComponent);
|
||||
gunComponent!.canUseEffect = state;
|
||||
|
||||
RefreshModifiers(weapon);
|
||||
}
|
||||
// WD EDIT END
|
||||
protected abstract void CreateEffect(EntityUid uid, MuzzleFlashEvent message, EntityUid? user = null);
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user