fix
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using Content.Shared._White.WeaponModules;
|
||||
using Content.Shared.Actions;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Hands;
|
||||
@@ -21,6 +22,20 @@ public abstract partial class SharedGunSystem
|
||||
args.PushMarkup(Loc.GetString("gun-fire-rate-examine", ("color", FireRateExamineColor),
|
||||
("fireRate", $"{component.FireRateModified:0.0}")));
|
||||
|
||||
if (TryComp<WeaponModulesComponent>(uid, out var weaponModulesComponent))
|
||||
{
|
||||
if (weaponModulesComponent.Modules.Count == 0)
|
||||
{
|
||||
args.PushMarkup(Loc.GetString("gun-modules", ("modules", "Пусто")));
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var module in weaponModulesComponent.Modules)
|
||||
{
|
||||
args.PushMarkup(Loc.GetString("gun-modules", ("modules", Name(module))));
|
||||
}
|
||||
}
|
||||
|
||||
if (!TryComp<TwoModeEnergyAmmoProviderComponent>(uid, out var comp))
|
||||
return;
|
||||
|
||||
|
||||
@@ -477,8 +477,8 @@ public abstract partial class SharedGunSystem : EntitySystem
|
||||
|
||||
protected void MuzzleFlash(EntityUid gun, AmmoComponent component, EntityUid? user = null)
|
||||
{
|
||||
bool cancelled = TryComp<WeaponModulesComponent>(gun, out var weaponModulesComponent) && weaponModulesComponent.UseEffect;
|
||||
if(cancelled) return;
|
||||
bool cancelled = TryComp<WeaponModulesComponent>(gun, out var weaponModulesComponent) && weaponModulesComponent.WeaponFireEffect; // WD EDIT
|
||||
if(cancelled) return; // WD EDIT END
|
||||
|
||||
var attemptEv = new GunMuzzleFlashAttemptEvent();
|
||||
RaiseLocalEvent(gun, ref attemptEv);
|
||||
|
||||
@@ -6,9 +6,7 @@
|
||||
[RegisterComponent]
|
||||
public sealed partial class AcceleratorModuleComponent : BaseModuleComponent
|
||||
{
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField]
|
||||
public float OldFireRate;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField]
|
||||
public float FireRateAdd = 2.4F;
|
||||
}
|
||||
|
||||
@@ -6,9 +6,7 @@
|
||||
[RegisterComponent]
|
||||
public sealed partial class LaserModuleComponent : BaseModuleComponent
|
||||
{
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField]
|
||||
public float OldProjectileSpeed;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField]
|
||||
public float ProjectileSpeedAdd = 15F;
|
||||
}
|
||||
|
||||
@@ -6,9 +6,7 @@
|
||||
[RegisterComponent]
|
||||
public sealed partial class LightModuleComponent : BaseModuleComponent
|
||||
{
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField]
|
||||
public bool Enabled;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField]
|
||||
public float Radius = 4F;
|
||||
}
|
||||
|
||||
@@ -8,9 +8,7 @@ namespace Content.Shared._White.WeaponModules;
|
||||
[RegisterComponent]
|
||||
public sealed partial class SilencerModuleComponent : BaseModuleComponent
|
||||
{
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField]
|
||||
public SoundSpecifier? OldSoundGunshot;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField]
|
||||
public SoundSpecifier NewSoundGunshot = new SoundPathSpecifier("/Audio/White/Weapons/Modules/silence.ogg");
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public partial class WeaponModulesComponent : Component
|
||||
public List<EntityUid> Modules = new();
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
public bool UseEffect;
|
||||
public bool WeaponFireEffect;
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
|
||||
Reference in New Issue
Block a user