|
@@ -6,8 +6,8 @@ from synergine2.config import Config
|
6
|
6
|
from synergine2_cocos2d.util import PathManager
|
7
|
7
|
|
8
|
8
|
from opencombat.exception import UnknownWeapon
|
9
|
|
-from opencombat.gui.const import MAN_STAND_UP
|
10
|
|
-from opencombat.gui.const import MAN_CRAWLING
|
|
9
|
+from opencombat.gui.const import POSITION_MAN_STAND_UP
|
|
10
|
+from opencombat.gui.const import POSITION_MAN_CRAWLING
|
11
|
11
|
|
12
|
12
|
if typing.TYPE_CHECKING:
|
13
|
13
|
from opencombat.gui.actor import BaseActor
|
|
@@ -30,16 +30,14 @@ class WeaponImageApplier(ImageApplier):
|
30
|
30
|
self.path_manager = PathManager(config.resolve('global.include_path.graphics'))
|
31
|
31
|
self._cache = {} # type: typing.Dict[str, Image.Image]
|
32
|
32
|
|
33
|
|
- def get_images_scheme(self) -> typing.Dict[str, typing.Dict[str, str]]:
|
|
33
|
+ def get_images_scheme(self) -> typing.Dict[str, typing.Dict[str, typing.List[str]]]:
|
34
|
34
|
return {
|
35
|
|
- MAN_STAND_UP: {
|
|
35
|
+ POSITION_MAN_STAND_UP: {
|
36
|
36
|
RIFFLE: [
|
37
|
37
|
'actors/man_weap1.png'
|
38
|
38
|
],
|
39
|
39
|
},
|
40
|
|
- # FIXME NOW
|
41
|
|
- # MAN_CRAWLING: {
|
42
|
|
- 'CRAWL': {
|
|
40
|
+ POSITION_MAN_CRAWLING: {
|
43
|
41
|
RIFFLE: [
|
44
|
42
|
'actors/man_c1_weap1.png',
|
45
|
43
|
'actors/man_c2_weap1.png',
|
|
@@ -84,4 +82,8 @@ class WeaponImageApplier(ImageApplier):
|
84
|
82
|
raise UnknownWeapon(
|
85
|
83
|
'Unknown weapon "{}" for mode "{}"'.format(weapon_type, mode),
|
86
|
84
|
)
|
|
85
|
+ except IndexError:
|
|
86
|
+ raise UnknownWeapon(
|
|
87
|
+ 'Unknown weapon "{}" for mode "{}"'.format(weapon_type, mode),
|
|
88
|
+ )
|
87
|
89
|
|