Guest User

Untitled

a guest
Feb 23rd, 2015
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.59 KB | None | 0 0
  1. -- modinfo config option
  2. configuration_options =
  3. {
  4.     {
  5.         name = "OPT_DIFFICULTY",
  6.         label = "Recipe difficulty",
  7.         options =   {
  8.                         {description = "Easy", data = 1, hover="Log(1), Stinger(4)"},
  9.                         {description = "Normal", data = 2, hover="Log(2), TentacleSpots(1), Stinger(6)"},
  10.                         {description = "Hard", data = 3, hover="Log(2), TentacleSpots(2), Stinger(8)"},
  11.                     },
  12.         default = 2,
  13.     }
  14. }
  15.  
  16. -------------------------------------------------------
  17. --modmain
  18.  
  19. GLOBAL.CRAFTABLETENTACLESPIKE_OPT_DIFFICULTY = GetModConfigData("OPT_DIFFICULTY")
  20.  
  21. STRINGS = GLOBAL.STRINGS
  22. RECIPETABS = GLOBAL.RECIPETABS
  23. Recipe = GLOBAL.Recipe
  24. Ingredient = GLOBAL.Ingredient
  25. TECH = GLOBAL.TECH
  26.  
  27. STRINGS.RECIPE_DESC.TENTACLESPIKE = "It's pointy and slimy."
  28.  
  29. local recipe = Recipe("tentaclespike", { Ingredient("log", 2), Ingredient("tentaclespots", 1), Ingredient("stinger", 6) }, RECIPETABS.WAR, TECH.SCIENCE_TWO)
  30.  
  31. if GLOBAL.CRAFTABLETENTACLESPIKE_OPT_DIFFICULTY == 1 then
  32.     Recipe("tentaclespike", { Ingredient("log", 1), Ingredient("stinger", 4) }, RECIPETABS.WAR, TECH.SCIENCE_ONE)
  33. elseif GLOBAL.CRAFTABLETENTACLESPIKE_OPT_DIFFICULTY == 2 then
  34.     Recipe("tentaclespike", { Ingredient("log", 2), Ingredient("tentaclespots", 1), Ingredient("stinger", 6) }, RECIPETABS.WAR, TECH.SCIENCE_TWO)
  35. elseif GLOBAL.CRAFTABLETENTACLESPIKE_OPT_DIFFICULTY == 3 then
  36.     Recipe("tentaclespike", { Ingredient("log", 2), Ingredient("tentaclespots", 2), Ingredient("stinger", 8) }, RECIPETABS.WAR, TECH.SCIENCE_TWO)
  37. end
Advertisement
Add Comment
Please, Sign In to add comment