Entity Reagent Reactions v2 (#3714)
* Refactors reactions to be more POWERFUL and DATA-ORIENTED
This commit is contained in:
committed by
GitHub
parent
6739d6a6a9
commit
a6f04e22e4
@@ -12,7 +12,7 @@ using Robust.Shared.ViewVariables;
|
||||
namespace Content.Server.GameObjects.Components.Nutrition
|
||||
{
|
||||
[RegisterComponent]
|
||||
public class CreamPiedComponent : SharedCreamPiedComponent, IReagentReaction, IThrowCollide
|
||||
public class CreamPiedComponent : SharedCreamPiedComponent, IThrowCollide
|
||||
{
|
||||
private bool _creamPied;
|
||||
|
||||
@@ -38,19 +38,6 @@ namespace Content.Server.GameObjects.Components.Nutrition
|
||||
CreamPied = false;
|
||||
}
|
||||
|
||||
ReagentUnit IReagentReaction.ReagentReactTouch(ReagentPrototype reagent, ReagentUnit volume)
|
||||
{
|
||||
switch (reagent.ID)
|
||||
{
|
||||
case "chem.SpaceCleaner":
|
||||
case "chem.Water":
|
||||
Wash();
|
||||
break;
|
||||
}
|
||||
|
||||
return ReagentUnit.Zero;
|
||||
}
|
||||
|
||||
void IThrowCollide.HitBy(ThrowCollideEventArgs eventArgs)
|
||||
{
|
||||
if (eventArgs.Thrown.Deleted || !eventArgs.Thrown.TryGetComponent(out CreamPieComponent? creamPie)) return;
|
||||
|
||||
Reference in New Issue
Block a user