Skip to content

Commit

Permalink
Merge branch 'master' into resprites
Browse files Browse the repository at this point in the history
  • Loading branch information
Schrodinger71 authored Oct 27, 2024
2 parents 0315a69 + 75dc097 commit c047df8
Show file tree
Hide file tree
Showing 30 changed files with 219 additions and 27 deletions.
8 changes: 5 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"program": "${workspaceFolder}/bin/Content.Client/Content.Client.dll",
"args": [],
"console": "internalConsole",
"stopAtEntry": false
"stopAtEntry": false,
"brokeredServicePipeName": "undefined"
},
{
"name": "Client (Compatibility renderer)",
Expand All @@ -29,7 +30,8 @@
"program": "${workspaceFolder}/bin/Content.Server/Content.Server.dll",
"args": [],
"console": "integratedTerminal",
"stopAtEntry": false
"stopAtEntry": false,
"brokeredServicePipeName": "undefined"
},
{
"name": "YAML Linter",
Expand All @@ -52,4 +54,4 @@
"preLaunchTask": "build"
}
]
}
}
3 changes: 2 additions & 1 deletion Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
<BoxContainer Orientation="Horizontal" HorizontalExpand="True">
<CheckBox Visible="True" Name="PlaySound" Access="Public" Text="{Loc 'admin-bwoink-play-sound'}" Pressed="True" />
<Control HorizontalExpand="True" MinWidth="5" />
<Button Visible="True" Name="PopOut" Access="Public" Text="{Loc 'admin-logs-pop-out'}" StyleClasses="OpenBoth" HorizontalAlignment="Left" />
<!-- <Button Visible="True" Name="PopOut" Access="Public" Text="{Loc 'admin-logs-pop-out'}" StyleClasses="OpenBoth" HorizontalAlignment="Left" /> --> <!-- ADT-Tweak -->
<Button Visible="True" Name="Logs" Access="Public" Text="{Loc 'admin-player-actions-open-logs'}" StyleClasses="OpenBoth" HorizontalAlignment="Left" /> <!-- ADT-Tweak -->
<Control HorizontalExpand="True" />
<Button Visible="False" Name="Playerpanel" Text="{Loc 'admin-player-actions-open-playerpanel'}" StyleClasses="OpenRight" /> <!-- ADT-Tweak -->
<Button Visible="False" Name="Bans" Text="{Loc 'admin-player-actions-bans'}" StyleClasses="OpenRight" />
Expand Down
12 changes: 9 additions & 3 deletions Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
using Robust.Shared.Network;
using Robust.Shared.Configuration;
using Robust.Shared.Utility;
using Content.Client.Administration.UI.Logs;
using Content.Client.Eui;

namespace Content.Client.Administration.UI.Bwoink
{
Expand Down Expand Up @@ -179,12 +181,13 @@ public BwoinkControl()
_console.ExecuteCommand($"respawn \"{_currentPlayer.Username}\"");
};

PopOut.OnPressed += _ =>
// ADT-Tweak-Start
Logs.OnPressed += _ =>
{
uiController.PopOut();
if (_currentPlayer is not null)
_console.ExecuteCommand($"adminlogs \"{_currentPlayer.Username}\"");
};

// ADT-Tweak-Start
Playerpanel.OnPressed += _ =>
{
if (_currentPlayer is not null)
Expand Down Expand Up @@ -240,6 +243,9 @@ public void UpdateButtons()
Follow.Disabled = !Follow.Visible || disabled;

// ADT-Tweak-Start
Logs.Visible = _adminManager.HasFlag(AdminFlags.Logs);
Logs.Disabled = !Logs.Visible || disabled;

Playerpanel.Visible = _adminManager.HasFlag(AdminFlags.Ban);
Playerpanel.Disabled = !Playerpanel.Visible || disabled;
// ADT-Tweak-End
Expand Down
11 changes: 9 additions & 2 deletions Content.Client/Administration/UI/Logs/AdminLogsControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public AdminLogsControl()

public HashSet<LogType> SelectedTypes { get; } = new();

public HashSet<Guid> SelectedPlayers { get; } = new();
public HashSet<Guid> SelectedPlayers { get; set; } = new(); // ADT-Tweak

public HashSet<LogImpact> SelectedImpacts { get; } = new();

Expand Down Expand Up @@ -210,6 +210,13 @@ public void SetTypesSelection(HashSet<LogType> selectedTypes, bool invert = fals
UpdateLogs();
}

// ADT-Tweak-Start
public void SetPlayersSelection(HashSet<Guid> selectedPlayers)
{
SelectedPlayers = selectedPlayers;
}
// ADT-Tweak-End

public void UpdateTypes()
{
foreach (var control in TypesContainer.Children)
Expand Down Expand Up @@ -441,7 +448,7 @@ public void SetPlayers(Dictionary<Guid, string> players)
var button = new AdminLogPlayerButton(id)
{
Text = name,
Pressed = allSelected
Pressed = SelectedPlayers.Contains(id), // ADT-Tweak
};

if (allSelected)
Expand Down
12 changes: 10 additions & 2 deletions Content.Client/Administration/UI/Logs/AdminLogsEui.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,18 @@ public override void HandleState(EuiStateBase state)
return;
}

var oldSelection = new HashSet<Guid>(LogsControl.SelectedPlayers); // ADT-Tweak
LogsControl.SetCurrentRound(s.RoundId);
LogsControl.SetPlayers(s.Players);
LogsControl.UpdateCount(round: s.RoundLogs);

// ADT-Tweak-Start
if (!FirstState)
{
return;
}

if (oldSelection.Count() > 0)
LogsControl.SetPlayersSelection(oldSelection);
// ADT-Tweak-End

FirstState = false;
LogsControl.SetRoundSpinBox(s.RoundId);
Expand Down Expand Up @@ -155,6 +159,10 @@ public override void HandleMessage(EuiMessageBase msg)
if (setLogFilter.Types != null)
LogsControl.SetTypesSelection(setLogFilter.Types, setLogFilter.InvertTypes);

// ADT-Tweak-Start
if (setLogFilter.SelectedPlayers != null)
LogsControl.SetPlayersSelection(setLogFilter.SelectedPlayers);
// ADT-Tweak-End
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ public void PopOut()
helper.WindowRoot = _uiManager.CreateWindowRoot(helper.ClydeWindow);
helper.WindowRoot.AddChild(helper.Control);

helper.Control.PopOut.Disabled = true;
helper.Control.PopOut.Visible = false;
// helper.Control.PopOut.Disabled = true; //ADT-Tweak
// helper.Control.PopOut.Visible = false; //ADT-Tweak
}

private void UnreadAHelpReceived()
Expand Down
3 changes: 3 additions & 0 deletions Content.Server/ADT/Shadekin/ShadekinSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
using Content.Shared.Cuffs.Components;
using Content.Shared.Mech.Components;
using Content.Server.Disposal.Unit.Components;
using Content.Shared.Bed.Cryostorage;

namespace Content.Server.ADT.Shadekin;

Expand Down Expand Up @@ -70,6 +71,8 @@ public override void Update(float frameTime)
continue;
if (_mobState.IsIncapacitated(uid))
continue;
if (HasComp<CryostorageContainedComponent>(uid))
continue;

_alert.ShowAlert(uid, _proto.Index<AlertPrototype>("ShadekinPower"), (short) Math.Clamp(Math.Round(comp.PowerLevel / 50f), 0, 4));
comp.NextSecond = _timing.CurTime + TimeSpan.FromSeconds(1);
Expand Down
10 changes: 10 additions & 0 deletions Content.Server/Administration/Commands/OpenAdminLogsCommand.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Content.Server.Administration.Logs;
using Content.Server.EUI;
using Content.Shared.Administration;
using Robust.Server.Player;
using Robust.Shared.Console;

namespace Content.Server.Administration.Commands;
Expand All @@ -23,5 +24,14 @@ public void Execute(IConsoleShell shell, string argStr, string[] args)
var eui = IoCManager.Resolve<EuiManager>();
var ui = new AdminLogsEui();
eui.OpenEui(ui, player);

// ADT-Tweak-Start
if (args.Length == 1)
{
var pm = IoCManager.Resolve<IPlayerManager>();
if (pm.TryGetPlayerDataByUsername(args[0], out var playerData))
ui.SetLogFilter(selectedPlayers: [playerData.UserId.UserId]);
}
// ADT-Tweak-End
}
}
5 changes: 3 additions & 2 deletions Content.Server/Administration/Logs/AdminLogsEui.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,13 @@ public override async void HandleMessage(EuiMessageBase msg)
}
}

public void SetLogFilter(string? search = null, bool invertTypes = false, HashSet<LogType>? types = null)
public void SetLogFilter(string? search = null, bool invertTypes = false, HashSet<LogType>? types = null, HashSet<Guid>? selectedPlayers = null) // ADT-Tweak
{
var message = new SetLogFilter(
search,
invertTypes,
types);
types,
selectedPlayers); // ADT-Tweak

SendMessage(message);
}
Expand Down
4 changes: 3 additions & 1 deletion Content.Shared/Administration/Logs/AdminLogsEuiState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,18 @@ public static class AdminLogsEuiMsg
[Serializable, NetSerializable]
public sealed class SetLogFilter : EuiMessageBase
{
public SetLogFilter(string? search = null, bool invertTypes = false, HashSet<LogType>? types = null)
public SetLogFilter(string? search = null, bool invertTypes = false, HashSet<LogType>? types = null, HashSet<Guid>? selectedPlayers = null) // ADT-Tweak
{
Search = search;
InvertTypes = invertTypes;
Types = types;
SelectedPlayers = selectedPlayers; // ADT-Tweak
}

public string? Search { get; set; }
public bool InvertTypes { get; set; }
public HashSet<LogType>? Types { get; set; }
public HashSet<Guid>? SelectedPlayers { get; set; } // ADT-Tweak
}

[Serializable, NetSerializable]
Expand Down
1 change: 1 addition & 0 deletions Resources/Locale/ru-RU/ADT/administration/ui/actions.ftl
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
admin-player-actions-open-playerpanel = Панель
admin-player-actions-open-logs = Логи
12 changes: 12 additions & 0 deletions Resources/Locale/ru-RU/ADT/personalization.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,14 @@ ent-ADTClothingUniformZoroJumpsuit = легендарный деловой ко
ent-ADTPlushieEmma = плюшевая Эмма
.desc = Кажется, она хочет заставить вас работать.
ent-ADTClothingHeadHatsSatanHoop = обруч с шипами
.desc = Маленький металлический обруч для головы, украшенный несколькими шипами. Острыми шипами.
.suffix = { "Именное, Schrodinger" }
ent-ADTClothingUniformSatanSuit = темный костюм с красной рубашкой
.desc = Прекрасно пошитый пиджак и брюки из темной ткани в сочетании с кроваво-красной рубашкой и чёрным галстуком.
.suffix = { "Именное, Schrodinger" }
ent-ADTWeaponPistolUma = "Умми"
.desc = Пистолет на основе МК58, выполненный под прихоти владельца. На затворе имеет небольшую надпись "Умми".
.suffix = { "Пистолет, Спонсорское, Ума" }
Expand All @@ -399,3 +407,7 @@ ent-ADTClothingOuterArmorUma = бронежилет
ent-ADTClothingUniformJumpsuitUmaSport = тёмная спортивная форма
.desc = Облегающая спортивная форма, позволяющая телу дышать при интенсивных тренировках. Выглядит ухоженной и на удивление чистой. От неё исходит приятный запах.
.suffix = { "Спонсорское, Ума" }
ent-ADTBartenderIDCardUrog = диск Урог-Джаха
.desc = Бывший диск ядерной авторизации, выигранный однажды Урог-Джахом у одного из капитанов Нанотрейзен (финансовый отдел все ещё выясняет, откуда у мистера Джаха деньги на подобную авантюру). Но теперь диск безопасен - ядерные коды с него удалены и вместо них записан доступ бармена.
.suffix = { "Именное, Урог-Джах" }
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,30 @@
Piercing: 0.7
Heat: 0.8

- type: entity
parent: ClothingHeadBase
id: ADTClothingHeadHatsSatanHoop
name: hoop with spikes
description: hoop with spikes
suffix: Именное, Schrodinger
components:
- type: Sprite
sprite: ADT/Personalization/hoop_spikes.rsi
- type: Clothing
sprite: ADT/Personalization/hoop_spikes.rsi

- type: entity
parent: ClothingUniformBase
id: ADTClothingUniformSatanSuit
name: black suit with red shirt
description: black suit with red shirt
suffix: Именное, Schrodinger
components:
- type: Sprite
sprite: ADT/Personalization/satan_suit.rsi
- type: Clothing
sprite: ADT/Personalization/satan_suit.rsi

# Pyotr
- type: entity
parent: ClothingOuterStorageBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1245,3 +1245,16 @@
map: ["enum.GunVisualLayers.Mag"]
- type: Clothing
sprite: ADT/Personalization/uma_pistol.rsi

#Vladya (Урог-Джах)
- type: entity
parent: IDCardStandard
id: ADTBartenderIDCardUrog
name: bartender ID card Urog
suffix: Именное, Урог-Джах
components:
- type: Sprite
sprite: ADT/Personalization/urog_card.rsi
state: icon
- type: PresetIdCard
job: Bartender
2 changes: 0 additions & 2 deletions Resources/Prototypes/ADT/Reagents/medicine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -560,8 +560,6 @@
component: StutteringAccent
time: 60
type: Add
- !type:Jitter
time: 60

- type: reagent
id: ADTAlomicine
Expand Down
8 changes: 0 additions & 8 deletions Resources/ServerInfo/Guidebook/Antagonist/Traitors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@
<Box>
<GuideEntityEmbed Entity="HandTeleporter" Caption="Ручной Телепорт"/>
</Box>
- Украсть [color=#a4885c]Чрезвычайные приказы по безопасности[/color] Главы службы безопасности.
<Box>
<GuideEntityEmbed Entity="BookSecretDocuments" Caption="Чрезвычайные приказы по безопасности"/>
</Box>
- Украсть [color=#a4885c]ID карту главы персонала[/color].
<Box>
<GuideEntityEmbed Entity="HoPIDCard" Caption="ID карта главы персонала"/>
Expand All @@ -90,9 +86,5 @@
<Box>
<GuideEntityEmbed Entity="BoxFolderQmClipboard" Caption="Портативный планшет заказов"/>
</Box>
- Украсть [color=#a4885c]Гравитационное ядро[/color], подорвав Генератор Гравитации.
<Box>
<GuideEntityEmbed Entity="NesGravityGeneratorCore" Caption="Гравитационное ядро"/>
</Box>

</Document>
2 changes: 1 addition & 1 deletion Resources/ServerInfo/Guidebook/Service/Bartender.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</Box>
<Box>
<GuideEntityEmbed Entity="BoozeDispenser" Caption="Раздатчик алкоголя"/>
<GuideEntityEmbed Entity="soda_dispenser" Caption="Раздатчик безалкоголя"/>
<GuideEntityEmbed Entity="SodaDispenser" Caption="Раздатчик безалкоголя"/>
<GuideEntityEmbed Entity="VendingMachineBooze" Caption="АлкоМат"/>
</Box>

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions Resources/Textures/ADT/Personalization/hoop_spikes.rsi/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Created by discord:not_so_big_chungus",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "icon"
},
{
"name": "equipped-HELMET",
"directions": 4
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions Resources/Textures/ADT/Personalization/satan_suit.rsi/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Created by discord:not_so_big_chungus",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "icon"
},
{
"name": "equipped-INNERCLOTHING",
"directions": 4
},
{
"name": "equipped-INNERCLOTHING-monkey",
"directions": 4
},
{
"name": "inhand-left",
"directions": 4
},
{
"name": "inhand-right",
"directions": 4
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c047df8

Please sign in to comment.