Skip to content

Commit

Permalink
Com
Browse files Browse the repository at this point in the history
  • Loading branch information
NameLunar committed Nov 26, 2024
1 parent dd728bf commit 726ab3f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Content.Server/Holiday/Christmas/RandomGiftSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public sealed class RandomGiftSystem : EntitySystem

private readonly List<string> _possibleGiftsSafe = new();
private readonly List<string> _possibleGiftsUnsafe = new();
private readonly List<string> _possibleGiftsUnsafeADT = new();
private readonly List<string> _possibleGiftsUnsafeADT = new(); // Лист подарочков ЧЕК

/// <inheritdoc/>
public override void Initialize()
Expand Down Expand Up @@ -74,6 +74,7 @@ private void OnUseInHand(EntityUid uid, RandomGiftComponent component, UseInHand

private void OnGiftMapInit(EntityUid uid, RandomGiftComponent component, MapInitEvent args)
{
// Думаю всё понятно. Если компонент объекта имеет "InsaneMode" с знчением, то вот. Иначе... Else
if (component.InsaneMode == "Unsafe")
component.SelectedEntity = _random.Pick(_possibleGiftsUnsafe);
else if (component.InsaneMode == "Safe")
Expand All @@ -92,6 +93,7 @@ private void OnPrototypesReloaded(PrototypesReloadedEventArgs obj)

private void BuildIndex()
{
// Ну тут тоже все понятно. Очищается лист, что создан сверху
_possibleGiftsSafe.Clear();
_possibleGiftsUnsafe.Clear();
_possibleGiftsUnsafeADT.Clear();
Expand Down

0 comments on commit 726ab3f

Please sign in to comment.