Skip to content

Commit

Permalink
Merge branch 'goob' of https://github.com/Scomossor/Gaby-Station into…
Browse files Browse the repository at this point in the history
… goob
  • Loading branch information
AgentePanela committed Dec 3, 2024
2 parents ef955ec + 20f6e5d commit 2dd817c
Show file tree
Hide file tree
Showing 590 changed files with 31,647 additions and 4,888 deletions.
2 changes: 1 addition & 1 deletion Content.Benchmarks/MapLoadBenchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public async Task Cleanup()
PoolManager.Shutdown();
}

public static readonly string[] MapsSource = { "Empty", "Satlern", "Box", "Bagel", "Dev", "CentComm", "Atlas", "Core", "TestTeg", "Packed", "Origin", "Omega", "Cluster", "Reach", "Meta", "Marathon", "Europa", "MeteorArena", "Fland", "Oasis", "Cog", "FlandHighPop", "OasisHighPop", "OriginHighPop", "Barratry", "Kettle" }; //Goobstation, readds maps
public static readonly string[] MapsSource = { "Empty", "Satlern", "Box", "Bagel", "Dev", "CentComm", "Atlas", "Core", "TestTeg", "Packed", "Origin", "Omega", "Cluster", "Reach", "Meta", "Marathon", "Europa", "MeteorArena", "Fland", "Oasis", "FlandHighPop", "OasisHighPop", "OriginHighPop", "Barratry", "Kettle" }; //Goobstation, readds maps

[ParamsSource(nameof(MapsSource))]
public string Map;
Expand Down
36 changes: 36 additions & 0 deletions Content.Client/Actions/ActionsSystem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.IO;
using System.Linq;
using Content.Shared._Goobstation.Actions;
using Content.Shared.Actions;
using JetBrains.Annotations;
using Robust.Client.Player;
Expand Down Expand Up @@ -35,6 +36,11 @@ public sealed class ActionsSystem : SharedActionsSystem
public event Action? ClearAssignments;
public event Action<List<SlotAssignment>>? AssignSlot;

// Goobstation start
public event Action<EntityUid>? ActionsSaved;
public event Action<EntityUid>? ActionsLoaded;
// Goobstation end

private readonly List<EntityUid> _removed = new();
private readonly List<(EntityUid, BaseActionComponent?)> _added = new();

Expand All @@ -49,6 +55,16 @@ public override void Initialize()
SubscribeLocalEvent<EntityTargetActionComponent, ComponentHandleState>(OnEntityTargetHandleState);
SubscribeLocalEvent<WorldTargetActionComponent, ComponentHandleState>(OnWorldTargetHandleState);
SubscribeLocalEvent<EntityWorldTargetActionComponent, ComponentHandleState>(OnEntityWorldTargetHandleState);

SubscribeNetworkEvent<LoadActionsEvent>(OnLoadActions); // Goobstation
}

private void OnLoadActions(LoadActionsEvent msg, EntitySessionEventArgs args) // Goobstation
{
if (args.SenderSession != _playerManager.LocalSession)
return;

ActionsLoaded?.Invoke(GetEntity(msg.Entity));
}

// goob edit - man fuck them actions bruh
Expand Down Expand Up @@ -237,6 +253,24 @@ protected override void ActionRemoved(EntityUid performer, EntityUid actionId, A
OnActionRemoved?.Invoke(actionId);
}

// Goobstation start
protected override void SaveActions(EntityUid performer)
{
if (_playerManager.LocalEntity != performer)
return;

ActionsSaved?.Invoke(performer);
}

protected override void LoadActions(EntityUid performer)
{
if (_playerManager.LocalEntity != performer)
return;

ActionsLoaded?.Invoke(performer);
}
// Goobstation end

public IEnumerable<(EntityUid Id, BaseActionComponent Comp)> GetClientActions()
{
if (_playerManager.LocalEntity is not { } user)
Expand All @@ -248,10 +282,12 @@ protected override void ActionRemoved(EntityUid performer, EntityUid actionId, A
private void OnPlayerAttached(EntityUid uid, ActionsComponent component, LocalPlayerAttachedEvent args)
{
LinkAllActions(component);
ActionsLoaded?.Invoke(uid); // Goobstation
}

private void OnPlayerDetached(EntityUid uid, ActionsComponent component, LocalPlayerDetachedEvent? args = null)
{
ActionsSaved?.Invoke(uid); // Goobstation
UnlinkAllActions();
}

Expand Down
5 changes: 0 additions & 5 deletions Content.Client/Input/ContentContexts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,6 @@ public static void SetupContexts(IInputContextContainer contexts)
{
common.AddFunction(boundKey);
}
// goobstation
foreach (var boundKey in ContentKeyFunctions.GetLoadoutBoundKeys())
{
common.AddFunction(boundKey);
}

var aghost = contexts.New("aghost", "common");
aghost.AddFunction(EngineKeyFunctions.MoveUp);
Expand Down
12 changes: 0 additions & 12 deletions Content.Client/Inventory/ClientInventorySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public override void Initialize()

SubscribeLocalEvent<InventorySlotsComponent, LocalPlayerAttachedEvent>(OnPlayerAttached);
SubscribeLocalEvent<InventorySlotsComponent, LocalPlayerDetachedEvent>(OnPlayerDetached);
SubscribeLocalEvent<InventorySlotsComponent, RefreshInventorySlotsEvent>(OnRefreshInventorySlots); // Shitmed Change

SubscribeLocalEvent<InventoryComponent, ComponentShutdown>(OnShutdown);

Expand Down Expand Up @@ -183,17 +182,6 @@ public void UpdateSlot(EntityUid owner, InventorySlotsComponent component, strin
EntitySlotUpdate?.Invoke(newData);
}

// Shitmed Change Start
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);
}
// Shitmed Change End

public bool TryAddSlotDef(EntityUid owner, InventorySlotsComponent component, SlotDefinition newSlotDef)
{
SlotData newSlotData = newSlotDef; //convert to slotData
Expand Down
1 change: 1 addition & 0 deletions Content.Client/Lobby/LobbyState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ protected override void Startup()

_serverCur.BalanceChange += UpdatePlayerBalance; // Goobstation - Goob Coin

Lobby!.FUCKINGMARIAH.Texture = _resourceCache.GetResource<TextureResource>("/Textures/_Goobstation/Interface/Misc/FUCKINGMARIAH.png");
}

protected override void Shutdown()
Expand Down
2 changes: 2 additions & 0 deletions Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,8 @@ public void RefreshAntags()
("humanoid-profile-editor-antag-preference-no-button", 1)
};

AntagList.AddChild(new Label { Text = Loc.GetString("humanoid-profile-editor-antag-roll-before-jobs") }); // Goobstation

foreach (var antag in _prototypeManager.EnumeratePrototypes<AntagPrototype>().OrderBy(a => Loc.GetString(a.Name)))
{
if (!antag.SetPreference)
Expand Down
1 change: 1 addition & 0 deletions Content.Client/Lobby/UI/LobbyGui.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
<BoxContainer Orientation="Vertical" SeparationOverride="4" Name="VoteContainer"
Access="Public" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 8" />
</BoxContainer>
<TextureRect Access="Public" Name="FUCKINGMARIAH" MaxHeight="25" />
<!-- Vertical Padding-->
<Control VerticalExpand="True" />
<!-- Left Bot Panel -->
Expand Down
5 changes: 0 additions & 5 deletions Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,6 @@ void AddCheckBox(string checkBoxName, bool currentState, Action<BaseButton.Butto
{
AddButton(boundKey);
}
// goobstation
foreach (var boundKey in ContentKeyFunctions.GetLoadoutBoundKeys())
{
AddButton(boundKey);
}

AddHeader("ui-options-header-shuttle");
AddButton(ContentKeyFunctions.ShuttleStrafeUp);
Expand Down
6 changes: 2 additions & 4 deletions Content.Client/UserInterface/Screens/DefaultGameScreen.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@
<!-- Buffer so big votes don't skew it -->
<Control/>
</BoxContainer>
<BoxContainer Orientation="Horizontal"> <!--goobstation-->
<actions:ActionsBar Name="Actions" Access="Protected" />
<BoxContainer Name="VoteMenu" Access="Public" Margin="0 10 0 10" Orientation="Vertical"/>
</BoxContainer>
<BoxContainer Name="VoteMenu" Access="Public" Margin="0 10 0 10" Orientation="Vertical"/>
<actions:ActionsBar Name="Actions" Access="Protected" />
</BoxContainer>
<widgets:GhostGui Name="Ghost" Access="Protected" />
<inventory:InventoryGui Name="Inventory" Access="Protected" />
Expand Down
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;
Inventory.OnResized += ResizeActionContainer;
}

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

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

private void ChatOnResizeFinish(Vector2 _)
{
var marginBottom = Chat.GetValue<float>(MarginBottomProperty);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
<inventory:InventoryGui Name="Inventory" Access="Protected"/>
<hotbar:HotbarGui Name="Hotbar" Access="Protected"/>
<targeting:TargetingControl Name="Targeting" Access="Protected"/> <!-- Shitmed Change -->
<BoxContainer Name="TopLeftContainer" Orientation="Horizontal"> <!--goobstation-->
<actions:ActionsBar Name="Actions" Access="Protected" />
<BoxContainer Name="TopLeftContainer" Orientation="Vertical">
<actions:ActionsBar Name="Actions" Access="Protected" />
<BoxContainer Name="VoteMenu" Access="Public" Orientation="Vertical"/>
</BoxContainer>
<alerts:AlertsUI Name="Alerts" Access="Protected" />
Expand Down
Loading

0 comments on commit 2dd817c

Please sign in to comment.