Skip to content

Commit

Permalink
Оно не крашится И оно работает
Browse files Browse the repository at this point in the history
  • Loading branch information
pxc1984 committed Jun 24, 2024
1 parent 7e6e50d commit c195938
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 25 deletions.
6 changes: 3 additions & 3 deletions Content.Client/_Sunrise/Overlays/LoveVisionOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
using Robust.Client.Player;
using Robust.Shared.Enums;
using Robust.Shared.Prototypes;
using Content.Shared.Abilities;
using Content.Shared._Sunrise.Aphrodesiac;
using System.Numerics;

namespace Content.Client._Sunrise.Overlays;
namespace Content.Client._Sunrise.LoveVision;

public sealed class LoveVisionOverlay : Overlay
{
Expand All @@ -26,7 +26,7 @@ protected override void Draw(in OverlayDrawArgs args)
{
if (ScreenTexture == null)
return;
if (_playerManager.LocalPlayer?.ControlledEntity is not { Valid: true } player)
if (_playerManager.LocalSession?.AttachedEntity is not { Valid: true } player)
return;
if (!_entityManager.HasComponent<LoveVisionComponent>(player))
return;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Content.Shared.Abilities;
using Content.Shared._Sunrise.Aphrodesiac;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Shared.Player;

namespace Content.Client._Sunrise.Overlays;
namespace Content.Client._Sunrise.LoveVision;
public sealed class LoveVisionSystem : EntitySystem
{
[Dependency] private readonly IPlayerManager _player = default!;
Expand Down
7 changes: 7 additions & 0 deletions Content.Server/_Sunrise/Aphrodesiac/AphrodesiacSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using Content.Shared._Sunrise.Aphrodesiac;

namespace Content.Server._Sunrise.Aphrodesiac;

public sealed class AphrodesiacSystem : SharedAphrodesiacSystem
{
}
7 changes: 0 additions & 7 deletions Content.Server/_Sunrise/Love/LoveVisionSystem.cs

This file was deleted.

4 changes: 2 additions & 2 deletions Content.Server/_Sunrise/ReagentEffects/LoveEffect.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Abilities;
using Content.Shared._Sunrise.Aphrodesiac;
using Robust.Shared.Prototypes;

namespace Content.Server.Chemistry.ReagentEffects;
Expand All @@ -17,7 +17,7 @@ public override void Effect(ReagentEffectArgs args)

effectPower *= args.Scale;

var loveVisionSys = args.EntityManager.EntitySysManager.GetEntitySystem<SharedLoveSystem>();
var loveVisionSys = args.EntityManager.EntitySysManager.GetEntitySystem<SharedAphrodesiacSystem>();
loveVisionSys.TryApplyLoveenness(args.SolutionEntity, effectPower);
}
}
2 changes: 1 addition & 1 deletion Content.Shared/_Sunrise/Abilities/LoveVisionComponent.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Robust.Shared.GameStates;

namespace Content.Shared.Abilities;
namespace Content.Shared._Sunrise.Aphrodesiac;

[RegisterComponent, NetworkedComponent]
public sealed partial class LoveVisionComponent : Component
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
using Content.Shared.StatusEffect;
using Content.Shared.Traits.Assorted;

namespace Content.Shared.Abilities;
namespace Content.Shared._Sunrise.Aphrodesiac;

public abstract class SharedLoveSystem : EntitySystem
public abstract class SharedAphrodesiacSystem : EntitySystem
{
[ValidatePrototypeId<StatusEffectPrototype>]
public const string LoveKey = "Love";
public const string LoveKey = "LoveEffect";

[Dependency] private readonly StatusEffectsSystem _statusEffectsSystem = default!;

Expand Down
5 changes: 5 additions & 0 deletions Resources/Locale/en-US/_sunrise/aphrodesiac/aphrodesiac.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
reagent-name-aphrodesiac = Aphrodesiac
reagent-desc-aphrodesiac = A substance that increases arousal or pleasure.
reagent-physical-desc-aphrodesiac = Shimmering, ruby-red liquid that glows softly in the light.
aphrodesiac-effect1 = Your skin tingles warmly.
aphrodesiac-effect2 = Your heart is racing fast.
5 changes: 5 additions & 0 deletions Resources/Locale/ru-RU/_sunrise/aphrodesiac/aphrodesiac.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
reagent-name-aphrodesiac = Афродезиак
reagent-desc-aphrodesiac = Вещество, которое усиливает возбуждение или удовольствие.
reagent-physical-desc-aphrodesiac = Мерцающая, рубиново-красная жидкость, мягко светящаяся на свету.
aphrodesiac-effect1 = Ваша кожа приятно покалывает.
aphrodesiac-effect2 = Ваше сердце быстро бьется.
1 change: 1 addition & 0 deletions Resources/Prototypes/Entities/Mobs/Species/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
- Pacified
- StaminaModifier
- Flashed
- LoveEffect # Sunrise-Aphrodesiac
- type: Reflect
enabled: false
reflectProb: 0
Expand Down
12 changes: 6 additions & 6 deletions Resources/Prototypes/_Sunrise/Reagents/fun.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
- type: reagent
id: Aphrodesiac
name: reagent-name-aphrodesiac # TODO: this
name: reagent-name-aphrodesiac
group: Special
desc: reagent-desc-aphrodesiac # TODO: this
physicalDesc: reagent-physical-desc-love # TODO: add dis shii
flavor: # TODO: THIS
color: "#B100C8"
desc: reagent-desc-aphrodesiac
physicalDesc: reagent-physical-desc-aphrodesiac
flavor: funny
color: "#FF00E8"
metabolisms:
Poison:
effects:
- !type:PopupMessage
type: Local
messages: [ "love-effect1", "love-effect2" ]
messages: [ "aphrodesiac-effect1", "aphrodesiac-effect2" ]
probability: 0.1
- !type:LoveEffect
effectPower: 2
9 changes: 9 additions & 0 deletions Resources/Prototypes/_Sunrise/Recipes/Reactions/fun.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- type: reaction
id: Aphrodesiac
reactants:
Omnizine:
amount: 2
Leporazine:
amount: 3
products:
Aphrodesiac: 5
2 changes: 1 addition & 1 deletion Resources/Prototypes/_Sunrise/status_effects.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
- type: statusEffect
id: Love
id: LoveEffect

0 comments on commit c195938

Please sign in to comment.