Merge branch 'general-devel' into patch-31

This commit is contained in:
Chris 2021-08-02 18:58:04 +09:30 committed by GitHub
commit b766b478fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 3 deletions

View file

@ -156,6 +156,12 @@ namespace TShockAPI.Configuration
/// <summary>Disables tombstone dropping during death for all players.</summary>
[Description("Disables tombstone dropping during death for all players.")]
public bool DisableTombstones = true;
/// <summary>
/// Disables Skeletron Prime Bombs from spawning, useful for preventing unwanted world destruction on for the worthy seed world.
/// </summary>
[Description("Disables Skeletron Prime Bombs from spawning, useful for preventing unwanted world destruction on for the worthy seed world.")]
public bool DisablePrimeBombs;
/// <summary>Forces the world time to be normal, day, or night.</summary>
[Description("Forces the world time to be normal, day, or night.")]

View file

@ -1618,15 +1618,18 @@ namespace TShockAPI
private void OnProjectileSetDefaults(SetDefaultsEventArgs<Projectile, int> e)
{
//tombstone fix.
if (e.Info == 43 || (e.Info >= 201 && e.Info <= 205) || (e.Info >= 527 && e.Info <= 531))
if (e.Info == ProjectileID.Tombstone || (e.Info >= ProjectileID.GraveMarker && e.Info <= ProjectileID.Obelisk) || (e.Info >= ProjectileID.RichGravestone1 && e.Info <= ProjectileID.RichGravestone5))
if (Config.Settings.DisableTombstones)
e.Object.SetDefaults(0);
if (e.Info == 75)
if (e.Info == ProjectileID.HappyBomb)
if (Config.Settings.DisableClownBombs)
e.Object.SetDefaults(0);
if (e.Info == 109)
if (e.Info == ProjectileID.SnowBallHostile)
if (Config.Settings.DisableSnowBalls)
e.Object.SetDefaults(0);
if (e.Info == ProjectileID.BombSkeletronPrime)
if (Config.Settings.DisablePrimeBombs)
e.Object.SetDefaults(0);
}
/// <summary>NetHooks_SendData - Fired when the server sends data.</summary>