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:
committed by
Pieter-Jan Briers
parent
b8becf4a56
commit
37df61113e
@@ -63,6 +63,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="EntryPoint.cs" />
|
||||
<Compile Include="GameObjects\Components\Damage\DamageableComponent.cs" />
|
||||
<Compile Include="GameObjects\Components\Inventory\EquipmentSlotDefinitions.cs" />
|
||||
<Compile Include="GameObjects\Components\Inventory\InventoryTemplates.cs" />
|
||||
<Compile Include="GameObjects\Components\Inventory\SharedInventoryComponent.cs" />
|
||||
@@ -71,6 +72,7 @@
|
||||
<Compile Include="GameObjects\Components\Storage\SharedStorageComponent.cs" />
|
||||
<Compile Include="GameObjects\ContentNetIDs.cs" />
|
||||
<Compile Include="GameObjects\EntitySystemMessages\VerbSystemMessages.cs" />
|
||||
<Compile Include="GameObjects\Messages\Mob\HealthHud.cs" />
|
||||
<Compile Include="GameObjects\PhysicalConstants.cs" />
|
||||
<Compile Include="Interfaces\ISharedNotifyManager.cs" />
|
||||
<Compile Include="GameObjects\Verb.cs" />
|
||||
@@ -117,4 +119,4 @@
|
||||
<Compile Include="Construction\ConstructionPrototype.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
@@ -11,5 +11,6 @@
|
||||
public const uint INVENTORY = 1006;
|
||||
public const uint POWER_DEBUG_TOOL = 1007;
|
||||
public const uint CONSTRUCTOR = 1008;
|
||||
public const uint SPECIES = 1009;
|
||||
}
|
||||
}
|
||||
|
||||
28
Content.Shared/GameObjects/Messages/Mob/HealthHud.cs
Normal file
28
Content.Shared/GameObjects/Messages/Mob/HealthHud.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using SS14.Shared.GameObjects;
|
||||
using SS14.Shared.Serialization;
|
||||
using System;
|
||||
|
||||
namespace Content.Shared.GameObjects
|
||||
{
|
||||
/// <summary>
|
||||
/// Sends updates to the standard species health hud with the sprite to change the hud to
|
||||
/// </summary>
|
||||
[Serializable, NetSerializable]
|
||||
public class HudStateChange : ComponentMessage
|
||||
{
|
||||
public string StateSprite;
|
||||
public ScreenEffects effect;
|
||||
|
||||
public HudStateChange()
|
||||
{
|
||||
Directed = true;
|
||||
}
|
||||
}
|
||||
|
||||
public enum ScreenEffects
|
||||
{
|
||||
None,
|
||||
CircleMask,
|
||||
GradientCircleMask,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user