portablejim

kos-functions.ks

Feb 23rd, 2021
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. function resForParts { parameter partList to list().
  2. from { local x is 0. } until x >= toTanks:length STEP { set x to x + 1. } DO {
  3. for res in partList[x]:resources {
  4. print (" [" + x + "] " + res:name):padright(21)
  5. + round(res:amount / res:capacity * 100):tostring():padright(4)
  6. + round(res:amount,1):tostring():padright(8)
  7. + "/ "
  8. + round(res:capacity,1):tostring().
  9. }
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment