Skip to content

Commit

Permalink
eula
Browse files Browse the repository at this point in the history
  • Loading branch information
Lgibb18 committed Jun 18, 2024
1 parent c5b14cd commit b568df1
Show file tree
Hide file tree
Showing 26 changed files with 58 additions and 28 deletions.
2 changes: 2 additions & 0 deletions Content.Client/Ligyb/DiseaseRoleSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// © SUNRISE, An EULA/CLA with a hosting restriction, full text: https://github.com/space-sunrise/space-station-14/blob/master/CLA.txt

using Content.Shared.Actions;
using Content.Shared.DoAfter;
using Content.Shared.Doors.Systems;
Expand Down
1 change: 1 addition & 0 deletions Content.Client/Ligyb/SickSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// © SUNRISE, An EULA/CLA with a hosting restriction, full text: https://github.com/space-sunrise/space-station-14/blob/master/CLA.txt
using Content.Shared.CCVar;
using Content.Shared.Mind.Components;
using Content.Shared.Mobs.Systems;
Expand Down
1 change: 1 addition & 0 deletions Content.Client/Ligyb/VaccinatorSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// © SUNRISE, An EULA/CLA with a hosting restriction, full text: https://github.com/space-sunrise/space-station-14/blob/master/CLA.txt
using Content.Shared.Chemistry.EntitySystems;

namespace Content.Client.Chemistry.EntitySystems;
Expand Down
1 change: 1 addition & 0 deletions Content.Server/Ligyb/CureDiseaseInfection.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// © SUNRISE, An EULA/CLA with a hosting restriction, full text: https://github.com/space-sunrise/space-station-14/blob/master/CLA.txt
using Content.Server.Zombies;
using Content.Shared.Chemistry.Reagent;
using Robust.Shared.Configuration;
Expand Down
1 change: 1 addition & 0 deletions Content.Server/Ligyb/DiseaseImmuneClothingSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// © SUNRISE, An EULA/CLA with a hosting restriction, full text: https://github.com/space-sunrise/space-station-14/blob/master/CLA.txt
using Content.Shared.Clothing.Components;
using Content.Shared.Inventory.Events;
using Content.Shared.Ligyb;
Expand Down
1 change: 1 addition & 0 deletions Content.Server/Ligyb/DiseaseRoleSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// © SUNRISE, An EULA/CLA with a hosting restriction, full text: https://github.com/space-sunrise/space-station-14/blob/master/CLA.txt
using Content.Server.Body.Systems;
using Content.Server.Chat.Systems;
using Content.Server.Doors.Systems;
Expand Down
1 change: 1 addition & 0 deletions Content.Server/Ligyb/MinimumBleedComponent.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// © SUNRISE, An EULA/CLA with a hosting restriction, full text: https://github.com/space-sunrise/space-station-14/blob/master/CLA.txt
using Content.Shared.StatusIcon;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
Expand Down
1 change: 1 addition & 0 deletions Content.Server/Ligyb/MinimumBleedSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// © SUNRISE, An EULA/CLA with a hosting restriction, full text: https://github.com/space-sunrise/space-station-14/blob/master/CLA.txt
using Robust.Shared.Configuration;
namespace Content.Server.Ligyb;
using Robust.Shared.Prototypes;
Expand Down
30 changes: 16 additions & 14 deletions Content.Server/Ligyb/SickSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// © SUNRISE, An EULA/CLA with a hosting restriction, full text: https://github.com/space-sunrise/space-station-14/blob/master/CLA.txt
using Robust.Shared.Configuration;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
Expand Down Expand Up @@ -57,7 +58,7 @@ public override void Initialize()

public void OnShut(EntityUid uid, SickComponent component, ComponentShutdown args)
{
foreach(var emote in EnsureComp<AutoEmoteComponent>(uid).Emotes)
foreach (var emote in EnsureComp<AutoEmoteComponent>(uid).Emotes)
{
if (emote.Contains("Infected"))
{
Expand All @@ -66,10 +67,10 @@ public void OnShut(EntityUid uid, SickComponent component, ComponentShutdown arg
}
foreach (var key in component.Symptoms)
{
switch(key)
switch (key)
{
case "Narcolepsy":
if(TryComp<SleepyComponent>(uid, out var narc))
if (TryComp<SleepyComponent>(uid, out var narc))
{
RemComp<SleepyComponent>(uid);
}
Expand All @@ -85,11 +86,11 @@ public void OnShut(EntityUid uid, SickComponent component, ComponentShutdown arg
{
RemComp<PermanentBlindnessComponent>(uid);
}
if(HasComp<BlurryVisionComponent>(uid))
if (HasComp<BlurryVisionComponent>(uid))
{
RemComp<BlurryVisionComponent>(uid);
}
if(HasComp<EyeClosingComponent>(uid))
if (HasComp<EyeClosingComponent>(uid))
{
RemComp<EyeClosingComponent>(uid);
}
Expand All @@ -108,7 +109,7 @@ public void OnShut(EntityUid uid, SickComponent component, ComponentShutdown arg
break;
}
}
_bloodstream.ChangeBloodReagent(uid, component.BeforeInfectedBloodReagent);
_bloodstream.ChangeBloodReagent(uid, component.BeforeInfectedBloodReagent);
}
public override void Update(float frameTime)
{
Expand All @@ -134,7 +135,7 @@ public override void Update(float frameTime)
}
else
{
if(_gameTiming.CurTime >= component.NextStadyAt)
if (_gameTiming.CurTime >= component.NextStadyAt)
{
component.Stady++;
foreach (var emote in EnsureComp<AutoEmoteComponent>(uid).Emotes)
Expand Down Expand Up @@ -172,9 +173,9 @@ void AddMoney(EntityUid uid, FixedPoint2 value)

private void UpdateInfection(EntityUid uid, SickComponent component, EntityUid disease, DiseaseRoleComponent diseaseComponent)
{
foreach((var key, (var min, var max)) in diseaseComponent.Symptoms)
foreach ((var key, (var min, var max)) in diseaseComponent.Symptoms)
{
if(!component.Symptoms.Contains(key))
if (!component.Symptoms.Contains(key))
{
if (component.Stady >= min && component.Stady <= max)
{
Expand All @@ -198,9 +199,9 @@ private void UpdateInfection(EntityUid uid, SickComponent component, EntityUid d
_autoEmote.AddEmote(uid, "InfectedCrying");
break;
case "Narcolepsy":
if(!HasComp<SleepyComponent>(uid))
if (!HasComp<SleepyComponent>(uid))
{
var c= AddComp<SleepyComponent>(uid);
var c = AddComp<SleepyComponent>(uid);
EntityManager.EntitySysManager.GetEntitySystem<SleepySystem>().SetNarcolepsy(uid, new Vector2(10, 30), new Vector2(300, 600), c);
}
break;
Expand Down Expand Up @@ -238,14 +239,15 @@ private void OnEmote(EntityUid uid, SickComponent component, ref EmoteEvent args
{
if (_robustRandom.Prob(0.9f))
{
if(TryComp<DiseaseRoleComponent>(component.owner, out var disease)) {
if (TryComp<DiseaseRoleComponent>(component.owner, out var disease))
{
var kind = SuicideKind.Piercing;
if (_prototypeManager.TryIndex<DamageTypePrototype>(kind.ToString(), out var damagePrototype))
{
_damageableSystem.TryChangeDamage(uid, new(damagePrototype, 0.25f * disease.Lethal), true, origin: uid);
}
}

EntityCoordinates start = Transform(uid).Coordinates;
foreach (var entity in _lookup.GetEntitiesInRange(uid, 0.7f))
{
Expand Down Expand Up @@ -277,7 +279,7 @@ private void OnEmote(EntityUid uid, SickComponent component, ref EmoteEvent args
_vomitSystem.Vomit(uid, -30, -20);
}
}
if(args.Emote.ID == "Insult")
if (args.Emote.ID == "Insult")
{
if (TryComp<DiseaseRoleComponent>(component.owner, out var disease))
{
Expand Down
1 change: 1 addition & 0 deletions Content.Server/Ligyb/SleepyComponent.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// © SUNRISE, An EULA/CLA with a hosting restriction, full text: https://github.com/space-sunrise/space-station-14/blob/master/CLA.txt
using System.Numerics;

namespace Content.Server.Traits.Assorted;
Expand Down
1 change: 1 addition & 0 deletions Content.Server/Ligyb/SleepySystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// © SUNRISE, An EULA/CLA with a hosting restriction, full text: https://github.com/space-sunrise/space-station-14/blob/master/CLA.txt
using Content.Shared.Bed.Sleep;
using Content.Shared.StatusEffect;
using Robust.Shared.Random;
Expand Down
11 changes: 6 additions & 5 deletions Content.Server/Ligyb/VaccinatorSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// © SUNRISE, An EULA/CLA with a hosting restriction, full text: https://github.com/space-sunrise/space-station-14/blob/master/CLA.txt
using Content.Server.Power.Components;
using Content.Server.Power.EntitySystems;
using Content.Shared.Chemistry.Components;
Expand Down Expand Up @@ -90,11 +91,11 @@ private void OnPaper(PaperInputTextMessageLigyb args)
List<string> wasProto = new List<string>();
foreach (var reactant in args.ReagentQuantity)
{
if(_prototypeManager.TryIndex(reactant.Reagent.Prototype, out ReagentPrototype? protoss))
if (_prototypeManager.TryIndex(reactant.Reagent.Prototype, out ReagentPrototype? protoss))
{
if(protoss.Group != "Infect")
if (protoss.Group != "Infect")
{
if(paper != null)
if (paper != null)
{
EntityManager.DeleteEntity(paper);
return;
Expand All @@ -113,9 +114,9 @@ private void OnPaper(PaperInputTextMessageLigyb args)
var text = new StringBuilder();
text.AppendLine("Для изготовления вакцины, требуется:");
text.AppendLine();
foreach(var r in reactantReactions)
foreach (var r in reactantReactions)
{
foreach(var reactan in r.Reactants)
foreach (var reactan in r.Reactants)
{
if (r.MixingCategories == null)
{
Expand Down
1 change: 1 addition & 0 deletions Content.Shared/Ligyb/DiseaseImmuneClothingComponent.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// © SUNRISE, An EULA/CLA with a hosting restriction, full text: https://github.com/space-sunrise/space-station-14/blob/master/CLA.txt
namespace Content.Shared.Ligyb;

[RegisterComponent]
Expand Down
1 change: 1 addition & 0 deletions Content.Shared/Ligyb/DiseaseImmuneComponent.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// © SUNRISE, An EULA/CLA with a hosting restriction, full text: https://github.com/space-sunrise/space-station-14/blob/master/CLA.txt
namespace Content.Shared.Ligyb;

[RegisterComponent]
Expand Down
1 change: 1 addition & 0 deletions Content.Shared/Ligyb/DiseaseRoleComponent.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// © SUNRISE, An EULA/CLA with a hosting restriction, full text: https://github.com/space-sunrise/space-station-14/blob/master/CLA.txt
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
Expand Down
1 change: 1 addition & 0 deletions Content.Shared/Ligyb/DiseaseTempImmuneComponent.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// © SUNRISE, An EULA/CLA with a hosting restriction, full text: https://github.com/space-sunrise/space-station-14/blob/master/CLA.txt
namespace Content.Shared.Ligyb;

[RegisterComponent]
Expand Down
1 change: 1 addition & 0 deletions Content.Shared/Ligyb/DiseaseVaccineTimerComponent.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// © SUNRISE, An EULA/CLA with a hosting restriction, full text: https://github.com/space-sunrise/space-station-14/blob/master/CLA.txt
namespace Content.Shared.Ligyb;

[RegisterComponent]
Expand Down
9 changes: 5 additions & 4 deletions Content.Shared/Ligyb/DiseaseVaccineTimerSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// © SUNRISE, An EULA/CLA with a hosting restriction, full text: https://github.com/space-sunrise/space-station-14/blob/master/CLA.txt
using Robust.Shared.Configuration;
namespace Content.Shared.Ligyb;
using Robust.Shared.Prototypes;
Expand All @@ -22,22 +23,22 @@ public override void Initialize()
public void OnInit(EntityUid uid, DiseaseVaccineTimerComponent component, ComponentInit args)
{
component.ReadyAt = _gameTiming.CurTime + component.delay;
if(TryComp<MovementSpeedModifierComponent>(uid, out var speed))
if (TryComp<MovementSpeedModifierComponent>(uid, out var speed))
{
component.SpeedBefore = speed.BaseSprintSpeed;
_movementSpeed.ChangeBaseSpeed(uid, speed.BaseWalkSpeed, speed.BaseSprintSpeed / 2, speed.Acceleration, speed);
}
}
public void OnShut(EntityUid uid, DiseaseVaccineTimerComponent component, ComponentShutdown args)
{
if(component.SpeedBefore != 0)
if (component.SpeedBefore != 0)
{
if(TryComp<MovementSpeedModifierComponent>(uid, out var speed))
if (TryComp<MovementSpeedModifierComponent>(uid, out var speed))
{
_movementSpeed.ChangeBaseSpeed(uid, speed.BaseWalkSpeed, component.SpeedBefore, speed.Acceleration, speed);
}
}

}
public override void Update(float frameTime)
{
Expand Down
1 change: 1 addition & 0 deletions Content.Shared/Ligyb/InfectEvent.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// © SUNRISE, An EULA/CLA with a hosting restriction, full text: https://github.com/space-sunrise/space-station-14/blob/master/CLA.txt
using Content.Shared.Actions;
using Content.Shared.Store;
using Robust.Shared.GameObjects;
Expand Down
5 changes: 3 additions & 2 deletions Content.Shared/Ligyb/SharedDiseaseRoleSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// © SUNRISE, An EULA/CLA with a hosting restriction, full text: https://github.com/space-sunrise/space-station-14/blob/master/CLA.txt
using Content.Shared.Actions;
using Content.Shared.DoAfter;
using Content.Shared.Doors.Systems;
Expand Down Expand Up @@ -74,9 +75,9 @@ public void OnInfect(InfectEvent ev)
{
var comps = AddComp<SickComponent>(ev.Target);
comps.owner = ev.Performer;

comp.Infected.Add(ev.Target);

}
}
}
Expand Down
1 change: 1 addition & 0 deletions Content.Shared/Ligyb/SharedSickSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// © SUNRISE, An EULA/CLA with a hosting restriction, full text: https://github.com/space-sunrise/space-station-14/blob/master/CLA.txt
using Content.Shared.CCVar;
using Content.Shared.Mind.Components;
using Content.Shared.Mobs.Systems;
Expand Down
3 changes: 2 additions & 1 deletion Content.Shared/Ligyb/SharedVaccinatorSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// © SUNRISE, An EULA/CLA with a hosting restriction, full text: https://github.com/space-sunrise/space-station-14/blob/master/CLA.txt
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reaction;
using Content.Shared.Interaction;
Expand Down Expand Up @@ -164,7 +165,7 @@ public void FinishMix(Entity<VaccinatorComponent> entity)
}
}
_solution.UpdateChemicals(soln.Value, true, reactionMixer);

}
}

Expand Down
1 change: 1 addition & 0 deletions Content.Shared/Ligyb/SickComponent.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// © SUNRISE, An EULA/CLA with a hosting restriction, full text: https://github.com/space-sunrise/space-station-14/blob/master/CLA.txt
using Content.Shared.StatusIcon;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
Expand Down
7 changes: 5 additions & 2 deletions Content.Shared/Ligyb/SpeedModifierOnComponent.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// © SUNRISE, An EULA/CLA with a hosting restriction, full text: https://github.com/space-sunrise/space-station-14/blob/master/CLA.txt
using Content.Shared.Clothing;
using Robust.Shared.GameStates;

Expand All @@ -17,13 +18,15 @@ public sealed partial class SpeedModifierOnComponent : Component
/// <summary>
/// A multiplier applied to the walk speed.
/// </summary>
[DataField] [ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
[DataField]
[ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
public float WalkModifier = 0.6f;

/// <summary>
/// A multiplier applied to the sprint speed.
/// </summary>
[DataField] [ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
[DataField]
[ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
public float SprintModifier = 0.6f;

[DataField] public bool TurnedOff;
Expand Down
1 change: 1 addition & 0 deletions Content.Shared/Ligyb/SpeedModifierOnSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// © SUNRISE, An EULA/CLA with a hosting restriction, full text: https://github.com/space-sunrise/space-station-14/blob/master/CLA.txt
using Content.Shared.Clothing;
using Content.Shared.Hands;
using Content.Shared.Movement.Systems;
Expand Down
1 change: 1 addition & 0 deletions Content.Shared/Ligyb/VaccinatorComponent.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// © SUNRISE, An EULA/CLA with a hosting restriction, full text: https://github.com/space-sunrise/space-station-14/blob/master/CLA.txt
using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.Chemistry.Reaction;
using Robust.Shared.Audio;
Expand Down

0 comments on commit b568df1

Please sign in to comment.