Client LuaCsForBarotrauma
RadiationParams.cs
1 using System.Collections.Generic;
2 using System.Xml.Linq;
3 using Microsoft.Xna.Framework;
4 
5 namespace Barotrauma
6 {
7  internal class RadiationParams: ISerializableEntity
8  {
9  public string Name => nameof(RadiationParams);
10  public Dictionary<Identifier, SerializableProperty> SerializableProperties { get; }
11 
12  [Serialize(defaultValue: -100f, isSaveable: IsPropertySaveable.No, "How much radiation the world starts with.")]
13  public float StartingRadiation { get; set; }
14 
15  [Serialize(defaultValue: 100f, isSaveable: IsPropertySaveable.No, "How much radiation is added on each step.")]
16  public float RadiationStep { get; set; }
17 
18  [Serialize(defaultValue: 10, isSaveable: IsPropertySaveable.No, "How many turns in radiation does it take for an outpost to be removed from the map.")]
19  public int CriticalRadiationThreshold { get; set; }
20 
21  [Serialize(defaultValue: 3, isSaveable: IsPropertySaveable.No, "Minimum amount of outposts in the level that cannot be removed due to radiation.")]
22  public int MinimumOutpostAmount { get; set; }
23 
24  [Serialize(defaultValue: 3f, isSaveable: IsPropertySaveable.No, "How fast the radiation increase animation goes.")]
25  public float AnimationSpeed { get; set; }
26 
27  [Serialize(defaultValue: 10f, isSaveable: IsPropertySaveable.No, "How long it takes to apply more radiation damage while in a radiated zone.")]
28  public float RadiationDamageDelay { get; set; }
29 
30  [Serialize(defaultValue: 1f, isSaveable: IsPropertySaveable.No, "How much is the radiation affliction increased by while in a radiated zone.")]
31  public float RadiationDamageAmount { get; set; }
32 
33  [Serialize(defaultValue: -1.0f, isSaveable: IsPropertySaveable.No, "Maximum amount of radiation.")]
34  public float MaxRadiation { get; set; }
35 
36  [Serialize(defaultValue: "139,0,0,85", isSaveable: IsPropertySaveable.No, "The color of the radiated area.")]
37  public Color RadiationAreaColor { get; set; }
38 
39  [Serialize(defaultValue: "255,0,0,255", isSaveable: IsPropertySaveable.No, "The tint of the radiation border sprites.")]
40  public Color RadiationBorderTint { get; set; }
41 
42  [Serialize(defaultValue: 16.66f, isSaveable: IsPropertySaveable.No, "Speed of the border spritesheet animation.")]
43  public float BorderAnimationSpeed { get; set; }
44 
45  public RadiationParams(XElement element)
46  {
47  SerializableProperties = SerializableProperty.DeserializeProperties(this, element);
48  }
49  }
50 }