Advertisement
renard162

stress_mcm.script

Sep 23rd, 2022
947
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.64 KB | Gaming | 0 0
  1.  
  2. local default = {
  3.     regen = 26,
  4.     drain = 13,
  5.  
  6.     campfire_enabled = true,
  7.     campfire_psy_regen = 40,
  8.     campfire_distance = 15,
  9.  
  10.     controler_damage_multiplier = 50,
  11.     controler_damage_max_distance = 50,
  12.  
  13.     hit_stress = 2.8,
  14.     wounded_stress = 14,
  15.  
  16.     stage_1 = 75,
  17.     stage_2 = 50,
  18.     voices = 80,
  19. }
  20.  
  21. function on_mcm_load()
  22.     raw_config = { id = "psy_stress", sh = true, gr = {
  23.         { id = "regen", type = "track", val = 2, min = 1, max = 100, step = 1, def = 26},
  24.         { id = "drain", type = "track", val = 2, min = 1, max = 50, step = 1, def = 13},
  25.         --
  26.         { id = "controler_damage_multiplier", type = "track", val = 2, min = 25, max = 150, step = 1, def = 40},
  27.         { id = "controler_damage_max_distance", type = "track", val = 2, min = 25, max = 150, step = 1, def = 50},
  28.         --
  29.         { id = "hit_stress", type = "track", val = 2, min = 0.1, max = 10, step = 0.1, def = 2.8},
  30.         { id = "wounded_stress", type = "track", val = 2, min = 0.1, max = 30, step = 0.1, def = 14},
  31.         --
  32.         { id = "stage_1", type = "track", val = 2, min = 50, max = 90, step = 1, def = 75},
  33.         { id = "stage_2", type = "track", val = 2, min = 25, max = 80, step = 1, def = 50,},
  34.         { id = "voices", type = "track", val = 2, min = 1, max = 100, step = 1, def = 80},
  35.         --
  36.         { id = "campfire_enabled", type = "check", val = 1, def = true},
  37.         { id = "campfire_regen", type = "track", val = 2, min = 0.1, max = 25, step = 0.1, def = 1.8},
  38.         { id = "campfire_distance", type = "track", val = 2, min = 5, max = 25, step = 1, def = 15},
  39.         },
  40.     }
  41.  
  42.     return raw_config
  43. end
  44.  
  45.  
  46. function get_config(key)
  47.     if ui_mcm then
  48.         return ui_mcm.get("psy_stress/"..key)
  49.     else
  50.         return default[key]
  51.     end
  52. end
  53.  
Advertisement
Comments
  • renard162
    1 year
    # text 0.10 KB | 0 0
    1. Fixed:
    2. - "controler_damage_max_distance" typo resulting in MCM menu bug and nil value in axr_options.ltx
Add Comment
Please, Sign In to add comment
Advertisement