Re-organize all projects (#4166)

This commit is contained in:
DrSmugleaf
2021-06-09 22:19:39 +02:00
committed by GitHub
parent 9f50e4061b
commit ff1a2d97ea
1773 changed files with 5258 additions and 5508 deletions

View File

@@ -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);
}
}
}

View 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);
}
}
}

View File

@@ -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);
}
}
}
}

View 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);
}
}
}
}