File: wolf3d.py

package info (click to toggle)
game-data-packager 87
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid
  • size: 33,392 kB
  • sloc: python: 15,387; sh: 704; ansic: 95; makefile: 50
file content (39 lines) | stat: -rw-r--r-- 1,017 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/python3
# encoding=utf-8
#
# Copyright © 2014 Simon McVittie <smcv@debian.org>
# SPDX-License-Identifier: GPL-2.0-or-later

from __future__ import annotations

import logging
from typing import TYPE_CHECKING, Any

from ..game import (GameData)

if TYPE_CHECKING:
    import argparse

logger = logging.getLogger(__name__)


class Wolf3DGameData(GameData):
    def add_parser(
        self,
        parsers: argparse._SubParsersAction[Any],
        base_parser: argparse.ArgumentParser,
        **kwargs: Any
    ) -> argparse.ArgumentParser:
        parser = super(Wolf3DGameData, self).add_parser(parsers, base_parser)
        parser.add_argument(
            '-f', dest='download', action='store_false',
            help='Require 1wolf14.zip on the command line',
        )
        parser.add_argument(
            '-w', dest='download', action='store_true',
            help='Download 1wolf14.zip (done automatically if necessary)',
        )
        return parser


GAME_DATA_SUBCLASS = Wolf3DGameData