Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Апстрим #161

Merged
merged 27 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
5004cf8
Physical Pulling (#883)
Mnemotechnician Sep 17, 2024
b65a5d8
Core Fullsize (Underfueled) AME (#927)
VMSolidus Sep 17, 2024
3dc28cf
Automatic Changelog Update (#883)
SimpleStation14 Sep 17, 2024
0079259
Automatic Changelog Update (#927)
SimpleStation14 Sep 17, 2024
2f8d9e8
Fixes to Bench and Barber Chair Rotation (#925)
Flybik Sep 17, 2024
34d9e0d
Re-Adds Fireaxe Prying (#921)
zelezniciar1 Sep 17, 2024
ff618e9
Automatic Changelog Update (#925)
SimpleStation14 Sep 17, 2024
f5275e2
9 More Traits (#918)
VMSolidus Sep 17, 2024
3dd57ca
Open Market Tacsuits (#845)
VMSolidus Sep 17, 2024
9e293ea
Psionic Power Rolling Rework (#830)
VMSolidus Sep 17, 2024
a553909
IPC Refactor (#771)
VMSolidus Sep 17, 2024
ca88477
Automatic Changelog Update (#921)
SimpleStation14 Sep 17, 2024
46cbafa
Filespace ContestsSystem.cs (#931)
VMSolidus Sep 18, 2024
364b237
Fix Uncloneable Feedback Message (#926)
VMSolidus Sep 18, 2024
4d4afb6
Automatic Changelog Update (#926)
SimpleStation14 Sep 18, 2024
d5f0c55
Better Lying Down System (From White Dream) (#815)
VMSolidus Sep 19, 2024
a8e435c
Automatic Changelog Update (#815)
SimpleStation14 Sep 19, 2024
2bfbc72
Remove DeltaV Options (#928)
FoxxoTrystan Sep 19, 2024
0cf7803
Automatic Changelog Update (#928)
SimpleStation14 Sep 19, 2024
d6dd2ea
Fix SpawnAndDeleteAllEntities (#932)
VMSolidus Sep 19, 2024
dee5a40
[Port] StepTriggerGroup From WhiteDream (#929)
VMSolidus Sep 19, 2024
6d1aae9
Automatic Changelog Update (#929)
SimpleStation14 Sep 19, 2024
ba7ef78
Merge remote-tracking branch 'upstream/master'
Evgencheg Sep 19, 2024
80cbc27
Merge branch 'Lost-Paradise-Project:master' into master
Evgencheg Sep 19, 2024
f0e074f
переводы
Evgencheg Sep 19, 2024
a339a9b
фиксик
Evgencheg Sep 19, 2024
4165f85
я глупый
Evgencheg Sep 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions Content.Client/Buckle/BuckleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,11 @@ private void OnBuckleAfterAutoHandleState(EntityUid uid, BuckleComponent compone

private void OnAppearanceChange(EntityUid uid, BuckleComponent component, ref AppearanceChangeEvent args)
{
if (!TryComp<RotationVisualsComponent>(uid, out var rotVisuals))
if (!TryComp<RotationVisualsComponent>(uid, out var rotVisuals)
|| !Appearance.TryGetData<bool>(uid, BuckleVisuals.Buckled, out var buckled, args.Component)
|| !buckled || args.Sprite == null)
return;

if (!Appearance.TryGetData<bool>(uid, BuckleVisuals.Buckled, out var buckled, args.Component) ||
!buckled ||
args.Sprite == null)
{
_rotationVisualizerSystem.SetHorizontalAngle((uid, rotVisuals), rotVisuals.DefaultRotation);
return;
}

// Animate strapping yourself to something at a given angle
// TODO: Dump this when buckle is better
_rotationVisualizerSystem.AnimateSpriteRotation(uid, args.Sprite, rotVisuals.HorizontalRotation, 0.125f);
Expand Down
23 changes: 0 additions & 23 deletions Content.Client/DeltaV/Options/UI/Tabs/DeltaTab.xaml

This file was deleted.

46 changes: 0 additions & 46 deletions Content.Client/DeltaV/Options/UI/Tabs/DeltaTab.xaml.cs

This file was deleted.

1 change: 1 addition & 0 deletions Content.Client/Input/ContentContexts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public static void SetupContexts(IInputContextContainer contexts)
human.AddFunction(ContentKeyFunctions.Arcade1);
human.AddFunction(ContentKeyFunctions.Arcade2);
human.AddFunction(ContentKeyFunctions.Arcade3);
human.AddFunction(ContentKeyFunctions.LookUp);

// actions should be common (for ghosts, mobs, etc)
common.AddFunction(ContentKeyFunctions.OpenActionsMenu);
Expand Down
2 changes: 0 additions & 2 deletions Content.Client/Options/UI/OptionsMenu.xaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<DefaultWindow xmlns="https://spacestation14.io"
xmlns:tabs="clr-namespace:Content.Client.Options.UI.Tabs"
xmlns:dtabs="clr-namespace:Content.Client.DeltaV.Options.UI.Tabs"
Title="{Loc 'ui-options-title'}"
MinSize="800 450">
<TabContainer Name="Tabs" Access="Public">
Expand All @@ -9,6 +8,5 @@
<tabs:KeyRebindTab Name="KeyRebindTab" />
<tabs:AudioTab Name="AudioTab" />
<tabs:NetworkTab Name="NetworkTab" />
<dtabs:DeltaTab Name="DeltaTab" />
</TabContainer>
</DefaultWindow>
1 change: 0 additions & 1 deletion Content.Client/Options/UI/OptionsMenu.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public OptionsMenu()
Tabs.SetTabTitle(2, Loc.GetString("ui-options-tab-controls"));
Tabs.SetTabTitle(3, Loc.GetString("ui-options-tab-audio"));
Tabs.SetTabTitle(4, Loc.GetString("ui-options-tab-network"));
Tabs.SetTabTitle(5, Loc.GetString("ui-options-tab-deltav")); // DeltaV specific settings

UpdateTabs();
}
Expand Down
15 changes: 15 additions & 0 deletions Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ private void HandleToggleWalk(BaseButton.ButtonToggledEventArgs args)
_deferCommands.Add(_inputManager.SaveToUserData);
}

private void HandleHoldLookUp(BaseButton.ButtonToggledEventArgs args)
{
_cfg.SetCVar(CCVars.HoldLookUp, args.Pressed);
_cfg.SaveToFile();
}

private void HandleDefaultWalk(BaseButton.ButtonToggledEventArgs args)
{
_cfg.SetCVar(CCVars.DefaultWalk, args.Pressed);
Expand All @@ -109,6 +115,12 @@ private void HandleStaticStorageUI(BaseButton.ButtonToggledEventArgs args)
_cfg.SaveToFile();
}

private void HandleToggleAutoGetUp(BaseButton.ButtonToggledEventArgs args)
{
_cfg.SetCVar(CCVars.AutoGetUp, args.Pressed);
_cfg.SaveToFile();
}

public KeyRebindTab()
{
IoCManager.InjectDependencies(this);
Expand Down Expand Up @@ -193,6 +205,9 @@ void AddCheckBox(string checkBoxName, bool currentState, Action<BaseButton.Butto
AddButton(ContentKeyFunctions.OfferItem);
AddButton(ContentKeyFunctions.SaveItemLocation);
AddButton(ContentKeyFunctions.ToggleStanding);
AddButton(ContentKeyFunctions.LookUp);
AddCheckBox("ui-options-function-auto-get-up", _cfg.GetCVar(CCVars.AutoGetUp), HandleToggleAutoGetUp);
AddCheckBox("ui-options-function-hold-look-up", _cfg.GetCVar(CCVars.HoldLookUp), HandleHoldLookUp);

AddHeader("ui-options-header-interaction-adv");
AddButton(ContentKeyFunctions.SmartEquipBackpack);
Expand Down
1 change: 1 addition & 0 deletions Content.Client/Options/UI/Tabs/MiscTab.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<CheckBox Name="ReducedMotionCheckBox" Text="{Loc 'ui-options-reduced-motion'}" />
<CheckBox Name="EnableColorNameCheckBox" Text="{Loc 'ui-options-enable-color-name'}" />
<CheckBox Name="ColorblindFriendlyCheckBox" Text="{Loc 'ui-options-colorblind-friendly'}" />
<CheckBox Name="DisableFiltersCheckBox" Text="{Loc 'ui-options-no-filters'}" />
<BoxContainer Orientation="Horizontal">
<Label Text="{Loc 'ui-options-chat-window-opacity'}" Margin="8 0" />
<Slider Name="ChatWindowOpacitySlider"
Expand Down
7 changes: 6 additions & 1 deletion Content.Client/Options/UI/Tabs/MiscTab.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public MiscTab()
ScreenShakeIntensitySlider.OnValueChanged += OnScreenShakeIntensitySliderChanged;
// ToggleWalk.OnToggled += OnCheckBoxToggled;
StaticStorageUI.OnToggled += OnCheckBoxToggled;
DisableFiltersCheckBox.OnToggled += OnCheckBoxToggled;

HudThemeOption.SelectId(_hudThemeIdToIndex.GetValueOrDefault(_cfg.GetCVar(CVars.InterfaceTheme), 0));
DiscordRich.Pressed = _cfg.GetCVar(CVars.DiscordEnabled);
Expand All @@ -98,6 +99,7 @@ public MiscTab()
ScreenShakeIntensitySlider.Value = _cfg.GetCVar(CCVars.ScreenShakeIntensity) * 100f;
// ToggleWalk.Pressed = _cfg.GetCVar(CCVars.ToggleWalk);
StaticStorageUI.Pressed = _cfg.GetCVar(CCVars.StaticStorageUI);
DisableFiltersCheckBox.Pressed = _cfg.GetCVar(CCVars.NoVisionFilters);


ApplyButton.OnPressed += OnApplyButtonPressed;
Expand Down Expand Up @@ -154,6 +156,7 @@ private void OnApplyButtonPressed(BaseButton.ButtonEventArgs args)
_cfg.SetCVar(CCVars.ScreenShakeIntensity, ScreenShakeIntensitySlider.Value / 100f);
// _cfg.SetCVar(CCVars.ToggleWalk, ToggleWalk.Pressed);
_cfg.SetCVar(CCVars.StaticStorageUI, StaticStorageUI.Pressed);
_cfg.SetCVar(CCVars.NoVisionFilters, DisableFiltersCheckBox.Pressed);

if (HudLayoutOption.SelectedMetadata is string opt)
{
Expand Down Expand Up @@ -184,6 +187,7 @@ private void UpdateApplyButton()
var isScreenShakeIntensitySame = Math.Abs(ScreenShakeIntensitySlider.Value / 100f - _cfg.GetCVar(CCVars.ScreenShakeIntensity)) < 0.01f;
// var isToggleWalkSame = ToggleWalk.Pressed == _cfg.GetCVar(CCVars.ToggleWalk);
var isStaticStorageUISame = StaticStorageUI.Pressed == _cfg.GetCVar(CCVars.StaticStorageUI);
var isNoVisionFiltersSame = DisableFiltersCheckBox.Pressed == _cfg.GetCVar(CCVars.NoVisionFilters);

ApplyButton.Disabled = isHudThemeSame &&
isLayoutSame &&
Expand All @@ -202,7 +206,8 @@ private void UpdateApplyButton()
isChatWindowOpacitySame &&
isScreenShakeIntensitySame &&
// isToggleWalkSame &&
isStaticStorageUISame;
isStaticStorageUISame &&
isNoVisionFiltersSame;
}

}
Expand Down
8 changes: 4 additions & 4 deletions Content.Client/Overlays/DogVisionSystem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Content.Shared.Traits.Assorted.Components;
using Content.Shared.DeltaV.CCVars;
using Content.Shared.CCVar;
using Robust.Client.Graphics;
using Robust.Shared.Configuration;
using Robust.Shared.Player;
Expand All @@ -23,7 +23,7 @@ public override void Initialize()
SubscribeLocalEvent<DogVisionComponent, LocalPlayerAttachedEvent>(OnPlayerAttached);
SubscribeLocalEvent<DogVisionComponent, LocalPlayerDetachedEvent>(OnPlayerDetached);

Subs.CVar(_cfg, DCCVars.NoVisionFilters, OnNoVisionFiltersChanged);
Subs.CVar(_cfg, CCVars.NoVisionFilters, OnNoVisionFiltersChanged);

_overlay = new();
}
Expand All @@ -33,7 +33,7 @@ private void OnDogVisionInit(EntityUid uid, DogVisionComponent component, Compon
if (uid != _playerMan.LocalEntity)
return;

if (!_cfg.GetCVar(DCCVars.NoVisionFilters))
if (!_cfg.GetCVar(CCVars.NoVisionFilters))
_overlayMan.AddOverlay(_overlay);
}

Expand All @@ -47,7 +47,7 @@ private void OnDogVisionShutdown(EntityUid uid, DogVisionComponent component, Co

private void OnPlayerAttached(EntityUid uid, DogVisionComponent component, LocalPlayerAttachedEvent args)
{
if (!_cfg.GetCVar(DCCVars.NoVisionFilters))
if (!_cfg.GetCVar(CCVars.NoVisionFilters))
_overlayMan.AddOverlay(_overlay);
}

Expand Down
8 changes: 4 additions & 4 deletions Content.Client/Overlays/UltraVisionSystem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Content.Shared.Traits.Assorted.Components;
using Content.Shared.DeltaV.CCVars;
using Content.Shared.CCVar;
using Robust.Client.Graphics;
using Robust.Shared.Configuration;
using Robust.Shared.Player;
Expand All @@ -23,7 +23,7 @@ public override void Initialize()
SubscribeLocalEvent<UltraVisionComponent, LocalPlayerAttachedEvent>(OnPlayerAttached);
SubscribeLocalEvent<UltraVisionComponent, LocalPlayerDetachedEvent>(OnPlayerDetached);

Subs.CVar(_cfg, DCCVars.NoVisionFilters, OnNoVisionFiltersChanged);
Subs.CVar(_cfg, CCVars.NoVisionFilters, OnNoVisionFiltersChanged);

_overlay = new();
}
Expand All @@ -33,7 +33,7 @@ private void OnUltraVisionInit(EntityUid uid, UltraVisionComponent component, Co
if (uid != _playerMan.LocalEntity)
return;

if (!_cfg.GetCVar(DCCVars.NoVisionFilters))
if (!_cfg.GetCVar(CCVars.NoVisionFilters))
_overlayMan.AddOverlay(_overlay);
}

Expand All @@ -47,7 +47,7 @@ private void OnUltraVisionShutdown(EntityUid uid, UltraVisionComponent component

private void OnPlayerAttached(EntityUid uid, UltraVisionComponent component, LocalPlayerAttachedEvent args)
{
if (!_cfg.GetCVar(DCCVars.NoVisionFilters))
if (!_cfg.GetCVar(CCVars.NoVisionFilters))
_overlayMan.AddOverlay(_overlay);
}

Expand Down
69 changes: 69 additions & 0 deletions Content.Client/Standing/LayingDownSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
using Content.Shared.ActionBlocker;
using Content.Shared.Rotation;
using Content.Shared.Standing;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Shared.Timing;

namespace Content.Client.Standing;

public sealed class LayingDownSystem : SharedLayingDownSystem
{
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly IEyeManager _eyeManager = default!;
[Dependency] private readonly AnimationPlayerSystem _animation = default!;
[Dependency] private readonly ActionBlockerSystem _actionBlocker = default!;

public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<LayingDownComponent, MoveEvent>(OnMovementInput);

SubscribeNetworkEvent<CheckAutoGetUpEvent>(OnCheckAutoGetUp);
}

private void OnMovementInput(EntityUid uid, LayingDownComponent component, MoveEvent args)
{
if (!_timing.IsFirstTimePredicted
|| !_actionBlocker.CanMove(uid)
|| _animation.HasRunningAnimation(uid, "rotate")
|| !TryComp<TransformComponent>(uid, out var transform)
|| !TryComp<SpriteComponent>(uid, out var sprite)
|| !TryComp<RotationVisualsComponent>(uid, out var rotationVisuals))
return;

var rotation = transform.LocalRotation + (_eyeManager.CurrentEye.Rotation - (transform.LocalRotation - transform.WorldRotation));

if (rotation.GetDir() is Direction.SouthEast or Direction.East or Direction.NorthEast or Direction.North)
{
rotationVisuals.HorizontalRotation = Angle.FromDegrees(270);
sprite.Rotation = Angle.FromDegrees(270);
return;
}

rotationVisuals.HorizontalRotation = Angle.FromDegrees(90);
sprite.Rotation = Angle.FromDegrees(90);
}

private void OnCheckAutoGetUp(CheckAutoGetUpEvent ev, EntitySessionEventArgs args)
{
if (!_timing.IsFirstTimePredicted)
return;

var uid = GetEntity(ev.User);

if (!TryComp<TransformComponent>(uid, out var transform) || !TryComp<RotationVisualsComponent>(uid, out var rotationVisuals))
return;

var rotation = transform.LocalRotation + (_eyeManager.CurrentEye.Rotation - (transform.LocalRotation - transform.WorldRotation));

if (rotation.GetDir() is Direction.SouthEast or Direction.East or Direction.NorthEast or Direction.North)
{
rotationVisuals.HorizontalRotation = Angle.FromDegrees(270);
return;
}

rotationVisuals.HorizontalRotation = Angle.FromDegrees(90);
}
}
Loading
Loading