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

Adt content #22

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
741c743
перенос текстур
Darki255 Jun 27, 2024
3915838
Merge branch 'master' into texture
Schrodinger71 Jun 27, 2024
51cdb3f
перенос прототипов
Darki255 Jun 27, 2024
f9fc58c
перенос аудио
Darki255 Jun 27, 2024
ee62563
английская локализация
Darki255 Jun 27, 2024
116002a
Русская локализация
Darki255 Jun 27, 2024
b1cc789
англ локализация в папке ss-14
Darki255 Jun 27, 2024
dc9a667
Русская локализация в папке ss-14
Darki255 Jun 27, 2024
9118989
Merge branch 'master' into audio
Schrodinger71 Jun 27, 2024
866056f
перенос serverinfo
Darki255 Jun 27, 2024
b67e0c0
перенос serverinfo (#21)
Schrodinger71 Jun 27, 2024
5323204
перенос прототипов (#18)
Schrodinger71 Jun 27, 2024
fb07f37
перенос текстур (#17)
Schrodinger71 Jun 27, 2024
d6e1cbd
перенос аудио (#19)
Schrodinger71 Jun 27, 2024
dec91dc
англ и русская локализация (#20)
Schrodinger71 Jun 27, 2024
d3a058a
код с АДТ(нуждается в фиксе)
Ratyyy Jun 27, 2024
ea92eb7
Оставил пару комментов
Schrodinger71 Jun 27, 2024
5cfdede
Merge pull request #765 from TORGOVEC471/added_new_posters
modern-nm Jun 24, 2024
27cc9bc
Правка в ADTeam.txt
Schrodinger71 Jun 28, 2024
3fa569b
Закомментировал генокрада, систему улья общий чат, починил бумбокс
Schrodinger71 Jun 28, 2024
653bfae
Merge branch 'master' into adt_content
Schrodinger71 Jun 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
49 changes: 49 additions & 0 deletions Content.Client/ADT/ApathySystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using Content.Shared.Drugs;
using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Shared.Player;
using Content.Shared.Alert;
using Content.Client.UserInterface.Systems.DamageOverlays;
using Content.Shared.ADT;

namespace Content.Client.ADT;

public sealed class ApathySystem : EntitySystem
{
[Dependency] private readonly IPlayerManager _player = default!;
[Dependency] private readonly AlertsSystem _alertsSystem = default!;
public static string ApathyKey = "Apathy";

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

SubscribeLocalEvent<ApathyComponent, ComponentInit>(OnInit);
SubscribeLocalEvent<ApathyComponent, ComponentShutdown>(OnShutdown);
SubscribeLocalEvent<ApathyComponent, LocalPlayerAttachedEvent>(OnPlayerAttached);
SubscribeLocalEvent<ApathyComponent, LocalPlayerDetachedEvent>(OnPlayerDetached);

}

private void OnInit(EntityUid uid, ApathyComponent component, ComponentInit args)
{
if (_player.LocalPlayer?.ControlledEntity == uid)
_alertsSystem.ShowAlert(uid, component.Alert);
}

private void OnShutdown(EntityUid uid, ApathyComponent component, ComponentShutdown args)
{
if (_player.LocalPlayer?.ControlledEntity == uid)
_alertsSystem.ClearAlert(uid, component.Alert);
}

private void OnPlayerAttached(EntityUid uid, ApathyComponent component, LocalPlayerAttachedEvent args)
{
_alertsSystem.ShowAlert(uid, component.Alert);
}

private void OnPlayerDetached(EntityUid uid, ApathyComponent component, LocalPlayerDetachedEvent args)
{
_alertsSystem.ClearAlert(uid, component.Alert);
}
}
67 changes: 67 additions & 0 deletions Content.Client/ADT/BoomBox/UI/BoomBoxBoundUi.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
using Content.Shared.BoomBox;
using JetBrains.Annotations;
using Robust.Client.GameObjects;

namespace Content.Client.ADT.BoomBox.UI;

[UsedImplicitly]
public sealed class BoomBoxBoundUi : BoundUserInterface
{
[ViewVariables]
private BoomBoxWindow? _window;

public BoomBoxBoundUi(EntityUid owner, Enum uiKey) : base(owner, uiKey)
{
}

protected override void Open()
{
base.Open();

_window = new BoomBoxWindow();
_window.OpenCentered();

_window.OnClose += Close;
_window.MinusVolButtonPressed += OnMinusVolButtonPressed;
_window.PlusVolButtonPressed += OnPlusVolButtonPressed;
_window.StartButtonPressed += OnStartButtonPressed;
_window.StopButtonPressed += OnStopButtonPressed;
}

private void OnMinusVolButtonPressed()
{
SendMessage(new BoomBoxMinusVolMessage());
}

private void OnPlusVolButtonPressed()
{
SendMessage(new BoomBoxPlusVolMessage());
}

private void OnStartButtonPressed()
{
SendMessage(new BoomBoxStartMessage());
}

private void OnStopButtonPressed()
{
SendMessage(new BoomBoxStopMessage());
}

protected override void UpdateState(BoundUserInterfaceState state)
{
base.UpdateState(state);

if (_window == null || state is not BoomBoxUiState cast)
return;

_window.UpdateState(cast);
}

protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
if (disposing)
_window?.Dispose();
}
}
25 changes: 25 additions & 0 deletions Content.Client/ADT/BoomBox/UI/BoomBoxWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<DefaultWindow xmlns="https://spacestation14.io"
Title="{Loc 'boombox-ui-window'}"
MinSize="256 80"
SetSize="256 80">
<BoxContainer Orientation="Vertical" VerticalExpand="True">
<BoxContainer Orientation="Horizontal" HorizontalExpand="True">
<Button Name="MinusVolButton"
Text="{Loc 'boombox-ui-minusvol-button'}"
HorizontalExpand="True"
Disabled="True" />
<Button Name="StartButton"
Text="{Loc 'boombox-ui-start-button'}"
HorizontalExpand="True"
Disabled="True" />
<Button Name="StopButton"
Text="{Loc 'boombox-ui-stop-button'}"
HorizontalExpand="True"
Disabled="True" />
<Button Name="PlusVolButton"
Text="{Loc 'boombox-ui-plusvol-button'}"
HorizontalExpand="True"
Disabled="True" />
</BoxContainer>
</BoxContainer>
</DefaultWindow>
34 changes: 34 additions & 0 deletions Content.Client/ADT/BoomBox/UI/BoomBoxWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using System.Linq;
using Content.Shared.BoomBox;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;

namespace Content.Client.ADT.BoomBox.UI;

[GenerateTypedNameReferences]
public sealed partial class BoomBoxWindow : DefaultWindow
{
public event Action? MinusVolButtonPressed;
public event Action? PlusVolButtonPressed;
public event Action? StartButtonPressed;
public event Action? StopButtonPressed;

public BoomBoxWindow()
{
RobustXamlLoader.Load(this);

MinusVolButton.OnPressed += _ => MinusVolButtonPressed?.Invoke();
PlusVolButton.OnPressed += _ => PlusVolButtonPressed?.Invoke();
StartButton.OnPressed += _ => StartButtonPressed?.Invoke();
StopButton.OnPressed += _ => StopButtonPressed?.Invoke();
}

public void UpdateState(BoomBoxUiState state)
{
MinusVolButton.Disabled = !state.CanMinusVol;
PlusVolButton.Disabled = !state.CanPlusVol;
StartButton.Disabled = !state.CanStart;
StopButton.Disabled = !state.CanStop;
}
}
104 changes: 104 additions & 0 deletions Content.Client/ADT/Changeling/ChangelingPanelSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
// /// Made for Adventure Time Project by ModerN. https://github.com/modern-nm mailto:modern-nm@yandex.by
// /// see also https://github.com/DocNITE/liebendorf-station/tree/feature/emote-radial-panel
// using Content.Client.Humanoid;
// using Content.Client.UserInterface.Systems.Radial;
// using Content.Client.UserInterface.Systems.Radial.Controls;
// using Content.Shared.Changeling;
// using Content.Shared.Humanoid.Prototypes;
// using Robust.Client.GameObjects;
// using Robust.Client.Player;
// using Robust.Client.UserInterface;
// using Robust.Client.UserInterface.Controls;
// using Robust.Shared.Map;
// using Robust.Shared.Player;
// using Robust.Shared.Prototypes;
// using Robust.Shared.Random;
// using Robust.Shared.Utility;
// using System.Numerics;

// namespace Content.Client.ADT.Language;

// public sealed class ChangelingPanelSystem : EntitySystem
// {
// [Dependency] private readonly IPrototypeManager _proto = default!;
// [Dependency] private readonly IRobustRandom _random = default!;
// [Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!;
// [Dependency] private readonly IPlayerManager _playerMan = default!;
// [Dependency] private readonly SpriteSystem _spriteSystem = default!;
// [Dependency] private readonly IEntityManager _entManager = default!;
// [Dependency] private readonly HumanoidAppearanceSystem _appearanceSystem = default!;

// /// <summary>
// /// We should enable radial for single target
// /// </summary>
// private RadialContainer? _openedMenu;

// private const string DefaultIcon = "/Textures/Interface/AdminActions/play.png";

// private const string EmptyIcon = "/Textures/Interface/AdminActions/emptyIcon.png";

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

// SubscribeLocalEvent<PlayerAttachedEvent>(OnPlayerAttached);
// SubscribeLocalEvent<PlayerDetachedEvent>(OnPlayerDetached);

// SubscribeNetworkEvent<RequestChangelingFormsMenuEvent>(HandleChangelingFormsMenuEvent);
// }

// private void HandleChangelingFormsMenuEvent(RequestChangelingFormsMenuEvent args)
// {
// if (_openedMenu != null)
// return;
// if (_playerMan.LocalEntity == null)
// {
// return;
// }

// //if (!TryComp<ChangelingComponent>(_playerMan.LocalEntity.Value, out var changelingComponent)) // нет на клиенте
// // return;

// _openedMenu = _userInterfaceManager.GetUIController<RadialUiController>()
// .CreateRadialContainer();

// foreach (var humanoid in args.HumanoidData)
// {
// var dummy = _entManager.SpawnEntity(_proto.Index<SpeciesPrototype>(humanoid.Species).DollPrototype, MapCoordinates.Nullspace);
// //var humanoidEntityUid = GetEntity(humanoid); // Entities on the client outside of the FOV are nonexistant. You can see that if you zoom out. //So it'll give you UID 0 which is EntityUid.Invalid.
// _appearanceSystem.LoadProfile(dummy, humanoid.Profile);
// var face = new SpriteView();
// face.SetEntity(dummy);

// var actionName = humanoid.Name;
// var texturePath = _spriteSystem.Frame0(new SpriteSpecifier.Texture(new ResPath(EmptyIcon)));

// var emoteButton = _openedMenu.AddButton(actionName, texturePath, face);
// emoteButton.Opacity = 210;
// emoteButton.Tooltip = null;
// emoteButton.Controller.OnPressed += (_) =>
// {
// var ev = new SelectChangelingFormEvent(args.Target, entitySelected: humanoid.NetEntity);
// RaiseNetworkEvent(ev);
// _openedMenu.Dispose();
// };
// }
// _openedMenu.OnClose += (_) =>
// {
// _openedMenu = null;
// };
// if (_playerMan.LocalEntity != null)
// _openedMenu.OpenAttached(_playerMan.LocalEntity.Value);

// }

// private void OnPlayerAttached(PlayerAttachedEvent args)
// {
// _openedMenu?.Dispose();
// }

// private void OnPlayerDetached(PlayerDetachedEvent args)
// {
// _openedMenu?.Dispose();
// }
// }
49 changes: 49 additions & 0 deletions Content.Client/ADT/ChangelingEggsSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using Content.Shared.Drugs;
using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Shared.Player;
using Content.Shared.Alert;
using Content.Client.UserInterface.Systems.DamageOverlays;
using Content.Shared.ADT;
using Content.Shared.Changeling.Components;

namespace Content.Client.Changeling;

public sealed class LingEggsSystem : EntitySystem
{
[Dependency] private readonly IPlayerManager _player = default!;
[Dependency] private readonly AlertsSystem _alertsSystem = default!;
public static string EggKey = "LingEggs";

private void InitializeAlert()
{

SubscribeLocalEvent<LingEggsHolderComponent, ComponentInit>(OnInit);
SubscribeLocalEvent<LingEggsHolderComponent, ComponentShutdown>(OnShutdown);
SubscribeLocalEvent<LingEggsHolderComponent, LocalPlayerAttachedEvent>(OnPlayerAttached);
SubscribeLocalEvent<LingEggsHolderComponent, LocalPlayerDetachedEvent>(OnPlayerDetached);

}

private void OnInit(EntityUid uid, LingEggsHolderComponent component, ComponentInit args)
{
if (_player.LocalPlayer?.ControlledEntity == uid)
_alertsSystem.ShowAlert(uid, component.Alert);
}

private void OnShutdown(EntityUid uid, LingEggsHolderComponent component, ComponentShutdown args)
{
if (_player.LocalPlayer?.ControlledEntity == uid)
_alertsSystem.ClearAlert(uid, component.Alert);
}

private void OnPlayerAttached(EntityUid uid, LingEggsHolderComponent component, LocalPlayerAttachedEvent args)
{
_alertsSystem.ShowAlert(uid, component.Alert);
}

private void OnPlayerDetached(EntityUid uid, LingEggsHolderComponent component, LocalPlayerDetachedEvent args)
{
_alertsSystem.ClearAlert(uid, component.Alert);
}
}
Loading
Loading