A small addition to the documentation (#30506)
* Completion of documentation Comments have been added to ConditionalSpawnerComponent and RandomSpawnerComponent * Appear fix Some fixes with word "appear"
This commit is contained in:
@@ -6,14 +6,25 @@ namespace Content.Server.Spawners.Components
|
|||||||
[Virtual]
|
[Virtual]
|
||||||
public partial class ConditionalSpawnerComponent : Component
|
public partial class ConditionalSpawnerComponent : Component
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A list of entities, one of which can spawn in after calling Spawn()
|
||||||
|
/// </summary>
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
[DataField]
|
[DataField]
|
||||||
public List<EntProtoId> Prototypes { get; set; } = new();
|
public List<EntProtoId> Prototypes { get; set; } = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A list of game rules.
|
||||||
|
/// If at least one of them was launched in the game,
|
||||||
|
/// an attempt will occur to spawn one of the objects in the Prototypes list
|
||||||
|
/// </summary>
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
[DataField]
|
[DataField]
|
||||||
public List<EntProtoId> GameRules = new();
|
public List<EntProtoId> GameRules = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Chance of spawning an entity
|
||||||
|
/// </summary>
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
[DataField]
|
[DataField]
|
||||||
public float Chance { get; set; } = 1.0f;
|
public float Chance { get; set; } = 1.0f;
|
||||||
|
|||||||
@@ -5,18 +5,33 @@ namespace Content.Server.Spawners.Components
|
|||||||
[RegisterComponent, EntityCategory("Spawner")]
|
[RegisterComponent, EntityCategory("Spawner")]
|
||||||
public sealed partial class RandomSpawnerComponent : ConditionalSpawnerComponent
|
public sealed partial class RandomSpawnerComponent : ConditionalSpawnerComponent
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A list of rarer entities that can spawn with the RareChance
|
||||||
|
/// instead of one of the entities in the Prototypes list.
|
||||||
|
/// </summary>
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
[DataField]
|
[DataField]
|
||||||
public List<EntProtoId> RarePrototypes { get; set; } = new();
|
public List<EntProtoId> RarePrototypes { get; set; } = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The chance that a rare prototype may spawn instead of a common prototype
|
||||||
|
/// </summary>
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
[DataField]
|
[DataField]
|
||||||
public float RareChance { get; set; } = 0.05f;
|
public float RareChance { get; set; } = 0.05f;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Scatter of entity spawn coordinates
|
||||||
|
/// </summary>
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
[DataField]
|
[DataField]
|
||||||
public float Offset { get; set; } = 0.2f;
|
public float Offset { get; set; } = 0.2f;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A variable meaning whether the spawn will
|
||||||
|
/// be able to be used again or whether
|
||||||
|
/// it will be destroyed after the first use
|
||||||
|
/// </summary>
|
||||||
[DataField]
|
[DataField]
|
||||||
public bool DeleteSpawnerAfterSpawn = true;
|
public bool DeleteSpawnerAfterSpawn = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user