home
·
contact
·
privacy
projects
/
plomrogue2
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve chat message meta data display.
[plomrogue2]
/
plomrogue
/
things.py
diff --git
a/plomrogue/things.py
b/plomrogue/things.py
index 09cf7f0b8bac496e17c2e980494afd369ce09dcb..a13f771dd2f7821d9d895f837c8348375b30bf0b 100644
(file)
--- a/
plomrogue/things.py
+++ b/
plomrogue/things.py
@@
-7,6
+7,7
@@
import random
class ThingBase:
type_ = '?'
class ThingBase:
type_ = '?'
+ carrying = False
def __init__(self, game, id_=0, position=(YX(0, 0), YX(0, 0))):
self.game = game
def __init__(self, game, id_=0, position=(YX(0, 0), YX(0, 0))):
self.game = game
@@
-24,7
+25,6
@@
class Thing(ThingBase):
protection = '.'
commandable = False
carried = False
protection = '.'
commandable = False
carried = False
- carrying = False
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@@
-89,10
+89,15
@@
class Thing(ThingBase):
url_limits)
lowered_nick = lower_msg_by_volume(name, volume,
largest_audible_distance)
url_limits)
lowered_nick = lower_msg_by_volume(name, volume,
largest_audible_distance)
+ symbol = ''
+ if listener.fov_test(self.position[0], self.position[1]):
+ self.game.io.send('CHATFACE %s' % self.id_, c_id)
+ if self.type_ == 'Player' and hasattr(self, 'thing_char'):
+ symbol = '/@' + self.thing_char
self.game.io.send('CHAT ' +
self.game.io.send('CHAT ' +
- quote('
(volume: %.2f) %s: %s' % (volume
,
-
lowered_nick
,
-
lowered_msg)),
+ quote('
vol:%.f%s %s%s: %s' % (volume * 100, '%'
,
+
lowered_nick, symbol
,
+ lowered_msg)),
c_id)
c_id)