Advertisement
Jousway

Original Noteskin.lua

Sep 15th, 2016
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.04 KB | None | 0 0
  1. -- Haggen Daze
  2.  
  3. local ret = ... or {};
  4.  
  5. ret.RedirTable =
  6. {
  7.     Up = "Down",
  8.     Down = "Down",
  9.     Left = "Down",
  10.     Right = "Down",
  11.     UpLeft = "Down",
  12.     UpRight = "Down",
  13. };
  14.  
  15. local OldRedir = ret.Redir;
  16. ret.Redir = function(sButton, sElement)
  17.     -- sButton, sElement = OldRedir(sButton, sElement);
  18.  
  19.     -- Instead of separate hold heads, use the tap note graphics.
  20.     if sElement == "Hold Head Active" or
  21.        sElement == "Roll Head Active"
  22.     then
  23.         sElement =
  24.             (GAMESTATE:GetCurrentStyle():GetStyleType() == "StyleType_TwoPlayersSharedSides")
  25.             and "Tap Note" or "Hold Head Active";
  26.     end
  27.    
  28.     -- Test
  29.     if sElement == "Hold Head Inactive" or
  30.        sElement == "Roll Head Inactive"
  31.     then
  32.         sElement =
  33.             (GAMESTATE:GetCurrentStyle():GetStyleType() == "StyleType_TwoPlayersSharedSides")
  34.             and "Tap Note" or "Hold Head Inactive";
  35.     end
  36.    
  37.     if sElement == "Tap Fake"
  38.     then
  39.         sElement = "Tap Note";
  40.     end
  41.    
  42.     sButton = ret.RedirTable[sButton];
  43.  
  44.     return sButton, sElement;
  45. end
  46.  
  47. -- local OldRedir = ret.Redir;
  48. -- ret.Redir = function(sButton, sElement)
  49.     -- sButton = ret.RedirTable[sButton];
  50.     -- return sButton, sElement;
  51. -- end
  52.  
  53. -- To have separate graphics for each hold part:
  54. local OldRedir = ret.Redir;
  55. ret.Redir = function(sButton, sElement)
  56.     -- Redirect non-hold, non-roll parts.
  57.     if string.find(sElement, "hold") or string.find(sElement, "roll") then
  58.         return sButton, sElement;
  59.     end
  60.     return OldRedir(sButton, sElement);
  61. end
  62.  
  63. --[[
  64. local OldFunc = ret.Load;
  65. function ret.Load()
  66.     local t = OldFunc();
  67.  
  68.     -- The main "Explosion" part just loads other actors; don't rotate
  69.     -- it.  The "Hold Explosion" part should not be rotated.
  70.     if Var "Element" == "Explosion" or
  71.        Var "Element" == "Roll Explosion" then
  72.         t.BaseRotationZ = nil;
  73.     end
  74.     return t;
  75. end
  76. ]]
  77.  
  78. local OldFunc = ret.Load;
  79. function ret.Load()
  80.     local t = OldFunc();
  81.  
  82.     --Explosion should not be rotated; it calls other actors.
  83.     if Var "Element" == "Explosion" then
  84.         t.BaseRotationZ = nil;
  85.     end
  86.     return t;
  87. end
  88.  
  89. ret.PartsToRotate =
  90. {
  91.     ["Receptor"] = true,
  92.     ["Go Receptor"] = true,
  93.     ["Ready Receptor"] = true,
  94.     ["Tap Explosion Bright"] = true,
  95.     ["Tap Explosion Dim"] = true,
  96.     ["Tap Note"] = true,
  97.     ["Tap Fake"] = true,
  98.     ["Tap Lift"] = true,
  99.     ["Hold Head Active"] = true,
  100.     ["Hold Head Inactive"] = true,
  101.     ["Roll Head Active"] = true,
  102.     ["Roll Head Inactive"] = true,
  103.     ["Hold Explosion"] = true,
  104.     ["Roll Explosion"] = true,
  105. };
  106. ret.Rotate =
  107. {
  108.     Up = 180,
  109.     Down = 0,
  110.     Left = 90,
  111.     Right = -90,
  112.     UpLeft = 135,
  113.     UpRight = 225,
  114. };
  115.  
  116. --
  117. -- If a derived skin wants to have separate UpLeft graphics,
  118. -- use this:
  119. --
  120. -- ret.RedirTable.UpLeft = "UpLeft";
  121. -- ret.RedirTable.UpRight = "UpLeft";
  122. -- ret.Rotate.UpLeft = 0;
  123. -- ret.Rotate.UpRight = 90;
  124. --
  125. ret.Blank =
  126. {
  127.     ["Hold Topcap Active"] = true,
  128.     ["Hold Topcap Inactive"] = true,
  129.     ["Roll Topcap Active"] = true,
  130.     ["Roll Topcap Inactive"] = true,
  131.     ["Hold Tail Active"] = true,
  132.     ["Hold Tail Inactive"] = true,
  133.     ["Roll Tail Active"] = true,
  134.     ["Roll Tail Inactive"] = true,
  135.     ["Roll Explosion"] = true,
  136. };
  137.  
  138. return ret;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement