Compare commits

..

6 commits

Author SHA1 Message Date
af3e32d9de ResearchTree: add OS T2 nodes and IDs. 2021-08-07 15:29:24 +02:00
08c1aa1050 SaveTool: refresh unlocks when profile is updated. 2021-08-07 15:29:00 +02:00
7cfb8bbbcb SaveTool: read OS and arch unlocks on tree initialisation. 2021-08-07 15:13:51 +02:00
609404d181 NodeIDs: fix an enumerator's name. 2021-08-07 14:54:09 +02:00
59c6f2d51f NodeIDs: fixed an enumerator's name. 2021-08-07 14:52:50 +02:00
d9ca0f3c83 SaveTool: fix a node styling issue.
Unlocked children of locked nodes, as well as tooltips for locked nodes,
used the "disabled text" colour when they shouldn't.
2021-08-07 14:48:18 +02:00
4 changed files with 79 additions and 20 deletions

View file

@ -93,17 +93,17 @@ enum OSIDs: Int {
LongRange1 = 400030,
// Tier 2
SparkOS,
ImprovedNeuralOS,
EnhancedSkeletonOS,
ExtendedArtsLibrary,
SustainableShield1,
Shields2,
SustainableRecharger1,
Enhancements2,
FuelSave2,
LongRange2,
EmpoweredArtsLibrary,
SparkOS = 310010,
ImprovedNeuralOS = 310050,
EnhancedSkeletonOS = 310030,
ExtendedArtsLibrary = 310100,
SustainableShields1 = 410011,
Shields2 = 410010,
SustainableRecharger1 = 410052,
Enhancements2 = 410050,
FuelSave2 = 410051,
LongRange2 = 410030,
EmpoweredArtsLibrary = 310101,
//Tier 3
BlazeOS,
@ -142,7 +142,7 @@ enum OSIDs: Int {
SpartoiOS,
SustainableShields4,
Shields5,
SustainableRecharger5,
SustainableRecharger4,
Enhancements5,
FuelSave5,
LongRange5,

View file

@ -358,12 +358,64 @@ void ResearchTree::generateOSTree() {
"Controlling module that helps in stabilisation for higher accuracy and reload speed.",
"Accuracy +2, Fuel burn rate +50, Magazine reload +25, Energy recharge +33", ""});
// T2
_osNodes.emplace(SparkOS, Node{Node::Type::OS, "Spark OS", 2, 3,
"An OS equipped with an enhanced AI for M.A.S.S. control called \"Spark\".",
"Accuracy +31, Shield +1872, Fuel burn rate +200, Magazine reload +54, Energy recharge +93, Shield recover +2040",
"Shield +3%"});
_osNodes.emplace(ImprovedNeuralOS, Node{Node::Type::OS, "Improved Neural OS", 2, 3,
"An improved version of the Neural OS that improves synchronisation.",
"Accuracy +14, Shield +1296, Fuel burn rate +50, Magazine reload +68, Energy recharge +117, Shield recover +3230",
"Magazine reload +3%, Energy recharge +3%"});
_osNodes.emplace(EnhancedSkeletonOS, Node{Node::Type::OS, "Enhanced Skeleton OS", 2, 3,
"An updated version of the ExoSkel OS that improves weight simulation.",
"Accuracy +59, Shield +1080, Fuel burn rate +300, Magazine reload +68, Energy recharge +117, Shield recover +765",
"Accuracy +3%"});
_osNodes.emplace(ExtendedArtsLibrary, Node{Node::Type::OS, "Extended Arts Library", 2, 0,
"Enable the usage of Extended Combos in close combat attacks.",
"", ""});
_osNodes.emplace(SustainableShields1, Node{Node::Type::Module, "Sustainable Shields 1", 2, 0,
"A module that efficiently converts energy into shields.",
"Shields +216", ""});
_osNodes.emplace(Shields2, Node{Node::Type::Module, "Shields 2", 2, 0,
"Level 2 Module that helps in optimising shield usage.",
"Shield +180, Fuel burn rate +25, Shield recover +675", ""});
_osNodes.emplace(SustainableRecharger1, Node{Node::Type::Module, "Sustainable Recharger 1", 2, 0,
"Energy-saving shield recharging module.",
"Shield recover +1350", ""});
_osNodes.emplace(Enhancements2, Node{Node::Type::Module, "Enhancements 2", 2, 0,
"Level 2 Overall enhancement module.",
"Accuracy +3, Shield +108, Magazine reload +15, Energy recharge +19, Fuel burn rate -6, Shield recover +225", ""});
_osNodes.emplace(FuelSave2, Node{Node::Type::Module, "Fuel Save 2", 2, 0,
"Level 2 Optimisation module for energy usage of the M.A.S.S. frame.",
"Fuel burn rate -12, Fuel recharge +7", ""});
_osNodes.emplace(LongRange2, Node{Node::Type::Module, "Long Range 2", 2, 0,
"Level 2 Controlling module that helps in stabilisation for higher accuracy and reload speed.",
"Accuracy +5, Fuel burn rate +50, Magazine reload +31, Energy recharge +38", ""});
_osNodes.emplace(EmpoweredArtsLibrary, Node{Node::Type::OS, "Empowered Arts Library", 2, 0,
"Enable the usage of Empowered Combos in close combat attacks.",
"", ""});
#define osAddChild(parent, child) _osNodes.at(parent).addChild(_osNodes.at(child));
osAddChild(NeuralOS, Shields1)
osAddChild(NeuralOS, Enhancements1)
osAddChild(NeuralOS, ExoSkelOS)
osAddChild(ExoSkelOS, FuelSave1)
osAddChild(ExoSkelOS, LongRange1)
osAddChild(Shields1, SparkOS)
osAddChild(Enhancements1, ImprovedNeuralOS)
osAddChild(FuelSave1, ImprovedNeuralOS)
osAddChild(LongRange1, EnhancedSkeletonOS)
osAddChild(SparkOS, SustainableShields1)
osAddChild(SparkOS, Shields2)
osAddChild(SparkOS, SustainableRecharger1)
osAddChild(ImprovedNeuralOS, SustainableRecharger1)
osAddChild(ImprovedNeuralOS, Enhancements2)
osAddChild(ImprovedNeuralOS, FuelSave2)
osAddChild(EnhancedSkeletonOS, FuelSave2)
osAddChild(EnhancedSkeletonOS, LongRange2)
osAddChild(EnhancedSkeletonOS, ExtendedArtsLibrary)
osAddChild(ExtendedArtsLibrary, EmpoweredArtsLibrary)
#undef osAddChild
_osNodes.at(NeuralOS).setState(Node::State::Unlocked);

View file

@ -190,6 +190,8 @@ void SaveTool::handleFileAction(efsw::WatchID watch_id,
_currentProfile->refreshValues();
if(_tree) {
_tree->readEngineUnlocks(_currentProfile->engineInventory(), _currentProfile->gearInventory());
_tree->readOSUnlocks(_currentProfile->osInventory(), _currentProfile->moduleInventory());
_tree->readArchUnlocks(_currentProfile->archInventory(), _currentProfile->techInventory());
}
}
else if(Utility::String::endsWith(filename, _currentProfile->steamId() + ".sav")) {

View file

@ -402,8 +402,10 @@ void SaveTool::drawResearchTree() {
_tree->readEngineUnlocks(_currentProfile->engineInventory(), _currentProfile->gearInventory());
_tree->generateOSTree();
_tree->readOSUnlocks(_currentProfile->osInventory(), _currentProfile->moduleInventory());
_tree->generateArchTree();
_tree->readArchUnlocks(_currentProfile->archInventory(), _currentProfile->techInventory());
}
if(ImGui::BeginTabBar("##TreeTabBar")) {
@ -500,6 +502,9 @@ void SaveTool::drawNode(Node& node) {
}
if(has_children) {
bool open = ImGui::TreeNodeEx(node.name(), ImGuiTreeNodeFlags_SpanAvailWidth|(node.state() == Node::State::Unlocked ? ImGuiTreeNodeFlags_Selected : 0));
if(node.state() == Node::State::Unavailable) {
ImGui::PopStyleColor();
}
nodeTooltip();
if(open) {
for(Node* child : node.children()) {
@ -511,11 +516,11 @@ void SaveTool::drawNode(Node& node) {
else {
ImGui::TreeNodeEx(node.name(), ImGuiTreeNodeFlags_SpanAvailWidth|ImGuiTreeNodeFlags_Leaf|ImGuiTreeNodeFlags_NoTreePushOnOpen|
ImGuiTreeNodeFlags_Bullet|(node.state() == Node::State::Unlocked ? ImGuiTreeNodeFlags_Selected : 0));
nodeTooltip();
}
if(node.state() == Node::State::Unavailable) {
ImGui::PopStyleColor();
}
nodeTooltip();
}
}
void SaveTool::drawMassManager() {