Closed SodaPopinski closed 3 months ago
My bad, the annotation was accidentally removed by a merge.
Should be fixed in 0.5.0.1
This issue is stale because it has been open for 60 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
In a previous version, each part had a "resources" field, where I could get resource.name. That doesn't seem to work anymore.
Here's some example code that no longer works.
for (n in 0..vessel.parts.length) { //fix once I know how to add items to a list let part = vessel.parts[n] if(part.resources.list.length != 0) { if (vessel.parts[n].resources.list[0].resource.name == "Methane") { // CONSOLE.print_line(vessel.parts[n].part_name + " num: " + n.to_string()) all_tanks += n let part_location = vessel.facing.vector*100.0 - part.global_position.to_local(vessel.control_frame) if (!up) { if (part_location.magnitude > rear_most_amount) { rear_most_amount = part_location.magnitude rear_most_tank = n } } else { if (part_location.magnitude < rear_most_amount) { rear_most_amount = part_location.magnitude rear_most_tank = n } } // CONSOLE.print_line(part_location.to_fixed(2)) } } }