Advertisement
EESweetieBot

ease table reader is djumb

Apr 6th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.83 KB | None | 0 0
  1. local mse = {}
  2.                 for i,v in pairs(mods_ease) do
  3.                     if v and table.getn(v) > 6 and v[1] and v[2] and v[3] and v[4] and v[5] and v[6] and v[7] then
  4.                         if beat >=v[1] then
  5.                             if (v[6] == 'len' and beat <=v[1]+v[2]) or (v[6] == 'end' and beat <=v[2]) then
  6.                                 local strength = v[7](beat - v[1], v[3], v[4] - v[3], v[6] == 'end' and v[2] - v[1] or v[2], v[10], v[11])
  7.                                 if type(v[5]) == 'string' then
  8.                                     local modstr = v[5] == 'xmod' and strength..'x' or (v[5] == 'cmod' and 'C'..strength or strength..' '..v[5])
  9.                                     GAMESTATE:ApplyModifiers('*9999 '..modstr,v[8]);
  10.                                 elseif type(v[5]) == 'function' then
  11.                                     v[5](strength)
  12.                                 end
  13.                                 table.insert(mse,v)
  14.                             elseif (v[9] and ((v[6] == 'len' and beat <=v[1]+v[2]+v[9]) or (v[6] == 'end' and beat <=v[9]))) then
  15.                                 if type(v[5]) == 'string' then
  16.                                     local modstr = v[5] == 'xmod' and v[4]..'x' or (v[5] == 'cmod' and 'C'..v[4] or v[4]..' '..v[5])
  17.                                     GAMESTATE:ApplyModifiers('*9999 '..modstr,v[8]);
  18.                                 elseif type(v[5]) == 'function' then
  19.                                     v[5](v[4])
  20.                                 end
  21.                                 table.insert(mse,v)
  22.                             else
  23.                                 if type(v[5]) == 'function' then
  24.                                     v[5](v[4]) -- never trust this mf actually sending v[4] at the end beat if you dont use persist
  25.                                 end
  26.                             end
  27.                         else
  28.                             table.insert(mse,v)
  29.                         end
  30.                     else
  31.                         SCREENMAN:SystemMessage('Ease Error! (line '..i..' | beat: '.. v[1] .. ' | mod: '.. v[5] ..')');
  32.                     end
  33.                 end
  34.                 mods_ease = mse
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement