mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-18 22:18:52 +03:00
# Description This PR fully replaces the "Tier 3 Tech Lockout" with a research softcap. How it works is that technologies are allowed to set a softcap contribution, meaning that they multiplicatively increase the cost of all other research by a certain amount. By default, this is done by all Tier 3 Technologies. Essentially, this means that you're no longer limited to a single research category's tier 3 selections. Instead the costs of research increase the more capstones you unlock. The current cost increase for research is displayed on the console. <details><summary><h1>Media</h1></summary> <p>  </p> </details> # Changelog 🆑 - remove: Removed the "Tier 3 Tech Lockout" mechanic. You are no longer limited to 1 discipline worth of t3 research. - add: Research is now "Softcapped" by Tier 3 unlocks. Each unlocked Tier 3 technology multiplicatively increases the cost of all other research. Rushing a capstone can be quite expensive, as will be getting multiple capstones. I hope you're glad that you can build more than one prober now without guaranteeing the station will explode. (cherry picked from commit b7da1f4ff64ca3ce8c4dc4545186573174b3e89c)
41 lines
1.7 KiB
C#
41 lines
1.7 KiB
C#
using Content.Shared.Research.Components;
|
|
using Content.Shared.Research.Prototypes;
|
|
using Robust.Client.AutoGenerated;
|
|
using Robust.Client.GameObjects;
|
|
using Robust.Client.UserInterface;
|
|
using Robust.Client.UserInterface.XAML;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Utility;
|
|
|
|
namespace Content.Client.Research.UI;
|
|
|
|
[GenerateTypedNameReferences]
|
|
public sealed partial class TechnologyCardControl : Control
|
|
{
|
|
public Action? OnPressed;
|
|
|
|
public TechnologyCardControl(TechnologyPrototype technology, IPrototypeManager prototypeManager, SpriteSystem spriteSys, FormattedMessage description, int points, bool hasAccess, TechnologyDatabaseComponent database)
|
|
{
|
|
RobustXamlLoader.Load(this);
|
|
|
|
var discipline = prototypeManager.Index<TechDisciplinePrototype>(technology.Discipline);
|
|
Background.ModulateSelfOverride = discipline.Color;
|
|
|
|
DisciplineTexture.Texture = spriteSys.Frame0(discipline.Icon);
|
|
TechnologyNameLabel.Text = Loc.GetString(technology.Name);
|
|
var message = new FormattedMessage();
|
|
message.AddMarkup(Loc.GetString("research-console-tier-discipline-info",
|
|
("tier", technology.Tier), ("color", discipline.Color), ("discipline", Loc.GetString(discipline.Name))));
|
|
TierLabel.SetMessage(message);
|
|
UnlocksLabel.SetMessage(description);
|
|
|
|
TechnologyTexture.Texture = spriteSys.Frame0(technology.Icon);
|
|
|
|
if (!hasAccess)
|
|
ResearchButton.ToolTip = Loc.GetString("research-console-no-access-popup");
|
|
|
|
ResearchButton.Disabled = points < technology.Cost * database.SoftCapMultiplier || !hasAccess;
|
|
ResearchButton.OnPressed += _ => OnPressed?.Invoke();
|
|
}
|
|
}
|