1
0

Formula#calculate is using QuantityInput

Updated FormulaBuilder to properly index parts[]
This commit is contained in:
cryptogopher
2020-05-17 18:14:19 +02:00
parent c402fe8353
commit fa9c329a81
3 changed files with 24 additions and 6 deletions

View File

@@ -177,7 +177,14 @@ module BodyTracking
[
:bt_expression,
[left, right].map do |side|
side[0] == :bt_quantity ? "quantities['#{side[1]}'][_index]" : "#{side[1]}"
case side[0]
when :bt_quantity
"quantities['#{side[1]}'][_index]"
when :bt_quantity_method_call
"#{side[1]}[_index]"
else
"#{side[1]}"
end
end.join(op.to_s)
]
end