-
Notifications
You must be signed in to change notification settings - Fork 3
Beam System
SmArtKar edited this page Jan 8, 2023
·
6 revisions
This article is for C# users who wish to use beams in their mods.
Beams are spawned via static methods of corresponding type - Beam.CreateActiveBeam and Beam.CreateStaticBeam respectively
public static Beam CreateActiveBeam(Thing beamStart, Thing beamEnd, ThingDef beamDef, Vector3 startOffset = new Vector3(), Vector3 endOffset = new Vector3()) { }
public static Beam CreateStaticBeam(Thing beamStart, Thing beamEnd, ThingDef beamDef, Vector3 startOffset = new Vector3(), Vector3 endOffset = new Vector3()) { }
public static Beam CreateStaticBeam(Vector3 beamStart, Vector3 beamEnd, ThingDef beamDef, Map map) { }All of them return created beam objects
public abstract class Beam : ThingWithComps
{
public Vector3 firstPoint;
public Vector3 secondPoint;
public Matrix4x4 matrix;
public List<List<Material>> materials;
public Material curMat;
public int frameAmount = 0;
public int frameDelayAmount = 0;
public int currentFrame = 0;
public int currentFrameTick = 0;
public int sizeIndex = 0;
public int sizeAmount = 0;
public float maxRange = 0;
public int ticksLeft = -1;
public int fadeoutTicks = -1;
}- Stats
- Gene Templates
- Pawn Group Utility
- Under Group Combat Pressure Think Node
- Min Prey Body Size
- Modular Things
- Gene Locked Recipes and Buildings
- Additional Gene Drops
- Angle Based Shotguns
- Following ("Running") Beams
- Pawn Turret Extensions
- Damage Modification
- Advanced Tools
- Shockwave Attacks
- Miniguns
- Elite Shot
- AOE Hediff Explosion Projectiles
- Frag Grenades
- Cooldown Graphics
- Scatter Things Ability
- Abilities on Equipment
- Burst Projectile Abilities
- Reloadable Abilities
- Shockwave Ability
- Projectile Comps
- Projectile Impact Effects
- Projectile Trails
- Bouncy Projectiles
- Spawner Projectiles
- Roof Collapse Projectiles
- Scattershot Projectiles
- Custom Body Graphic For Apparel
- Multi Layered Apparel Graphics
- Advanced Equipment Shields
- Equipment with Prerequisites
- Advanced Armor
- Gene-based Apparel Textures
- Gene Locked Equipment
- Additional Apparel Graphics Comps
- Hediff Giver Extension
- Bomb Hediff Comp
- Remove On Severity Comp
- Renderable Hediffs
- Shield Hediffs
- Armored Hediffs
- Disableable Hediffs
- Modular Hediffs
- Hediffs with Prerequisites
- Singular Hediff Abilities
- Hediff On Damage
- Additional Hediff Graphics Comps
- Caching
- IArmored
- IDamageResponse
- IRenderable
- IStageOverride
- IStatModifier
- IProjectile
- IPreventEquip
- IHediffGraphicGiver and IEquippableGraphicGiver
- IDamageModifier
- IColorSelector
- IBodyModifier