forked from project-ethea/After_the_Storm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
base-loader.cfg
189 lines (144 loc) · 4.27 KB
/
base-loader.cfg
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
#textdomain wesnoth-After_the_Storm
#
# Naia library
#
#ifhave ~add-ons/Naia/loader.cfg
{~add-ons/Naia/loader.cfg}
#else
#ifhave ./Naia/loader.cfg
#define NAIA_EMBEDDED
After_the_Storm#enddef
{./Naia/loader.cfg}
#endif
#endif
#ifndef NAIA_VERSION
#error Naia or a Naia base library component is missing. Cannot continue loading this add-on.
#endif
#
# Local library
#
# LD provides a simpler, shorter way of including WML files by using only
# relative paths (to the add-on's directory).
#define LD __PATH__
{~add-ons/After_the_Storm/{__PATH__}}#enddef
{LD /mainline-strings.cfg}
#ifndef __WMLUNITS__
{LD /terrain-graphics}
{LD /terrain.cfg}
{LD /terrain-virtual.cfg}
#endif
#ifndef EDITOR
# LE includes WML files using paths relative to the currently selected
# episode's directory.
#ifdef CAMPAIGN_AFTER_THE_STORM_EPISODE_I
#define LE __PATH__
{~add-ons/After_the_Storm/episode1/{__PATH__}}#enddef
#define ME
~add-ons/After_the_Storm/episode1/maps#enddef
#endif
#ifdef CAMPAIGN_AFTER_THE_STORM_EPISODE_II
#define LE __PATH__
{~add-ons/After_the_Storm/episode2/{__PATH__}}#enddef
#define ME
~add-ons/After_the_Storm/episode2/maps#enddef
#endif
#ifdef CAMPAIGN_AFTER_THE_STORM_EPISODE_III
#define LE __PATH__
{~add-ons/After_the_Storm/episode3/{__PATH__}}#enddef
#define ME
~add-ons/After_the_Storm/episode3/maps#enddef
#endif
#ifndef __WMLUNITS__
# DIFF includes WML conditionally depending on the selected difficulty. I
# prefer this to mainline's ON_DIFFICULTY macro, which has an exceedingly
# long name for such an ubiquitous purpose. There is no whitespace (e.g.
# tabs, newlines, blanks) around the inclusions in order to avoid issues
# when the substitution is performed in middle of a string literal.
#ifdef EASY
#define DIFF _ON_EASY _ON_NORMAL _ON_HARD
{_ON_EASY}#enddef
#endif
#ifdef NORMAL
#define DIFF _ON_EASY _ON_NORMAL _ON_HARD
{_ON_NORMAL}#enddef
#endif
#ifdef HARD
#define DIFF _ON_EASY _ON_NORMAL _ON_HARD
{_ON_HARD}#enddef
#endif
#define PERSISTENT_NS_ATS
"Project_Ethea.After_the_Storm" #enddef
#define PERSISTENT_NS_IFTU
"Project_Ethea.Invasion_from_the_Unknown" #enddef
# NOTE: do not change the order in which these files are preprocessing unless
# you are very sure of what you are doing.
[lua]
code = <<
PROJECT_ETHEA_AFTER_THE_STORM_VERSION = '>>+"{LD dist/VERSION}"+<<'
naia_register_package {
global_id = 'project_ethea.After_the_Storm',
name = 'After the Storm',
i18n_name = wesnoth.textdomain('wesnoth-After_the_Storm')('After the Storm'),
version = PROJECT_ETHEA_AFTER_THE_STORM_VERSION,
abbreviation = 'AtS',
tracker_url = 'https://github.com/project-ethea/After_the_Storm/issues',
forum_thread = 'https://forums.wesnoth.org/viewtopic.php?t=32091',
maintainer_mode = filesystem.have_file('~add-ons/After_the_Storm/base-maint.cfg'),
}
check_host_compatibility('1.15.14', '1.16.x', {}, false)
check_addon_compatibility()
-- Load local code files.
for i, file in ipairs {
'overrides.lua',
'segmented.lua',
'theme.lua',
'gui/character_action_dialog.lua',
'gui/combo_info_dialog.lua',
'gui/item_choice_dialog.lua',
'gui/show_image.lua',
'gui/top_message.lua',
'After_the_Storm.lua',
}
do
wesnoth.dofile('~add-ons/After_the_Storm/lua/' .. file)
end
>>
[/lua]
#endif
{LD /base-debug.cfg}
{LD /base-rc.cfg}
{LD /macros}
[+units]
{LD /units}
[/units]
#ifndef __WMLUNITS__
{GLOBAL_EVENTS ({LD /global-events.cfg})}
#define MAP __FILE__
map_file="{ME}/{__FILE__}"
#enddef
#define MASK __FILE__
mask="{LE /masks/{__FILE__}}"
#enddef
#define SHROUD_DATA __FILE__
shroud_data="{LE /masks/{__FILE__}}"
#enddef
#
# Episode-specific data files
#
{LE characters.cfg}
{LE deaths.cfg}
{LE storytxt.cfg}
{LE scenarios}
#endif
#else
[editor_group]
id = "wesnoth-UMC-After_the_Storm"
name = _ "After the Storm (custom terrains)"
icon = "group_custom"
[/editor_group]
# Get rid of this macro since it may be redefined by other add-ons
# loaded by the editor.
#undef LD
#endif
# EOF
# kate: indent-mode normal; encoding utf-8; space-indent on;