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
This commit is contained in:
clusterfack
2018-12-13 07:47:19 -06:00
committed by Pieter-Jan Briers
parent b8becf4a56
commit 37df61113e
52 changed files with 1172 additions and 183 deletions

View File

@@ -0,0 +1,61 @@
using Content.Shared.GameObjects;
using System;
namespace Content.Server.GameObjects
{
/// <summary>
/// Triggers an event when values rise above or drop below this threshold
/// </summary>
public struct DamageThreshold
{
public DamageType DamageType { get; }
public int Value { get; }
public ThresholdType ThresholdType { get; }
public DamageThreshold(DamageType damageType, int value, ThresholdType thresholdType)
{
DamageType = damageType;
Value = value;
ThresholdType = thresholdType;
}
public override bool Equals(Object obj)
{
return obj is DamageThreshold && this == (DamageThreshold)obj;
}
public override int GetHashCode()
{
return DamageType.GetHashCode() ^ Value.GetHashCode();
}
public static bool operator ==(DamageThreshold x, DamageThreshold y)
{
return x.DamageType == y.DamageType && x.Value == y.Value;
}
public static bool operator !=(DamageThreshold x, DamageThreshold y)
{
return !(x == y);
}
}
public enum ThresholdType
{
None,
Destruction,
Death,
Critical,
HUDUpdate
}
public class DamageThresholdPassedEventArgs : EventArgs
{
public DamageThreshold DamageThreshold { get; }
public bool Passed { get; }
public DamageThresholdPassedEventArgs(DamageThreshold threshold, bool passed)
{
DamageThreshold = threshold;
Passed = passed;
}
}
}