pywargame 0.3.1__py3-none-any.whl → 0.4.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pywargame/__init__.py +7 -1
- pywargame/common/__init__.py +3 -0
- pywargame/common/dicedraw.py +6 -1
- pywargame/common/drawdice.py +12 -3
- pywargame/common/test.py +2 -2
- pywargame/cyberboard/__init__.py +2 -0
- pywargame/cyberboard/archive.py +2 -2
- pywargame/cyberboard/base.py +2 -1
- pywargame/cyberboard/board.py +3 -1
- pywargame/cyberboard/cell.py +2 -1
- pywargame/cyberboard/draw.py +2 -1
- pywargame/cyberboard/exporter.py +8 -7
- pywargame/cyberboard/extractor.py +1 -1
- pywargame/cyberboard/features.py +1 -1
- pywargame/cyberboard/gamebox.py +1 -1
- pywargame/cyberboard/gbxext.py +13 -9
- pywargame/cyberboard/gsnexp.py +17 -8
- pywargame/cyberboard/gsnext.py +12 -7
- pywargame/cyberboard/head.py +2 -1
- pywargame/cyberboard/image.py +1 -1
- pywargame/cyberboard/mark.py +1 -1
- pywargame/cyberboard/palette.py +2 -1
- pywargame/cyberboard/piece.py +2 -1
- pywargame/cyberboard/player.py +1 -1
- pywargame/cyberboard/scenario.py +1 -1
- pywargame/cyberboard/testgrid.py +2 -1
- pywargame/cyberboard/tile.py +2 -1
- pywargame/cyberboard/tray.py +2 -1
- pywargame/cyberboard/windows.py +1 -1
- pywargame/cyberboard/zeropwd.py +18 -11
- pywargame/latex/latexexporter.py +7 -7
- pywargame/latex/main.py +10 -6
- pywargame/vassal/__init__.py +3 -2
- pywargame/vassal/board.py +1 -1
- pywargame/vassal/buildfile.py +2 -1
- pywargame/vassal/chart.py +1 -1
- pywargame/vassal/chessclock.py +1 -1
- pywargame/vassal/collect.py +4 -3
- pywargame/vassal/command.py +1 -1
- pywargame/vassal/documentation.py +1 -1
- pywargame/vassal/dumpvsav.py +7 -2
- pywargame/vassal/element.py +2 -1
- pywargame/vassal/exporter.py +2 -2
- pywargame/vassal/extension.py +1 -1
- pywargame/vassal/folder.py +1 -1
- pywargame/vassal/game.py +1 -1
- pywargame/vassal/gameelements.py +29 -12
- pywargame/vassal/globalproperty.py +1 -1
- pywargame/vassal/grid.py +1 -1
- pywargame/vassal/map.py +1 -1
- pywargame/vassal/mapelements.py +1 -1
- pywargame/vassal/merge.py +8 -5
- pywargame/vassal/merger.py +1 -1
- pywargame/vassal/moduledata.py +2 -1
- pywargame/vassal/patch.py +8 -5
- pywargame/vassal/player.py +1 -1
- pywargame/vassal/trait.py +13 -10
- pywargame/vassal/traits/__init__.py +1 -1
- pywargame/vassal/traits/area.py +5 -3
- pywargame/vassal/traits/basic.py +1 -1
- pywargame/vassal/traits/calculatedproperty.py +1 -1
- pywargame/vassal/traits/cargo.py +4 -1
- pywargame/vassal/traits/click.py +1 -1
- pywargame/vassal/traits/clone.py +1 -1
- pywargame/vassal/traits/delete.py +1 -1
- pywargame/vassal/traits/deselect.py +1 -1
- pywargame/vassal/traits/dynamicproperty.py +1 -1
- pywargame/vassal/traits/globalcommand.py +1 -1
- pywargame/vassal/traits/globalhotkey.py +1 -1
- pywargame/vassal/traits/globalproperty.py +1 -1
- pywargame/vassal/traits/hide.py +1 -1
- pywargame/vassal/traits/label.py +1 -1
- pywargame/vassal/traits/layer.py +1 -1
- pywargame/vassal/traits/mark.py +1 -1
- pywargame/vassal/traits/mask.py +1 -1
- pywargame/vassal/traits/mat.py +4 -1
- pywargame/vassal/traits/moved.py +1 -1
- pywargame/vassal/traits/movefixed.py +1 -1
- pywargame/vassal/traits/nonrect.py +1 -1
- pywargame/vassal/traits/nostack.py +1 -1
- pywargame/vassal/traits/place.py +1 -1
- pywargame/vassal/traits/prototype.py +1 -1
- pywargame/vassal/traits/report.py +1 -1
- pywargame/vassal/traits/restrictaccess.py +1 -1
- pywargame/vassal/traits/restrictcommand.py +1 -1
- pywargame/vassal/traits/{return.py → retrn.py} +1 -1
- pywargame/vassal/traits/rotate.py +1 -1
- pywargame/vassal/traits/sendto.py +1 -1
- pywargame/vassal/traits/sheet.py +1 -1
- pywargame/vassal/traits/skel.py +1 -1
- pywargame/vassal/traits/stack.py +1 -1
- pywargame/vassal/traits/submenu.py +1 -1
- pywargame/vassal/traits/trail.py +1 -1
- pywargame/vassal/traits/trigger.py +1 -1
- pywargame/vassal/turn.py +1 -1
- pywargame/vassal/upgrade.py +1 -1
- pywargame/vassal/vmod.py +46 -2
- pywargame/vassal/widget.py +1 -1
- pywargame/vassal/withtraits.py +1 -1
- pywargame/vassal/zone.py +1 -1
- pywargame/zuntzu/__init__.py +9 -0
- pywargame/zuntzu/countersheet.py +3 -3
- pywargame/zuntzu/dicehand.py +2 -2
- pywargame/zuntzu/exporter.py +10 -10
- pywargame/zuntzu/gamebox.py +7 -7
- pywargame/zuntzu/map.py +2 -2
- pywargame/zuntzu/scenario.py +2 -2
- pywargame/zuntzu/ztexp.py +10 -8
- {pywargame-0.3.1.dist-info → pywargame-0.4.2.dist-info}/METADATA +51 -31
- pywargame-0.4.2.dist-info/RECORD +138 -0
- pywargame-0.4.2.dist-info/entry_points.txt +11 -0
- pywargame/cyberboard.py +0 -2728
- pywargame/gbx0pwd.py +0 -2776
- pywargame/gbxextract.py +0 -2795
- pywargame/gsnexport.py +0 -16499
- pywargame/gsnextract.py +0 -2790
- pywargame/vassal/patchcollect.py +0 -28
- pywargame/vassal/skel.py +0 -380
- pywargame/vassal.py +0 -12500
- pywargame/vmodpatch.py +0 -12548
- pywargame/vsavdump.py +0 -12533
- pywargame/vslmerge.py +0 -13015
- pywargame/wgexport.py +0 -16689
- pywargame/ztexport.py +0 -14351
- pywargame-0.3.1.dist-info/RECORD +0 -150
- /pywargame/vassal/{dumpcollect.py → collectdump.py} +0 -0
- /pywargame/vassal/{mrgcollect.py → collectmrg.py} +0 -0
- /pywargame/vassal/{xml.py → xmlns.py} +0 -0
- {pywargame-0.3.1.dist-info → pywargame-0.4.2.dist-info}/WHEEL +0 -0
- {pywargame-0.3.1.dist-info → pywargame-0.4.2.dist-info}/licenses/LICENSE +0 -0
- {pywargame-0.3.1.dist-info → pywargame-0.4.2.dist-info}/top_level.txt +0 -0
pywargame/vassal/extension.py
CHANGED
pywargame/vassal/folder.py
CHANGED
pywargame/vassal/game.py
CHANGED
pywargame/vassal/gameelements.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
## BEGIN_IMPORT
|
2
|
-
from common import VerboseGuard
|
2
|
+
from .. common import VerboseGuard
|
3
3
|
from . base import *
|
4
4
|
from . element import Element
|
5
5
|
from . withtraits import *
|
@@ -1059,17 +1059,34 @@ class MultiActionButton(GameElement):
|
|
1059
1059
|
disabledIcon = '', # image when disabled
|
1060
1060
|
menuItems = []): # Button texts
|
1061
1061
|
'''
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1062
|
+
A button that executes other buttons (by `buttonText` name)
|
1063
|
+
|
1064
|
+
Parameters
|
1065
|
+
----------
|
1066
|
+
game : pywargame.vassal.Game
|
1067
|
+
The game parent
|
1068
|
+
node : xml.dom.minidom.Node
|
1069
|
+
Possible node
|
1070
|
+
description : str
|
1071
|
+
Description (comment)
|
1072
|
+
text : str
|
1073
|
+
Text on button
|
1074
|
+
tooltip : str
|
1075
|
+
Button tool-tip
|
1076
|
+
icon : str
|
1077
|
+
Icon on button
|
1078
|
+
hotkey : str
|
1079
|
+
Hotkey or named command to execute button
|
1080
|
+
canDisable : bool
|
1081
|
+
If this can be disabled
|
1082
|
+
propertyGate : str
|
1083
|
+
When property (not expression) is `true`, then disable
|
1084
|
+
this button
|
1085
|
+
disabledIcon : str
|
1086
|
+
Icon to use when disabled
|
1087
|
+
menuItems : list of str
|
1088
|
+
`buttonText` of other buttons to execute
|
1089
|
+
(note, not named commands or hotkeys).
|
1073
1090
|
'''
|
1074
1091
|
super().__init__(game,
|
1075
1092
|
self.TAG,
|
pywargame/vassal/grid.py
CHANGED
pywargame/vassal/map.py
CHANGED
pywargame/vassal/mapelements.py
CHANGED
pywargame/vassal/merge.py
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
#!/usr/bin/env python
|
2
2
|
## BEGIN_IMPORTS
|
3
|
-
from vassal import Merger
|
4
|
-
from common import Verbose
|
3
|
+
from pywargame.vassal import Merger
|
4
|
+
from pywargame.common import Verbose
|
5
5
|
## END_IMPORTS
|
6
6
|
|
7
|
-
|
8
7
|
# ====================================================================
|
9
|
-
|
8
|
+
def mergeMain():
|
10
9
|
from argparse import ArgumentParser, FileType
|
11
10
|
|
12
11
|
ap = ArgumentParser(description='Merge two modules or extensions')
|
@@ -49,7 +48,11 @@ if __name__ == '__main__':
|
|
49
48
|
op.unlink(missing_ok=True)
|
50
49
|
|
51
50
|
raise
|
52
|
-
|
51
|
+
|
52
|
+
|
53
|
+
# ====================================================================
|
54
|
+
if __name__ == '__main__':
|
55
|
+
mergeMain()
|
53
56
|
|
54
57
|
|
55
58
|
#
|
pywargame/vassal/merger.py
CHANGED
pywargame/vassal/moduledata.py
CHANGED
pywargame/vassal/patch.py
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
#
|
3
3
|
# Patch a module
|
4
4
|
## BEGIN_IMPORTS
|
5
|
-
from vassal
|
6
|
-
from common import Verbose
|
5
|
+
from pywargame.vassal import VMod
|
6
|
+
from pywargame.common import Verbose
|
7
7
|
## END_IMPORT
|
8
8
|
|
9
9
|
# ====================================================================
|
@@ -18,7 +18,7 @@ def patchIt(args):
|
|
18
18
|
VMod.patch(vmodname, patchname, args.verbose)
|
19
19
|
|
20
20
|
# ====================================================================
|
21
|
-
|
21
|
+
def patchMain():
|
22
22
|
from argparse import ArgumentParser, FileType
|
23
23
|
|
24
24
|
ap = ArgumentParser(description='Patch a module with a Python script')
|
@@ -35,10 +35,13 @@ if __name__ == '__main__':
|
|
35
35
|
action='store_true')
|
36
36
|
|
37
37
|
args = ap.parse_args()
|
38
|
-
|
39
38
|
|
40
39
|
patchIt(args)
|
41
|
-
|
40
|
+
|
41
|
+
# ====================================================================
|
42
|
+
if __name__ == '__main__':
|
43
|
+
patchMain()
|
44
|
+
|
42
45
|
#
|
43
46
|
# EOF
|
44
47
|
#
|
pywargame/vassal/player.py
CHANGED
pywargame/vassal/trait.py
CHANGED
@@ -6,7 +6,8 @@ class Trait:
|
|
6
6
|
|
7
7
|
Unlike the Element classes, this actually holds state that
|
8
8
|
isn't reflected elsewhere in the DOM. This means that the
|
9
|
-
data here is local to the object. So when we do
|
9
|
+
data here is local to the object. So when we do::
|
10
|
+
|
10
11
|
|
11
12
|
piece = foo.getPieceSlots()[0]
|
12
13
|
traits = p.getTraits()
|
@@ -14,23 +15,25 @@ class Trait:
|
|
14
15
|
if trait.ID == 'piece':
|
15
16
|
trait["gpid"] = newPid
|
16
17
|
trait["lpid"] = newPid
|
17
|
-
|
18
|
+
|
18
19
|
we do not actually change anything in the DOM. To do that, we
|
19
|
-
must add back _all_ the traits as
|
20
|
-
|
20
|
+
must add back _all_ the traits as::
|
21
|
+
|
21
22
|
piece.setTraits(traits)
|
22
23
|
|
23
|
-
We can add traits to a piece, like
|
24
|
-
|
24
|
+
We can add traits to a piece, like::
|
25
|
+
|
25
26
|
piece.addTrait(MarkTrait('Hello','World'))
|
26
|
-
|
27
|
+
|
27
28
|
But it is not particularly efficient. Better to do
|
28
|
-
(continuing from above)
|
29
|
-
|
29
|
+
(continuing from above)::
|
30
|
+
|
31
|
+
|
30
32
|
traits.append(MarkTrait('Hello','World;)
|
31
33
|
piece.setTraits(traits)
|
34
|
+
|
32
35
|
|
33
|
-
.. include::
|
36
|
+
.. include:: traits/README.md
|
34
37
|
:parser: myst_parser.sphinx_
|
35
38
|
|
36
39
|
'''
|
pywargame/vassal/traits/area.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
## BEGIN_IMPORT
|
2
|
-
from common import VerboseGuard
|
2
|
+
from ... common import VerboseGuard
|
3
3
|
from .. trait import Trait
|
4
4
|
from .. base import rgb, key
|
5
5
|
## END_IMPORT
|
@@ -40,8 +40,10 @@ class AreaTrait(Trait):
|
|
40
40
|
onKey = onKey,
|
41
41
|
offMenuText = offMenuText,
|
42
42
|
offKey = offKey,
|
43
|
-
globallyVisible = globallyVisible
|
44
|
-
|
43
|
+
globallyVisible = globallyVisible)
|
44
|
+
'''Create an area effect trait
|
45
|
+
|
46
|
+
'''
|
45
47
|
self.setState(active = alwaysActive or not globallyVisible)
|
46
48
|
|
47
49
|
Trait.known_traits.append(AreaTrait)
|
pywargame/vassal/traits/basic.py
CHANGED
pywargame/vassal/traits/cargo.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
## BEGIN_IMPORT
|
2
|
-
from common import VerboseGuard
|
2
|
+
from ... common import VerboseGuard
|
3
3
|
from .. trait import Trait
|
4
4
|
## END_IMPORT
|
5
5
|
|
@@ -14,6 +14,9 @@ class CargoTrait(Trait):
|
|
14
14
|
detectionDistanceY = 0,
|
15
15
|
attachKey = '',
|
16
16
|
detachKey = ''):
|
17
|
+
'''Create cargo trait
|
18
|
+
|
19
|
+
'''
|
17
20
|
self.setType(description = description,
|
18
21
|
maintainRelativeFacing = maintainRelativeFacing,
|
19
22
|
detectionDistanceX = detectionDistanceX,
|
pywargame/vassal/traits/click.py
CHANGED
pywargame/vassal/traits/clone.py
CHANGED
pywargame/vassal/traits/hide.py
CHANGED
pywargame/vassal/traits/label.py
CHANGED
pywargame/vassal/traits/layer.py
CHANGED
pywargame/vassal/traits/mark.py
CHANGED
pywargame/vassal/traits/mask.py
CHANGED
pywargame/vassal/traits/mat.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
## BEGIN_IMPORT
|
2
|
-
from common import VerboseGuard
|
2
|
+
from ... common import VerboseGuard
|
3
3
|
from .. trait import Trait
|
4
4
|
## END_IMPORT
|
5
5
|
|
@@ -10,6 +10,9 @@ class MatTrait(Trait):
|
|
10
10
|
def __init__(self,
|
11
11
|
name = 'Mat',
|
12
12
|
description = ''):
|
13
|
+
'''Create mat trait
|
14
|
+
|
15
|
+
'''
|
13
16
|
self.setType(name = name,
|
14
17
|
description = description)
|
15
18
|
self.setState(content='0')
|
pywargame/vassal/traits/moved.py
CHANGED
pywargame/vassal/traits/place.py
CHANGED
pywargame/vassal/traits/sheet.py
CHANGED
pywargame/vassal/traits/skel.py
CHANGED
pywargame/vassal/traits/stack.py
CHANGED
pywargame/vassal/traits/trail.py
CHANGED
pywargame/vassal/turn.py
CHANGED
pywargame/vassal/upgrade.py
CHANGED