Skip to content

Commit

Permalink
Shipwreck && Flesh adds (Rxup#249)
Browse files Browse the repository at this point in the history
* some fixes & adds

* add uranium in spawners

* fixes
  • Loading branch information
KayzelW authored Sep 27, 2023
1 parent 7aac215 commit 3c9f5cb
Show file tree
Hide file tree
Showing 32 changed files with 741 additions and 314 deletions.
3 changes: 3 additions & 0 deletions Content.Server/Backmen/Flesh/FleshHeartComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ public sealed partial class FleshHeartComponent : Component
"Human",
"Reptilian",
"Dwarf",
"Oni",
"Vox",
"HumanoidFoxes",
};

[DataField("alertLevelOnActivate")] public string AlertLevelOnActivate = "red";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ public sealed partial class FleshCultRuleComponent : Component
"Human",
"Reptilian",
"Dwarf",
"Oni",
"Vox",
"HumanoidFoxes",
};

public enum WinTypes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ public sealed partial class ShipwreckedNPCHecateComponent : Component
[ViewVariables(VVAccess.ReadWrite)]
public ShipwreckedRuleComponent? Rule;

[ViewVariables(VVAccess.ReadWrite)]
public EntityUid? GunSafe;
[ViewVariables(VVAccess.ReadWrite)] public HashSet<EntityUid> GunSafe = new ();

[ViewVariables(VVAccess.ReadWrite)]
public bool UnlockedSafe;

[ViewVariables(VVAccess.ReadWrite)]
public EntityUid? EngineBayDoor;
[ViewVariables(VVAccess.ReadWrite)] public HashSet<EntityUid> EngineBayDoor = new();

[ViewVariables(VVAccess.ReadWrite)]
public bool UnlockedEngineBay;
Expand Down
45 changes: 37 additions & 8 deletions Content.Server/Backmen/Shipwrecked/ShipwreckedRuleSystem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Diagnostics.CodeAnalysis;
using System.ComponentModel.Design;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Numerics;
using System.Text;
Expand All @@ -17,6 +18,7 @@
using Content.Server.Chemistry.Components;
using Content.Server.Construction.Components;
using Content.Server.Destructible;
using Content.Server.Doors.Systems;
using Content.Server.Explosion.EntitySystems;
using Content.Server.Fluids.EntitySystems;
using Content.Server.GameTicking;
Expand Down Expand Up @@ -127,6 +129,8 @@ public sealed class ShipwreckedRuleSystem : GameRuleSystem<ShipwreckedRuleCompon
[Dependency] private readonly TileSystem _tileSystem = default!;
[Dependency] private readonly TransformSystem _transformSystem = default!;
[Dependency] private readonly RoleSystem _roleSystem = default!;
[Dependency] private readonly AirlockSystem _airlockSystem = default!;


private ISawmill _sawmill = default!;

Expand Down Expand Up @@ -1411,6 +1415,9 @@ private void CheckShouldRoundEnd(EntityUid uid, ShipwreckedRuleComponent compone

private void OnInitHecate(EntityUid uid, ShipwreckedNPCHecateComponent component, MapInitEvent args)
{
component.GunSafe.Clear();
component.EngineBayDoor.Clear();

var doorQuery = GetEntityQuery<DoorComponent>();
var storageQuery = GetEntityQuery<EntityStorageComponent>();

Expand All @@ -1425,14 +1432,14 @@ private void OnInitHecate(EntityUid uid, ShipwreckedNPCHecateComponent component
if (accessList.Contains("Armory") && storageQuery.HasComponent(entity))
{
// This is probably the gun safe.
component.GunSafe = entity;
component.GunSafe.Add(entity);
break;
}

if (accessList.Contains("Engineering") && doorQuery.HasComponent(entity))
{
// This is probably the engine bay door.
component.EngineBayDoor = entity;
component.EngineBayDoor.Add(entity);
break;
}

Expand All @@ -1442,12 +1449,22 @@ private void OnInitHecate(EntityUid uid, ShipwreckedNPCHecateComponent component

private void OnAskGeneratorUnlock(EntityUid uid, ShipwreckedNPCHecateComponent component, ShipwreckedHecateAskGeneratorUnlockEvent args)
{
if (component.UnlockedEngineBay || component.EngineBayDoor == null)
if (component.UnlockedEngineBay || !component.EngineBayDoor.Any())
return;

component.UnlockedEngineBay = true;

Comp<AccessReaderComponent>(component.EngineBayDoor.Value).AccessLists.Clear();
foreach (var row in component.EngineBayDoor)
{
if (TerminatingOrDeleted(row))
continue;
if (TryComp<AirlockComponent>(row, out var airlock) && !airlock.EmergencyAccess)
{
_airlockSystem.ToggleEmergencyAccess(row, airlock);
continue;
}
Comp<AccessReaderComponent>(row).AccessLists.Clear();
}

_npcConversationSystem.QueueResponse(uid, args.AccessGranted);
}
Expand All @@ -1464,13 +1481,25 @@ private void OnAskWeapons(EntityUid uid, ShipwreckedNPCHecateComponent component

private void OnAskWeaponsUnlock(EntityUid uid, ShipwreckedNPCHecateComponent component, ShipwreckedHecateAskWeaponsUnlockEvent args)
{
if (component.GunSafe == null || Deleted(component.GunSafe))

if (!component.GunSafe.Any())
{
_sawmill.Warning($"Hecate tried to unlock the gun safe, but it's missing.");
return;
}
else

foreach (var row in component.GunSafe)
{
_lockSystem.Unlock(component.GunSafe.Value, uid);
if (TerminatingOrDeleted(row) )
{
continue;
}
if (TryComp<AirlockComponent>(row, out var airlock) && !airlock.EmergencyAccess)
{
_airlockSystem.ToggleEmergencyAccess(row, airlock);
continue;
}
_lockSystem.Unlock(row, uid);
}
}

Expand Down
3 changes: 3 additions & 0 deletions Content.Shared/Backmen/Flesh/FleshCultistComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ public sealed partial class FleshCultistComponent : Component
"Human",
"Reptilian",
"Dwarf",
"Oni",
"Vox",
"HumanoidFoxes",
};

[DataField("adrenalinReagents")] public List<ReagentQuantity> AdrenalinReagents = new()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
objective-condition-create-flesh-heart-title = Создай и пробуди сердце плоти.
objective-condition-create-flesh-heart-description = Вам нужно развить необходимый навык, чтобы создать сердце.
Чтобы пробудить его, оно должно поглотить необходимое количество тел эволюционировавших существ.
После пробуждения будьте готовы защищать его, так как он начнет превращать всю станцию в плоть.
objective-condition-flesh-cultist-survival-title = Выжить и сохранить человеческий облик.
objective-condition-flesh-cultist-survival-description = Избегайте голода паразита, чтобы предотвратить непредвиденные обстоятельства.
8 changes: 4 additions & 4 deletions Resources/Locale/ru-RU/backmen/preset-shipwrecked.ftl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## Gamemode

shipwrecked-title = Потерпевший Кораблекрушение
shipwrecked-title = Кораблекрушение(выживание)
shipwrecked-description = Группа путешественников отправляется в путь, чтобы узнать свою историю смерти...
shipwrecked-too-many-ready-players = Слишком много игроков было готово к игре! Количество готовых игроков {$readyPlayersCount} , но предел для этого режима {$maximumPlayers} .
shipwrecked-no-one-ready = Нет готовых игроков! Невозможно начать игру Выжившие.
shipwrecked-no-one-ready = Нет готовых игроков! Невозможно начать игру с режимом Кораблекрушение.
shipwrecked-shuttle-announcement = Анонс транспортного шаттла от {$sender}: {$message}
## Round End
Expand All @@ -29,7 +29,7 @@ shipwrecked-list-all-objectives-complete = [color=green]Все задачи вы
## Passenger Manifest

passenger-manifest-passenger-line = - {$name}, {$details}
passenger-manifest-end-line = -< END MANIFEST >-
passenger-manifest-end-line = -< КОНЕЦ МАНИФЕСТА >-
## Jobs

Expand Down Expand Up @@ -87,7 +87,7 @@ hecate-response-sorry-6 = Мне очень жаль, но я не могу на
hecate-response-help = Чем я могу Вам помочь? Вы можете спросить меня о: {$availablePrompts}.
hecate-response-name = Меня зовут Геката. А тебя?
hecate-response-name = Меня зовут Катя. А тебя?
hecate-response-buy-sell = Хм! Это может быть темой для коммерсанта.
hecate-response-hello-1 = Приветствую!
Expand Down
Loading

0 comments on commit 3c9f5cb

Please sign in to comment.