Commit bbb9fdfd authored by dylan grafmyre's avatar dylan grafmyre
Browse files

bsppack is actually named bspzip

parent 3cb5eb83
......@@ -39,7 +39,7 @@ install: ttt_terrorcon_v2_p.bsp
cp -v $^ $(MOD_DIR)maps\\
%.lint: %.bspzip-addlist
$(PYTHON_BIN) ./contrib/bsppack-lint $^ 2> $@
$(PYTHON_BIN) ./contrib/bspzip-lint $^ 2> $@
.PHONY: lint
......
......@@ -40,17 +40,17 @@ class BsppackAddlist(collections.UserDict):
if not os.path.isfile(key):
logging.error('local file is not file: %r', key)
def main_vmflint(argp, bsppack_addlist):
def main_vmflint(argp, bspzip_addlist):
path = '{}.vmf'.format(os.path.splitext(argp.input.name)[0])
logging.info('parsing vmf %r ...', path)
with open(path) as fh:
vmf = pyvmf.Vmf.load(fh)
logging.info('parsing vmf %r ... done %r ', path, vmf)
models = set([i.attributes['model'] for i in vmf.iter_props()])
bsppack_addlist_values = bsppack_addlist.values()
bsppack_addlist_values_lower = [i.lower() for i in bsppack_addlist_values]
bspzip_addlist_values = bspzip_addlist.values()
bspzip_addlist_values_lower = [i.lower() for i in bspzip_addlist_values]
for model in models:
prop_is_zipped = model in bsppack_addlist_values
prop_is_zipped = model in bspzip_addlist_values
if not prop_is_zipped:
logging.error('using unpacked file: %r', model)
continue
......@@ -62,7 +62,7 @@ def main_vmflint(argp, bsppack_addlist):
continue
materials.add(material_lower)
material_is_zipped = material_lower in bsppack_addlist_values_lower
material_is_zipped = material_lower in bspzip_addlist_values_lower
if not material_is_zipped:
logging.error('%r %r: using unpacked file: %r', leaf.name, leaf.attributes['id'], material)
......@@ -70,11 +70,11 @@ def main(argp=None, argv=None):
if argp is None:
argp = ARGP.parse_args(argv)
logging.basicConfig(level=logging.INFO)
bsppack_addlist = BsppackAddlist.new_from_file(argp.input)
bsppack_addlist.lint_local()
bspzip_addlist = BsppackAddlist.new_from_file(argp.input)
bspzip_addlist.lint_local()
if HAS_PYVMF:
main_vmflint(argp, bsppack_addlist)
main_vmflint(argp, bspzip_addlist)
if __name__ == '__main__':
main()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment