From: Stefano Rivera Date: Sat, 17 May 2014 17:42:36 +0000 (+0200) Subject: Overrideable messages X-Git-Tag: 0.1~61 X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=bd20e189a992894f8c20226b127fdec426de6425;p=naja.git Overrideable messages --- diff --git a/naja/actions.py b/naja/actions.py index c0f19c6..c96a219 100644 --- a/naja/actions.py +++ b/naja/actions.py @@ -46,7 +46,11 @@ class LocationAction(object): substitutions['location_bits'] = bit_glyphs( location.bitwise_operand) - return self.TEXT % substitutions + text = self.TEXT + if self.data.get('message', None) is not None: + text = self.data['message'] + + return text % substitutions def check_available(self, player): return player.bits.check_bits(self.required_bits)