Re-organize all projects (#4166)
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#nullable enable
|
||||
using Content.Shared.Chemistry.Reaction;
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Player;
|
||||
|
||||
namespace Content.Server.Chemistry.EntitySystems
|
||||
{
|
||||
public class ChemicalReactionSystem : SharedChemicalReactionSystem
|
||||
{
|
||||
protected override void OnReaction(ReactionPrototype reaction, IEntity owner, ReagentUnit unitReactions)
|
||||
{
|
||||
base.OnReaction(reaction, owner, unitReactions);
|
||||
|
||||
if (reaction.Sound != null)
|
||||
SoundSystem.Play(Filter.Pvs(owner), reaction.Sound, owner.Transform.Coordinates);
|
||||
}
|
||||
}
|
||||
}
|
||||
36
Content.Server/Chemistry/EntitySystems/HypospraySystem.cs
Normal file
36
Content.Server/Chemistry/EntitySystems/HypospraySystem.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using Content.Server.Chemistry.Components;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Weapons.Melee;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Server.Chemistry.EntitySystems
|
||||
{
|
||||
public class HypospraySystem : EntitySystem
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<HyposprayComponent, AfterInteractEvent>(OnAfterInteract);
|
||||
SubscribeLocalEvent<HyposprayComponent, ClickAttackEvent>(OnClickAttack);
|
||||
}
|
||||
|
||||
public void OnAfterInteract(EntityUid uid, HyposprayComponent comp, AfterInteractEvent args)
|
||||
{
|
||||
if (!args.CanReach)
|
||||
return;
|
||||
var target = args.Target;
|
||||
var user = args.User;
|
||||
|
||||
comp.TryDoInject(target, user);
|
||||
}
|
||||
|
||||
public void OnClickAttack(EntityUid uid, HyposprayComponent comp, ClickAttackEvent args)
|
||||
{
|
||||
var target = args.TargetEntity;
|
||||
var user = args.User;
|
||||
|
||||
comp.TryDoInject(target, user);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
#nullable enable
|
||||
using System.Linq;
|
||||
using Content.Server.Chemistry.Components;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Server.Chemistry.EntitySystems
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public class SolutionAreaEffectSystem : EntitySystem
|
||||
{
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var inception in ComponentManager.EntityQuery<SolutionAreaEffectInceptionComponent>().ToArray())
|
||||
{
|
||||
inception.InceptionUpdate(frameTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
18
Content.Server/Chemistry/EntitySystems/VaporSystem.cs
Normal file
18
Content.Server/Chemistry/EntitySystems/VaporSystem.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Content.Server.Chemistry.Components;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Server.Chemistry.EntitySystems
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public class VaporSystem : EntitySystem
|
||||
{
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var vaporComp in ComponentManager.EntityQuery<VaporComponent>(true))
|
||||
{
|
||||
vaporComp.Update(frameTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user