Port medibot + bot spawners from nyano (#9854)

* Port medibot + bot spawners from nyano

* Make the injection thresholds constants

* Remove warning

* Check against const in system too

* resolving systems just isn't worth it

* only resolve entity manager once

* Reduceother resolves too

* fix post-merge

* woops
This commit is contained in:
Rane
2022-07-25 11:33:31 -04:00
committed by GitHub
parent 75574b0765
commit 57206eb49c
20 changed files with 448 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Content.Shared.Chemistry.Reagent;
namespace Content.Server.Silicons.Bots
{
[RegisterComponent]
public sealed class MedibotComponent : Component
{
/// <summary>
/// Med the bot will inject when UNDER the standard med damage threshold.
/// </summary>
[DataField("standardMed", customTypeSerializer: typeof(PrototypeIdSerializer<ReagentPrototype>))]
public string StandardMed = "Tricordrazine";
[DataField("standardMedInjectAmount")]
public float StandardMedInjectAmount = 15f;
public const float StandardMedDamageThreshold = 50f;
/// <summary>
/// Med the bot will inject when OVER the emergency med damage threshold.
/// </summary>
[DataField("emergencyMed", customTypeSerializer: typeof(PrototypeIdSerializer<ReagentPrototype>))]
public string EmergencyMed = "Inaprovaline";
[DataField("emergencyMedInjectAmount")]
public float EmergencyMedInjectAmount = 15f;
public const float EmergencyMedDamageThreshold = 100f;
}
}