Files
wwdpublic/Content.Server/Botany/Components/TeleportingTraitComponent.cs
dootythefrooty f2e6d1a657 New Plant Trait : Bluespace Slips (#674)
# Description

Adds a new trait which plants can mutate to have. 
It teleports both the slippee and the produce to a random location
within a radius determined by how potent the produce is.
Inert unless the plant also has the slippery trait. 

~~Probably very stinky code considering this is my first time dealing
with c#.~~

---
<details><summary><h1>Media</h1></summary>
<p>



https://github.com/user-attachments/assets/cd22756d-ea5e-4a30-8043-c991549c9019



</p>
</details>

---

# Changelog

🆑
- add: Added Bluespace Slips, a plant trait that teleports you randomly
if you slip.
2024-08-08 00:54:13 +01:00

32 lines
732 B
C#

namespace Content.Server.Botany
{
[RegisterComponent]
public sealed partial class TeleportingTraitComponent : Component
{
/// <summary>
/// Teleportation radius of produce.
/// </summary>
[DataField]
public float ProduceTeleportRadius;
/// <summary>
/// How much to divide the potency.
/// </summary>
[DataField]
public float PotencyDivide = 10f;
/// <summary>
/// Potency of fruit.
/// </summary>
[DataField]
public float Potency;
/// <summary>
/// Chance of deletion.
/// </summary>
[DataField]
public float DeletionChance = .5f;
}
}