From 77100a3951d4604eb282556e259fadc5fc47532f Mon Sep 17 00:00:00 2001
From: Tornado Tech <54727692+Tornado-Technology@users.noreply.github.com>
Date: Mon, 9 Dec 2024 15:36:18 +1000
Subject: [PATCH 01/10] Added artificial bluespace crystals
---
.../en-US/_corvaxnext/bluespace_harvester.ftl | 1 +
.../ru-RU/_corvaxnext/bluespace_harvester.ftl | 1 +
.../Entities/Structures/Machines/lathe.yml | 7 ++++++-
.../Devices/Circuitboards/Machine/production.yml | 2 +-
.../_CorvaxNext/Entities/Objects/Misc/parts.yml | 13 +++++++++++++
.../_CorvaxNext/Recipes/Lathes/parts.yml | 7 +++++++
.../_CorvaxNext/Research/experimental.yml | 16 +++++++++++++++-
.../_CorvaxNext/Stacks/science_stacks.yml | 5 +++++
Resources/Prototypes/_CorvaxNext/tags.yml | 3 +++
9 files changed, 52 insertions(+), 3 deletions(-)
create mode 100644 Resources/Prototypes/_CorvaxNext/Entities/Objects/Misc/parts.yml
create mode 100644 Resources/Prototypes/_CorvaxNext/Recipes/Lathes/parts.yml
create mode 100644 Resources/Prototypes/_CorvaxNext/Stacks/science_stacks.yml
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/Prototypes/Entities/Structures/Machines/lathe.yml b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml
index 97e8618ba2a..63e60cea642 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,9 @@
- ReagentGrinderIndustrialMachineCircuitboard
- JukeboxCircuitBoard
- SalvageExpeditionsComputerCircuitboard # Corvax-Cringe
- - MachineBluespaceHarvesterCircuitboard # Corvax-Next-BluespaceHarvester
+ # Corvax-Next-BluespaceHarvester-Start
+ - MachineBluespaceHarvesterCircuitboard
+ # 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..f430844f83a 100644
--- a/Resources/Prototypes/_CorvaxNext/Entities/Objects/Devices/Circuitboards/Machine/production.yml
+++ b/Resources/Prototypes/_CorvaxNext/Entities/Objects/Devices/Circuitboards/Machine/production.yml
@@ -13,7 +13,7 @@
Glass: 15
Steel: 15
CableHV: 5
- Manipulator: 5
+ ArtificialBluespaceCrystal: 5
Capacitor: 5
MatterBin: 15
tagRequirements:
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/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..c7e8966287f 100644
--- a/Resources/Prototypes/_CorvaxNext/Research/experimental.yml
+++ b/Resources/Prototypes/_CorvaxNext/Research/experimental.yml
@@ -1,5 +1,17 @@
-# Tier 2
+# Tier 1
+- type: technology
+ id: Bluespace
+ name: research-technology-bluespace
+ icon:
+ sprite: Objects/Misc/stock_parts.rsi
+ state: ansible_crystal
+ discipline: Experimental
+ tier: 1
+ cost: 5000
+ recipeUnlocks:
+ - ArtificialBluespaceCrystal
+# Tier 2
- type: technology
id: BluespaceMining
name: research-technology-bluespace-mining
@@ -11,3 +23,5 @@
cost: 10000
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/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
From c008a9872cca15b4787236fc20070552cca77550 Mon Sep 17 00:00:00 2001
From: Tornado Tech <54727692+Tornado-Technology@users.noreply.github.com>
Date: Mon, 9 Dec 2024 17:44:48 +1000
Subject: [PATCH 02/10] Added transitor
---
.../BluespaceHarvesterMenu.xaml | 2 -
.../BluespaceHarvesterMenu.xaml.cs | 3 +-
.../BluespaceHarvesterComponent.cs | 23 ++--
.../BluespaceHarvesterSystem.cs | 105 ++++++------------
.../BluespaceHarvesterUi.cs | 4 +-
.../Entities/Structures/Machines/lathe.yml | 1 +
.../Circuitboards/Machine/production.yml | 25 ++++-
.../Structures/Machines/bluespace.yml | 43 +++++++
.../Machines/bluespace_harvester.yml | 32 ++++--
.../Recipes/Lathes/electronics.yml | 11 +-
.../_CorvaxNext/Research/experimental.yml | 13 ++-
.../Prototypes/_CorvaxNext/Wires/layouts.yml | 7 ++
.../Prototypes/_CorvaxNext/explosion.yml | 16 +++
.../Power/bluespace_transitor.rsi/beam.png | Bin 0 -> 1582 bytes
.../Power/bluespace_transitor.rsi/display.png | Bin 0 -> 849 bytes
.../Power/bluespace_transitor.rsi/idle.png | Bin 0 -> 1063 bytes
.../Power/bluespace_transitor.rsi/meta.json | 40 +++++++
.../Power/bluespace_transitor.rsi/offline.png | Bin 0 -> 580 bytes
18 files changed, 217 insertions(+), 108 deletions(-)
create mode 100644 Resources/Prototypes/_CorvaxNext/Entities/Structures/Machines/bluespace.yml
create mode 100644 Resources/Prototypes/_CorvaxNext/Wires/layouts.yml
create mode 100644 Resources/Prototypes/_CorvaxNext/explosion.yml
create mode 100644 Resources/Textures/_CorvaxNext/Objects/Structures/Power/bluespace_transitor.rsi/beam.png
create mode 100644 Resources/Textures/_CorvaxNext/Objects/Structures/Power/bluespace_transitor.rsi/display.png
create mode 100644 Resources/Textures/_CorvaxNext/Objects/Structures/Power/bluespace_transitor.rsi/idle.png
create mode 100644 Resources/Textures/_CorvaxNext/Objects/Structures/Power/bluespace_transitor.rsi/meta.json
create mode 100644 Resources/Textures/_CorvaxNext/Objects/Structures/Power/bluespace_transitor.rsi/offline.png
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..7d9bebc5313 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..aad9b1a3c4a 100644
--- a/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterComponent.cs
+++ b/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterComponent.cs
@@ -7,10 +7,13 @@ 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]
+ [ViewVariables(VVAccess.ReadWrite)]
public bool Reseted;
///
@@ -109,28 +112,28 @@ public sealed partial class BluespaceHarvesterComponent : Component
[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 +149,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..a86f9f9b488 100644
--- a/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs
+++ b/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs
@@ -1,25 +1,22 @@
-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.Timing;
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,15 +24,15 @@ 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 },
- };
+ public List Taps =
+ [
+ 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 float _updateTimer;
private const float UpdateTime = 1.0f;
@@ -44,11 +41,18 @@ public override void Initialize()
{
base.Initialize();
+ SubscribeLocalEvent(ReceivedChanged);
SubscribeLocalEvent(OnTargetLevel);
SubscribeLocalEvent(OnBuy);
SubscribeLocalEvent(OnDestruction);
}
+ 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);
@@ -72,8 +76,18 @@ public override void Update(float frameTime)
// 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.ResetTime == TimeSpan.Zero)
+ {
+ if (harvester.ReceivedPower < harvester.DrawRate && harvester.CurrentLevel != 0)
+ harvester.ResetTime = _timing.CurTime;
+ }
+ else
+ {
+ if (harvester.ReceivedPower >= harvester.DrawRate)
+ harvester.ResetTime = TimeSpan.Zero;
+ }
+
+ if (harvester.ResetTime <= _timing.CurTime && harvester.ResetTime != TimeSpan.Zero)
{
// If there is insufficient production,
// it will reset itself (turn off) and you will need to start it again,
@@ -125,11 +139,10 @@ 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.Reseted)
return;
harvester.Comp.TargetLevel = args.TargetLevel;
- harvester.Comp.Reseted = true; // We start only after manual switching on.
UpdateUI(harvester.Owner, harvester.Comp);
}
@@ -184,13 +197,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 +279,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)
@@ -300,51 +314,6 @@ private int GetStableLevel(EntityUid uid, BluespaceHarvesterComponent? harvester
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))
- 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;
- }
-
private bool TryGetCategory(EntityUid uid, BluespaceHarvesterCategory target, [NotNullWhen(true)] out BluespaceHarvesterCategoryInfo? info, BluespaceHarvesterComponent? harvester = null)
{
info = null;
@@ -369,7 +338,7 @@ private void Reset(EntityUid uid, BluespaceHarvesterComponent? harvester = null)
return;
harvester.Danger += harvester.DangerFromReset;
- harvester.Reseted = true;
+ harvester.Reseted = 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/Prototypes/Entities/Structures/Machines/lathe.yml b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml
index 63e60cea642..740af449939 100644
--- a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml
+++ b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml
@@ -535,6 +535,7 @@
- SalvageExpeditionsComputerCircuitboard # Corvax-Cringe
# Corvax-Next-BluespaceHarvester-Start
- MachineBluespaceHarvesterCircuitboard
+ - MachineBluespaceTransitorCircuitboard
# Corvax-Next-BluespaceHarvester-End
# Corvax-Next-MutableLaws-Start
- AsimovCircuitBoard
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 f430844f83a..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:
@@ -16,9 +16,24 @@
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/Structures/Machines/bluespace.yml b/Resources/Prototypes/_CorvaxNext/Entities/Structures/Machines/bluespace.yml
new file mode 100644
index 00000000000..2a6e6fbf035
--- /dev/null
+++ b/Resources/Prototypes/_CorvaxNext/Entities/Structures/Machines/bluespace.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/Entities/Structures/Machines/bluespace_harvester.yml b/Resources/Prototypes/_CorvaxNext/Entities/Structures/Machines/bluespace_harvester.yml
index 5bd2672875b..bf08b794ecc 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,36 @@
- 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: ActivatableUIRequiresPower
- 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 +98,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/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/Research/experimental.yml b/Resources/Prototypes/_CorvaxNext/Research/experimental.yml
index c7e8966287f..7f525a90ffc 100644
--- a/Resources/Prototypes/_CorvaxNext/Research/experimental.yml
+++ b/Resources/Prototypes/_CorvaxNext/Research/experimental.yml
@@ -1,4 +1,4 @@
-# Tier 1
+# Tier 2
- type: technology
id: Bluespace
name: research-technology-bluespace
@@ -6,12 +6,13 @@
sprite: Objects/Misc/stock_parts.rsi
state: ansible_crystal
discipline: Experimental
- tier: 1
- cost: 5000
+ tier: 2
+ cost: 25000
recipeUnlocks:
- ArtificialBluespaceCrystal
+ - MachineBluespaceTransitorCircuitboard
-# Tier 2
+# Tier 3
- type: technology
id: BluespaceMining
name: research-technology-bluespace-mining
@@ -19,8 +20,8 @@
sprite: Objects/Misc/stock_parts.rsi
state: ansible_crystal
discipline: Experimental
- tier: 2
- cost: 10000
+ tier: 3
+ cost: 30000
recipeUnlocks:
- MachineBluespaceHarvesterCircuitboard
technologyPrerequisites:
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/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 0000000000000000000000000000000000000000..7a143ccf96370e3524f9674c195f2f54407f1d50
GIT binary patch
literal 1582
zcmV+}2GRM6P)EX>4Tx04R}tkv&MmKpe$i6Gf4#g9Sw#GE^rEq9Tq`#UfZJZG~1HOfLO`CJjl7
zi=*ILaPVWX>fqw6tAnc`2!4P#Iyou2NQwVT3N2zhIPS;0dyl(!fKV?p&FYu{G~G6n
zv8a^Eu1a065FnxtgAiqA8S&I&8ouM}9s$1IMR=C~xj#p*nzI-Xkcj7)VcNtS#50?=
z!FiuJ#EP;?d`>)W(glehxvqHp#<}3Kz%xT;Iyp}qB9;nmth6yJni}ymaah%K$`>*o
ztDLtuYvn3y-jlyDnA2BMT&FpL7?u!60umHdQ9>CuBDCtHSV+=-)W<*U`V-_*$W;O(
z#{w$QAiI9>Klt6Pm7kjQl7dm7^TlyKMuDzfpiy(2?_@z%9_T=JnRx$LRx*rmmK6fP+I|
ztU%f8KJV^s@9p0+&HjD>|FCj-!P6_A000DKNkl+^X5ro3g6Yc_DskK-T
z4;qIf*Ch9nyqA~cj0b!=;+fAh08bd+Tl
zIMMFD`C3&S#mxdC4agg3ssuUF@BYzQWkJ}qGj0|LWq_yjP|Uv*y#~ff5!J|q%wbpoAy}cyR9s+>oXb9==7K`APABhZ~G|x94uMjj(%JwoNO+j
z_8~^o75OAt5Zi#R*|JNz0$sDkB@4P{%QmJVQ~loU=K~|UX3I8a08XCt2l&V5H?hu%
zHGrhFsI?+$bb6rHijgw}+ES%GjgEe`Rz&S1h}5?>bfm3Q>aThu-WlBTjq6_hLx4*^
z-@~H0Wh?b%v}kS(nPF9Rq^$<)4;ercQ6*g={Zr!ecFmTJ#>viUOcTq~>Cc{S7b@Gf
zQeQ>@0NELW@<-soh@g$kz9t0x&*%H7(BUSyIQwn_f)7LMKDbQ-~oa#-M0FF=fi^dYPPWpfA
z9Ou@@y_ClqKzyP1U)k#02V9;?0swR$H*NLB96$X^(^fah^^@<4a77#sE}lOpyuR48
zps8$UK|}hJ?D}ja$ZXj(wKZu((@*>!AfZEc#^n%c0B58DoRJ1_MjF5wX#i)K4Dk2J
zXZ425~v@>1$7G~)vP+o#C{m(zTx6ZPMr2VNgpBuaGk(m+iub*10s|b
zQiw|sF3N-U0mxE>BeVAba`4F^z6V4NDos0H8i-n!5_uE>kY3c24y>qI7ij=4`kn2=
z`a1R))-3R>`(hl}yk|zJ0a2yr+T|;O$Fi7^WHjeJGXf1D8N9>tYO+^D3Gej@Nf4R=
zQPH!zAAa(*Z^&t`Psj?U&bavk-_A6ioq0)tH9%X7o_4CWBHG<2=+CdxuTtT?J|Ro6
z>jTgP*}?M#@Alt&AMic!6LkIgWa{axPskd!^#S7sz`r)X^#KkE>!(E`y`gjFj@_&+
z_18%~{AjB$Z}Dr6<-9(DmPDQfIfD-XFmdrJ<0Ub|d3{0>u+4%l$XO68a(zIC;7X80
gB9TZW63N-*Kkq&TB(R5l3jhEB07*qoM6N<$g0wOM?f?J)
literal 0
HcmV?d00001
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 0000000000000000000000000000000000000000..894e800395542c21997f3ffb881616d07fab5005
GIT binary patch
literal 849
zcmV-X1FrmuP)Px&3rR#lR9J=8S3gV>Q5^n`dTI`hSb@v671~gVVk%9++N3Ea+Jv|;5f@3^3yDmQ
z#@UHMbZ}u%2SkD}J2*7dilk@=OMyaCnks2J2+_RYbExll*Xz-{12uk2-@QM-@B4l4
z_g?P={6>qSz$%pCEm|0N31;ViEfjQp4VGCsa{kvYYzsIl*b-2k^gfYJeyI
z<5#iOKODf?i8xdd=1LVZyY|-=V3a)}5+y{U?wxmPyLygUG1e}k`;~yAxGS6(T7-D<
zIyx?2f++6VJ_&{b`0QD`@MzzSAJ0R`mx0yg70o(L=8g4>R40HCiMDn2=oS$oQ4)Ph
zH^=-SM55)y3fxVAV>k;!B)XY-quUN9xUI9N<~C^r5F$~xEYst@E|C5?^_;Wd@mK(%
zE+4#})3`Hu6S4V0cjhEs
zOug0gCsS$kc^v5TI5aV8k?R~_U`{YGECUt@05St<)#l)A*l-?;lP?y9THgi7bUjs>
z^TBuoXT!)0q*e0jdAyi|U?_kO7L8O$uJ-l<0LC6aQAIF}jwAp89~Kq>0LfI^lmOip
zxMi6Fm3m-ftgo7k2NT6mYrW|js0S8sbR?k?^MppIRRgvJ@FL8T8ws%ePRK~jk{jWl
bf13RQCZxMWJpdD_00000NkvXXu0mjf4Yh+>
literal 0
HcmV?d00001
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 0000000000000000000000000000000000000000..70a80615440f1d2d62e07e94663efd04bd276e6e
GIT binary patch
literal 1063
zcmV+?1laqDP)EX>4Tx04R}tkv&MmKpe$i6Gf4#g9Sw#GE^rEq9Tq`#UfZJZG~1HOfLO`CJjl7
zi=*ILaPVWX>fqw6tAnc`2!4P#Iyou2NQwVT3N2zhIPS;0dyl(!fKV?p&FYu{G~G6n
zv8a^Eu1a065FnxtgAiqA8S&I&8ouM}9s$1IMR=C~xj#p*nzI-Xkcj7)VcNtS#50?=
z!FiuJ#EP;?d`>)W(glehxvqHp#<}3Kz%xT;Iyp}qB9;nmth6yJni}ymaah%K$`>*o
ztDLtuYvn3y-jlyDnA2BMT&FpL7?u!60umHdQ9>CuBDCtHSV+=-)W<*U`V-_*$W;O(
z#{w$QAiI9>Klt6Pm7kjQl7dm7^TlyKMuDzfpiy(2?_@z%9_T=JnRx$LRx*rmmK6fP+I|
ztU%f8KJV^s@9p0+&HjD>|FCj-!P6_A0007BNklf+hesp*1mB-lom}a-T
z_g=qu*Aw3ZAP9mW2!bF8f*=TD+X&=_Fp7+wqfyR^+qfDNU*{~piIo_?g)YBbqexj4
zO52W0LOF1jFKYWoqnx?Kca4+Hrb?UX;*|jaEc+7%01&2wAe&7gOb3D34gm0R
z`tW0XU4BJ?x*3&8;*M=s>$s+V@AoIcvOi%vk7t$O$;kYM0k8|eh6KPa02>kjy8vuR0PF&=SxW$4rsrQ^Edgvy&$gUl-{Lz7ASbUg
z9ouq-#osi6*PQ~c
hZ2cA>2!bHCnNM?FWf8=+Bs2g3002ovPDHLkV1jyG_Qe1I
literal 0
HcmV?d00001
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 0000000000000000000000000000000000000000..e701d9994d2227227fad91902511f593dfac985e
GIT binary patch
literal 580
zcmV-K0=xZ*P)o*=%i_)!Y6qyYqPa{{MMzW+5gfCMG5(CIV^0l2L1%
zi6U$*F3{gb0_>0biKu2yMY-OT#Y{?;>&?hrn2NMv$zmoYqmE&sZE3@j*5U#m*4`w7
zasS#pyX(EXKQCxCg5xOHo3g+CDRfL;AZ=JOJAaM?cL#vaU%w~(!pk>GnC2X9yF;y7
z;bZ?Bqpf$$UAf6s>!KHT-4U&gu4bf|Ny$>RL2oc*_~nOY#5;uh<9>p9A^nDwFrbOI
z?GD!}HAY)#;_9isX>IVk-Y#8xm86-U=z_KoLdZfcOV?fvb}BNe1CHZpnxWTFB^Pp8
z0D6PrVSC4Wn8qybc#rd!F0;P!kmXyqwYX`_(t7iQZs1kyOZKY1itHs-Phf=jcsoKzLgzX+eZUOumg)-ycfr_ca3XnAON9L(IVd8MipU^*o
zAW1XNfxF|02lM{c_7fTK7pqk(09;>M0^t6GN1h4Ay}Ne+c)z&`K-=z|$iPHfggCs4
z{+6j&P|S}qr3m}}s4<)xA%qk{$fr*pOZ7f&t*IUPMgQ5(qL`SLnd4LbFTVgUq3&3M
S;;TLY0000
Date: Mon, 9 Dec 2024 18:03:50 +1000
Subject: [PATCH 03/10] Updated locale & minor fixes
---
.../objects/devices/circuitboards/machine/production.ftl | 5 +++++
.../Locale/ru-RU/_corvaxnext/entities/objects/misc/parts.ftl | 2 ++
.../entities/structures/machines/bluespace_harvester.ftl | 2 ++
.../_corvaxnext/entities/structures/power/substations.ftl | 2 ++
Resources/Locale/ru-RU/_corvaxnext/wires/wire-names.ftl | 1 +
.../Entities/Structures/Machines/bluespace_harvester.yml | 1 -
.../{Machines/bluespace.yml => Power/substations.yml} | 0
7 files changed, 12 insertions(+), 1 deletion(-)
create mode 100644 Resources/Locale/ru-RU/_corvaxnext/entities/objects/devices/circuitboards/machine/production.ftl
create mode 100644 Resources/Locale/ru-RU/_corvaxnext/entities/objects/misc/parts.ftl
create mode 100644 Resources/Locale/ru-RU/_corvaxnext/entities/structures/machines/bluespace_harvester.ftl
create mode 100644 Resources/Locale/ru-RU/_corvaxnext/entities/structures/power/substations.ftl
create mode 100644 Resources/Locale/ru-RU/_corvaxnext/wires/wire-names.ftl
rename Resources/Prototypes/_CorvaxNext/Entities/Structures/{Machines/bluespace.yml => Power/substations.yml} (100%)
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/_CorvaxNext/Entities/Structures/Machines/bluespace_harvester.yml b/Resources/Prototypes/_CorvaxNext/Entities/Structures/Machines/bluespace_harvester.yml
index bf08b794ecc..62a7fc82502 100644
--- a/Resources/Prototypes/_CorvaxNext/Entities/Structures/Machines/bluespace_harvester.yml
+++ b/Resources/Prototypes/_CorvaxNext/Entities/Structures/Machines/bluespace_harvester.yml
@@ -71,7 +71,6 @@
maxIntensity: 2500
- type: ActivatableUI
key: enum.BluespaceHarvesterUiKey.Key
- - type: ActivatableUIRequiresPower
- type: UserInterface
interfaces:
enum.BluespaceHarvesterUiKey.Key:
diff --git a/Resources/Prototypes/_CorvaxNext/Entities/Structures/Machines/bluespace.yml b/Resources/Prototypes/_CorvaxNext/Entities/Structures/Power/substations.yml
similarity index 100%
rename from Resources/Prototypes/_CorvaxNext/Entities/Structures/Machines/bluespace.yml
rename to Resources/Prototypes/_CorvaxNext/Entities/Structures/Power/substations.yml
From c70c9d364fad849198f210af354b4ff58ba31d4f Mon Sep 17 00:00:00 2001
From: Tornado Tech <54727692+Tornado-Technology@users.noreply.github.com>
Date: Mon, 9 Dec 2024 18:30:38 +1000
Subject: [PATCH 04/10] Xddd
---
.../BluespaceHarvesterComponent.cs | 3 ++
.../BluespaceHarvesterSystem.cs | 50 ++++++++++++-------
2 files changed, 35 insertions(+), 18 deletions(-)
diff --git a/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterComponent.cs b/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterComponent.cs
index aad9b1a3c4a..b065b4f060d 100644
--- a/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterComponent.cs
+++ b/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterComponent.cs
@@ -109,6 +109,9 @@ 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()
{
diff --git a/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs b/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs
index a86f9f9b488..d4075356253 100644
--- a/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs
+++ b/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs
@@ -24,7 +24,7 @@ public sealed class BluespaceHarvesterSystem : EntitySystem
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly SharedAmbientSoundSystem _ambientSound = default!;
- public List Taps =
+ private readonly List _taps =
[
new BluespaceHarvesterTap { Level = 0, Visual = BluespaceHarvesterVisuals.Tap0 },
new BluespaceHarvesterTap { Level = 1, Visual = BluespaceHarvesterVisuals.Tap1 },
@@ -37,16 +37,41 @@ public sealed class BluespaceHarvesterSystem : EntitySystem
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)
+ {
+ var query = EntityQueryEnumerator();
+ while (query.MoveNext(out _, out var harvester))
+ {
+ harvester.Harvesters++;
+ }
+ }
+
+ private void OnRemove(Entity ent, ref ComponentRemove args)
+ {
+ var query = EntityQueryEnumerator();
+ while (query.MoveNext(out _, out var harvester))
+ {
+ harvester.Harvesters--;
+ }
+ }
+
private void ReceivedChanged(Entity ent, ref PowerConsumerReceivedChanged args)
{
ent.Comp.ReceivedPower = args.ReceivedPower;
@@ -67,8 +92,6 @@ 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;
@@ -76,18 +99,7 @@ public override void Update(float frameTime)
// 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.
- if (harvester.ResetTime == TimeSpan.Zero)
- {
- if (harvester.ReceivedPower < harvester.DrawRate && harvester.CurrentLevel != 0)
- harvester.ResetTime = _timing.CurTime;
- }
- else
- {
- if (harvester.ReceivedPower >= harvester.DrawRate)
- harvester.ResetTime = TimeSpan.Zero;
- }
-
- if (harvester.ResetTime <= _timing.CurTime && harvester.ResetTime != TimeSpan.Zero)
+ 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,
@@ -171,7 +183,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;
@@ -279,7 +291,7 @@ private int GetPointGeneration(EntityUid uid, BluespaceHarvesterComponent? harve
if (!Resolve(uid, ref harvester))
return 0;
- return harvester.CurrentLevel * 4 * (Emagged(uid) ? 2 : 1) + (harvester.ResetTime == TimeSpan.Zero ? 1 : 0);
+ return harvester.CurrentLevel * 4 * (Emagged(uid) ? 2 : 1) * (harvester.ResetTime == TimeSpan.Zero ? 1 : 0);
}
private int GetDangerPointGeneration(EntityUid uid, BluespaceHarvesterComponent? harvester = null)
@@ -288,7 +300,6 @@ private int GetDangerPointGeneration(EntityUid uid, BluespaceHarvesterComponent?
return 0;
var stable = GetStableLevel(uid, harvester);
-
if (harvester.CurrentLevel < stable && harvester.CurrentLevel != 0)
return -1;
@@ -311,6 +322,9 @@ private int GetStableLevel(EntityUid uid, BluespaceHarvesterComponent? harvester
if (!Resolve(uid, ref harvester))
return 0;
+ if (harvester.Harvesters > 1)
+ return 0;
+
return Emagged(uid) ? harvester.EmaggedStableLevel : harvester.StableLevel;
}
From e963578dbc7ef06fcb1fe77645cd7e9bc3f66adc Mon Sep 17 00:00:00 2001
From: Tornado Tech <54727692+Tornado-Technology@users.noreply.github.com>
Date: Mon, 9 Dec 2024 18:53:18 +1000
Subject: [PATCH 05/10] Update
Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterMenu.xaml.cs
Co-authored-by: FN <37689533+FireNameFN@users.noreply.github.com>
---
.../BluespaceHarvester/BluespaceHarvesterMenu.xaml.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterMenu.xaml.cs b/Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterMenu.xaml.cs
index 7d9bebc5313..795fab0b0ad 100644
--- a/Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterMenu.xaml.cs
+++ b/Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterMenu.xaml.cs
@@ -47,7 +47,7 @@ public void UpdateState(BluespaceHarvesterBoundUserInterfaceState state)
{
var child = new BluespaceHarvesterCategory(category, state.Points >= category.Cost);
- child.CategoryButton.OnButtonDown += (_) =>
+ child.CategoryButton.OnButtonDown += _ =>
{
_owner.SendBuy(category.Type);
};
From 1d3335c021e9de6a13362b28cb8b68a454a17a48 Mon Sep 17 00:00:00 2001
From: Tornado Tech <54727692+Tornado-Technology@users.noreply.github.com>
Date: Mon, 9 Dec 2024 18:53:35 +1000
Subject: [PATCH 06/10] Update
Resources/Prototypes/_CorvaxNext/Entities/Structures/Power/substations.yml
Co-authored-by: FN <37689533+FireNameFN@users.noreply.github.com>
---
.../_CorvaxNext/Entities/Structures/Power/substations.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Resources/Prototypes/_CorvaxNext/Entities/Structures/Power/substations.yml b/Resources/Prototypes/_CorvaxNext/Entities/Structures/Power/substations.yml
index 2a6e6fbf035..da269b60107 100644
--- a/Resources/Prototypes/_CorvaxNext/Entities/Structures/Power/substations.yml
+++ b/Resources/Prototypes/_CorvaxNext/Entities/Structures/Power/substations.yml
@@ -1,7 +1,7 @@
- type: entity
parent: BaseSubstation
id: BluespaceTransitor
- name: bluespace T.R.A.N.S.I.T.O.R
+ name: bluespace T.R.A.N.S.I.T.O.R.
components:
- type: Battery
startingCharge: 2500000
From 0213b24bbdf189775b99aebe8806b9db0b11eb80 Mon Sep 17 00:00:00 2001
From: Tornado Tech <54727692+Tornado-Technology@users.noreply.github.com>
Date: Mon, 9 Dec 2024 18:53:43 +1000
Subject: [PATCH 07/10] Update
Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs
Co-authored-by: FN <37689533+FireNameFN@users.noreply.github.com>
---
.../BluespaceHarvester/BluespaceHarvesterSystem.cs | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs b/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs
index d4075356253..0c456bb685d 100644
--- a/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs
+++ b/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs
@@ -26,12 +26,12 @@ public sealed class BluespaceHarvesterSystem : EntitySystem
private readonly List _taps =
[
- 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 },
+ 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;
From 5e35fc47e9d14d17650fef39f762ed2569ed72a4 Mon Sep 17 00:00:00 2001
From: Tornado Tech <54727692+Tornado-Technology@users.noreply.github.com>
Date: Mon, 9 Dec 2024 18:54:33 +1000
Subject: [PATCH 08/10] Rename reseted to reset
---
.../BluespaceHarvesterComponent.cs | 2 +-
.../BluespaceHarvester/BluespaceHarvesterSystem.cs | 14 +++++++-------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterComponent.cs b/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterComponent.cs
index b065b4f060d..9a31af0d60c 100644
--- a/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterComponent.cs
+++ b/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterComponent.cs
@@ -14,7 +14,7 @@ public sealed partial class BluespaceHarvesterComponent : Component
/// Responsible for forcibly turning off the harvester and blocking input level.
///
[ViewVariables(VVAccess.ReadWrite)]
- public bool Reseted;
+ public bool Reset;
///
/// The current level at which the harvester is located is what other parameters are calculated from.
diff --git a/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs b/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs
index d4075356253..352dbbf04e2 100644
--- a/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs
+++ b/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs
@@ -93,8 +93,8 @@ public override void Update(float frameTime)
while (query.MoveNext(out var uid, out var harvester, out var consumer))
{
// 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.
@@ -107,7 +107,7 @@ public override void Update(float frameTime)
Reset(uid, harvester);
}
- if (harvester.Reseted)
+ if (harvester.Reset)
{
if (harvester.CurrentLevel < harvester.TargetLevel)
harvester.CurrentLevel++;
@@ -136,7 +136,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);
@@ -151,7 +151,7 @@ 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)
+ if (!harvester.Comp.Reset)
return;
harvester.Comp.TargetLevel = args.TargetLevel;
@@ -160,7 +160,7 @@ private void OnTargetLevel(Entity harvester, ref Bl
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))
@@ -352,7 +352,7 @@ private void Reset(EntityUid uid, BluespaceHarvesterComponent? harvester = null)
return;
harvester.Danger += harvester.DangerFromReset;
- harvester.Reseted = false;
+ harvester.Reset = false;
harvester.TargetLevel = 0;
}
From 57329f9f23e9da4e122dcabc6a5f189b920b80f5 Mon Sep 17 00:00:00 2001
From: Tornado Tech <54727692+Tornado-Technology@users.noreply.github.com>
Date: Mon, 9 Dec 2024 19:38:17 +1000
Subject: [PATCH 09/10] Separated map count
---
.../BluespaceHarvesterSystem.cs | 32 +++++++++++++++----
1 file changed, 25 insertions(+), 7 deletions(-)
diff --git a/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs b/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs
index 978bd712aa1..4af8f65fa03 100644
--- a/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs
+++ b/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs
@@ -9,6 +9,7 @@
using System.Linq;
using Content.Server.Power.EntitySystems;
using Robust.Shared.Audio.Systems;
+using Robust.Shared.Map;
using Robust.Shared.Timing;
namespace Content.Server._CorvaxNext.BluespaceHarvester;
@@ -56,19 +57,36 @@ public override void Initialize()
private void OnStartup(Entity ent, ref ComponentStartup args)
{
- var query = EntityQueryEnumerator();
- while (query.MoveNext(out _, out var harvester))
- {
- harvester.Harvesters++;
- }
+ UpdateCount();
}
private void OnRemove(Entity ent, ref ComponentRemove args)
{
+ UpdateCount();
+ }
+
+ private void UpdateCount()
+ {
+ var dictionary = new Dictionary>();
+
var query = EntityQueryEnumerator();
- while (query.MoveNext(out _, out var harvester))
+ while (query.MoveNext(out var entityUid, out _))
+ {
+ var mapId = Transform(entityUid).MapID;
+ if (!dictionary.TryGetValue(mapId, out var list))
+ {
+ dictionary[mapId] = [];
+ list = dictionary[mapId];
+ }
+
+ list.Add(entityUid);
+ }
+
+ query = EntityQueryEnumerator();
+ while (query.MoveNext(out var entityUid, out var harvester))
{
- harvester.Harvesters--;
+ var mapId = Transform(entityUid).MapID;
+ harvester.Harvesters = dictionary[mapId].Count;
}
}
From 4b722e5387afc7d1e03302e786e810dcb88a0a99 Mon Sep 17 00:00:00 2001
From: Tornado Tech <54727692+Tornado-Technology@users.noreply.github.com>
Date: Mon, 9 Dec 2024 19:58:01 +1000
Subject: [PATCH 10/10] Update BluespaceHarvesterSystem.cs
---
.../BluespaceHarvester/BluespaceHarvesterSystem.cs | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs b/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs
index 4af8f65fa03..a9c9013b5f8 100644
--- a/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs
+++ b/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs
@@ -11,6 +11,7 @@
using Robust.Shared.Audio.Systems;
using Robust.Shared.Map;
using Robust.Shared.Timing;
+using Robust.Shared.Utility;
namespace Content.Server._CorvaxNext.BluespaceHarvester;
@@ -73,12 +74,7 @@ private void UpdateCount()
while (query.MoveNext(out var entityUid, out _))
{
var mapId = Transform(entityUid).MapID;
- if (!dictionary.TryGetValue(mapId, out var list))
- {
- dictionary[mapId] = [];
- list = dictionary[mapId];
- }
-
+ var list = dictionary.GetOrNew(mapId);
list.Add(entityUid);
}