plant analyzer QoL

This commit is contained in:
Fox-McCloud
2017-01-29 03:37:22 -05:00
parent fd63808e6c
commit 6d4316264a
3 changed files with 12 additions and 14 deletions
+4 -12
View File
@@ -61,20 +61,12 @@
var/msg = "<span class='info'>*---------*\n This is \a <span class='name'>[src]</span>.\n"
if(seed)
msg += seed.get_analyzer_text()
msg += "\n- Nutritional value: [reagents.get_reagent_amount("nutriment")]\n"
msg += "- Other substances: [reagents.total_volume-reagents.get_reagent_amount("nutriment")]\n"
msg += "*---------*</span>"
var/list/scannable_reagents = list("charcoal" = "Charcoal", "morphine" = "Morphine", "amanitin" = "Amatoxins",
"toxin" = "Toxins", "psilocybin" = "Psilocybin", "condensedcapsaicin" = "Condensed Capsaicin",
"capsaicin" = "Capsaicin", "frostoil" = "Frost Oil", "gold" = "Mineral Content", "glycerol" = "Glycerol",
"radium" = "Highly Radioactive Material", "uranium" = "Radioactive Material")
var/reag_txt = ""
if(seed)
for(var/reagent_id in scannable_reagents)
if(reagent_id in seed.reagents_add)
var/amt = reagents.get_reagent_amount(reagent_id)
reag_txt += "\n<span class='info'>- [scannable_reagents[reagent_id]]: [amt*100/reagents.maximum_volume]%</span>"
for(var/reagent_id in seed.reagents_add)
var/datum/reagent/R = chemical_reagents_list[reagent_id]
var/amt = reagents.get_reagent_amount(reagent_id)
reag_txt += "\n<span class='info'>- [R.name]: [amt]</span>"
if(reag_txt)
msg += reag_txt
+6
View File
@@ -290,6 +290,12 @@
text += "- Weed Vulnerability: [weed_chance]\n"
if(rarity)
text += "- Species Discovery Value: [rarity]\n"
var/all_traits = ""
for(var/datum/plant_gene/trait/traits in genes)
if(istype(traits, /datum/plant_gene/trait/plant_type))
continue
all_traits += " [traits.get_name()]"
text += "- Plant Traits:[all_traits]\n"
text += "*---------*"
+2 -2
View File
@@ -205,13 +205,13 @@
var/potDiff = S.potency - shuttle_master.discoveredPlants[S.type] // Compare it to the previous best
if(potDiff > 0) // This sample is better
shuttle_master.discoveredPlants[S.type] = S.potency
msg += "<span class='good'>+[potDiff]</span>: New sample of \"[capitalize(S.species)]\" is superior. Good work.<br>"
msg += "<span class='good'>+[potDiff]</span>: New sample of \"[capitalize(S.species)]\" is superior. Good work.<br>"
shuttle_master.points += potDiff
else // This sample is worthless
msg += "<span class='bad'>+0</span>: New sample of \"[capitalize(S.species)]\" is not more potent than existing sample ([shuttle_master.discoveredPlants[S.type]] potency).<br>"
else // This is a new discovery!
shuttle_master.discoveredPlants[S.type] = S.potency
msg += "<span class='good'>[S.rarity]</span>: New species discovered: \"[capitalize(S.species)]\". Excellent work.<br>"
msg += "<span class='good'>[S.rarity]</span>: New species discovered: \"[capitalize(S.species)]\". Excellent work.<br>"
shuttle_master.points += S.rarity // That's right, no bonus for potency. Send a crappy sample first to "show improvement" later
qdel(MA)
shuttle_master.sold_atoms += "."