fork download
  1. local util = include( "modules/util" )
  2. local serverdefs = include( "modules/serverdefs" )
  3.  
  4. local CORP_NAMES = serverdefs.CORP_NAMES
  5. local ESCAPE_MISSION_TAGS = { "vault", "ceo_office", "security", "executive_terminals", "server_farm", "nanofab", "cyberlab", "detention_centre" }
  6. local NO_CFO_MISSION_TAGS = { "vault", "security", "executive_terminals", "server_farm", "nanofab", "cyberlab", "detention_centre" }
  7. local DEFAULT_MISSION_TAGS = util.tmerge( { "2max" }, CORP_NAMES, ESCAPE_MISSION_TAGS )
  8. local DEFAULT_MISSION_TAGS_FIRST = util.tmerge( { "2max" }, CORP_NAMES, NO_CFO_MISSION_TAGS )
  9.  
  10. local simdefs = {
  11. map_colours_normal =
  12. {
  13. asia = {14/255, 54/255, 79/255, 1},
  14. europe = {22/255, 56/255, 56/255, 1},
  15. sa = {42/255, 61/255, 30/255, 1},
  16. na = {28/255, 36/255, 64/255, 1},
  17. omni = {255/255,175/255,36/255, 1},
  18. atlantis = {17/255,61/255,17/255},
  19. },
  20. map_colours_highlight =
  21. {
  22. asia = {89/255,138/255,221/255, 1},
  23. europe = {180/255,180/255,180/255, 1},
  24. sa = {200/255, 125/255, 13/255, 1},
  25. na = {187/255,82/255,200/255, 1},
  26. omni = {255/255,175/255,36/255, 1},
  27. atlantis = {93/255,190/255,51/255},
  28. },
  29.  
  30. map_colours_unhighlight =
  31. {
  32. asia = {34/255,57/255,56/255,.5},
  33. europe = {34/255,57/255,56/255,.5},
  34. sa = {34/255,57/255,56/255,.5},
  35. na = {34/255,57/255,56/255,.5},
  36. omni = {255/255,175/255,36/255, 1},
  37. atlantis = {34/255,57/255,56/255,.5},
  38. },
  39.  
  40. CORP_NAMES = CORP_NAMES,
  41. ESCAPE_MISSION_TAGS = ESCAPE_MISSION_TAGS,
  42. NO_CFO_MISSION_TAGS = NO_CFO_MISSION_TAGS,
  43. DEFAULT_MISSION_TAGS = DEFAULT_MISSION_TAGS,
  44. DEFAULT_MISSION_TAGS_FIRST = DEFAULT_MISSION_TAGS_FIRST,
  45. }
  46.  
  47. local _simdefs = include("sim/simdefs")
  48.  
  49. for k, v in pairs(simdefs) do
  50. rawset(_simdefs,k,v)
  51. end
  52.  
  53. local idx = 4
  54.  
  55. local function tryGet(t,...)
  56. local args = {...}
  57. if t[table.remove(args,1)] then
  58. if #args <= 0 then
  59. return true
  60. else
  61. return tryGet(t,unpack(args))
  62. end
  63. end
  64. return false
  65. end
  66.  
  67. if tryGet(_simdefs,"SCREEN_CUSTOMS","map_screen.lua","widgets",4,"children",1,"children") then
  68. idx = #_simdefs.SCREEN_CUSTOMS["map_screen.lua"].widgets[4].children[1].children
  69. end
  70.  
  71.  
  72. local function apply()
  73. table.insert(CORP_NAMES,"atlantis")
  74. table.insert(DEFAULT_MISSION_TAGS,"atlantis")
  75. table.insert(DEFAULT_MISSION_TAGS_FIRST,"atlantis")
  76. _simdefs.SCREEN_CUSTOMS["map_screen.lua"].widgets[4].children[1].children[idx + 1].isVisible = true
  77. end
  78.  
  79. local function reset()
  80. local array = include("modules/array")
  81. array.removeElement(CORP_NAMES,"atlantis")
  82. array.removeElement(DEFAULT_MISSION_TAGS,"atlantis")
  83. array.removeElement(DEFAULT_MISSION_TAGS_FIRST,"atlantis")
  84. _simdefs.SCREEN_CUSTOMS["map_screen.lua"].widgets[4].children[1].children[idx + 1].isVisible = false
  85. end
  86.  
  87. log:write("SIM IDX "..tostring(idx))
  88.  
  89. _simdefs.SCREEN_CUSTOMS = util.extend(_simdefs.SCREEN_CUSTOMS){
  90. ["map_screen.lua"] = {
  91. widgets = {
  92. [4] = {
  93. children = {
  94. [1] = {
  95. children = {
  96. [idx + 1] = {
  97. name = [[atlantis]],
  98. isVisible = true,
  99. noInput = false,
  100. anchor = 1,
  101. rotation = 0,
  102. x = 0,
  103. xpx = true,
  104. y = 0,
  105. ypx = true,
  106. w = 3552,
  107. wpx = true,
  108. h = 610,
  109. hpx = true,
  110. sx = 1,
  111. sy = 1,
  112. scissor =
  113. {
  114. -0.166666001081467,
  115. -0.5,
  116. 0.166633993387222,
  117. 0.5,
  118. },
  119. ctor = [[image]],
  120. color =
  121. {
  122. 1,
  123. 1,
  124. 1,
  125. 1,
  126. },
  127. tilew = 3,
  128. tileh = 1,
  129. images =
  130. {
  131. {
  132. file = [[gui/map_atlantis.png]],
  133. name = [[]],
  134. }
  135. }
  136. }
  137. }
  138. }
  139. }
  140. }
  141. }
  142. }
  143. }
  144.  
  145. return {
  146. apply = apply,
  147. reset = reset,
  148. }
Runtime error #stdin #stdout #stderr 0s 14120KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
lua5.3: prog.lua:1: attempt to call a nil value (global 'include')
stack traceback:
	prog.lua:1: in main chunk
	[C]: in ?