Вернуть трейлы от пуль (#270)

* - add: Bring back bullet trails.

* - add: Cvar, thinner trails.

* - add: Add option.
This commit is contained in:
Aviu00
2024-06-04 11:00:48 +00:00
committed by GitHub
parent cfd9b19da0
commit 9d1c014938
18 changed files with 103 additions and 42 deletions

View File

@@ -40,6 +40,7 @@
<CheckBox Name="ParallaxLowQualityCheckBox" Text="{Loc 'ui-options-parallax-low-quality'}" /> <CheckBox Name="ParallaxLowQualityCheckBox" Text="{Loc 'ui-options-parallax-low-quality'}" />
<CheckBox Name="FpsCounterCheckBox" Text="{Loc 'ui-options-fps-counter'}" /> <CheckBox Name="FpsCounterCheckBox" Text="{Loc 'ui-options-fps-counter'}" />
<CheckBox Name="LogInChatCheckBox" Text="Логировать действия в чат" /> <CheckBox Name="LogInChatCheckBox" Text="Логировать действия в чат" />
<CheckBox Name="ShowTrailsCheckBox" Text="Отображать трейлы от пуль" />
</BoxContainer> </BoxContainer>
<controls:StripeBack HasBottomEdge="False" HasMargins="False"> <controls:StripeBack HasBottomEdge="False" HasMargins="False">
<Button Name="ApplyButton" <Button Name="ApplyButton"

View File

@@ -74,6 +74,7 @@ namespace Content.Client.Options.UI.Tabs
ParallaxLowQualityCheckBox.OnToggled += OnCheckBoxToggled; ParallaxLowQualityCheckBox.OnToggled += OnCheckBoxToggled;
FpsCounterCheckBox.OnToggled += OnCheckBoxToggled; FpsCounterCheckBox.OnToggled += OnCheckBoxToggled;
LogInChatCheckBox.OnToggled += OnCheckBoxToggled; LogInChatCheckBox.OnToggled += OnCheckBoxToggled;
ShowTrailsCheckBox.OnToggled += OnCheckBoxToggled;
ApplyButton.OnPressed += OnApplyButtonPressed; ApplyButton.OnPressed += OnApplyButtonPressed;
VSyncCheckBox.Pressed = _cfg.GetCVar(CVars.DisplayVSync); VSyncCheckBox.Pressed = _cfg.GetCVar(CVars.DisplayVSync);
FullscreenCheckBox.Pressed = ConfigIsFullscreen; FullscreenCheckBox.Pressed = ConfigIsFullscreen;
@@ -86,6 +87,7 @@ namespace Content.Client.Options.UI.Tabs
ParallaxLowQualityCheckBox.Pressed = _cfg.GetCVar(CCVars.ParallaxLowQuality); ParallaxLowQualityCheckBox.Pressed = _cfg.GetCVar(CCVars.ParallaxLowQuality);
FpsCounterCheckBox.Pressed = _cfg.GetCVar(CCVars.HudFpsCounterVisible); FpsCounterCheckBox.Pressed = _cfg.GetCVar(CCVars.HudFpsCounterVisible);
LogInChatCheckBox.Pressed = _cfg.GetCVar(WhiteCVars.LogChatActions); LogInChatCheckBox.Pressed = _cfg.GetCVar(WhiteCVars.LogChatActions);
ShowTrailsCheckBox.Pressed = _cfg.GetCVar(WhiteCVars.ShowTrails);
ViewportWidthSlider.Value = _cfg.GetCVar(CCVars.ViewportWidth); ViewportWidthSlider.Value = _cfg.GetCVar(CCVars.ViewportWidth);
_cfg.OnValueChanged(CCVars.ViewportMinimumWidth, _ => UpdateViewportWidthRange()); _cfg.OnValueChanged(CCVars.ViewportMinimumWidth, _ => UpdateViewportWidthRange());
@@ -119,6 +121,7 @@ namespace Content.Client.Options.UI.Tabs
_cfg.SetCVar(CCVars.ParallaxLowQuality, ParallaxLowQualityCheckBox.Pressed); _cfg.SetCVar(CCVars.ParallaxLowQuality, ParallaxLowQualityCheckBox.Pressed);
_cfg.SetCVar(CCVars.HudFpsCounterVisible, FpsCounterCheckBox.Pressed); _cfg.SetCVar(CCVars.HudFpsCounterVisible, FpsCounterCheckBox.Pressed);
_cfg.SetCVar(WhiteCVars.LogChatActions, LogInChatCheckBox.Pressed); _cfg.SetCVar(WhiteCVars.LogChatActions, LogInChatCheckBox.Pressed);
_cfg.SetCVar(WhiteCVars.ShowTrails, ShowTrailsCheckBox.Pressed);
_cfg.SetCVar(CCVars.ViewportWidth, (int) ViewportWidthSlider.Value); _cfg.SetCVar(CCVars.ViewportWidth, (int) ViewportWidthSlider.Value);
_cfg.SaveToFile(); _cfg.SaveToFile();
@@ -149,6 +152,7 @@ namespace Content.Client.Options.UI.Tabs
var isPLQSame = ParallaxLowQualityCheckBox.Pressed == _cfg.GetCVar(CCVars.ParallaxLowQuality); var isPLQSame = ParallaxLowQualityCheckBox.Pressed == _cfg.GetCVar(CCVars.ParallaxLowQuality);
var isFpsCounterVisibleSame = FpsCounterCheckBox.Pressed == _cfg.GetCVar(CCVars.HudFpsCounterVisible); var isFpsCounterVisibleSame = FpsCounterCheckBox.Pressed == _cfg.GetCVar(CCVars.HudFpsCounterVisible);
var isLogInChatSame = LogInChatCheckBox.Pressed == _cfg.GetCVar(WhiteCVars.LogChatActions); var isLogInChatSame = LogInChatCheckBox.Pressed == _cfg.GetCVar(WhiteCVars.LogChatActions);
var isShowTrailsSame = ShowTrailsCheckBox.Pressed == _cfg.GetCVar(WhiteCVars.ShowTrails);
var isWidthSame = (int) ViewportWidthSlider.Value == _cfg.GetCVar(CCVars.ViewportWidth); var isWidthSame = (int) ViewportWidthSlider.Value == _cfg.GetCVar(CCVars.ViewportWidth);
ApplyButton.Disabled = isVSyncSame && ApplyButton.Disabled = isVSyncSame &&
@@ -162,7 +166,8 @@ namespace Content.Client.Options.UI.Tabs
isPLQSame && isPLQSame &&
isFpsCounterVisibleSame && isFpsCounterVisibleSame &&
isWidthSame && isWidthSame &&
isLogInChatSame; isLogInChatSame &&
isShowTrailsSame;
} }
private bool ConfigIsFullscreen => private bool ConfigIsFullscreen =>

View File

@@ -1,6 +1,8 @@
using Content.Client._White.Trail.Line.Manager; using Content.Client._White.Trail.Line.Manager;
using Content.Shared._White;
using Robust.Client.Graphics; using Robust.Client.Graphics;
using Robust.Client.ResourceManagement; using Robust.Client.ResourceManagement;
using Robust.Shared.Configuration;
using Robust.Shared.Enums; using Robust.Shared.Enums;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
@@ -11,6 +13,9 @@ public sealed class TrailOverlay : Overlay
private readonly IPrototypeManager _protoManager; private readonly IPrototypeManager _protoManager;
private readonly IResourceCache _cache; private readonly IResourceCache _cache;
private readonly ITrailLineManager _lineManager; private readonly ITrailLineManager _lineManager;
private readonly IConfigurationManager _cfg;
private bool _showTrails;
private readonly Dictionary<string, ShaderInstance?> _shaderDict; private readonly Dictionary<string, ShaderInstance?> _shaderDict;
private readonly Dictionary<string, Texture?> _textureDict; private readonly Dictionary<string, Texture?> _textureDict;
@@ -20,13 +25,17 @@ public sealed class TrailOverlay : Overlay
public TrailOverlay( public TrailOverlay(
IPrototypeManager protoManager, IPrototypeManager protoManager,
IResourceCache cache, IResourceCache cache,
IConfigurationManager cfg,
ITrailLineManager lineManager ITrailLineManager lineManager
) )
{ {
_protoManager = protoManager; _protoManager = protoManager;
_cache = cache; _cache = cache;
_cfg = cfg;
_lineManager = lineManager; _lineManager = lineManager;
_cfg.OnValueChanged(WhiteCVars.ShowTrails, val => _showTrails = val, true);
_shaderDict = new Dictionary<string, ShaderInstance?>(); _shaderDict = new Dictionary<string, ShaderInstance?>();
_textureDict = new Dictionary<string, Texture?>(); _textureDict = new Dictionary<string, Texture?>();
@@ -38,6 +47,9 @@ public sealed class TrailOverlay : Overlay
var handle = args.WorldHandle; var handle = args.WorldHandle;
foreach (var item in _lineManager.Lines) foreach (var item in _lineManager.Lines)
{ {
if (!_showTrails && item.Settings.OptionsConcealable)
continue;
item.Render(handle, GetCachedTexture(item.Settings.TexurePath ?? "")); item.Render(handle, GetCachedTexture(item.Settings.TexurePath ?? ""));
} }
} }

View File

@@ -2,6 +2,7 @@ using Content.Client._White.Trail.Line.Manager;
using Content.Shared._White.Trail; using Content.Shared._White.Trail;
using Robust.Client.Graphics; using Robust.Client.Graphics;
using Robust.Client.ResourceManagement; using Robust.Client.ResourceManagement;
using Robust.Shared.Configuration;
using Robust.Shared.GameStates; using Robust.Shared.GameStates;
using Robust.Shared.Map; using Robust.Shared.Map;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
@@ -23,6 +24,7 @@ public sealed class TrailSystem : EntitySystem
new TrailOverlay( new TrailOverlay(
IoCManager.Resolve<IPrototypeManager>(), IoCManager.Resolve<IPrototypeManager>(),
IoCManager.Resolve<IResourceCache>(), IoCManager.Resolve<IResourceCache>(),
IoCManager.Resolve<IConfigurationManager>(),
_lineManager _lineManager
)); ));

View File

@@ -21,6 +21,7 @@ public sealed partial class TrailComponent : SharedTrailComponent
TexurePath = defaultTrail.TexurePath; TexurePath = defaultTrail.TexurePath;
Gradient = defaultTrail.Gradient; Gradient = defaultTrail.Gradient;
GradientIteratorType = defaultTrail.GradientIteratorType; GradientIteratorType = defaultTrail.GradientIteratorType;
OptionsConcealable = defaultTrail.OptionsConcealable;
} }
public override Vector2 Gravity { get; set; } public override Vector2 Gravity { get; set; }
@@ -48,4 +49,6 @@ public sealed partial class TrailComponent : SharedTrailComponent
public override TrailSplineRendererType SplineRendererType { get; set; } public override TrailSplineRendererType SplineRendererType { get; set; }
public override Spline4DType GradientIteratorType { get; set; } public override Spline4DType GradientIteratorType { get; set; }
public override bool OptionsConcealable { get; set; }
} }

View File

@@ -60,6 +60,9 @@ public abstract partial class SharedTrailComponent : Component, ITrailSettings
[DataField("splineRendererType")] [DataField("splineRendererType")]
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
public virtual TrailSplineRendererType SplineRendererType { get; set; } public virtual TrailSplineRendererType SplineRendererType { get; set; }
[DataField, ViewVariables(VVAccess.ReadWrite)]
public virtual bool OptionsConcealable { get; set; }
} }
[Serializable, NetSerializable] [Serializable, NetSerializable]

View File

@@ -37,6 +37,8 @@ public sealed partial class TrailSettings : ITrailSettings
public TrailSplineRendererType SplineRendererType { get; set; } public TrailSplineRendererType SplineRendererType { get; set; }
public bool OptionsConcealable { get; set; }
public static void Inject(ITrailSettings into, ITrailSettings from) public static void Inject(ITrailSettings into, ITrailSettings from)
{ {
into.Scale = from.Scale; into.Scale = from.Scale;
@@ -51,6 +53,7 @@ public sealed partial class TrailSettings : ITrailSettings
into.Gradient = from.Gradient; into.Gradient = from.Gradient;
into.SplineIteratorType = from.SplineIteratorType; into.SplineIteratorType = from.SplineIteratorType;
into.SplineRendererType = from.SplineRendererType; into.SplineRendererType = from.SplineRendererType;
into.OptionsConcealable = from.OptionsConcealable;
} }
} }
@@ -81,6 +84,8 @@ public interface ITrailSettings
Spline2DType SplineIteratorType { get; set; } Spline2DType SplineIteratorType { get; set; }
TrailSplineRendererType SplineRendererType { get; set; } TrailSplineRendererType SplineRendererType { get; set; }
bool OptionsConcealable { get; set; }
} }
public enum SegmentCreationMethod : byte public enum SegmentCreationMethod : byte

View File

@@ -12,6 +12,13 @@ namespace Content.Shared._White;
[CVarDefs] [CVarDefs]
public sealed class WhiteCVars public sealed class WhiteCVars
{ {
/*
* Bullet trails
*/
public static readonly CVarDef<bool> ShowTrails =
CVarDef.Create("white.show_trails", true, CVar.CLIENTONLY | CVar.ARCHIVE);
/* /*
* Wiki rules * Wiki rules
*/ */

View File

@@ -1,6 +1,6 @@
- type: entity - type: entity
noSpawn: true noSpawn: true
parent: BaseBullet parent: [BaseBullet, BaseBulletTrail]
id: BulletAntiMateriel id: BulletAntiMateriel
name: bullet (.60 anti-materiel) name: bullet (.60 anti-materiel)
components: components:

View File

@@ -1,7 +1,7 @@
- type: entity - type: entity
id: BulletCaselessRifle id: BulletCaselessRifle
name: bullet (.25 caseless) name: bullet (.25 caseless)
parent: BaseBullet parent: [BaseBullet, BaseBulletTrail]
noSpawn: true noSpawn: true
components: components:
- type: Projectile - type: Projectile
@@ -12,7 +12,7 @@
- type: entity - type: entity
id: BulletCaselessRiflePractice id: BulletCaselessRiflePractice
name: bullet (.25 caseless practice) name: bullet (.25 caseless practice)
parent: BaseBulletPractice parent: [BaseBulletPractice, BaseBulletTrail]
noSpawn: true noSpawn: true
components: components:
- type: Projectile - type: Projectile
@@ -23,7 +23,7 @@
- type: entity - type: entity
id: BulletCaselessRifleRubber id: BulletCaselessRifleRubber
name: bullet (.25 caseless rubber) name: bullet (.25 caseless rubber)
parent: BaseBulletRubber parent: [BaseBulletRubber, BaseBulletTrail]
noSpawn: true noSpawn: true
components: components:
- type: Projectile - type: Projectile

View File

@@ -2,7 +2,7 @@
id: PelletClusterRubber id: PelletClusterRubber
name: pellet (ball, Rubber) name: pellet (ball, Rubber)
noSpawn: true noSpawn: true
parent: BaseBullet parent: [BaseBullet, BaseBulletTrail]
components: components:
- type: Sprite - type: Sprite
sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
@@ -23,7 +23,7 @@
id: PelletClusterLethal id: PelletClusterLethal
name: pellet (ball, Lethal) name: pellet (ball, Lethal)
noSpawn: true noSpawn: true
parent: BaseBullet parent: [BaseBullet, BaseBulletTrail]
components: components:
- type: Sprite - type: Sprite
sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
@@ -41,7 +41,7 @@
id: PelletClusterIncendiary id: PelletClusterIncendiary
name: pellet (ball, incendiary) name: pellet (ball, incendiary)
noSpawn: true noSpawn: true
parent: BaseBulletIncendiary parent: [BaseBulletIncendiary, BaseBulletTrail]
components: components:
- type: Sprite - type: Sprite
sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi

View File

@@ -1,7 +1,7 @@
- type: entity - type: entity
id: BulletHeavyRifle id: BulletHeavyRifle
name: bullet (.20 rifle) name: bullet (.20 rifle)
parent: BaseBullet parent: [BaseBullet, BaseBulletTrail]
noSpawn: true noSpawn: true
components: components:
- type: Projectile - type: Projectile
@@ -12,7 +12,7 @@
- type: entity - type: entity
id: BulletMinigun id: BulletMinigun
name: minigun bullet (.10 rifle) name: minigun bullet (.10 rifle)
parent: BulletHeavyRifle parent: [BulletHeavyRifle, BaseBulletTrail]
noSpawn: true noSpawn: true
components: components:
- type: Projectile - type: Projectile

View File

@@ -1,7 +1,7 @@
- type: entity - type: entity
id: BulletLightRifle id: BulletLightRifle
name: bullet (.20 rifle) name: bullet (.20 rifle)
parent: BaseBullet parent: [BaseBullet, BaseBulletTrail]
noSpawn: true noSpawn: true
components: components:
- type: Projectile - type: Projectile
@@ -12,7 +12,7 @@
- type: entity - type: entity
id: BulletLightRiflePractice id: BulletLightRiflePractice
name: bullet (.20 rifle practice) name: bullet (.20 rifle practice)
parent: BaseBulletPractice parent: [BaseBulletPractice, BaseBulletTrail]
noSpawn: true noSpawn: true
components: components:
- type: Projectile - type: Projectile
@@ -23,7 +23,7 @@
- type: entity - type: entity
id: BulletLightRifleRubber id: BulletLightRifleRubber
name: bullet (.20 rifle rubber) name: bullet (.20 rifle rubber)
parent: BaseBulletRubber parent: [BaseBulletRubber, BaseBulletTrail]
noSpawn: true noSpawn: true
components: components:
- type: Projectile - type: Projectile
@@ -33,7 +33,7 @@
- type: entity - type: entity
id: BulletLightRifleIncendiary id: BulletLightRifleIncendiary
parent: BaseBulletIncendiary parent: [BaseBulletIncendiary, BaseBulletTrail]
name: bullet (.20 rifle incendiary) name: bullet (.20 rifle incendiary)
noSpawn: true noSpawn: true
components: components:
@@ -45,7 +45,7 @@
- type: entity - type: entity
id: BulletLightRifleUranium id: BulletLightRifleUranium
parent: BaseBulletUranium parent: [BaseBulletUranium, BaseBulletTrail]
name: bullet (.20 rifle uranium) name: bullet (.20 rifle uranium)
noSpawn: true noSpawn: true
components: components:

View File

@@ -1,7 +1,7 @@
- type: entity - type: entity
id: BulletMagnum id: BulletMagnum
name: bullet (.45 magnum) name: bullet (.45 magnum)
parent: BaseBullet parent: [BaseBullet, BaseBulletTrail]
noSpawn: true noSpawn: true
components: components:
- type: Projectile - type: Projectile
@@ -12,7 +12,7 @@
- type: entity - type: entity
id: BulletMagnumPractice id: BulletMagnumPractice
name: bullet (.45 magnum practice) name: bullet (.45 magnum practice)
parent: BaseBulletPractice parent: [BaseBulletPractice, BaseBulletTrail]
noSpawn: true noSpawn: true
components: components:
- type: Projectile - type: Projectile
@@ -23,7 +23,7 @@
- type: entity - type: entity
id: BulletMagnumRubber id: BulletMagnumRubber
name: bullet (.45 magnum rubber) name: bullet (.45 magnum rubber)
parent: BaseBulletRubber parent: [BaseBulletRubber, BaseBulletTrail]
noSpawn: true noSpawn: true
components: components:
- type: Projectile - type: Projectile
@@ -36,7 +36,7 @@
- type: entity - type: entity
id: BulletMagnumIncendiary id: BulletMagnumIncendiary
parent: BaseBulletIncendiary parent: [BaseBulletIncendiary, BaseBulletTrail]
name: bullet (.45 magnum incendiary) name: bullet (.45 magnum incendiary)
noSpawn: true noSpawn: true
components: components:
@@ -49,7 +49,7 @@
- type: entity - type: entity
id: BulletMagnumAP id: BulletMagnumAP
name: bullet (.45 magnum armor-piercing) name: bullet (.45 magnum armor-piercing)
parent: BaseBulletAP parent: [BaseBulletAP, BaseBulletTrail]
noSpawn: true noSpawn: true
components: components:
- type: Projectile - type: Projectile
@@ -61,7 +61,7 @@
- type: entity - type: entity
id: BulletMagnumUranium id: BulletMagnumUranium
name: bullet (.45 magnum uranium) name: bullet (.45 magnum uranium)
parent: BaseBulletUranium parent: [BaseBulletUranium, BaseBulletTrail]
noSpawn: true noSpawn: true
components: components:
- type: Projectile - type: Projectile

View File

@@ -1,7 +1,7 @@
- type: entity - type: entity
id: BulletPistol id: BulletPistol
name: bullet (.35 auto) name: bullet (.35 auto)
parent: BaseBullet parent: [BaseBullet, BaseBulletTrail]
noSpawn: true noSpawn: true
components: components:
- type: Projectile - type: Projectile
@@ -12,7 +12,7 @@
- type: entity - type: entity
id: BulletPistolPractice id: BulletPistolPractice
name: bullet (.35 auto practice) name: bullet (.35 auto practice)
parent: BaseBulletPractice parent: [BaseBulletPractice, BaseBulletTrail]
noSpawn: true noSpawn: true
components: components:
- type: Projectile - type: Projectile
@@ -23,7 +23,7 @@
- type: entity - type: entity
id: BulletPistolRubber id: BulletPistolRubber
name: bullet (.35 auto rubber) name: bullet (.35 auto rubber)
parent: BaseBulletRubber parent: [BaseBulletRubber, BaseBulletTrail]
noSpawn: true noSpawn: true
components: components:
- type: Projectile - type: Projectile
@@ -33,7 +33,7 @@
- type: entity - type: entity
id: BulletPistolIncendiary id: BulletPistolIncendiary
parent: BaseBulletIncendiary parent: [BaseBulletIncendiary, BaseBulletTrail]
name: bullet (.35 auto incendiary) name: bullet (.35 auto incendiary)
noSpawn: true noSpawn: true
components: components:
@@ -45,7 +45,7 @@
- type: entity - type: entity
id: BulletPistolUranium id: BulletPistolUranium
parent: BaseBulletUranium parent: [BaseBulletUranium, BaseBulletTrail]
name: bullet (.35 auto uranium) name: bullet (.35 auto uranium)
noSpawn: true noSpawn: true
components: components:

View File

@@ -1,7 +1,7 @@
- type: entity - type: entity
id: BulletRifle id: BulletRifle
name: bullet (0.20 rifle) name: bullet (0.20 rifle)
parent: BaseBullet parent: [BaseBullet, BaseBulletTrail]
noSpawn: true noSpawn: true
components: components:
- type: Projectile - type: Projectile
@@ -12,7 +12,7 @@
- type: entity - type: entity
id: BulletRiflePractice id: BulletRiflePractice
name: bullet (0.20 rifle practice) name: bullet (0.20 rifle practice)
parent: BaseBulletPractice parent: [BaseBulletPractice, BaseBulletTrail]
noSpawn: true noSpawn: true
components: components:
- type: Projectile - type: Projectile
@@ -23,7 +23,7 @@
- type: entity - type: entity
id: BulletRifleRubber id: BulletRifleRubber
name: bullet (0.20 rifle rubber) name: bullet (0.20 rifle rubber)
parent: BaseBulletRubber parent: [BaseBulletRubber, BaseBulletTrail]
noSpawn: true noSpawn: true
components: components:
- type: Projectile - type: Projectile
@@ -33,7 +33,7 @@
- type: entity - type: entity
id: BulletRifleIncendiary id: BulletRifleIncendiary
parent: BaseBulletIncendiary parent: [BaseBulletIncendiary, BaseBulletTrail]
name: bullet (0.20 rifle incendiary) name: bullet (0.20 rifle incendiary)
noSpawn: true noSpawn: true
components: components:
@@ -42,10 +42,10 @@
types: types:
Blunt: 2 Blunt: 2
Heat: 15 Heat: 15
- type: entity - type: entity
id: BulletRifleUranium id: BulletRifleUranium
parent: BaseBulletUranium parent: [BaseBulletUranium, BaseBulletTrail]
name: bullet (0.20 rifle uranium) name: bullet (0.20 rifle uranium)
noSpawn: true noSpawn: true
components: components:
@@ -54,4 +54,4 @@
types: types:
Radiation: 7 Radiation: 7
Piercing: 8 Piercing: 8

View File

@@ -2,7 +2,7 @@
id: PelletShotgunSlug id: PelletShotgunSlug
name: pellet (.50 slug) name: pellet (.50 slug)
noSpawn: true noSpawn: true
parent: BaseBullet parent: [BaseBullet, BaseBulletTrail]
components: components:
- type: Sprite - type: Sprite
sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
@@ -16,7 +16,7 @@
id: PelletShotgunBeanbag id: PelletShotgunBeanbag
name: beanbag (.50) name: beanbag (.50)
noSpawn: true noSpawn: true
parent: BaseBullet parent: [BaseBullet, BaseBulletTrail]
components: components:
- type: Sprite - type: Sprite
sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
@@ -33,7 +33,7 @@
id: PelletShotgun id: PelletShotgun
name: pellet (.50) name: pellet (.50)
noSpawn: true noSpawn: true
parent: BaseBullet parent: [BaseBullet, BaseBulletTrail]
components: components:
- type: Sprite - type: Sprite
sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
@@ -47,7 +47,7 @@
id: PelletShotgunIncendiary id: PelletShotgunIncendiary
name: pellet (.50 incendiary) name: pellet (.50 incendiary)
noSpawn: true noSpawn: true
parent: BaseBulletIncendiary parent: [BaseBulletIncendiary, BaseBulletTrail]
components: components:
- type: Sprite - type: Sprite
sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
@@ -64,7 +64,7 @@
id: PelletShotgunPractice id: PelletShotgunPractice
name: pellet (.50 practice) name: pellet (.50 practice)
noSpawn: true noSpawn: true
parent: BaseBulletPractice parent: [BaseBulletPractice, BaseBulletTrail]
components: components:
- type: Sprite - type: Sprite
sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
@@ -78,7 +78,7 @@
id: PelletShotgunImprovised id: PelletShotgunImprovised
name: improvised pellet name: improvised pellet
noSpawn: true noSpawn: true
parent: BaseBullet parent: [BaseBullet, BaseBulletTrail]
components: components:
- type: Sprite - type: Sprite
sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
@@ -93,7 +93,7 @@
id: PelletShotgunTranquilizer id: PelletShotgunTranquilizer
name: pellet (.50 tranquilizer) name: pellet (.50 tranquilizer)
noSpawn: true noSpawn: true
parent: BaseBulletPractice parent: [BaseBulletPractice, BaseBulletTrail]
components: components:
- type: Sprite - type: Sprite
sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
@@ -167,7 +167,7 @@
id: PelletShotgunUranium id: PelletShotgunUranium
name: pellet (.50 uranium) name: pellet (.50 uranium)
noSpawn: true noSpawn: true
parent: BaseBullet parent: [BaseBullet, BaseBulletTrail]
components: components:
- type: Sprite - type: Sprite
sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
@@ -182,7 +182,7 @@
id: PelletGrapeshot #tally fucking ho id: PelletGrapeshot #tally fucking ho
name: grapeshot pellet name: grapeshot pellet
noSpawn: true noSpawn: true
parent: BaseBullet parent: [BaseBullet, BaseBulletTrail]
components: components:
- type: Sprite - type: Sprite
noRot: false noRot: false

View File

@@ -0,0 +1,23 @@
- type: entity
noSpawn: true
abstract: true
id: BaseBulletTrail
name: BaseBulletTrail
components:
- type: Trail
splineIteratorType: CatmullRom
splineRendererType: Continuous
creationMethod: OnMove
lengthStep: 0.1
scale: 0.03, 0.0
lifetime: 1
randomWalk: 0.03, 0.001
gravity: 0.001, 0.005
texturePath: /Textures/White/Effects/Trails/Continuous/trail.png
gradientIteratorType: Bezier
gradient:
- 1, 1, 1, 0
- 1, 1, 1, 2
- 1, 1, 1, 0
- 1, 1, 1, 0
optionsConcealable: true