diff --git a/balloons/ascii.say b/balloons/ascii.say index 1a9d0140..02d6d00f 100644 --- a/balloons/ascii.say +++ b/balloons/ascii.say @@ -1,5 +1,6 @@ /:/ \:\ +X:X n:_ : diff --git a/balloons/ascii.think b/balloons/ascii.think index 56591d2d..dce8de56 100644 --- a/balloons/ascii.think +++ b/balloons/ascii.think @@ -1,5 +1,6 @@ /:o \:o +X:o n:_ : diff --git a/balloons/cowsay.say b/balloons/cowsay.say index 51942faf..a00a704d 100644 --- a/balloons/cowsay.say +++ b/balloons/cowsay.say @@ -1,5 +1,6 @@ /:/ \:\ +X:X n:_ s:- diff --git a/balloons/cowsay.think b/balloons/cowsay.think index 1450bc78..c9bd31ce 100644 --- a/balloons/cowsay.think +++ b/balloons/cowsay.think @@ -1,5 +1,6 @@ /:o \:o +X:o n:_ s:- diff --git a/balloons/linux-vt.say b/balloons/linux-vt.say index 69a14aee..33d8f97c 100644 --- a/balloons/linux-vt.say +++ b/balloons/linux-vt.say @@ -1,5 +1,6 @@ /:/ \:\ +X:X n:─ : diff --git a/balloons/round.say b/balloons/round.say index 01ef456e..63a19913 100644 --- a/balloons/round.say +++ b/balloons/round.say @@ -1,5 +1,6 @@ /:╱ \:╲ +X:╳ n:─ : diff --git a/balloons/unicode.say b/balloons/unicode.say index a67a7f82..01ea3f0e 100644 --- a/balloons/unicode.say +++ b/balloons/unicode.say @@ -1,5 +1,6 @@ /:╱ \:╲ +X:╳ n:─ : diff --git a/balloons/unicode.think b/balloons/unicode.think index 005e545b..04e0c213 100644 --- a/balloons/unicode.think +++ b/balloons/unicode.think @@ -1,5 +1,6 @@ /:o \:o +X:o n:⁀ s:‿ diff --git a/src/backend.py b/src/backend.py index df971561..1f0c7307 100755 --- a/src/backend.py +++ b/src/backend.py @@ -69,7 +69,8 @@ class Backend(): if self.balloon is not None: self.link = {'\\' : linkcolour + self.balloon.link, - '/' : linkcolour + self.balloon.linkmirror} + '/' : linkcolour + self.balloon.linkmirror, + 'X' : linkcolour + self.balloon.linkcross} else: self.link = {} diff --git a/src/balloon.py b/src/balloon.py index 2448290a..59aefbab 100755 --- a/src/balloon.py +++ b/src/balloon.py @@ -43,6 +43,7 @@ class Balloon(): @param link:str The \-directional balloon line character @param linkmirror:str The /-directional balloon line character + @param linkcross:str The /-directional balloon crossing a \-driectional ballonon line character @param ww:str See the info manual @param ee:str See the info manual @param nw:list See the info manual @@ -62,8 +63,8 @@ class Balloon(): @param w:str See the info manual @param nww:str See the info manual ''' - def __init__(self, link, linkmirror, ww, ee, nw, nnw, n, nne, ne, nee, e, see, se, sse, s, ssw, sw, sww, w, nww): - (self.link, self.linkmirror) = (link, linkmirror) + def __init__(self, link, linkmirror, linkcross, ww, ee, nw, nnw, n, nne, ne, nee, e, see, se, sse, s, ssw, sw, sww, w, nww): + (self.link, self.linkmirror, self.linkcross) = (link, linkmirror, linkcross) (self.ww, self.ee) = (ww, ee) (self.nw, self.ne, self.se, self.sw) = (nw, ne, se, sw) (self.nnw, self.n, self.nne) = (nnw, n, nne) @@ -144,12 +145,12 @@ class Balloon(): ## Use default balloon if none is specified if balloonfile is None: if isthink: - return Balloon('o', 'o', '( ', ' )', [' _'], ['_'], ['_'], ['_'], ['_ '], ' )', ' )', ' )', ['- '], ['-'], ['-'], ['-'], [' -'], '( ', '( ', '( ') - return Balloon('\\', '/', '< ', ' >', [' _'], ['_'], ['_'], ['_'], ['_ '], ' \\', ' |', ' /', ['- '], ['-'], ['-'], ['-'], [' -'], '\\ ', '| ', '/ ') + return Balloon('o', 'o', 'o', '( ', ' )', [' _'], ['_'], ['_'], ['_'], ['_ '], ' )', ' )', ' )', ['- '], ['-'], ['-'], ['-'], [' -'], '( ', '( ', '( ') + return Balloon('\\', '/', 'X', '< ', ' >', [' _'], ['_'], ['_'], ['_'], ['_ '], ' \\', ' |', ' /', ['- '], ['-'], ['-'], ['-'], [' -'], '\\ ', '| ', '/ ') ## Initialise map for balloon parts map = {} - for elem in ('\\', '/', 'ww', 'ee', 'nw', 'nnw', 'n', 'nne', 'ne', 'nee', 'e', 'see', 'se', 'sse', 's', 'ssw', 'sw', 'sww', 'w', 'nww'): + for elem in ('\\', '/', 'X', 'ww', 'ee', 'nw', 'nnw', 'n', 'nne', 'ne', 'nee', 'e', 'see', 'se', 'sse', 's', 'ssw', 'sw', 'sww', 'w', 'nww'): map[elem] = [] ## Read all lines in the balloon file @@ -169,7 +170,7 @@ class Balloon(): map[last].append(value) ## Return the balloon - return Balloon(map['\\'][0], map['/'][0], map['ww'][0], map['ee'][0], map['nw'], map['nnw'], map['n'], + return Balloon(map['\\'][0], map['/'][0], map['X'][0], map['ww'][0], map['ee'][0], map['nw'], map['nnw'], map['n'], map['nne'], map['ne'], map['nee'][0], map['e'][0], map['see'][0], map['se'], map['sse'], map['s'], map['ssw'], map['sw'], map['sww'][0], map['w'][0], map['nww'][0])