Add reaction randomization. (#308)
* Add random products datafield to the reaciton prototype. One of the items in the list will be used as additional products as a result of the reaction and will be persistent per round. Resolves #245 * Another try Add getter and setter for the reaction products field and add random products there. * There is no such product as CP14BasicEffectHealHeat * Try to visualize random products in the guidebook * experimental recipes * fix * file restructurization * Guidebook alchemy update * Update Alchemy.xml * fix * Update mixing_simple.yml --------- Co-authored-by: Ed <96445749+TheShuEd@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
|
||||
using Content.Shared.FixedPoint;
|
||||
using Robust.Shared.Audio;
|
||||
|
||||
namespace Content.Server._CP14.Alchemy;
|
||||
|
||||
/// <summary>
|
||||
/// gradually rounds down all reagents in the specified solution
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(CP14SolutionNormalizerSystem))]
|
||||
public sealed partial class CP14SolutionNormalizerComponent : Component
|
||||
{
|
||||
[DataField(required: true)]
|
||||
public string Solution = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// will round down any reagent in solution until it is divisible by this value
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public float Factor = 0.25f;
|
||||
|
||||
/// <summary>
|
||||
/// the reagent will flow gradually by the specified number until it becomes normalized
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public FixedPoint2 LeakageQuantity = 0.05f;
|
||||
|
||||
[DataField]
|
||||
public TimeSpan UpdateFrequency = TimeSpan.FromSeconds(4f);
|
||||
|
||||
[DataField]
|
||||
public TimeSpan NextUpdateTime = TimeSpan.Zero;
|
||||
|
||||
[DataField]
|
||||
public SoundSpecifier NormalizeSound = new SoundPathSpecifier("/Audio/Ambience/Objects/drain.ogg")
|
||||
{
|
||||
Params = AudioParams.Default.WithVariation(0.03f)
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user