diff --git a/Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterMenu.xaml b/Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterMenu.xaml
index 8c1e8842d7e..3e814ced8f8 100644
--- a/Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterMenu.xaml
+++ b/Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterMenu.xaml
@@ -22,8 +22,6 @@
-
-
diff --git a/Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterMenu.xaml.cs b/Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterMenu.xaml.cs
index cf1621406f3..795fab0b0ad 100644
--- a/Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterMenu.xaml.cs
+++ b/Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterMenu.xaml.cs
@@ -37,7 +37,6 @@ public void UpdateState(BluespaceHarvesterBoundUserInterfaceState state)
PowerUsageLabel.Text = Loc.GetString("power-monitoring-window-value", ("value", state.PowerUsage));
PowerUsageNextLabel.Text = Loc.GetString("power-monitoring-window-value", ("value", state.PowerUsageNext));
- PowerSuppliertLabel.Text = Loc.GetString("power-monitoring-window-value", ("value", state.PowerSuppliert));
AvailablePointsLabel.Text = $"{state.Points}";
TotalPontsLabel.Text = $"{state.TotalPoints}";
@@ -48,7 +47,7 @@ public void UpdateState(BluespaceHarvesterBoundUserInterfaceState state)
{
var child = new BluespaceHarvesterCategory(category, state.Points >= category.Cost);
- child.CategoryButton.OnButtonDown += (args) =>
+ child.CategoryButton.OnButtonDown += _ =>
{
_owner.SendBuy(category.Type);
};
diff --git a/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterComponent.cs b/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterComponent.cs
index a83f9706335..9a31af0d60c 100644
--- a/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterComponent.cs
+++ b/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterComponent.cs
@@ -7,11 +7,14 @@ namespace Content.Server._CorvaxNext.BluespaceHarvester;
[RegisterComponent, Access(typeof(BluespaceHarvesterSystem))]
public sealed partial class BluespaceHarvesterComponent : Component
{
+ [ViewVariables(VVAccess.ReadWrite)]
+ public TimeSpan ResetTime;
+
///
/// Responsible for forcibly turning off the harvester and blocking input level.
///
- [DataField]
- public bool Reseted;
+ [ViewVariables(VVAccess.ReadWrite)]
+ public bool Reset;
///
/// The current level at which the harvester is located is what other parameters are calculated from.
@@ -106,31 +109,34 @@ public sealed partial class BluespaceHarvesterComponent : Component
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float EmaggedRiftChance = 0.03f;
+ [ViewVariables(VVAccess.ReadWrite)]
+ public int Harvesters;
+
[DataField]
public List Categories = new()
{
- new BluespaceHarvesterCategoryInfo()
+ new BluespaceHarvesterCategoryInfo
{
PrototypeId = "RandomHarvesterBiologicalLoot",
- Cost = 7_500,
+ Cost = 7500,
Type = BluespaceHarvesterCategory.Biological,
},
new BluespaceHarvesterCategoryInfo()
{
PrototypeId = "RandomHarvesterTechnologicalLoot",
- Cost = 7_500,
+ Cost = 10000,
Type = BluespaceHarvesterCategory.Technological,
},
- new BluespaceHarvesterCategoryInfo()
+ new BluespaceHarvesterCategoryInfo
{
PrototypeId = "RandomHarvesterIndustrialLoot",
- Cost = 7_500,
+ Cost = 12500,
Type = BluespaceHarvesterCategory.Industrial,
},
new BluespaceHarvesterCategoryInfo()
{
PrototypeId = "RandomHarvesterDestructionLoot",
- Cost = 7_500,
+ Cost = 15000,
Type = BluespaceHarvesterCategory.Destruction,
},
};
@@ -146,6 +152,12 @@ public sealed partial class BluespaceHarvesterComponent : Component
[DataField]
public SoundSpecifier SpawnSound = new SoundPathSpecifier("/Audio/Effects/teleport_arrival.ogg");
+
+ [ViewVariables]
+ public float ReceivedPower;
+
+ [ViewVariables]
+ public float DrawRate;
}
[Serializable]
diff --git a/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs b/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs
index f456b2dc9e5..a9c9013b5f8 100644
--- a/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs
+++ b/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs
@@ -1,25 +1,24 @@
-using Content.Server.NodeContainer;
-using Content.Server.NodeContainer.EntitySystems;
-using Content.Server.NodeContainer.Nodes;
using Content.Server.Power.Components;
-using Content.Server.Power.NodeGroups;
using Content.Shared.Audio;
using Content.Shared._CorvaxNext.BluespaceHarvester;
using Content.Shared.Destructible;
using Content.Shared.Emag.Components;
-using Microsoft.CodeAnalysis;
using Robust.Server.GameObjects;
using Robust.Shared.Random;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
+using Content.Server.Power.EntitySystems;
using Robust.Shared.Audio.Systems;
+using Robust.Shared.Map;
+using Robust.Shared.Timing;
+using Robust.Shared.Utility;
namespace Content.Server._CorvaxNext.BluespaceHarvester;
public sealed class BluespaceHarvesterSystem : EntitySystem
{
+ [Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
- [Dependency] private readonly NodeContainerSystem _nodeContainer = default!;
[Dependency] private readonly TransformSystem _transform = default!;
[Dependency] private readonly EntityLookupSystem _lookup = default!;
[Dependency] private readonly UserInterfaceSystem _ui = default!;
@@ -27,28 +26,72 @@ public sealed class BluespaceHarvesterSystem : EntitySystem
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly SharedAmbientSoundSystem _ambientSound = default!;
- public List Taps = new List()
- {
- new BluespaceHarvesterTap() { Level = 0, Visual = BluespaceHarvesterVisuals.Tap0 },
- new BluespaceHarvesterTap() { Level = 1, Visual = BluespaceHarvesterVisuals.Tap1 },
- new BluespaceHarvesterTap() { Level = 5, Visual = BluespaceHarvesterVisuals.Tap2 },
- new BluespaceHarvesterTap() { Level = 10, Visual = BluespaceHarvesterVisuals.Tap3 },
- new BluespaceHarvesterTap() { Level = 15, Visual = BluespaceHarvesterVisuals.Tap4 },
- new BluespaceHarvesterTap() { Level = 20, Visual = BluespaceHarvesterVisuals.Tap5 },
- };
+ private readonly List _taps =
+ [
+ new() { Level = 0, Visual = BluespaceHarvesterVisuals.Tap0 },
+ new() { Level = 1, Visual = BluespaceHarvesterVisuals.Tap1 },
+ new() { Level = 5, Visual = BluespaceHarvesterVisuals.Tap2 },
+ new() { Level = 10, Visual = BluespaceHarvesterVisuals.Tap3 },
+ new() { Level = 15, Visual = BluespaceHarvesterVisuals.Tap4 },
+ new() { Level = 20, Visual = BluespaceHarvesterVisuals.Tap5 },
+ ];
private float _updateTimer;
private const float UpdateTime = 1.0f;
+ private EntityQuery _harvesterQuery;
+
public override void Initialize()
{
base.Initialize();
+ _harvesterQuery = GetEntityQuery();
+
+ SubscribeLocalEvent(OnStartup);
+ SubscribeLocalEvent(OnRemove);
+
+ SubscribeLocalEvent(ReceivedChanged);
SubscribeLocalEvent(OnTargetLevel);
SubscribeLocalEvent(OnBuy);
SubscribeLocalEvent(OnDestruction);
}
+ private void OnStartup(Entity ent, ref ComponentStartup args)
+ {
+ UpdateCount();
+ }
+
+ private void OnRemove(Entity ent, ref ComponentRemove args)
+ {
+ UpdateCount();
+ }
+
+ private void UpdateCount()
+ {
+ var dictionary = new Dictionary>();
+
+ var query = EntityQueryEnumerator();
+ while (query.MoveNext(out var entityUid, out _))
+ {
+ var mapId = Transform(entityUid).MapID;
+ var list = dictionary.GetOrNew(mapId);
+ list.Add(entityUid);
+ }
+
+ query = EntityQueryEnumerator();
+ while (query.MoveNext(out var entityUid, out var harvester))
+ {
+ var mapId = Transform(entityUid).MapID;
+ harvester.Harvesters = dictionary[mapId].Count;
+ }
+ }
+
+ private void ReceivedChanged(Entity ent, ref PowerConsumerReceivedChanged args)
+ {
+ ent.Comp.ReceivedPower = args.ReceivedPower;
+ ent.Comp.DrawRate = args.DrawRate;
+ }
+
public override void Update(float frameTime)
{
base.Update(frameTime);
@@ -63,17 +106,14 @@ public override void Update(float frameTime)
var query = EntityQueryEnumerator();
while (query.MoveNext(out var uid, out var harvester, out var consumer))
{
- var ent = (uid, harvester);
-
// We start only after manual switching on.
- if (harvester is { Reseted: false, CurrentLevel: 0 })
- harvester.Reseted = true;
+ if (harvester is { Reset: false, CurrentLevel: 0 })
+ harvester.Reset = true;
// The HV wires cannot transmit a lot of electricity so quickly,
// which is why it will not start.
// So this is simply using the amount of free electricity in the network.
- var supplier = GetPowerSupplier(uid, harvester);
- if (supplier < GetUsagePower(harvester.CurrentLevel) && harvester.CurrentLevel != 0)
+ if (harvester.ReceivedPower < harvester.DrawRate && harvester.CurrentLevel != 0)
{
// If there is insufficient production,
// it will reset itself (turn off) and you will need to start it again,
@@ -81,7 +121,7 @@ public override void Update(float frameTime)
Reset(uid, harvester);
}
- if (harvester.Reseted)
+ if (harvester.Reset)
{
if (harvester.CurrentLevel < harvester.TargetLevel)
harvester.CurrentLevel++;
@@ -110,7 +150,7 @@ public override void Update(float frameTime)
}
if (TryComp(uid, out var ambient))
- _ambientSound.SetAmbience(uid, harvester.Reseted, ambient); // Bzhzh, bzhzh
+ _ambientSound.SetAmbience(uid, harvester.Reset, ambient); // Bzhzh, bzhzh
UpdateAppearance(uid, harvester);
UpdateUI(uid, harvester);
@@ -125,17 +165,16 @@ private void OnDestruction(Entity harvester, ref De
private void OnTargetLevel(Entity harvester, ref BluespaceHarvesterTargetLevelMessage args)
{
// If we switch off, we don't need to be switched on.
- if (!harvester.Comp.Reseted && harvester.Comp.CurrentLevel != 0)
+ if (!harvester.Comp.Reset)
return;
harvester.Comp.TargetLevel = args.TargetLevel;
- harvester.Comp.Reseted = true; // We start only after manual switching on.
UpdateUI(harvester.Owner, harvester.Comp);
}
private void OnBuy(Entity harvester, ref BluespaceHarvesterBuyMessage args)
{
- if (!harvester.Comp.Reseted)
+ if (!harvester.Comp.Reset)
return;
if (!TryGetCategory(harvester.Owner, args.Category, out var info, harvester.Comp))
@@ -158,7 +197,7 @@ private void UpdateAppearance(EntityUid uid, BluespaceHarvesterComponent? harves
var level = harvester.CurrentLevel;
BluespaceHarvesterTap? max = null;
- foreach (var tap in Taps)
+ foreach (var tap in _taps)
{
if (tap.Level > level)
continue;
@@ -184,13 +223,14 @@ private void UpdateUI(EntityUid uid, BluespaceHarvesterComponent? harvester = nu
if (!Resolve(uid, ref harvester))
return;
- _ui.SetUiState(uid, BluespaceHarvesterUiKey.Key, new BluespaceHarvesterBoundUserInterfaceState(
+ _ui.SetUiState(uid,
+ BluespaceHarvesterUiKey.Key,
+ new BluespaceHarvesterBoundUserInterfaceState(
harvester.TargetLevel,
harvester.CurrentLevel,
harvester.MaxLevel,
GetUsagePower(harvester.CurrentLevel),
GetUsageNextPower(harvester.CurrentLevel),
- GetPowerSupplier(uid, harvester),
harvester.Points,
harvester.TotalPoints,
GetPointGeneration(uid, harvester),
@@ -265,7 +305,7 @@ private int GetPointGeneration(EntityUid uid, BluespaceHarvesterComponent? harve
if (!Resolve(uid, ref harvester))
return 0;
- return harvester.CurrentLevel * 4 * (Emagged(uid) ? 2 : 1);
+ return harvester.CurrentLevel * 4 * (Emagged(uid) ? 2 : 1) * (harvester.ResetTime == TimeSpan.Zero ? 1 : 0);
}
private int GetDangerPointGeneration(EntityUid uid, BluespaceHarvesterComponent? harvester = null)
@@ -274,7 +314,6 @@ private int GetDangerPointGeneration(EntityUid uid, BluespaceHarvesterComponent?
return 0;
var stable = GetStableLevel(uid, harvester);
-
if (harvester.CurrentLevel < stable && harvester.CurrentLevel != 0)
return -1;
@@ -297,52 +336,10 @@ private int GetStableLevel(EntityUid uid, BluespaceHarvesterComponent? harvester
if (!Resolve(uid, ref harvester))
return 0;
- return Emagged(uid) ? harvester.EmaggedStableLevel : harvester.StableLevel;
- }
-
- ///
- /// Receives information about all consumers and generators, subtracts and returns the amount of excess energy in the network.
- ///
- private float GetPowerSupplier(EntityUid uid, BluespaceHarvesterComponent? harvester = null, NodeContainerComponent? nodeComp = null)
- {
- if (!Resolve(uid, ref harvester, ref nodeComp))
+ if (harvester.Harvesters > 1)
return 0;
- if (!_nodeContainer.TryGetNode(nodeComp, "input", out var node))
- return 0;
-
- if (node.NodeGroup is not PowerNet netQ)
- return 0;
-
- var totalSources = 0.0f;
- foreach (var psc in netQ.Suppliers)
- {
- totalSources += psc.Enabled ? psc.MaxSupply : 0f;
- }
-
- foreach (var pcc in netQ.Dischargers)
- {
- if (!TryComp(pcc.Owner, out PowerNetworkBatteryComponent? batteryComp))
- continue;
-
- totalSources += batteryComp.NetworkBattery.CurrentSupply;
- }
-
- var totalConsumer = 0.0f;
- foreach (var pcc in netQ.Consumers)
- {
- totalConsumer += pcc.DrawRate;
- }
-
- foreach (var pcc in netQ.Chargers)
- {
- if (!TryComp(pcc.Owner, out PowerNetworkBatteryComponent? batteryComp))
- continue;
-
- totalConsumer += batteryComp.NetworkBattery.CurrentReceiving;
- }
-
- return totalSources - totalConsumer;
+ return Emagged(uid) ? harvester.EmaggedStableLevel : harvester.StableLevel;
}
private bool TryGetCategory(EntityUid uid, BluespaceHarvesterCategory target, [NotNullWhen(true)] out BluespaceHarvesterCategoryInfo? info, BluespaceHarvesterComponent? harvester = null)
@@ -369,7 +366,7 @@ private void Reset(EntityUid uid, BluespaceHarvesterComponent? harvester = null)
return;
harvester.Danger += harvester.DangerFromReset;
- harvester.Reseted = true;
+ harvester.Reset = false;
harvester.TargetLevel = 0;
}
diff --git a/Content.Shared/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterUi.cs b/Content.Shared/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterUi.cs
index 057e943a8d4..f861581c4af 100644
--- a/Content.Shared/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterUi.cs
+++ b/Content.Shared/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterUi.cs
@@ -12,7 +12,6 @@ public sealed class BluespaceHarvesterBoundUserInterfaceState : BoundUserInterfa
public readonly uint PowerUsage;
public readonly uint PowerUsageNext;
- public readonly float PowerSuppliert;
public readonly int Points;
public readonly int TotalPoints;
@@ -20,7 +19,7 @@ public sealed class BluespaceHarvesterBoundUserInterfaceState : BoundUserInterfa
public readonly List Categories;
- public BluespaceHarvesterBoundUserInterfaceState(int targetLevel, int currentLevel, int maxLevel, uint powerUsage, uint powerUsageNext, float powerSuppliert, int points, int totalPoints, int pointsGen, List categories)
+ public BluespaceHarvesterBoundUserInterfaceState(int targetLevel, int currentLevel, int maxLevel, uint powerUsage, uint powerUsageNext, int points, int totalPoints, int pointsGen, List categories)
{
TargetLevel = targetLevel;
CurrentLevel = currentLevel;
@@ -28,7 +27,6 @@ public BluespaceHarvesterBoundUserInterfaceState(int targetLevel, int currentLev
PowerUsage = powerUsage;
PowerUsageNext = powerUsageNext;
- PowerSuppliert = powerSuppliert;
Points = points;
TotalPoints = totalPoints;
diff --git a/Resources/Locale/en-US/_corvaxnext/bluespace_harvester.ftl b/Resources/Locale/en-US/_corvaxnext/bluespace_harvester.ftl
index 23f8f5549e1..c2b9faa6fdd 100644
--- a/Resources/Locale/en-US/_corvaxnext/bluespace_harvester.ftl
+++ b/Resources/Locale/en-US/_corvaxnext/bluespace_harvester.ftl
@@ -15,4 +15,5 @@ bluespace-harvester-category-Industrial = Industrial
bluespace-harvester-category-Technological = Technological
bluespace-harvester-category-Biological = Biological
bluespace-harvester-category-Destruction = Destruction
+research-technology-bluespace = Bluespace
research-technology-bluespace-mining = Bluespace Mining
diff --git a/Resources/Locale/ru-RU/_corvaxnext/bluespace_harvester.ftl b/Resources/Locale/ru-RU/_corvaxnext/bluespace_harvester.ftl
index e55e123d69a..f1627325a23 100644
--- a/Resources/Locale/ru-RU/_corvaxnext/bluespace_harvester.ftl
+++ b/Resources/Locale/ru-RU/_corvaxnext/bluespace_harvester.ftl
@@ -15,4 +15,5 @@ bluespace-harvester-category-Industrial = Промышленная
bluespace-harvester-category-Technological = Технологическая
bluespace-harvester-category-Biological = Биологическая
bluespace-harvester-category-Destruction = Разрушительная
+research-technology-bluespace = Блюспейс
research-technology-bluespace-mining = Блюспейс Добыча
diff --git a/Resources/Locale/ru-RU/_corvaxnext/entities/objects/devices/circuitboards/machine/production.ftl b/Resources/Locale/ru-RU/_corvaxnext/entities/objects/devices/circuitboards/machine/production.ftl
new file mode 100644
index 00000000000..51e5c25bb55
--- /dev/null
+++ b/Resources/Locale/ru-RU/_corvaxnext/entities/objects/devices/circuitboards/machine/production.ftl
@@ -0,0 +1,5 @@
+ent-MachineBluespaceHarvesterCircuitboard = плата блюспейс харвестера
+ .desc = { ent-BaseMachineCircuitboard.desc }
+
+ent-MachineBluespaceTransitorCircuitboard = плата блюспейс Т.Р.А.Н.З.И.Т.
+ .desc = { ent-BaseMachineCircuitboard.desc }
diff --git a/Resources/Locale/ru-RU/_corvaxnext/entities/objects/misc/parts.ftl b/Resources/Locale/ru-RU/_corvaxnext/entities/objects/misc/parts.ftl
new file mode 100644
index 00000000000..cb9bc4650ff
--- /dev/null
+++ b/Resources/Locale/ru-RU/_corvaxnext/entities/objects/misc/parts.ftl
@@ -0,0 +1,2 @@
+ent-ArtificialBluespaceCrystal = блюспейс-кристалл
+ .desc = Маленький синий кристалл с мистическими свойствами.
diff --git a/Resources/Locale/ru-RU/_corvaxnext/entities/structures/machines/bluespace_harvester.ftl b/Resources/Locale/ru-RU/_corvaxnext/entities/structures/machines/bluespace_harvester.ftl
new file mode 100644
index 00000000000..4977957a066
--- /dev/null
+++ b/Resources/Locale/ru-RU/_corvaxnext/entities/structures/machines/bluespace_harvester.ftl
@@ -0,0 +1,2 @@
+ent-BluespaceHarvester = блюспейс харвестер
+ .desc = Огромная хреновина которая делает что то интересное.
diff --git a/Resources/Locale/ru-RU/_corvaxnext/entities/structures/power/substations.ftl b/Resources/Locale/ru-RU/_corvaxnext/entities/structures/power/substations.ftl
new file mode 100644
index 00000000000..78179081521
--- /dev/null
+++ b/Resources/Locale/ru-RU/_corvaxnext/entities/structures/power/substations.ftl
@@ -0,0 +1,2 @@
+ent-BluespaceTransitor = блюспейс Т.Р.А.Н.З.И.Т.
+ .desc = Технологии мгновенной передачи электроэнергии, использующие провода как квантово-запутанную систему. Разработаны для обеспечения машин, предназначения которым, вам лучше не знать.
diff --git a/Resources/Locale/ru-RU/_corvaxnext/wires/wire-names.ftl b/Resources/Locale/ru-RU/_corvaxnext/wires/wire-names.ftl
new file mode 100644
index 00000000000..717455a02b6
--- /dev/null
+++ b/Resources/Locale/ru-RU/_corvaxnext/wires/wire-names.ftl
@@ -0,0 +1 @@
+wires-board-name-bluespace-harvester = БСХ
diff --git a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml
index 97e8618ba2a..740af449939 100644
--- a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml
+++ b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml
@@ -359,6 +359,9 @@
- EnergyCautery
- AdvancedRetractor
# Corvax-Next End
+ # Corvax-Next-BluespaceHarvester-Start
+ - ArtificialBluespaceCrystal
+ # Corvax-Next-BluespaceHarvester-End
- type: EmagLatheRecipes
emagDynamicRecipes:
- BoxBeanbag
@@ -530,7 +533,10 @@
- ReagentGrinderIndustrialMachineCircuitboard
- JukeboxCircuitBoard
- SalvageExpeditionsComputerCircuitboard # Corvax-Cringe
- - MachineBluespaceHarvesterCircuitboard # Corvax-Next-BluespaceHarvester
+ # Corvax-Next-BluespaceHarvester-Start
+ - MachineBluespaceHarvesterCircuitboard
+ - MachineBluespaceTransitorCircuitboard
+ # Corvax-Next-BluespaceHarvester-End
# Corvax-Next-MutableLaws-Start
- AsimovCircuitBoard
- CorporateCircuitBoard
diff --git a/Resources/Prototypes/_CorvaxNext/Entities/Objects/Devices/Circuitboards/Machine/production.yml b/Resources/Prototypes/_CorvaxNext/Entities/Objects/Devices/Circuitboards/Machine/production.yml
index 22d303872f2..98d0c3edd06 100644
--- a/Resources/Prototypes/_CorvaxNext/Entities/Objects/Devices/Circuitboards/Machine/production.yml
+++ b/Resources/Prototypes/_CorvaxNext/Entities/Objects/Devices/Circuitboards/Machine/production.yml
@@ -1,6 +1,6 @@
- type: entity
- id: MachineBluespaceHarvesterCircuitboard
parent: BaseMachineCircuitboard
+ id: MachineBluespaceHarvesterCircuitboard
name: Bluespace Harvester board
description: A machine board for a Bluespace Harvester
components:
@@ -13,12 +13,27 @@
Glass: 15
Steel: 15
CableHV: 5
- Manipulator: 5
+ ArtificialBluespaceCrystal: 5
Capacitor: 5
MatterBin: 15
- tagRequirements:
- GlassBeaker:
- amount: 5
- defaultPrototype: Beaker
+ - type: Item
+ size: Normal
+
+- type: entity
+ parent: BaseMachineCircuitboard
+ id: MachineBluespaceTransitorCircuitboard
+ name: bluespace T.R.A.N.S.I.T.O.R board
+ description: A machine board for a bluespace T.R.A.N.S.I.T.O.R
+ components:
+ - type: Sprite
+ sprite: Objects/Misc/module.rsi
+ state: bluespacearray
+ - type: MachineBoard
+ prototype: BluespaceTransitor
+ stackRequirements:
+ Steel: 10
+ CableHV: 30
+ ArtificialBluespaceCrystal: 5
+ Capacitor: 15
- type: Item
size: Normal
diff --git a/Resources/Prototypes/_CorvaxNext/Entities/Objects/Misc/parts.yml b/Resources/Prototypes/_CorvaxNext/Entities/Objects/Misc/parts.yml
new file mode 100644
index 00000000000..99d386bf142
--- /dev/null
+++ b/Resources/Prototypes/_CorvaxNext/Entities/Objects/Misc/parts.yml
@@ -0,0 +1,13 @@
+- type: entity
+ parent: BaseStockPart
+ id: ArtificialBluespaceCrystal
+ name: artificial bluespace crystal
+ description: A small blue crystal with mystical properties.
+ components:
+ - type: Sprite
+ state: ansible_crystal
+ - type: Tag
+ tags:
+ - ArtificialBluespaceCrystal
+ - type: Stack
+ stackType: ArtificialBluespaceCrystal
diff --git a/Resources/Prototypes/_CorvaxNext/Entities/Structures/Machines/bluespace_harvester.yml b/Resources/Prototypes/_CorvaxNext/Entities/Structures/Machines/bluespace_harvester.yml
index 5bd2672875b..62a7fc82502 100644
--- a/Resources/Prototypes/_CorvaxNext/Entities/Structures/Machines/bluespace_harvester.yml
+++ b/Resources/Prototypes/_CorvaxNext/Entities/Structures/Machines/bluespace_harvester.yml
@@ -6,6 +6,10 @@
placement:
mode: AlignTileAny
components:
+ - type: Electrified
+ mediumVoltageNode: input
+ mediumVoltageDamageMultiplier: 10
+ requirePower: true
- type: StationAiWhitelist
- type: BluespaceHarvester
- type: Appearance
@@ -54,32 +58,35 @@
- type: Destructible
thresholds:
- trigger: !type:DamageTrigger
- damage: 1250
+ damage: 750
behaviors:
- !type:ExplodeBehavior
- !type:DoActsBehavior
acts: ["Destruction"]
- type: Explosive
- explosionType: Cryo
+ explosionType: Bluespace
deleteAfterExplosion: false
- totalIntensity: 1000
- intensitySlope: 1
- maxIntensity: 10
+ totalIntensity: 5000
+ intensitySlope: 20
+ maxIntensity: 2500
- type: ActivatableUI
key: enum.BluespaceHarvesterUiKey.Key
- type: UserInterface
interfaces:
enum.BluespaceHarvesterUiKey.Key:
type: BluespaceHarvesterBoundUserInterface
+ enum.WiresUiKey.Key:
+ type: WiresBoundUserInterface
- type: Machine
board: MachineBluespaceHarvesterCircuitboard
- type: NodeContainer
examinable: true
nodes:
- input: !type:CableDeviceNode
- nodeGroupID: HVPower
+ input:
+ !type:CableDeviceNode
+ nodeGroupID: MVPower
- type: PowerConsumer
- voltage: High
+ voltage: Medium
- type: AmbientSound
enabled: false
volume: -1
@@ -90,7 +97,13 @@
radius: 2.5
energy: 0.5
castShadows: false
+ - type: LitOnPowered
+ - type: WiresPanel
+ - type: Wires
+ boardName: wires-board-name-bluespace-harvester
+ layoutId: BluespaceHarvester
+ - type: WiresVisuals
- type: AccessReader
- access: [ [ "Engineering" ], [ "Research" ], [ "Command" ] ]
+ access: [["Engineering"], ["Research"]]
- type: GuideHelp
guides: [ Power ] # TODO: Add BH guide
diff --git a/Resources/Prototypes/_CorvaxNext/Entities/Structures/Power/substations.yml b/Resources/Prototypes/_CorvaxNext/Entities/Structures/Power/substations.yml
new file mode 100644
index 00000000000..da269b60107
--- /dev/null
+++ b/Resources/Prototypes/_CorvaxNext/Entities/Structures/Power/substations.yml
@@ -0,0 +1,43 @@
+- type: entity
+ parent: BaseSubstation
+ id: BluespaceTransitor
+ name: bluespace T.R.A.N.S.I.T.O.R.
+ components:
+ - type: Battery
+ startingCharge: 2500000
+ - type: PowerNetworkBattery
+ maxSupply: 3000000000
+ maxChargeRate: 5000000000
+ supplyRampTolerance: 1000
+ supplyRampRate: 1000000000
+ efficiency: 100
+ - type: Machine
+ board: MachineBluespaceTransitorCircuitboard
+ - type: Explosive
+ explosionType: Bluespace
+ deleteAfterExplosion: false
+ totalIntensity: 5000
+ intensitySlope: 20
+ maxIntensity: 2500
+ - type: PowerMonitoringDevice
+ sprite: _CorvaxNext/Objects/Structures/Power/bluespace_transitor.rsi
+ state: display
+ - type: Sprite
+ sprite: _CorvaxNext/Objects/Structures/Power/bluespace_transitor.rsi
+ snapCardinals: true
+ layers:
+ - state: offline
+ - state: beam
+ shader: unshaded
+ map: ["enum.PowerDeviceVisualLayers.Powered"]
+ - type: PointLight
+ radius: 5
+ energy: 2.5
+ color: "#589bf9"
+ castShadows: false
+ - type: GenericVisualizer
+ visuals:
+ enum.PowerDeviceVisuals.Powered:
+ enum.PowerDeviceVisualLayers.Powered:
+ True: { visible: true }
+ False: { visible: false }
diff --git a/Resources/Prototypes/_CorvaxNext/Recipes/Lathes/electronics.yml b/Resources/Prototypes/_CorvaxNext/Recipes/Lathes/electronics.yml
index 4f34e0d2407..87fb6745391 100644
--- a/Resources/Prototypes/_CorvaxNext/Recipes/Lathes/electronics.yml
+++ b/Resources/Prototypes/_CorvaxNext/Recipes/Lathes/electronics.yml
@@ -2,9 +2,8 @@
parent: BaseGoldCircuitboardRecipe
id: MachineBluespaceHarvesterCircuitboard
result: MachineBluespaceHarvesterCircuitboard
- completetime: 10
- materials:
- Steel: 100
- Glass: 900
- Gold: 300
- Silver: 300
+
+- type: latheRecipe
+ parent: BaseGoldCircuitboardRecipe
+ id: MachineBluespaceTransitorCircuitboard
+ result: MachineBluespaceTransitorCircuitboard
diff --git a/Resources/Prototypes/_CorvaxNext/Recipes/Lathes/parts.yml b/Resources/Prototypes/_CorvaxNext/Recipes/Lathes/parts.yml
new file mode 100644
index 00000000000..cde3feadec6
--- /dev/null
+++ b/Resources/Prototypes/_CorvaxNext/Recipes/Lathes/parts.yml
@@ -0,0 +1,7 @@
+- type: latheRecipe
+ id: ArtificialBluespaceCrystal
+ result: ArtificialBluespaceCrystal
+ completetime: 1
+ materials:
+ Diamond: 600
+ Plasma: 600
diff --git a/Resources/Prototypes/_CorvaxNext/Research/experimental.yml b/Resources/Prototypes/_CorvaxNext/Research/experimental.yml
index e949c566f56..7f525a90ffc 100644
--- a/Resources/Prototypes/_CorvaxNext/Research/experimental.yml
+++ b/Resources/Prototypes/_CorvaxNext/Research/experimental.yml
@@ -1,5 +1,18 @@
# Tier 2
+- type: technology
+ id: Bluespace
+ name: research-technology-bluespace
+ icon:
+ sprite: Objects/Misc/stock_parts.rsi
+ state: ansible_crystal
+ discipline: Experimental
+ tier: 2
+ cost: 25000
+ recipeUnlocks:
+ - ArtificialBluespaceCrystal
+ - MachineBluespaceTransitorCircuitboard
+# Tier 3
- type: technology
id: BluespaceMining
name: research-technology-bluespace-mining
@@ -7,7 +20,9 @@
sprite: Objects/Misc/stock_parts.rsi
state: ansible_crystal
discipline: Experimental
- tier: 2
- cost: 10000
+ tier: 3
+ cost: 30000
recipeUnlocks:
- MachineBluespaceHarvesterCircuitboard
+ technologyPrerequisites:
+ - Bluespace
diff --git a/Resources/Prototypes/_CorvaxNext/Stacks/science_stacks.yml b/Resources/Prototypes/_CorvaxNext/Stacks/science_stacks.yml
new file mode 100644
index 00000000000..8392894cb6f
--- /dev/null
+++ b/Resources/Prototypes/_CorvaxNext/Stacks/science_stacks.yml
@@ -0,0 +1,5 @@
+- type: stack
+ id: ArtificialBluespaceCrystal
+ name: artificial bluespace crystal
+ spawn: ArtificialBluespaceCrystal
+ maxCount: 10
diff --git a/Resources/Prototypes/_CorvaxNext/Wires/layouts.yml b/Resources/Prototypes/_CorvaxNext/Wires/layouts.yml
new file mode 100644
index 00000000000..3dea8fc6d3d
--- /dev/null
+++ b/Resources/Prototypes/_CorvaxNext/Wires/layouts.yml
@@ -0,0 +1,7 @@
+- type: wireLayout
+ id: BluespaceHarvester
+ dummyWires: 12
+ wires:
+ - !type:AiInteractWireAction
+ - !type:PowerWireAction
+ - !type:AccessWireAction
diff --git a/Resources/Prototypes/_CorvaxNext/explosion.yml b/Resources/Prototypes/_CorvaxNext/explosion.yml
new file mode 100644
index 00000000000..bc45a4c98a7
--- /dev/null
+++ b/Resources/Prototypes/_CorvaxNext/explosion.yml
@@ -0,0 +1,16 @@
+- type: explosion
+ id: Bluespace
+ damagePerIntensity:
+ types:
+ Blunt: 5
+ Heat: 5
+ Cold: 5
+ Radiation: 30
+ tileBreakChance: [ 0, 0.5, 1 ]
+ tileBreakIntensity: [ 1, 5, 10 ]
+ tileBreakRerollReduction: 3
+ intensityPerState: 20
+ lightColor: Blue
+ fireColor: Blue
+ texturePath: /Textures/Effects/fire_greyscale.rsi
+ fireStates: 3
diff --git a/Resources/Prototypes/_CorvaxNext/tags.yml b/Resources/Prototypes/_CorvaxNext/tags.yml
index 59cdfd38c52..6f9058b1840 100644
--- a/Resources/Prototypes/_CorvaxNext/tags.yml
+++ b/Resources/Prototypes/_CorvaxNext/tags.yml
@@ -9,3 +9,6 @@
- type: Tag
id: Eyes
+
+- type: Tag
+ id: ArtificialBluespaceCrystal
diff --git a/Resources/Textures/_CorvaxNext/Objects/Structures/Power/bluespace_transitor.rsi/beam.png b/Resources/Textures/_CorvaxNext/Objects/Structures/Power/bluespace_transitor.rsi/beam.png
new file mode 100644
index 00000000000..7a143ccf963
Binary files /dev/null and b/Resources/Textures/_CorvaxNext/Objects/Structures/Power/bluespace_transitor.rsi/beam.png differ
diff --git a/Resources/Textures/_CorvaxNext/Objects/Structures/Power/bluespace_transitor.rsi/display.png b/Resources/Textures/_CorvaxNext/Objects/Structures/Power/bluespace_transitor.rsi/display.png
new file mode 100644
index 00000000000..894e8003955
Binary files /dev/null and b/Resources/Textures/_CorvaxNext/Objects/Structures/Power/bluespace_transitor.rsi/display.png differ
diff --git a/Resources/Textures/_CorvaxNext/Objects/Structures/Power/bluespace_transitor.rsi/idle.png b/Resources/Textures/_CorvaxNext/Objects/Structures/Power/bluespace_transitor.rsi/idle.png
new file mode 100644
index 00000000000..70a80615440
Binary files /dev/null and b/Resources/Textures/_CorvaxNext/Objects/Structures/Power/bluespace_transitor.rsi/idle.png differ
diff --git a/Resources/Textures/_CorvaxNext/Objects/Structures/Power/bluespace_transitor.rsi/meta.json b/Resources/Textures/_CorvaxNext/Objects/Structures/Power/bluespace_transitor.rsi/meta.json
new file mode 100644
index 00000000000..037bb438afa
--- /dev/null
+++ b/Resources/Textures/_CorvaxNext/Objects/Structures/Power/bluespace_transitor.rsi/meta.json
@@ -0,0 +1,40 @@
+{
+ "version": 1,
+ "license": "CC-BY-SA-3.0",
+ "copyright": "Taken from /vg/station at commit 5c50dee8fb2a55d6be3b3c9c90a782a618a5506e Cut out for unshaded by metalgearsloth",
+ "size": {
+ "x": 32,
+ "y": 32
+ },
+ "states": [
+ {
+ "name": "beam",
+ "delays": [
+ [
+ 0.1,
+ 0.1,
+ 0.1,
+ 0.1,
+ 0.1
+ ]
+ ]
+ },
+ {
+ "name": "idle",
+ "delays": [
+ [
+ 0.2,
+ 0.2,
+ 0.2,
+ 0.2
+ ]
+ ]
+ },
+ {
+ "name": "offline"
+ },
+ {
+ "name": "display"
+ }
+ ]
+}
diff --git a/Resources/Textures/_CorvaxNext/Objects/Structures/Power/bluespace_transitor.rsi/offline.png b/Resources/Textures/_CorvaxNext/Objects/Structures/Power/bluespace_transitor.rsi/offline.png
new file mode 100644
index 00000000000..e701d9994d2
Binary files /dev/null and b/Resources/Textures/_CorvaxNext/Objects/Structures/Power/bluespace_transitor.rsi/offline.png differ