Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added documentation to TeslaZap #20249

Merged
merged 2 commits into from Sep 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions OpenRA.Mods.Cnc/Projectiles/TeslaZap.cs
Expand Up @@ -23,21 +23,30 @@ public class TeslaZapInfo : IProjectileInfo
public readonly string Image = "litning";

[SequenceReference(nameof(Image))]
[Desc("Sprite sequence to play at the center.")]
public readonly string BrightSequence = "bright";

[SequenceReference(nameof(Image))]
[Desc("Sprite sequence to play at the borders.")]
public readonly string DimSequence = "dim";

[PaletteReference]
[Desc("The palette used to draw this electric zap.")]
public readonly string Palette = "effect";

[Desc("How many sprite sequences to play at the center.")]
public readonly int BrightZaps = 1;

[Desc("How many sprite sequences to play at the borders.")]
public readonly int DimZaps = 2;

[Desc("How long (in ticks) to play the sprite sequences.")]
public readonly int Duration = 2;

[Desc("How long (in ticks) until applying damage. Can't be longer than `" + nameof(Duration) + "`")]
public readonly int DamageDuration = 1;

[Desc("Follow the targeted actor when it moves.")]
public readonly bool TrackTarget = true;

public IProjectile Create(ProjectileArgs args) { return new TeslaZap(this, args); }
Expand Down
3 changes: 2 additions & 1 deletion OpenRA.Mods.Common/Traits/World/ActorSpawnManager.cs
Expand Up @@ -27,7 +27,8 @@ public class ActorSpawnManagerInfo : ConditionalTraitInfo, Requires<MapCreepsInf
[Desc("Maximum number of actors.")]
public readonly int Maximum = 4;

[Desc("Time (in ticks) between actor spawn. Supports 1 or 2 values.\nIf 2 values are provided they are used as a range from which a value is randomly selected.")]
[Desc("Time (in ticks) between actor spawn. Supports 1 or 2 values.",
"If 2 values are provided they are used as a range from which a value is randomly selected.")]
public readonly int[] SpawnInterval = { 6000 };

[FieldLoader.Require]
Expand Down