bunch of fixes and changes done
This commit is contained in:
parent
4a9193e549
commit
73b9a706a3
59 changed files with 940 additions and 68 deletions
|
|
@ -25,8 +25,8 @@ func show_recipe(recipe : CraftRecipe):
|
|||
ingredient_slots[x].update_ui()
|
||||
ingredient_slots[x].block_taking = true
|
||||
output_slot.item = recipe.output
|
||||
if (PlayerInventory.power_values.has(recipe.output)):
|
||||
output_slot.extra_data = "Botnet Power: " + str(PlayerInventory.power_values.get(recipe.output))
|
||||
#if (PlayerInventory.power_values.has(recipe.output)):
|
||||
#output_slot.extra_data = "Botnet Power: " + str(PlayerInventory.power_values.get(recipe.output))
|
||||
|
||||
output_slot.update_ui()
|
||||
output_slot.block_taking = true
|
||||
|
|
|
|||
|
|
@ -19,8 +19,18 @@ func scavs_ready():
|
|||
new_slot.item = scav.input
|
||||
new_slot.block_taking = true
|
||||
var scav_preview : String = str(scav.rolls) + " Rolls"
|
||||
|
||||
var total_chance : int = 0
|
||||
for loot in scav.loot_pool:
|
||||
scav_preview += "\n" + loot.item.item_name + " : " + str(loot.chance) + " Chance"
|
||||
total_chance += loot.chance
|
||||
var uncounted_chance = total_chance
|
||||
|
||||
for loot in scav.loot_pool:
|
||||
if loot.item:
|
||||
scav_preview += "\n" + loot.item.item_name + ": " + str((int((loot.chance/float(total_chance))*10000))/100) + "%"
|
||||
uncounted_chance -= loot.chance
|
||||
if uncounted_chance > 0:
|
||||
scav_preview += "\nNothing: " + str((int((uncounted_chance/float(total_chance))*10000))/100) + "%"
|
||||
new_slot.extra_data = scav_preview
|
||||
grid.add_child(new_slot)
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue