Skip to content

Commit

Permalink
some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Lgibb18 committed Jun 25, 2024
1 parent 3155e02 commit 6ba8dbf
Show file tree
Hide file tree
Showing 23 changed files with 186 additions and 65 deletions.
4 changes: 2 additions & 2 deletions Content.Client/_Sunrise/ERP/InteractionEui.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void RequestLove()
{
if (!_player.LocalEntity.HasValue) return;
if (!_window.TargetEntityId.HasValue) return;
SendMessage(new AddLoveMessage(_entManager.GetNetEntity(_player.LocalEntity.Value), _window.TargetEntityId.Value, 0));
SendMessage(new AddLoveMessage(_entManager.GetNetEntity(_player.LocalEntity.Value), _window.TargetEntityId.Value, 0, 0));
}

public void RequestState()
Expand Down Expand Up @@ -119,7 +119,7 @@ public void OnItemSelect(ItemList.ItemListSelectedEventArgs args)
_audio.PlayPvs(_random.Pick(interaction.Sounds), _player.LocalEntity.Value);
}
if (!_window.TargetEntityId.HasValue) return;
SendMessage(new AddLoveMessage(_entManager.GetNetEntity(_player.LocalEntity.Value), _window.TargetEntityId.Value, interaction.LovePercent));
SendMessage(new AddLoveMessage(_entManager.GetNetEntity(_player.LocalEntity.Value), _window.TargetEntityId.Value, interaction.LovePercentUser, interaction.LovePercentTarget));
_window.TimeUntilAllow = _gameTiming.CurTime + TimeSpan.FromSeconds(2);
}
}
Expand Down
16 changes: 12 additions & 4 deletions Content.Client/_Sunrise/ERP/InteractionWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,22 @@ public void Populate()
UserDescription.AddChild(new Label { Text = "Вы..." });
if (UserHasClothing) UserDescription.AddChild(new Label { Text = "...Обладаете одеждой" });
else UserDescription.AddChild(new Label { Text = "...Не обладаете одеждой" });
UserDescription.AddChild(new Label { Text = "...Обладаете анусом" });
if (UserSex.Value == Sex.Male) UserDescription.AddChild(new Label { Text = "...Обладаете пенисом" });
else if (UserSex.Value == Sex.Female) UserDescription.AddChild(new Label { Text = "...Обладаете вагиной" });
if (UserSex.Value == Sex.Female) UserDescription.AddChild(new Label { Text = "...Обладаете вагиной" });
if (UserSex.Value == Sex.Female) UserDescription.AddChild(new Label { Text = "...Обладаете грудью" });
//Таргет
TargetDescription.AddChild(new Label { Text = Identity.Name(_eui._entManager.GetEntity(TargetEntityId.Value), _eui._entManager, _player.LocalEntity.Value) + "..." });
if (TargetHasClothing) TargetDescription.AddChild(new Label { Text = "...Обладает одеждой" });
else TargetDescription.AddChild(new Label { Text = "...Не обладает одеждой" });
if (TargetSex.Value == Sex.Male) TargetDescription.AddChild(new Label { Text = "...Обладает пенисом" });
else if (TargetSex.Value == Sex.Female) TargetDescription.AddChild(new Label { Text = "...Обладает вагиной" });
else
{
TargetDescription.AddChild(new Label { Text = "...Не обладает одеждой" });
TargetDescription.AddChild(new Label { Text = "...Обладает анусом" });
if (TargetSex.Value == Sex.Male) TargetDescription.AddChild(new Label { Text = "...Обладает пенисом" });
if (TargetSex.Value == Sex.Female) TargetDescription.AddChild(new Label { Text = "...Обладает вагиной" });
}
if (TargetSex.Value == Sex.Female) TargetDescription.AddChild(new Label { Text = "...Обладает грудью" });

}
else
{
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/_Sunrise/ERP/Systems/InteractionEui.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public override void HandleMessage(EuiMessageBase msg)
switch (msg)
{
case AddLoveMessage req:
_interaction.AddLove(req.User, req.Target, req.Percent);
_interaction.AddLove(req.User, req.Target, req.PercentUser, req.PercentTarget);
if(_entManager.TryGetComponent<InteractionComponent>(_entManager.GetEntity(req.User), out var usComp))
{
SendMessage(new ResponseLoveMessage(usComp.Love));
Expand Down
78 changes: 56 additions & 22 deletions Content.Server/_Sunrise/ERP/Systems/InteractionSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<InteractionComponent, ComponentInit>(OnComponentInit);
SubscribeLocalEvent<GetVerbsEvent<Verb>>(AddVerbs);
SubscribeLocalEvent<InteractionComponent, GetVerbsEvent<Verb>>(AddVerbs);
}

public (Sex, bool, Sex, bool, bool)? RequestMenu(EntityUid User, EntityUid Target)
Expand Down Expand Up @@ -55,36 +55,70 @@ public override void Initialize()
return null;
}

public void AddLove(NetEntity entity, NetEntity target, int percent)
public void AddLove(NetEntity entity, NetEntity target, int percentUser, int percentTarget)
{
List<EntityUid> ents = new();
ents.Add(GetEntity(entity));
ents.Add(GetEntity(target));
foreach (var ent in ents)
var User = GetEntity(entity);
var Target = GetEntity(target);
if (!TryComp<InteractionComponent>(User, out var compUser)) return;
if (!TryComp<InteractionComponent>(Target, out var compTarget)) return;

if (percentUser != 0)
{
if (_gameTiming.CurTime > compUser.LoveDelay)
{
compUser.ActualLove += (percentUser + _random.Next(-percentUser / 2, percentUser / 2)) / 100f;
compUser.TimeFromLastErp = _gameTiming.CurTime;
}
Spawn("EffectHearts", Transform(User).Coordinates);
if(_random.Prob(0.1f))
{
_chat.TryEmoteWithChat(User, "Moan", ChatTransmitRange.Normal);
}
}
if (compUser.Love >= 1)
{
if (!TryComp<HumanoidAppearanceComponent>(ent, out var humanoid)) continue;
if (TryComp<InteractionComponent>(ent, out var comp))
compUser.ActualLove = 0;
compUser.Love = 0.95f;
compUser.LoveDelay = _gameTiming.CurTime + TimeSpan.FromMinutes(1);
_chat.TrySendInGameICMessage(User, "кончает!", InGameICChatType.Emote, false);
if(TryComp<HumanoidAppearanceComponent>(User, out var humuser))
{
if (percent != 0)
if(humuser.Sex == Sex.Male)
{
if (_gameTiming.CurTime > comp.LoveDelay && humanoid.Sex == Sex.Male)
{
comp.ActualLove += (percent + _random.Next(-percent / 2, percent / 2)) / 100f;
comp.TimeFromLastErp = _gameTiming.CurTime;
}
Spawn("EffectHearts", Transform(ent).Coordinates);
Spawn("PuddleSemen", Transform(User).Coordinates);
}
if (comp.Love >= 1 && humanoid.Sex == Sex.Male)
}
}

if (percentTarget != 0)
{
if (_gameTiming.CurTime > compTarget.LoveDelay)
{
compTarget.ActualLove += (percentTarget + _random.Next(-percentTarget / 2, percentTarget / 2)) / 100f;
compTarget.TimeFromLastErp = _gameTiming.CurTime;
}
Spawn("EffectHearts", Transform(Target).Coordinates);
if (_random.Prob(0.1f))
{
_chat.TryEmoteWithChat(User, "Moan", ChatTransmitRange.Normal);
}
}
if (compTarget.Love >= 1)
{
compTarget.ActualLove = 0;
compTarget.Love = 0.95f;
compTarget.LoveDelay = _gameTiming.CurTime + TimeSpan.FromMinutes(1);
_chat.TrySendInGameICMessage(Target, "кончает!", InGameICChatType.Emote, false);
if (TryComp<HumanoidAppearanceComponent>(Target, out var taruser))
{
if (taruser.Sex == Sex.Male)
{
comp.ActualLove = 0;
comp.Love = 0.95f;
comp.LoveDelay = _gameTiming.CurTime + TimeSpan.FromMinutes(1);
_chat.TrySendInGameICMessage(ent, "кончает!", InGameICChatType.Emote, false);
Spawn("PuddleSemen", Transform(Target).Coordinates);
}
}
}
}
private void AddVerbs(GetVerbsEvent<Verb> args)
private void AddVerbs(EntityUid uid, InteractionComponent comp, GetVerbsEvent<Verb> args)
{
if (!EntityManager.TryGetComponent(args.User, out ActorComponent? actor))
return;
Expand All @@ -98,7 +132,7 @@ private void AddVerbs(GetVerbsEvent<Verb> args)
{
Priority = -1,
Text = "Взаимодействовать с...",
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/snow.svg.192dpi.png")), //Не знаю, какую иконку вставить
Icon = new SpriteSpecifier.Texture(new("/Textures/_Sunrise/Interface/ERP/heart.png")),
Act = () =>
{
if (!args.CanInteract || !args.CanAccess) return;
Expand Down
3 changes: 2 additions & 1 deletion Content.Shared/_Sunrise/ERP/InteractionPrototype.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@ public sealed partial class InteractionPrototype : IPrototype

[DataField] public bool Erp = false; // Это ЕРП-действие?

[DataField] public int LovePercent = 0; // Сколько процентов добавлять к шкале "окончания"
[DataField] public int LovePercentUser = 0; // Сколько процентов добавлять к шкале "окончания"
[DataField] public int LovePercentTarget = 0; // Сколько процентов добавлять к шкале "окончания"
}
8 changes: 5 additions & 3 deletions Content.Shared/_Sunrise/ERP/SharedInteractionSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ public sealed class AddLoveMessage : EuiMessageBase
{
public NetEntity User;
public NetEntity Target;
public int Percent;
public int PercentUser;
public int PercentTarget;

public AddLoveMessage(NetEntity user, NetEntity target, int percent)
public AddLoveMessage(NetEntity user, NetEntity target, int percentUser, int percentTarget)
{
User = user;
Target = target;
Percent = percent;
PercentUser = percentUser;
PercentTarget = percentTarget;
}
}

Expand Down
Binary file added Resources/Audio/_Sunrise/ERP/femston1.ogg
Binary file not shown.
Binary file added Resources/Audio/_Sunrise/ERP/femston2.ogg
Binary file not shown.
Binary file added Resources/Audio/_Sunrise/ERP/femston3.ogg
Binary file not shown.
Binary file added Resources/Audio/_Sunrise/ERP/femston4.ogg
Binary file not shown.
Binary file modified Resources/Audio/_Sunrise/ERP/kiss1.ogg
Binary file not shown.
Binary file modified Resources/Audio/_Sunrise/ERP/kiss2.ogg
Binary file not shown.
Binary file modified Resources/Audio/_Sunrise/ERP/kiss3.ogg
Binary file not shown.
Binary file modified Resources/Audio/_Sunrise/ERP/kiss4.ogg
Binary file not shown.
Binary file modified Resources/Audio/_Sunrise/ERP/kiss5.ogg
Binary file not shown.
Binary file modified Resources/Audio/_Sunrise/ERP/kiss6.ogg
Binary file not shown.
Binary file added Resources/Audio/_Sunrise/ERP/maleston1.ogg
Binary file not shown.
Binary file added Resources/Audio/_Sunrise/ERP/maleston2.ogg
Binary file not shown.
12 changes: 12 additions & 0 deletions Resources/Prototypes/Voice/speech_emote_sounds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
collection: BikeHorn
Sigh:
collection: MaleSigh
Moan:
collection: MaleMoan
Crying:
collection: MaleCry
Whistle:
Expand Down Expand Up @@ -68,6 +70,8 @@
collection: CluwneHorn
Sigh:
collection: FemaleSigh
Moan:
collection: FemaleMoan
Crying:
collection: FemaleCry
Whistle:
Expand Down Expand Up @@ -152,6 +156,8 @@
collection: BikeHorn
Sigh:
collection: MaleSigh
Moan:
collection: MaleMoan
Crying:
collection: MaleCry
Whistle:
Expand Down Expand Up @@ -194,6 +200,8 @@
collection: CluwneHorn
Sigh:
collection: FemaleSigh
Moan:
collection: FemaleMoan
Crying:
collection: FemaleCry
Whistle:
Expand Down Expand Up @@ -281,6 +289,8 @@
collection: Snores
Sigh:
collection: MaleSigh
Moan:
collection: MaleMoan
Honk:
collection: BikeHorn
Crying:
Expand Down Expand Up @@ -322,6 +332,8 @@
collection: Snores
Sigh:
collection: FemaleSigh
Moan:
collection: FemaleMoan
Honk:
collection: BikeHorn
Crying:
Expand Down
58 changes: 26 additions & 32 deletions Resources/Prototypes/_Sunrise/ERP/Interactions/interactions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@
userWithoutCloth: false
targetWithoutCloth: false
erp: true
lovePercent: 2
lovePercentUser: 0
lovePercentTarget: 2

- type: interaction
id: ERPkiss
Expand Down Expand Up @@ -94,7 +95,8 @@
userWithoutCloth: false
targetWithoutCloth: false
erp: true
lovePercent: 5
lovePercentUser: 5
lovePercentTarget: 6

- type: interaction
id: ERPkiss2
Expand All @@ -117,7 +119,8 @@
userWithoutCloth: false
targetWithoutCloth: false
erp: true
lovePercent: 4
lovePercentUser: 5
lovePercentTarget: 6

- type: interaction
id: ERPbreast1
Expand All @@ -137,7 +140,8 @@
userWithoutCloth: false
targetWithoutCloth: true
erp: true
lovePercent: 1
lovePercentUser: 4
lovePercentTarget: 10

- type: interaction
id: ERPbreast2
Expand All @@ -153,7 +157,8 @@
userWithoutCloth: false
targetWithoutCloth: true
erp: true
lovePercent: 1
lovePercentUser: 5
lovePercentTarget: 13

- type: interaction
id: ERPanusInsert
Expand All @@ -175,7 +180,8 @@
userWithoutCloth: true
targetWithoutCloth: true
erp: true
lovePercent: 15
lovePercentUser: 20
lovePercentTarget: 20

- type: interaction
id: ERPvaginaInsert
Expand All @@ -196,7 +202,8 @@
userWithoutCloth: true
targetWithoutCloth: true
erp: true
lovePercent: 15
lovePercentUser: 20
lovePercentTarget: 20

- type: interaction
id: ERPvaginaLick
Expand All @@ -211,7 +218,8 @@
userWithoutCloth: false
targetWithoutCloth: true
erp: true
lovePercent: 3
lovePercentUser: 4
lovePercentTarget: 12

- type: interaction
id: ERPmasturbate
Expand All @@ -232,10 +240,11 @@
userWithoutCloth: false
targetWithoutCloth: true
erp: true
lovePercent: 15
lovePercentUser: 2
lovePercentTarget: 15

- type: interaction
id: ERPmasturbateSelfMale
id: ERPmasturbateSelf
name: Мастурбировать себе
icon: _Sunrise/Interface/ERP/heartIcon.png
emotes:
Expand All @@ -248,29 +257,13 @@
- path: /Audio/_Sunrise/ERP/hlup2.ogg
- path: /Audio/_Sunrise/ERP/hlup3.ogg
- path: /Audio/_Sunrise/ERP/hlup4.ogg
userSex: Male
targetSex: Unsexed
userWithoutCloth: true
targetWithoutCloth: false
erp: true
lovePercent: 15

- type: interaction
id: ERPmasturbateSelfFemale
name: Мастурбировать себе
icon: _Sunrise/Interface/ERP/heartIcon.png
emotes:
- мастурбирует
- мастурбирует, смотря на %target
- начинает мастурбировать
- начинает мастурбировать, смотря на %target
userSex: Female
userSex: Unsexed
targetSex: Unsexed
userWithoutCloth: true
targetWithoutCloth: false
erp: true
lovePercent: 0

lovePercentUser: 15
lovePercentTarget: 2

- type: interaction
id: ERPbruh
Expand All @@ -285,19 +278,20 @@
userWithoutCloth: false
targetWithoutCloth: true
erp: true
lovePercent: 15
lovePercentUser: 3
lovePercentTarget: 15

- type: interaction
id: ERPbruh2
name: Заставить отсосать
icon: _Sunrise/Interface/ERP/heartIcon.png
emotes:
- заставляет отсасывать у себя %target
- заставляет сосать %target
- заставляет делать минет %target
userSex: Male
targetSex: Unsexed
userWithoutCloth: true
targetWithoutCloth: false
erp: true
lovePercent: 15
lovePercentUser: 15
lovePercentTarget: 3
Loading

0 comments on commit 6ba8dbf

Please sign in to comment.