Skip to content

Commit

Permalink
Merge branch 'Fansana:master' into SillySlimes
Browse files Browse the repository at this point in the history
  • Loading branch information
fenndragon committed Aug 27, 2024
2 parents cee9659 + 4923c5e commit f67515a
Show file tree
Hide file tree
Showing 260 changed files with 21,932 additions and 19,701 deletions.
16 changes: 0 additions & 16 deletions Content.Client/FurryServers/FurryServersWindow.xaml

This file was deleted.

59 changes: 0 additions & 59 deletions Content.Client/FurryServers/FurryServersWindow.xaml.cs

This file was deleted.

4 changes: 0 additions & 4 deletions Content.Client/Info/LinkBanner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ public LinkBanner()
};
buttons.AddChild(guidebookButton);

var furryServersButton = new Button() { Text = "More Furry Servers" };
furryServersButton.OnPressed += args => UserInterfaceManager.GetUIController<FurryServersUIController>().ToggleWindow();
buttons.AddChild(furryServersButton);

var changelogButton = new ChangelogButton();
changelogButton.OnPressed += args => UserInterfaceManager.GetUIController<ChangelogUIController>().ToggleWindow();
buttons.AddChild(changelogButton);
Expand Down
1 change: 0 additions & 1 deletion Content.Client/Options/UI/EscapeMenu.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<Button Access="Public" Name="RulesButton" Text="{Loc 'ui-escape-rules'}" />
<Button Access="Public" Name="GuidebookButton" Text="{Loc 'ui-escape-guidebook'}" />
<Button Access="Public" Name="WikiButton" Text="{Loc 'ui-escape-wiki'}" />
<Button Access="Public" Name="FurryServersButton" Text="More Furry Servers" />
<Button Access="Public" Name="DisconnectButton" Text="{Loc 'ui-escape-disconnect'}" />
<Button Access="Public" Name="QuitButton" Text="{Loc 'ui-escape-quit'}" />
</BoxContainer>
Expand Down
5 changes: 0 additions & 5 deletions Content.Client/Stylesheets/StyleNano.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1342,11 +1342,6 @@ public StyleNano(IResourceCache resCache) : base(resCache)
.Prop(Label.StylePropertyFont, notoSans10),
// ---

// Furry Servers - Very Large Label for section headers
Element<Label>().Class("FurryServersSectionHeader")
.Prop(Label.StylePropertyFont, notoSansBold20),
// ---

// Different Background shapes ---
Element<PanelContainer>().Class(ClassAngleRect)
.Prop(PanelContainer.StylePropertyPanel, BaseAngleRect)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Content.Client.Gameplay;
using Content.Client.Gameplay;
using Content.Client.UserInterface.Controls;
using Content.Client.UserInterface.Systems.Guidebook;
using Content.Client.UserInterface.Systems.Info;
Expand All @@ -25,7 +25,6 @@ public sealed class EscapeUIController : UIController, IOnStateEntered<GameplayS
[Dependency] private readonly InfoUIController _info = default!;
[Dependency] private readonly OptionsUIController _options = default!;
[Dependency] private readonly GuidebookUIController _guidebook = default!;
[Dependency] private readonly FurryServersUIController _furryServers = default!;

private Options.UI.EscapeMenu? _escapeWindow;

Expand Down Expand Up @@ -99,12 +98,6 @@ public void OnStateEntered(GameplayState state)
_uri.OpenUri(_cfg.GetCVar(CCVars.InfoLinksWiki));
};

_escapeWindow.FurryServersButton.OnPressed += _ =>
{
CloseEscapeWindow();
_furryServers.ToggleWindow();
};

_escapeWindow.GuidebookButton.OnPressed += _ =>
{
_guidebook.ToggleGuidebook();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
<BoxContainer Orientation="Vertical">
<RichTextLabel Margin="8 0 0 0" Name="DenialReason" />
<Button Margin="8 10 0 0" Name="WhitelistApplyButton" Text="Apply for whitelist" />
<PanelContainer Margin="8 10 0 0" StyleClasses="LowDivider" />
<Button Margin="8 20 0 0" Name="FurryServersButton" Text="Or check out other Furry SS14 Servers" />
</BoxContainer>
</ScrollContainer>
</ui:WhitelistDenialWindow>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
using Robust.Shared.Console;
using Robust.Client.ResourceManagement;
using Robust.Shared.Utility;
using Content.Client.UserInterface.Systems.EscapeMenu;

namespace Content.Client.UserInterface.Systems.WhitelistWindow.Controls
{
Expand All @@ -31,11 +30,6 @@ public WhitelistDenialWindow()
{
_uri.OpenUri("https://discord.gg/ZZYNpq5KBJ"); // Floof discord link
};

FurryServersButton.OnPressed += _ =>
{
UserInterfaceManager.GetUIController<FurryServersUIController>().ToggleWindow();
};
}


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Microsoft.EntityFrameworkCore.Migrations;
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;

#nullable disable

Expand All @@ -10,13 +12,62 @@ public partial class ConsentSystem : Migration
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "consent_settings",
columns: table => new
{
consent_settings_id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
user_id = table.Column<Guid>(nullable: false),
consent_freetext = table.Column<string>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_consent_settings", x => x.consent_settings_id);
});

migrationBuilder.CreateTable(
name: "consent_toggle",
columns: table => new
{
consent_toggle_id = table.Column<int>(nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
consent_settings_id = table.Column<int>(nullable: false),
toggle_proto_id = table.Column<string>(nullable: false),
toggle_proto_state = table.Column<string>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_consent_toggle", x => x.consent_toggle_id);
table.ForeignKey(
name: "FK_consent_toggle_consent_settings_consent_settings_id",
column: x => x.consent_settings_id,
principalTable: "consent_settings",
principalColumn: "consent_settings_id",
onDelete: ReferentialAction.Cascade);
});

migrationBuilder.CreateIndex(
name: "IX_consent_settings_user_id",
table: "consent_settings",
column: "user_id",
unique: true);

migrationBuilder.CreateIndex(
name: "IX_consent_toggle_consent_settings_id_toggle_proto_id",
table: "consent_toggle",
columns: new[] { "consent_settings_id", "toggle_proto_id" },
unique: true);
}

/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "consent_toggle");

migrationBuilder.DropTable(
name: "consent_settings");
}
}
}
81 changes: 55 additions & 26 deletions Content.Server/Atmos/EntitySystems/AtmosphereSystem.Commands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Content.Server.Atmos.Components;
using Content.Shared.Administration;
using Content.Shared.Atmos;
using Content.Shared.Atmos.Components;
using Robust.Shared.Console;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
Expand Down Expand Up @@ -84,44 +85,72 @@ private void FixGridAtmosCommand(IConsoleShell shell, string argstr, string[] ar
continue;
}

var transform = Transform(euid.Value);
// Force Invalidate & update air on all tiles
Entity<GridAtmosphereComponent, GasTileOverlayComponent, MapGridComponent, TransformComponent> grid =
new(euid.Value, gridAtmosphere, Comp<GasTileOverlayComponent>(euid.Value), gridComp, Transform(euid.Value));

foreach (var (indices, tileMain) in gridAtmosphere.Tiles)
{
var tile = tileMain.Air;
if (tile == null)
continue;
RebuildGridTiles(grid);

if (!_mapSystem.TryGetTile(gridComp, indices, out var gTile) || gTile.IsEmpty)
{
gridAtmosphere.Tiles.Remove(indices);
var query = GetEntityQuery<AtmosFixMarkerComponent>();
foreach (var (indices, tile) in gridAtmosphere.Tiles.ToArray())
{
if (tile.Air is not {Immutable: false} air)
continue;
}

if (tile.Immutable && !IsTileSpace(euid, transform.MapUid, indices))
{
tile = new GasMixture(tile.Volume) { Temperature = tile.Temperature };
tileMain.Air = tile;
}

tile.Clear();
air.Clear();
var mixtureId = 0;
foreach (var entUid in gridComp.GetAnchoredEntities(indices))
var enumerator = _mapSystem.GetAnchoredEntitiesEnumerator(grid, grid, indices);
while (enumerator.MoveNext(out var entUid))
{
if (!TryComp(entUid, out AtmosFixMarkerComponent? afm))
continue;
mixtureId = afm.Mode;
break;
if (query.TryComp(entUid, out var marker))
mixtureId = marker.Mode;
}
var mixture = mixtures[mixtureId];
Merge(tile, mixture);
tile.Temperature = mixture.Temperature;

gridAtmosphere.InvalidatedCoords.Add(indices);
var mixture = mixtures[mixtureId];
Merge(air, mixture);
air.Temperature = mixture.Temperature;
}
}
}

/// <summary>
/// Clears & re-creates all references to <see cref="TileAtmosphere"/>s stored on a grid.
/// </summary>
private void RebuildGridTiles(
Entity<GridAtmosphereComponent, GasTileOverlayComponent, MapGridComponent, TransformComponent> ent)
{
foreach (var indices in ent.Comp1.Tiles.Keys)
{
InvalidateVisuals((ent, ent), indices);
}

var atmos = ent.Comp1;
atmos.MapTiles.Clear();
atmos.ActiveTiles.Clear();
atmos.ExcitedGroups.Clear();
atmos.HotspotTiles.Clear();
atmos.SuperconductivityTiles.Clear();
atmos.HighPressureDelta.Clear();
atmos.CurrentRunTiles.Clear();
atmos.CurrentRunExcitedGroups.Clear();
atmos.InvalidatedCoords.Clear();
atmos.CurrentRunInvalidatedTiles.Clear();
atmos.PossiblyDisconnectedTiles.Clear();
atmos.Tiles.Clear();

var volume = GetVolumeForTiles(ent);
TryComp(ent.Comp4.MapUid, out MapAtmosphereComponent? mapAtmos);

var enumerator = _map.GetAllTilesEnumerator(ent, ent);
while (enumerator.MoveNext(out var tileRef))
{
var tile = GetOrNewTile(ent, ent, tileRef.Value.GridIndices);
UpdateTileData(ent, mapAtmos, tile);
UpdateAdjacentTiles(ent, tile, activate: true);
UpdateTileAir(ent, tile, volume);
}
}

private CompletionResult FixGridAtmosCommandCompletions(IConsoleShell shell, string[] args)
{
MapId? playerMap = null;
Expand Down
Loading

0 comments on commit f67515a

Please sign in to comment.