Changeset 538:e5ad08f5e268


Ignore:
Timestamp:
Sep 7, 2013, 7:13:17 PM (7 years ago)
Author:
Jeremy Thurgood <firxen@…>
Branch:
default
rebase_source:
67a66b452521509c905affd4261dcab5eee0950f
Message:

More prohibited action warnings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/protagonist.py

    r531 r538  
    190190
    191191    def handle_attack_key_down(self):
    192         if self.changing_sequence or self.check_timer('attack_cooldown'):
     192        if self.changing_sequence:
     193            self.fire_note(
     194                "You can't do anything until your form has stabilised.")
     195            return
     196        if self.check_timer('attack_cooldown'):
    193197            return
    194198        self.start_timer('attack_cooldown')
     
    198202    def handle_keypress(self, key_command):
    199203        if self.changing_sequence:
    200             return
     204            self.fire_note(
     205                "You can't do anything until your form has stabilised.")
    201206        if key_command == CMD_TOGGLE_FORM:
    202207            self.world.transformations += 1
     
    302307    def shoot(self):
    303308        if not self.has_item('gun'):
    304             AddDrawableEvent.post(EphemeralNote('You are not armed.', 1))
     309            self.fire_note('You are not armed.')
    305310            return
    306311        vec = vec_from_angle(self.angle, BULLET_SPEED)
     
    375380            self.toggle_form()
    376381        self.start_timer('change_delay')
     382
     383    def fire_note(self, msg, secs=1):
     384        AddDrawableEvent.post(EphemeralNote(msg, secs))
Note: See TracChangeset for help on using the changeset viewer.