Particle cap config
This commit is contained in:
1 parent
e24c9afe14
commit
ae92e313be
2 files changed
+9
-1
No files matched your search
@@ -30,6 +30,14 @@ namespace CalamityMod
|
||||
[Tooltip("Enables rendering afterimages for Calamity NPCs, projectiles, etc.\nDisable to improve performance.")]
|
||||
public bool Afterimages { get; set; }
|
||||
|
||||
[Label("Maximum particles")]
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
[Range(0, 1000)]
|
||||
[DefaultValue(500)]
|
||||
[Tooltip("Sets the maximum of particle effects that can exist at once.\nParticles are separate from dust and gores.\nTurn down to improve performance.")]
|
||||
public int ParticleLimit { get; set; }
|
||||
|
||||
[Label("Disable Screenshakes")]
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(false)]
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Particles
|
||||
/// This is the maximum of particles allowed. Particles marked as important may replace nonimportant particles when the cap is reached
|
||||
/// </summary>
|
||||
// May be a good idea to make this into a config option
|
||||
private static readonly int particleCap = 500;
|
||||
private static readonly int particleCap = CalamityConfig.Instance.ParticleLimit;
|
||||
|
||||
private static Particle[] particles;
|
||||
private static int nextVacantIndex;
|
||||
|
||||
Reference in new issue
Block a user