Xui (#154)
* fix borg (#719) * Automatic changelog update * Переводы снаряжения и прочей мелочи в стартовом меню (#720) * Сумки, мешки и прочее * Перевод снаряжения * перевод черт персонажа * Добавлено ничего * Automatic changelog update * Фикс отображения потери мастера для импланта подчинения (#721) * фикс отображения * brain damage is real * я блять запустил райдер ради рефактора одного ифа * а лучше даже так * Automatic changelog update * add coderabbitai config (#722) * fix (#723) * Шприц теперь является оружием массового поражения (#724) * Automatic changelog update * Пиздец (#725) Я на это потратил 2 недели * Automatic changelog update * Honk FM (#136) (#726) * Fix Cosmic Temperance и новые песенки в jukebox * Новая музыка в jucebox x2 Co-authored-by: Vorge7 <vorge228@gmail.com> * Automatic changelog update * Флаф (fluff) мне (big_zi_348) (#727) * Заработал * brain damage * fuck (#729) * Automatic changelog update * FUCKERS (#732) * Удаление ненужных суффиксов (#731) * Перевод захардкукоженной строки (#728) * Пластырь поможет * очапятка * Перевод ревенанта * Карповый перекат * Create shakeable-component.ftl * Криогеника * Хранилища скафандров * Update autotranslate-14.ftl * Update Cyborgs.xml * Комоды * Кредиты * Удалил дубликат * Информация * Пластырь миму и клоуну * Переводы всего * Перевод аплинка * Удалил ненужные суффиксы * Revert "Удалил ненужные суффиксы" This reverts commit d82f05f30c37ec2c11e5736b91239fe9dd1a4d17. * Удаление ненужных суффиксов * Перевод реагентовых слизней * Перевод аномалий * Перевод маяков * Перевод различной мелочи * Automatic changelog update * Переводы и правки Гайдов (#730) * Automatic changelog update * aaaaa (#733) * Правка локализации (#737) * Update ThirstSystem.cs (#736) * AccessConfiguratorForBorgs (#735) * Automatic changelog update * Починил бесконечную сварку (#734) * Automatic changelog update * ShowManifestFeature (#738) * Automatic changelog update * I LOVE OPENSOURCE * Изменение размеров милишек (#739) * Фикс размеров * Заготовку биты тоже * Правка * Automatic changelog update * Время после взрыва нюки (#740) * More Fun * Автоформатирование * Подкрутка * Automatic changelog update * Скальпель в армейские ботинки (#741) * Automatic changelog update * DoHeavyAttack stamina check (#742) * Automatic changelog update * aaaaaaaaaaaaaaaaaaaaaaaaaaaaa (#743) * fix retarded code (#744) * Automatic changelog update * Локализация (#746) * Правка мелочей * Имя клоуну * Перевод оповещений для РНД * перевод занавесок * перевод столов * Automatic changelog update * Перевод и обновление кода гипоспрея для боргов (#745) * Я только хотел перевести... * refactor * ещё перевод * Revert "refactor" This reverts commit 355c2724c4ed9cd1357661e3ba889a88bdf17db7. * инверсия условия для проверки наличия прототипа * Automatic changelog update * Больше вещей в пояса охраны (#748) * Подкрутки и докрутки (#749) * Automatic changelog update * Добавил отображение защиты от горения и подправил описание защиты от взрывов (#747) * Добавил отображение защиты от горения * Update Content.Shared/Clothing/EntitySystems/FireProtectionSystem.cs Co-authored-by: ThereDrD <88589686+ThereDrD0@users.noreply.github.com> * Update Resources/Locale/ru-RU/_white/info/fire-protection.ftl Co-authored-by: ThereDrD <88589686+ThereDrD0@users.noreply.github.com> * Правки * негативный ноль с плавающей точкой --------- Co-authored-by: ThereDrD <88589686+ThereDrD0@users.noreply.github.com> * Automatic changelog update * Фикс текстурок внешних шлюзов (#751) * Микромелочь * Ещё одна мелочь * Починка прозрачности * Automatic changelog update * the fuck (#752) * the fuck * more logs * avoooo (#753) * nyaUpdate (#754) * Merge pull request #756 * nya v1.2 * ahhhh ** всех закопает (#758) --------- Co-authored-by: RavmorganButOnCocaine <valtos@nextmail.ru> Co-authored-by: BIGZi0348 <118811750+BIGZi0348@users.noreply.github.com> Co-authored-by: ThereDrD <88589686+ThereDrD0@users.noreply.github.com> Co-authored-by: Vorge7 <vorge228@gmail.com> Co-authored-by: Valtos <valtos@spaces.ru> Co-authored-by: haiwwkes <49613070+rhailrake@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Content.Shared.Chemistry.Components;
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Server._White.AutoRegenReagent
|
||||
{
|
||||
@@ -11,10 +12,10 @@ namespace Content.Server._White.AutoRegenReagent
|
||||
public string? SolutionName = null; // we'll fail during tests otherwise
|
||||
|
||||
[DataField("reagents", required: true)]
|
||||
public List<string> Reagents = default!;
|
||||
public List<ProtoId<ReagentPrototype>> Reagents = default!;
|
||||
|
||||
[DataField]
|
||||
public string CurrentReagent = "";
|
||||
public ProtoId<ReagentPrototype> CurrentReagent = default!;
|
||||
|
||||
[DataField]
|
||||
public int CurrentIndex = 0;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
using Content.Server.Chemistry.Containers.EntitySystems;
|
||||
using Content.Shared.Chemistry.EntitySystems;
|
||||
using Content.Server.Chemistry.EntitySystems;
|
||||
using Content.Server.Popups;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Interaction.Events;
|
||||
using Content.Shared.Verbs;
|
||||
using Robust.Shared.Timing;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Server._White.AutoRegenReagent
|
||||
{
|
||||
@@ -13,9 +14,10 @@ namespace Content.Server._White.AutoRegenReagent
|
||||
/// </summary>
|
||||
public sealed class AutoRegenReagentSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly SolutionContainerSystem _solutionSystem = default!;
|
||||
[Dependency] private readonly SharedSolutionContainerSystem _solutionSystem = default!;
|
||||
[Dependency] private readonly PopupSystem _popups = default!;
|
||||
[Dependency] private readonly IGameTiming _timing = default!;
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -45,7 +47,7 @@ namespace Content.Server._White.AutoRegenReagent
|
||||
if (autoComp.Solution == null)
|
||||
return;
|
||||
|
||||
_solutionSystem.TryAddReagent(autoComp.Solution.Value, autoComp.CurrentReagent, autoComp.UnitsPerInterval);
|
||||
_solutionSystem.TryAddReagent(autoComp.Solution.Value, autoComp.CurrentReagent, autoComp.UnitsPerInterval, out _);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +71,8 @@ namespace Content.Server._White.AutoRegenReagent
|
||||
|
||||
private void OnExamined(EntityUid uid, AutoRegenReagentComponent component, ExaminedEvent args)
|
||||
{
|
||||
args.PushMarkup(Loc.GetString("reagent-name", ("reagent", component.CurrentReagent)));
|
||||
if (_prototypeManager.TryIndex(component.CurrentReagent, out var reagentProto))
|
||||
args.PushMarkup(Loc.GetString("reagent-name", ("reagent", reagentProto.LocalizedName)));
|
||||
}
|
||||
|
||||
private void AddSwitchVerb(EntityUid uid, AutoRegenReagentComponent component,
|
||||
@@ -106,7 +109,7 @@ namespace Content.Server._White.AutoRegenReagent
|
||||
component.CurrentReagent = component.Reagents[component.CurrentIndex];
|
||||
}
|
||||
|
||||
private string SwitchReagent(AutoRegenReagentComponent component, EntityUid? user = null)
|
||||
private void SwitchReagent(AutoRegenReagentComponent component, EntityUid? user = null)
|
||||
{
|
||||
if (component.CurrentIndex + 1 == component.Reagents.Count)
|
||||
component.CurrentIndex = 0;
|
||||
@@ -118,10 +121,14 @@ namespace Content.Server._White.AutoRegenReagent
|
||||
|
||||
component.CurrentReagent = component.Reagents[component.CurrentIndex];
|
||||
|
||||
if (user != null)
|
||||
_popups.PopupEntity(Loc.GetString("autoregen-switched", ("reagent", component.CurrentReagent)), user.Value, user.Value);
|
||||
if (user == null)
|
||||
return;
|
||||
|
||||
if (!_prototypeManager.TryIndex(component.CurrentReagent, out var reagentProto))
|
||||
return;
|
||||
|
||||
_popups.PopupEntity(Loc.GetString("autoregen-switched", ("reagent", reagentProto.LocalizedName)), user.Value, user.Value);
|
||||
|
||||
return component.CurrentReagent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user