Skip to content

Commit 7876e52

Browse files
committed
added locales, and first bui steps
1 parent c24cae5 commit 7876e52

File tree

8 files changed

+68
-3
lines changed

8 files changed

+68
-3
lines changed

Content.Server/SS220/CultYogg/FungusMachine/FungusMachineSystem.cs

+2
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ public override void Initialize()
2727

2828
private void OnAttemptOpenUI(Entity<FungusMachineComponent> ent, ref ActivatableUIOpenAttemptEvent args)
2929
{
30+
/*
3031
if (HasComp<MiGoComponent>(args.User))
3132
return;
3233
3334
_popupSystem.PopupEntity(Loc.GetString("cult-yogg-fungus-denied-to-use"), ent, args.User);
3435
args.Cancel();
36+
*/
3537
}
3638

3739
protected override void OnComponentInit(EntityUid uid, FungusMachineComponent component, ComponentInit args)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt
2+
3+
using Content.Shared.SS220.CultYogg.Buildings;
4+
using Robust.Shared.Map;
5+
using Robust.Shared.Prototypes;
6+
using Robust.Shared.Serialization;
7+
8+
namespace Content.Shared.SS220.CultYogg.MiGo;
9+
10+
[Serializable, NetSerializable]
11+
public sealed class MiGoPlantBuiState : BoundUserInterfaceState
12+
{
13+
public List<CultYoggBuildingPrototype> Seeds = [];
14+
}
15+
16+
[Serializable, NetSerializable]
17+
public enum MiGoPlantUiKey : byte
18+
{
19+
Key
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt
2+
3+
using Content.Shared.SS220.CultYogg.Buildings;
4+
using Robust.Shared.Player;
5+
using Robust.Shared.Prototypes;
6+
using System.Linq;
7+
8+
namespace Content.Shared.SS220.CultYogg.MiGo;
9+
10+
public sealed class SharedMiGoPlantSystem : EntitySystem
11+
{
12+
[Dependency] private readonly SharedUserInterfaceSystem _userInterfaceSystem = default!;
13+
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
14+
/// <inheritdoc/>
15+
public override void Initialize()
16+
{
17+
base.Initialize();
18+
//SubscribeLocalEvent<MiGoComponent, BoundUIOpenedEvent>(OnBoundUIOpened);
19+
}
20+
21+
/*
22+
public void OpenUI(Entity<MiGoComponent> entity, ActorComponent actor)
23+
{
24+
_userInterfaceSystem.TryToggleUi(entity.Owner, MiGoPlantUiKey.Key, actor.PlayerSession);
25+
}
26+
*/
27+
28+
private void OnBoundUIOpened(Entity<MiGoComponent> entity, ref BoundUIOpenedEvent args)
29+
{
30+
_userInterfaceSystem.SetUiState(args.Entity, MiGoPlantUiKey.Key, new MiGoPlantBuiState()
31+
{
32+
Seeds = _prototypeManager.GetInstances<CultYoggBuildingPrototype>().Values.ToList(),
33+
});
34+
}
35+
}

Resources/Locale/ru-RU/ss220/cultYogg/cult_yogg_buildings.ftl

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,8 @@ ent-CultYoggDoor = проклятая дверь
77
ent-CultYoggAltar = алтарь жертвоприношений
88
.desc = Загадочный алтарь культа.
99
ent-CultYoggPod = хранилище
10-
.desc = Капсула, способная излечивать раны или даже воскрешать членов культа. Один её вид вызывает у вас тревогу.
10+
.desc = Капсула, способная излечивать раны или даже воскрешать членов культа. Один её вид вызывает у вас тревогу.
11+
ent-CultYoggFungusHydroponic = грибница
12+
.desc = Специальная гидропоника, позволяющая выращивать что-то куда более зловещее без затрат на уход.
13+
ent-CultYoggPond = пруд
14+
.desc = Резервуар густой жидкости с неизвестным источником самопополнения.
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ent-FoodMiGomyceteCult = Ми-Гомицелий
22
.desc = Мистическая субстанция взывающая к полгощению и рвотным позывам.
33
ent-MiGoSeedsCult = пакет спор (Ми-Го)
4-
.desc = "Знаменитый, чрезвычайно смертоносный гриб, который используется исключительно в декоративных целях".
4+
.desc = Знаменитый, чрезвычайно смертоносный гриб, который используется исключительно в декоративных целях
55
ent-HolyWaterJug = кувшин воды
66
.desc = Сохраняйте гидратацию.

Resources/Locale/ru-RU/ss220/cultYogg/cult_yogg_items.ftl

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ ent-ClothingBackpackSatchelCultYogg = Живой рюкзак
2424
.desc = Намертво вросшее в вас хранилище всех необходимых предметов. Пахнет лишайником.
2525
ent-ClothingBackpackDuffelCultYogg = Живая сумка
2626
.desc = Намертво вросшее в вас хранилище всех необходимых предметов. Пахнет лишайником.
27+
ent-CultStrangeFruitSeed = Семена странного фрукта
28+
.desc = Семена крайне агрессивной кудзы, из-за формы ошибочно называемой фруктом.
2729
ent-ProductStrangeFruitCultYogg = Странный фрукт
2830
.desc = Кажется, внутри него переплетены тысячи стеблей...
2931
ent-SedativestingCultYogg = Усыпляющее жало
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
seeds-strange-fruit-name = странный фрукт
2+
seeds-migo-name = ми-гомицелий

Resources/Prototypes/SS220/Entities/Objects/Consumable/CultYogg/MiGomycete.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
- type: seed
4444
id: MiGospores
45-
name: seeds-MiGo-name
45+
name: seeds-migo-name
4646
noun: seeds-noun-spores
4747
displayName: seeds-flyamanita-display-name
4848
plantRsi: SS220/Objects/CultYogg/migomycete.rsi

0 commit comments

Comments
 (0)