Files
ArachnaeSwarm/Source/ArachnaeSwarm/Projectiles/Projectile_ConfigurableHellsphereCannon.cs
2025-09-09 12:44:47 +08:00

93 lines
4.8 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using Verse;
using RimWorld;
using System.Collections.Generic;
namespace ArachnaeSwarm
{
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڶ<EFBFBD><DAB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>XML<4D><4C> <projectile> <20>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><C3B5>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԡ<EFBFBD>
/// </summary>
public class ProjectileProperties_ConfigurableHellsphereCannon : ProjectileProperties
{
// --- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֣<EFBFBD><D6A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> explosionChanceToStartFire ---
// ʹ<><CAB9> 'new' <20>ؼ<EFBFBD><D8BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ز<EFBFBD><D8B2><EFBFBD><E6BBBB><EFBFBD><EFBFBD><EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD>ֶ<EFBFBD>
public new float explosionRadius = 4.9f;
public new float explosionChanceToStartFire = 0f; // <--- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD>ʹ<EFBFBD><CAB9><EFBFBD><EFBFBD><EFBFBD>XML<4D><4C><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
public new bool applyDamageToExplosionCellsNeighbors = false;
public new ThingDef preExplosionSpawnThingDef = null;
public new float preExplosionSpawnChance = 0f;
public new int preExplosionSpawnThingCount = 1;
public new ThingDef postExplosionSpawnThingDef = null;
public new float postExplosionSpawnChance = 0f;
public new int postExplosionSpawnThingCount = 1;
public new GasType? postExplosionGasType = null;
public new float screenShakeFactor = 1f;
public new ThingDef postExplosionSpawnThingDefWater = null;
public new ThingDef postExplosionSpawnSingleThingDef = null;
public new ThingDef preExplosionSpawnSingleThingDef = null;
// <20><>Щ<EFBFBD><D0A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD>ȫ<EFBFBD><C8AB><EFBFBD>ֶΣ<D6B6><CEA3><EFBFBD><EFBFBD><EFBFBD>Ҫ 'new' <20>ؼ<EFBFBD><D8BC><EFBFBD>
public SoundDef explosionSound = null;
public bool damageFalloff = false;
public bool doVisualEffects = true;
public bool doSoundEffects = true;
public float? postExplosionGasRadiusOverride = null;
public int postExplosionGasAmount = 255;
public float? direction = null;
public FloatRange? affectedAngle = null;
public float excludeRadius = 0f;
public SimpleCurve flammabilityChanceCurve = null;
}
/// <summary>
/// <20><><EFBFBD><EFBFBD>Ͷ<EFBFBD><CDB6><EFBFBD><EFBFBD>ĺ<EFBFBD><C4BA><EFBFBD><EFBFBD>߼<EFBFBD><DFBC><EFBFBD><E0A3AC>XML<4D>е<EFBFBD> <thingClass> ָ<><D6B8><EFBFBD><EFBFBD>
/// </summary>
public class Projectile_ConfigurableHellsphereCannon : Projectile
{
public ProjectileProperties_ConfigurableHellsphereCannon Props => (ProjectileProperties_ConfigurableHellsphereCannon)def.projectile;
protected override void Impact(Thing hitThing, bool blockedByShield = false)
{
Map map = base.Map;
base.Impact(hitThing, blockedByShield);
GenExplosion.DoExplosion(
center: base.Position,
map: map,
radius: Props.explosionRadius,
damType: base.DamageDef,
instigator: launcher,
damAmount: DamageAmount,
armorPenetration: ArmorPenetration,
explosionSound: Props.explosionSound,
weapon: equipmentDef,
projectile: def,
intendedTarget: intendedTarget.Thing,
postExplosionSpawnThingDef: Props.postExplosionSpawnThingDef,
postExplosionSpawnChance: Props.postExplosionSpawnChance,
postExplosionSpawnThingCount: Props.postExplosionSpawnThingCount,
postExplosionGasType: Props.postExplosionGasType,
postExplosionGasRadiusOverride: Props.postExplosionGasRadiusOverride,
postExplosionGasAmount: Props.postExplosionGasAmount,
applyDamageToExplosionCellsNeighbors: Props.applyDamageToExplosionCellsNeighbors,
preExplosionSpawnThingDef: Props.preExplosionSpawnThingDef,
preExplosionSpawnChance: Props.preExplosionSpawnChance,
preExplosionSpawnThingCount: Props.preExplosionSpawnThingCount,
// --- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֣<EFBFBD>ʹ<EFBFBD><CAB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD>ֶ<EFBFBD> ---
chanceToStartFire: Props.explosionChanceToStartFire, // <--- <20><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>
damageFalloff: Props.damageFalloff,
direction: Props.direction,
affectedAngle: Props.affectedAngle,
doVisualEffects: Props.doVisualEffects,
propagationSpeed: base.DamageDef.expolosionPropagationSpeed,
excludeRadius: Props.excludeRadius,
doSoundEffects: Props.doSoundEffects,
postExplosionSpawnThingDefWater: Props.postExplosionSpawnThingDefWater,
screenShakeFactor: Props.screenShakeFactor,
flammabilityChanceCurve: Props.flammabilityChanceCurve,
postExplosionSpawnSingleThingDef: Props.postExplosionSpawnSingleThingDef,
preExplosionSpawnSingleThingDef: Props.preExplosionSpawnSingleThingDef
);
}
}
}