Overhaul and fix destructive analyzer menu

This commit is contained in:
Tad Hardesty
2017-11-28 17:59:42 -08:00
parent 23c0516c87
commit 219328cd7a
6 changed files with 83 additions and 39 deletions
+4 -6
View File
@@ -153,13 +153,11 @@
recalculate_nodes(TRUE) //Fully rebuild the tree.
/datum/techweb/proc/boost_with_path(datum/techweb_node/N, itempath)
if(!istype(N)||!ispath(itempath))
if(!istype(N) || !ispath(itempath))
return FALSE
var/boost = N.boost_item_paths[itempath]
if(!boosted_nodes[N])
boosted_nodes[N] = boost
if(N.autounlock_by_boost)
hidden_nodes -= N.id
boosted_nodes[N] = max(boosted_nodes[N], N.boost_item_paths[itempath])
if(N.autounlock_by_boost)
hidden_nodes -= N.id
return TRUE
/datum/techweb/proc/update_tiers(datum/techweb_node/base)
@@ -23,8 +23,6 @@
actual_cost = research_cost
/datum/techweb_node/proc/get_price(datum/techweb/host)
if(!host)
return actual_cost
var/discount = boost_item_paths[host.boosted_nodes[src]]
actual_cost = research_cost - discount
if(host)
actual_cost = research_cost - host.boosted_nodes[src]
return actual_cost