forked from yatyricky/lua-bundler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
war3map.lua
101 lines (82 loc) · 2.67 KB
/
war3map.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
function InitGlobals()
end
function InitCustomPlayerSlots()
SetPlayerStartLocation(Player(0), 0)
SetPlayerColor(Player(0), ConvertPlayerColor(0))
SetPlayerRacePreference(Player(0), RACE_PREF_HUMAN)
SetPlayerRaceSelectable(Player(0), true)
SetPlayerController(Player(0), MAP_CONTROL_USER)
end
function InitCustomTeams()
SetPlayerTeam(Player(0), 0)
end
function main()
SetCameraBounds(-3328.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), -3584.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM), 3328.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 3072.0 - GetCameraMargin(CAMERA_MARGIN_TOP), -3328.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), 3072.0 - GetCameraMargin(CAMERA_MARGIN_TOP), 3328.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), -3584.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM))
SetDayNightModels("Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerrain\\DNCLordaeronTerrain.mdl", "Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl")
NewSoundEnvironment("Default")
SetAmbientDaySound("LordaeronSummerDay")
SetAmbientNightSound("LordaeronSummerNight")
SetMapMusic("Music", true, 0)
InitBlizzard()
InitGlobals()
--nef-inject
local __modules = {}
local require = function(path)
local module = __modules[path]
if module ~= nil then
if not module.inited then
module.cached = module.loader()
module.inited = true
end
return module.cached
else
error("module not found")
return nil
end
end
----------------
__modules["Main"] = { inited = false, cached = false, loader = function(...)
---- START Main.lua ----
require("Dir/Logger")
local Test = require("Test")
print("This is main", 1751543663)
Test.Run()
---- END Main.lua ----
end}
----------------
__modules["Dir/Logger"] = { inited = false, cached = false, loader = function(...)
---- START Dir/Logger.lua ----
local Logger = {}
function Logger.Log(msg)
print("Logger.Log" .. msg)
end
print("module Logger loaded")
return Logger
---- END Dir/Logger.lua ----
end}
----------------
__modules["Test"] = { inited = false, cached = false, loader = function(...)
---- START Test.lua ----
local Logger = require("Dir/Logger")
local Test = {}
function Test.Run()
Logger.Log("Test.Run")
end
print("module Test loaded")
return Test
---- END Test.lua ----
end}
__modules["Main"].loader()
--nef-inject-end
end
function config()
SetMapName("TRIGSTR_001")
SetMapDescription("TRIGSTR_003")
SetPlayers(1)
SetTeams(1)
SetGamePlacement(MAP_PLACEMENT_USE_MAP_SETTINGS)
DefineStartLocation(0, 2304.0, -64.0)
InitCustomPlayerSlots()
SetPlayerSlotAvailable(Player(0), MAP_CONTROL_USER)
InitGenericPlayerSlots()
end