Files
tbd-station-14/Content.Shared/GameObjects/Components/Damage/DamageableComponent.cs
clusterfack 37df61113e Species Component (#130)
* Fix this
fug
oksure
Creates the initial species component, damage states, and threshold templates and hooks them into the damageable component

* More rebase fixes

* test

* Pre future rebase

* Please

* Lol

* Lol2

* SHADERS

* Update Engine

* yml file

* Fix an initialization issue, injects dependencies

* Fix error in loading shaders

* Makes a master character ui controller component added upon client attachment to entity and remove upon client detachment from entity

* Fixes just about everytrhing

* Address PJB's comments

* geeze

* Make overlays work in worldspace instead of screen space and not cover user interfaces

* update submodule
2018-12-13 14:47:18 +01:00

42 lines
1.1 KiB
C#

using SS14.Shared.GameObjects;
using SS14.Shared.Serialization;
using System;
using System.Collections.Generic;
namespace Content.Shared.GameObjects
{
public abstract class SharedDamageableComponent : Component
{
public override string Name => "Damageable";
public sealed override uint? NetID => ContentNetIDs.DAMAGEABLE;
public sealed override Type StateType => typeof(DamageComponentState);
}
// The IDs of the items get synced over the network.
[Serializable, NetSerializable]
public class DamageComponentState : ComponentState
{
public Dictionary<DamageType, int> CurrentDamage = new Dictionary<DamageType, int>();
public DamageComponentState(Dictionary<DamageType, int> damage) : base(ContentNetIDs.DAMAGEABLE)
{
CurrentDamage = damage;
}
}
/// <summary>
/// Damage types used in-game.
/// Total should never be used directly - it's a derived value.
/// </summary>
public enum DamageType
{
Total,
Brute,
Heat,
Cold,
Acid,
Toxic,
Electric
}
}