Guest User

Untitled

a guest
Oct 17th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1. ## new
  2. function InitUserPrefs()
  3. local Prefs = {
  4. "UserPrefGameplayShowStepsDisplay" = true
  5. "UserPrefGameplayShowStepsDisplay" = true,
  6. "UserPrefGameplayShowScore" = false,
  7. "UserPrefScoringMode" = 'DDR Extreme',
  8. "UserPrefShowLotsaOptions" = true,
  9. "UserPrefAutoSetStyle" = false,
  10. "UserPrefLongFail" = false,
  11. "UserPrefNotePosition" = true,
  12. "UserPrefComboOnRolls" = false,
  13. "UserPrefProtimingP1" = false,
  14. "UserPrefProtimingP2" = false,
  15. "FlashyCombos" = false,
  16. "UserPrefComboUnderField" = true,
  17. "UserPrefFancyUIBG" = true
  18. }
  19. for k, v in pairs(Prefs) do
  20. -- kind of xxx
  21. local GetPref == type(v) == "boolean" and GetUserPrefB or GetUserPref
  22. if GetPref(k) == nil then
  23. SetUserPref(k, v)
  24. end
  25. end
  26. end
  27.  
  28. ## old (nasty!)
  29. function InitUserPrefs()
  30. if GetUserPref("UserPrefGameplayShowStepsDisplay") == nil then
  31. SetUserPref("UserPrefGameplayShowStepsDisplay", true)
  32. end
  33. if GetUserPref("UserPrefGameplayShowScore") == nil then
  34. SetUserPref("UserPrefGameplayShowScore", false)
  35. end
  36. if GetUserPref("UserPrefScoringMode") == nil then
  37. SetUserPref("UserPrefScoringMode", 'DDR Extreme')
  38. end
  39. if GetUserPrefB("UserPrefShowLotsaOptions") == nil then
  40. SetUserPref("UserPrefShowLotsaOptions", true)
  41. end
  42. if GetUserPrefB("UserPrefAutoSetStyle") == nil then
  43. SetUserPref("UserPrefAutoSetStyle", false)
  44. end
  45. if GetUserPrefB("UserPrefLongFail") == nil then
  46. SetUserPref("UserPrefLongFail", false)
  47. end
  48. if GetUserPrefB("UserPrefNotePosition") == nil then
  49. SetUserPref("UserPrefNotePosition", true)
  50. end
  51. if GetUserPrefB("UserPrefComboOnRolls") == nil then
  52. SetUserPref("UserPrefComboOnRolls", false)
  53. end
  54. if GetUserPrefB("UserPrefProtimingP1") == nil then
  55. SetUserPref("UserPrefProtimingP1", false)
  56. end
  57. if GetUserPrefB("UserPrefProtimingP2") == nil then
  58. SetUserPref("UserPrefProtimingP2", false)
  59. end
  60. if GetUserPrefB("FlashyCombos") == nil then
  61. SetUserPref("FlashyCombos", false)
  62. end
  63. if GetUserPrefB("UserPrefComboUnderField") == nil then
  64. SetUserPref("UserPrefComboUnderField", true)
  65. end
  66. if GetUserPrefB("UserPrefFancyUIBG") == nil then
  67. SetUserPref("UserPrefFancyUIBG", true)
  68. end
  69. end
Add Comment
Please, Sign In to add comment