-
Notifications
You must be signed in to change notification settings - Fork 26
/
smbuild
249 lines (227 loc) · 9.48 KB
/
smbuild
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
import os
# Bit flags
EXCLUDE_SURF = 1
EXCLUDE_BHOP = 2
EXCLUDE_LITE = 4
EXCLUDE_DEATHRUN = 8
class MyPlugin:
def __init__(self, name, cfg='', excldflgs=0, files=[]):
self.name = name
self.cfg = cfg
self.excldflgs = excldflgs
self.files = files
class MyPluginList:
def __init__(self, plugins, flags=0):
self.plugins = plugins
self.flags = flags
def getPluginNameList(self):
mylist = []
for p in self.plugins:
mylist.append(p.name)
return mylist
@staticmethod
def addFileToListSlot(lst, d, f):
if d not in lst:
lst[d] = []
if f not in lst[d]:
lst[d].append(f)
@staticmethod
def addFileToList(lst, f):
MyPluginList.addFileToListSlot(lst, os.path.dirname(f), f)
def getPluginIncList(self):
mylist = {}
mylist['cfg/influx'] = []
for p in self.plugins:
# Configs
if p.cfg:
self.addFileToListSlot(mylist, 'cfg/influx', 'cfg_build/' + p.cfg + '.cfg')
# Files
for f in p.files:
self.addFileToList(mylist, f)
# Add script include files, we kinda need these
self.addFileToList(mylist, 'addons/sourcemod/scripting/include/influx/*')
self.addFileToList(mylist, 'addons/sourcemod/scripting/include/msharedutil/*')
# Misc
self.addFileToList(mylist, 'addons/sourcemod/gamedata/*')
self.addFileToList(mylist, 'addons/sourcemod/translations/*')
# Add files depending on the package we want to build
if not self.flags & EXCLUDE_LITE:
self.addFileToList(mylist, './influx_chatcolors.txt')
if self.flags & EXCLUDE_SURF:
self.addFileToList(mylist, 'addons/sourcemod/influxruns/surf_*.ini')
self.addFileToList(mylist, 'addons/sourcemod/influxzones/surf_*.ini')
if self.flags & EXCLUDE_BHOP:
self.addFileToList(mylist, 'addons/sourcemod/influxruns/bhop_*.ini')
self.addFileToList(mylist, 'addons/sourcemod/influxruns/kz_*.ini')
self.addFileToList(mylist, 'addons/sourcemod/influxzones/bhop_*.ini')
self.addFileToList(mylist, 'addons/sourcemod/influxzones/kz_*.ini')
return mylist
def getListFromFlags(self, flags):
pluginlist = []
for p in self.plugins:
if p.excldflgs & flags:
continue
pluginlist.append(p)
return MyPluginList(pluginlist, flags)
# All da plugins
pluginlist = MyPluginList([
MyPlugin('influx_ac_leftright', 'ac_leftright', EXCLUDE_SURF | EXCLUDE_LITE),
#MyPlugin('influx_comp_standup'),
MyPlugin('influx_config'),
MyPlugin('influx_core', 'core',
files=[
'addons/sourcemod/configs/admin_overrides_influx_example.cfg',
'addons/sourcemod/configs/influx_mode_overrides.cfg',
'addons/sourcemod/configs/influx_mode_overrides_example.cfg',
'addons/sourcemod/configs/influx_style_overrides.cfg',
'addons/sourcemod/configs/influx_style_overrides_example.cfg',
]),
MyPlugin('influx_disableradio'),
MyPlugin('influx_disableroundrestart', excldflgs=EXCLUDE_DEATHRUN),
MyPlugin('influx_disablesuicide', 'disablesuicide', EXCLUDE_DEATHRUN),
MyPlugin('influx_dropknife_css'),
MyPlugin('influx_fixtimelimit', excldflgs=EXCLUDE_LITE),
MyPlugin('influx_fpscheck', 'fpscheck', EXCLUDE_SURF | EXCLUDE_LITE),
MyPlugin('influx_help', 'help'),
MyPlugin('influx_hud'),
MyPlugin('influx_hud_draw', 'hud_draw'),
MyPlugin('influx_hud_draw_csgo', 'hud_draw_csgo'),
MyPlugin('influx_hud_draw_css'),
MyPlugin('influx_hud_hidehud'),
MyPlugin('influx_hud_hideplayers'),
MyPlugin('influx_hud_hideplayers_wepsnd'),
MyPlugin('influx_hud_recchat'),
MyPlugin('influx_hud_recsounds'),
MyPlugin('influx_jumps'),
MyPlugin('influx_maprankings', excldflgs=EXCLUDE_LITE),
MyPlugin('influx_mode_auto_csgo', 'mode_auto_csgo', EXCLUDE_SURF | EXCLUDE_DEATHRUN),
MyPlugin('influx_mode_auto_css', 'mode_auto_css', EXCLUDE_SURF | EXCLUDE_DEATHRUN),
MyPlugin('influx_mode_scroll', 'mode_scroll'),
MyPlugin('influx_mode_stockcap', 'mode_stockcap', EXCLUDE_SURF | EXCLUDE_DEATHRUN),
MyPlugin('influx_mode_velcap', 'mode_velcap', EXCLUDE_SURF | EXCLUDE_DEATHRUN),
MyPlugin('influx_mvpstar', 'mvpstar', EXCLUDE_LITE),
MyPlugin('influx_noclip'),
MyPlugin('influx_nocollision'),
MyPlugin('influx_nodmg', 'nodmg', EXCLUDE_DEATHRUN),
MyPlugin('influx_pause', 'pause', EXCLUDE_DEATHRUN),
MyPlugin('influx_practise', excldflgs=EXCLUDE_DEATHRUN),
MyPlugin('influx_prespeed', 'prespeed'),
MyPlugin('influx_printcptimes'),
MyPlugin('influx_recchat', 'recchat'),
MyPlugin('influx_recording', 'recording'),
MyPlugin('influx_recordsmenu', 'recordsmenu'),
MyPlugin('influx_recrank', 'recrank'),
MyPlugin('influx_recsounds', excldflgs=EXCLUDE_LITE,
files=[
'addons/sourcemod/configs/influx_sounds.cfg'
]),
MyPlugin('influx_silent_chatcmds', 'silent_chatcmds', EXCLUDE_LITE),
MyPlugin('influx_simpleranks', 'simpleranks', EXCLUDE_LITE,
files=[
'addons/sourcemod/configs/influx_simpleranks.cfg',
'addons/sourcemod/configs/influx_simpleranks_mode_points.cfg',
'addons/sourcemod/configs/influx_simpleranks_style_points.cfg',
'./influx_simpleranks_readme.txt',
]),
MyPlugin('influx_simpleranks_chat', excldflgs=EXCLUDE_LITE),
MyPlugin('influx_spawnpoints', 'spawnpoints'),
MyPlugin('influx_specalltalk_css', excldflgs=EXCLUDE_LITE),
MyPlugin('influx_speclist', 'speclist', EXCLUDE_LITE),
MyPlugin('influx_strafes', excldflgs=EXCLUDE_SURF),
MyPlugin('influx_strfsync', excldflgs=EXCLUDE_SURF),
MyPlugin('influx_style_adonly', excldflgs=EXCLUDE_SURF | EXCLUDE_DEATHRUN),
MyPlugin('influx_style_backwards', excldflgs=EXCLUDE_DEATHRUN),
MyPlugin('influx_style_hsw', excldflgs=EXCLUDE_SURF | EXCLUDE_DEATHRUN),
MyPlugin('influx_style_lowgrav', 'style_lowgrav', EXCLUDE_DEATHRUN),
MyPlugin('influx_style_normal'),
MyPlugin('influx_style_parkour', excldflgs=EXCLUDE_SURF | EXCLUDE_DEATHRUN),
MyPlugin('influx_style_prespeed', excldflgs=EXCLUDE_SURF | EXCLUDE_DEATHRUN),
MyPlugin('influx_style_rhsw', excldflgs=EXCLUDE_DEATHRUN),
MyPlugin('influx_style_sw', excldflgs=EXCLUDE_DEATHRUN),
MyPlugin('influx_style_tas_csgo', 'style_tas', EXCLUDE_DEATHRUN),
MyPlugin('influx_style_tas_css', 'style_tas', EXCLUDE_DEATHRUN),
MyPlugin('influx_style_wonly', excldflgs=EXCLUDE_DEATHRUN),
MyPlugin('influx_teams', 'teams', excldflgs=EXCLUDE_DEATHRUN),
MyPlugin('influx_teams_autojoin', 'teams_autojoin', EXCLUDE_DEATHRUN),
MyPlugin('influx_teams_spawncmds', excldflgs=EXCLUDE_DEATHRUN),
MyPlugin('influx_teletoend', excldflgs=EXCLUDE_DEATHRUN),
MyPlugin('influx_teletorun', 'teletorun', EXCLUDE_DEATHRUN),
#MyPlugin('influx_transfer_cksurf'),
MyPlugin('influx_truevel'),
MyPlugin('influx_wepdrop'),
MyPlugin('influx_wepgive', excldflgs=EXCLUDE_DEATHRUN),
MyPlugin('influx_zones', 'zones'),
MyPlugin('influx_zones_autobhop'),
MyPlugin('influx_zones_beams', 'beams',
files=[
'addons/sourcemod/configs/influx_beams.cfg',
'materials/influx/beam_end.vmt',
'materials/influx/beam_end.vtf',
'materials/influx/beam_start.vmt',
'materials/influx/beam_start.vtf',
]),
MyPlugin('influx_zones_block', 'zones_block'),
MyPlugin('influx_zones_checkpoint'),
MyPlugin('influx_zones_freestyle'),
MyPlugin('influx_zones_stage', 'zones_stage'),
MyPlugin('influx_zones_teleport'),
MyPlugin('influx_zones_timer', 'zones_timer'),
MyPlugin('influx_zones_validator', 'zones_validator'),
])
# Build all the plugins
fulllist = pluginlist.getPluginNameList()
for p in fulllist:
Plugin(source='addons/sourcemod/scripting/'+p+'.sp')
Package(
name='full',
plugins=fulllist,
filegroups=pluginlist.getPluginIncList(),
)
bhoplist = pluginlist.getListFromFlags(EXCLUDE_BHOP)
Package(
name='bhop',
plugins=bhoplist.getPluginNameList(),
filegroups=bhoplist.getPluginIncList(),
args={
'validmapnames': r'^(bhop\_|kz\_)\w+',
},
)
bhoplitelist = pluginlist.getListFromFlags(EXCLUDE_BHOP | EXCLUDE_LITE)
Package(
name='bhoplite',
plugins=bhoplitelist.getPluginNameList(),
filegroups=bhoplitelist.getPluginIncList(),
args={
'validmapnames': r'^(bhop\_|kz\_)\w+',
},
)
surflist = pluginlist.getListFromFlags(EXCLUDE_SURF)
Package(
name='surf',
plugins=surflist.getPluginNameList(),
filegroups=surflist.getPluginIncList(),
args={
'validmapnames': r'^surf\_\w+',
'defmaxwepspd': '260',
'scrollairaccelerate': '150',
'prespeedmaxjumps': '1',
'prespeedmaxspeed': '600',
'sv_autobunnyhopping': '1',
'startonjump': '0',
},
)
deathrunlist = pluginlist.getListFromFlags(EXCLUDE_DEATHRUN)
Package(
name='deathrun',
plugins=deathrunlist.getPluginNameList(),
filegroups=deathrunlist.getPluginIncList(),
args={
'validmapnames': r'^(dr\_|deathrun\_)\w+',
'defmaxwepspd': '260',
'scrollairaccelerate': '100',
'prespeedmaxjumps': '-1',
'prespeedmaxspeed': '0',
'mp_ignore_round_win_conditions': '0',
'sv_autobunnyhopping': '1',
},
)