Skip to content

Commit

Permalink
Revert "Merge pull request space-syndicate#168 from AwareFoxy/surg-ho…
Browse files Browse the repository at this point in the history
…tfix-mood"

This reverts commit f6fd496.
  • Loading branch information
desuwatch committed Jan 18, 2025
1 parent 0a30de4 commit d1606ee
Show file tree
Hide file tree
Showing 110 changed files with 373 additions and 2,232 deletions.
12 changes: 12 additions & 0 deletions Content.Client/Inventory/ClientInventorySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public override void Initialize()

SubscribeLocalEvent<InventorySlotsComponent, LocalPlayerAttachedEvent>(OnPlayerAttached);
SubscribeLocalEvent<InventorySlotsComponent, LocalPlayerDetachedEvent>(OnPlayerDetached);
SubscribeLocalEvent<InventorySlotsComponent, RefreshInventorySlotsEvent>(OnRefreshInventorySlots); // CorvaxNext: surgery
SubscribeLocalEvent<InventoryComponent, ComponentShutdown>(OnShutdown);

SubscribeLocalEvent<InventorySlotsComponent, DidEquipEvent>((_, comp, args) =>
Expand Down Expand Up @@ -181,6 +182,17 @@ public void UpdateSlot(EntityUid owner, InventorySlotsComponent component, strin
EntitySlotUpdate?.Invoke(newData);
}

// start-_CorvaxNext: surgery
public void OnRefreshInventorySlots(EntityUid owner, InventorySlotsComponent component, RefreshInventorySlotsEvent args)
{
if (!component.SlotData.TryGetValue(args.SlotName, out var slotData)
|| _playerManager.LocalEntity != owner)
return;

OnSlotRemoved?.Invoke(slotData);
}
// end-_CorvaxNext: surgery

public bool TryAddSlotDef(EntityUid owner, InventorySlotsComponent component, SlotDefinition newSlotDef)
{
SlotData newSlotData = newSlotDef; //convert to slotData
Expand Down
10 changes: 1 addition & 9 deletions Content.Client/UserInterface/Screens/DefaultGameScreen.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public DefaultGameScreen()

Chat.OnResized += ChatOnResized;
Chat.OnChatResizeFinish += ChatOnResizeFinish;

MainViewport.OnResized += ResizeActionContainer;
MainViewport.OnResized += ResizeAlertsContainer; // Corvax-Next-Surgery
Inventory.OnResized += ResizeActionContainer;
}

Expand All @@ -37,14 +37,6 @@ private void ResizeActionContainer()
Actions.ActionsContainer.MaxGridHeight = MainViewport.Size.Y - indent;
}

// Corvax-Next-Surgery-Start
private void ResizeAlertsContainer()
{
float indent = Chat.Size.Y + Targeting.Size.Y + 120;
Alerts.AlertContainer.MaxGridHeight = Math.Max(MainViewport.Size.Y - indent, 1);
}
// Corvax-Next-Surgery-End

private void ChatOnResizeFinish(Vector2 _)
{
var marginBottom = Chat.GetValue<float>(MarginBottomProperty);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
xmlns:partStatus="clr-namespace:Content.Client._CorvaxNext.UserInterface.Systems.PartStatus.Widgets"
MinSize="64 64">
<GridContainer Columns="1" HorizontalAlignment="Right" VerticalAlignment="Top">
<PanelContainer>
<GridContainer Name="AlertContainer" Columns="1" HorizontalAlignment="Right" VerticalAlignment="Center" Access="Public" /> <!-- Corvax-Next-Surgery -->
<PanelContainer >
<BoxContainer Name="AlertContainer" Access="Public" Orientation="Vertical" />
</PanelContainer>
<partStatus:PartStatusControl Name="PartStatus" Access="Protected"/>
</GridContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public sealed partial class AlertsUI : UIWidget
public AlertsUI()
{
RobustXamlLoader.Load(this);
LayoutContainer.SetGrowHorizontal(this, LayoutContainer.GrowDirection.Begin); // Corvax-Next-Surgery
}

public void SyncControls(AlertsSystem alertsSystem,
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public async Task DeleteAllThenGhost()
Console.WriteLine(pair.Client.EntMan.ToPrettyString(ent));
}

Assert.That(pair.Client.EntMan.EntityCount, Is.AtMost(1)); // Corvax-Next-Surgery: Tolerate at most one client entity
Assert.That(pair.Client.EntMan.EntityCount, Is.EqualTo(0));

// Create a new map.
int mapId = 1;
Expand Down
8 changes: 3 additions & 5 deletions Content.IntegrationTests/Tests/Movement/SlippingTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ public async Task BananaSlipTest()
{
var sys = SEntMan.System<SlipTestSystem>();
await SpawnTarget("TrashBananaPeel");

// Corvax-Next-Surgery-Start
// var modifier = Comp<MovementSpeedModifierComponent>(Player).SprintSpeedModifier;
// Assert.That(modifier, Is.EqualTo(1), "Player is not moving at full speed."); Yeeting this pointless Assert because it's not actually important.
// Corvax-Next-Surgery-End

var modifier = Comp<MovementSpeedModifierComponent>(Player).SprintSpeedModifier;
Assert.That(modifier, Is.EqualTo(1), "Player is not moving at full speed.");

// Player is to the left of the banana peel and has not slipped.
Assert.That(Delta(), Is.GreaterThan(0.5f));
Expand Down
3 changes: 0 additions & 3 deletions Content.Server/Arcade/BlockGame/BlockGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using Robust.Server.GameObjects;
using Robust.Shared.Random;
using System.Linq;
using Content.Shared._CorvaxNext.Mood;

namespace Content.Server.Arcade.BlockGame;

Expand Down Expand Up @@ -83,8 +82,6 @@ private void InvokeGameover()
{
_highScorePlacement = _arcadeSystem.RegisterHighScore(meta.EntityName, Points);
SendHighscoreUpdate();
var ev = new MoodEffectEvent("ArcadePlay"); // Corvax-Next-Mood
_entityManager.EventBus.RaiseLocalEvent(meta.Owner, ev); // Corvax-Next-Mood
}
SendMessage(new BlockGameMessages.BlockGameGameOverScreenMessage(Points, _highScorePlacement?.LocalPlacement, _highScorePlacement?.GlobalPlacement));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using Content.Server.Advertise;
using Content.Server.Advertise.Components;
using Content.Shared.Power;
using Content.Shared._CorvaxNext.Mood;
using static Content.Shared.Arcade.SharedSpaceVillainArcadeComponent;
using Robust.Server.GameObjects;
using Robust.Shared.Audio;
Expand Down Expand Up @@ -78,8 +77,6 @@ private void OnSVPlayerAction(EntityUid uid, SpaceVillainArcadeComponent compone
if (!TryComp<ApcPowerReceiverComponent>(uid, out var power) || !power.Powered)
return;

RaiseLocalEvent(msg.Actor, new MoodEffectEvent("ArcadePlay")); // _CorvaxNext: mood

switch (msg.PlayerAction)
{
case PlayerAction.Attack:
Expand Down
6 changes: 2 additions & 4 deletions Content.Server/Atmos/EntitySystems/BarotraumaSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Content.Shared.FixedPoint;
using Content.Shared.Inventory;
using Content.Shared.Inventory.Events;
using Content.Shared._CorvaxNext.Mood;
using Robust.Shared.Containers;

namespace Content.Server.Atmos.EntitySystems
Expand Down Expand Up @@ -244,16 +243,15 @@ public override void Update(float frameTime)
barotrauma.TakingDamage = true;
_adminLogger.Add(LogType.Barotrauma, $"{ToPrettyString(uid):entity} started taking low pressure damage");
}
RaiseLocalEvent(uid, new MoodEffectEvent("MobLowPressure")); // Corvax Next

_alertsSystem.ShowAlert(uid, barotrauma.LowPressureAlert, 2);
}
else if (pressure >= Atmospherics.HazardHighPressure)
{
var damageScale = MathF.Min(((pressure / Atmospherics.HazardHighPressure) - 1) * Atmospherics.PressureDamageCoefficient, Atmospherics.MaxHighPressureDamage);

// Deal damage and ignore resistances. Resistance to pressure damage should be done via pressure protection gear.
_damageableSystem.TryChangeDamage(uid, barotrauma.Damage * damageScale, true, false, canSever: false); // Corvax Next
RaiseLocalEvent(uid, new MoodEffectEvent("MobHighPressure")); // Corvax Next
_damageableSystem.TryChangeDamage(uid, barotrauma.Damage * damageScale, true, false, canSever: false); // CorvaxNext

if (!barotrauma.TakingDamage)
{
Expand Down
3 changes: 0 additions & 3 deletions Content.Server/Atmos/EntitySystems/FlammableSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
using Content.Shared.Weapons.Melee.Events;
using Content.Shared.FixedPoint;
using Robust.Server.Audio;
using Content.Shared._CorvaxNext.Mood;
using Robust.Shared.Physics.Components;
using Robust.Shared.Physics.Events;
using Robust.Shared.Physics.Systems;
Expand Down Expand Up @@ -427,12 +426,10 @@ public override void Update(float frameTime)
if (!flammable.OnFire)
{
_alertsSystem.ClearAlert(uid, flammable.FireAlert);
RaiseLocalEvent(uid, new MoodRemoveEffectEvent("OnFire")); // _CorvaxNext: mood
continue;
}

_alertsSystem.ShowAlert(uid, flammable.FireAlert);
RaiseLocalEvent(uid, new MoodEffectEvent("OnFire")); // _CorvaxNext: mood

if (flammable.FireStacks > 0)
{
Expand Down
3 changes: 0 additions & 3 deletions Content.Server/Bible/BibleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
using Content.Shared.Popups;
using Content.Shared.Timing;
using Content.Shared.Verbs;
using Content.Shared._CorvaxNext.Mood;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Player;
Expand Down Expand Up @@ -154,8 +153,6 @@ private void OnAfterInteract(EntityUid uid, BibleComponent component, AfterInter
_audio.PlayPvs(component.HealSoundPath, args.User);
_delay.TryResetDelay((uid, useDelay));
}

RaiseLocalEvent(args.Target.Value, new MoodEffectEvent("GotBlessed")); // _CorvaxNext: mood
}

private void AddSummonVerb(EntityUid uid, SummonableComponent component, GetVerbsEvent<AlternativeVerb> args)
Expand Down
5 changes: 1 addition & 4 deletions Content.Server/Body/Commands/AddHandCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,7 @@ public void Execute(IConsoleShell shell, string argStr, string[] args)
if (attachAt == default)
attachAt = bodySystem.GetBodyChildren(entity, body).First();

// Shitmed Change Start
var slotId = $"{part.Symmetry.ToString().ToLower()} {part.GetHashCode().ToString()}";
part.SlotId = part.GetHashCode().ToString();
// Shitmed Change End
var slotId = part.GetHashCode().ToString();

if (!bodySystem.TryCreatePartSlotAndAttach(attachAt.Id, slotId, hand, BodyPartType.Hand, attachAt.Component, part))
{
Expand Down
9 changes: 1 addition & 8 deletions Content.Server/Body/Commands/AttachBodyPartCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,8 @@ public void Execute(IConsoleShell shell, string argStr, string[] args)
return;
}

// Shitmed Change Start
var slotId = "";
if (part.Symmetry != BodyPartSymmetry.None)
slotId = $"{part.Symmetry.ToString().ToLower()} {part.GetHashCode().ToString()}";
else
slotId = $"{part.GetHashCode().ToString()}";
var slotId = $"AttachBodyPartVerb-{partUid}";

part.SlotId = part.GetHashCode().ToString();
// Shitmed Change End
// ReSharper disable once ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract
if (body.RootContainer.ContainedEntity != null)
{
Expand Down
2 changes: 0 additions & 2 deletions Content.Server/Body/Systems/RespiratorSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
using Content.Shared.EntityEffects;
using Content.Shared.Mobs.Systems;
using Content.Shared._CorvaxNext.Surgery.Body;
using Content.Shared._CorvaxNext.Mood;
using JetBrains.Annotations;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
Expand Down Expand Up @@ -295,7 +294,6 @@ private void TakeSuffocationDamage(Entity<RespiratorComponent> ent)
{
_alertsSystem.ShowAlert(ent, entity.Comp1.Alert);
}
RaiseLocalEvent(ent, new MoodEffectEvent("Suffocating")); // _CorvaxNext: mood
}

_damageableSys.TryChangeDamage(ent, HasComp<DebrainedComponent>(ent) ? ent.Comp.Damage * 4.5f : ent.Comp.Damage, interruptsDoAfters: false); // CorvaxNext: surgery
Expand Down
3 changes: 0 additions & 3 deletions Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
using Robust.Shared.Random;
using Robust.Shared.Utility;
using System.Linq;
using Content.Shared._CorvaxNext.Mood;
using Content.Shared.CombatMode.Pacification;
using Content.Shared.Store.Components;

Expand Down Expand Up @@ -479,8 +478,6 @@ private void OnAfterAntagEntSelected(Entity<NukeopsRuleComponent> ent, ref After
var target = (ent.Comp.TargetStation is not null) ? Name(ent.Comp.TargetStation.Value) : "the target";

RemComp<PacifiedComponent>(args.EntityUid); // Corvax-DionaPacifist: Allow dionas nukes to harm
RaiseLocalEvent(args.EntityUid, new MoodEffectEvent("NukeopsFocused")); // _CorvaxNext: mood

_antag.SendBriefing(args.Session,
Loc.GetString("nukeops-welcome",
("station", target),
Expand Down
2 changes: 0 additions & 2 deletions Content.Server/GameTicking/Rules/RevolutionaryRuleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
using Content.Server.RoundEnd;
using Content.Server.Shuttles.Systems;
using Content.Server.Station.Systems;
using Content.Shared._CorvaxNext.Mood;
using Content.Shared.Database;
using Content.Shared.GameTicking.Components;
using Content.Shared.Humanoid;
Expand Down Expand Up @@ -147,7 +146,6 @@ private void OnPostFlash(EntityUid uid, HeadRevolutionaryComponent comp, ref Aft

_npcFaction.AddFaction(ev.Target, RevolutionaryNpcFaction);
var revComp = EnsureComp<RevolutionaryComponent>(ev.Target);
RaiseLocalEvent(ev.Target, new MoodEffectEvent("RevolutionFocused")); // _CorvaxNext: mood

if (ev.User != null)
{
Expand Down
Loading

0 comments on commit d1606ee

Please sign in to comment.