mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
Roundstart variation game rules (#24397)
* Raise `StationPostInitEvent` broadcast * Basic variation pass handling * standardize names + rule entities * why does it work like that? * add to defaults * light break variation pass * ent spawn entry * move some stationevent utility functions to gamerule + add one for finding random tile on specified station * forgot how statistics works * powered light variation pass is good now * station tile count function * public method to ensure all solutions (for procedural use before mapinit) * move gamerulesystem utility funcs to partial * ensure all solutions before spilling in puddlesystem. for use when spilling before mapinit * trash & puddle variation passes! * oh yeah * ehh lets live a little * std * utility for game rule check based on comp * entprotoid the trash spawner oops * generalize trash variation * use added instead of started for secret rule * random cleanup * generic replacement variation system * Wall rusting variation rule * account for modifying while enumerating * use localaabb * fix test * minor tweaks * reinforced wall replacer + puddletweaker (cherry picked from commit cc24ba6a317c4bee84ffa1eda8397c255ca92be9)
This commit is contained in:
@@ -12,14 +12,12 @@ namespace Content.Shared.Storage;
|
||||
[DataDefinition]
|
||||
public partial struct EntitySpawnEntry
|
||||
{
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("id", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string? PrototypeId = null;
|
||||
[DataField("id")]
|
||||
public EntProtoId? PrototypeId = null;
|
||||
|
||||
/// <summary>
|
||||
/// The probability that an item will spawn. Takes decimal form so 0.05 is 5%, 0.50 is 50% etc.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("prob")] public float SpawnProbability = 1;
|
||||
|
||||
/// <summary>
|
||||
@@ -43,19 +41,16 @@ public partial struct EntitySpawnEntry
|
||||
/// </code>
|
||||
/// </example>
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("orGroup")] public string? GroupId = null;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("amount")] public int Amount = 1;
|
||||
[DataField] public int Amount = 1;
|
||||
|
||||
/// <summary>
|
||||
/// How many of this can be spawned, in total.
|
||||
/// If this is lesser or equal to <see cref="Amount"/>, it will spawn <see cref="Amount"/> exactly.
|
||||
/// Otherwise, it chooses a random value between <see cref="Amount"/> and <see cref="MaxAmount"/> on spawn.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("maxAmount")] public int MaxAmount = 1;
|
||||
[DataField] public int MaxAmount = 1;
|
||||
|
||||
public EntitySpawnEntry() { }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user