Emaggable vendors + Familiars for Chaplain (#6961)

This commit is contained in:
Rane
2022-04-17 03:16:02 -04:00
committed by GitHub
parent 22735ab5ee
commit 7a6d3e69a8
20 changed files with 313 additions and 28 deletions

View File

@@ -1,18 +1,13 @@
using System;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
using Content.Shared.Damage;
using Content.Shared.Damage.Prototypes;
using Robust.Shared.Serialization.Manager.Attributes;
using Content.Shared.Sound;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.ViewVariables;
using Robust.Shared.Prototypes;
namespace Content.Server.Bible.Components
{
[RegisterComponent]
public sealed class BibleComponent : Component
{
// Damage that will be healed on a success
[DataField("damage", required: true)]
[ViewVariables(VVAccess.ReadWrite)]
@@ -33,6 +28,15 @@ namespace Content.Server.Bible.Components
public TimeSpan LastAttackTime;
public TimeSpan CooldownEnd;
[DataField("cooldownTime")]
public float CooldownTime { get; } = 5f;
[DataField("sizzleSound")]
public SoundSpecifier SizzleSoundPath = new SoundPathSpecifier("/Audio/Effects/lightburn.ogg");
[DataField("healSound")]
public SoundSpecifier HealSoundPath = new SoundPathSpecifier("/Audio/Effects/holy.ogg");
[DataField("locPrefix")]
public string LocPrefix = "bible";
}
}

View File

@@ -0,0 +1,23 @@
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.Prototypes;
namespace Content.Server.Bible.Components
{
/// <summary>
/// This lets you summon a mob or item with an alternative verb on the item
/// </summary>
[RegisterComponent]
public sealed class SummonableComponent : Component
{
/// <summary>
/// Used for a special item only the Chaplain can summon. Usually a mob, but supports regular items too.
/// </summary>
[DataField("specialItem", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string? SpecialItemPrototype = null;
public bool AlreadySummoned = false;
[DataField("requriesBibleUser")]
public bool RequiresBibleUser = true;
}
}