Class: Missions::Events::Expired

Inherits:
MissionEvent show all
Defined in:
lib/missions/events/expired.rb

Overview

Spawned by the local missions subsystem upon mission expiration

Instance Attribute Summary

Attributes inherited from MissionEvent

#mission, #registry

Attributes inherited from Omega::Server::Event

#handlers, #id, #registry, #timestamp

Instance Method Summary collapse

Methods inherited from MissionEvent

#event_args, #initialize, #json_data

Methods inherited from Omega::Server::HandledEvent

#handlers_json, #initialize

Methods inherited from Omega::Server::Event

#event_args, #handlers_json, #initialize, #invoke, json_create, #json_data, #should_exec?, #time_elapsed?, #to_json, #to_s

Constructor Details

This class inherits a constructor from Missions::Events::MissionEvent

Instance Method Details

#handle_eventObject

Handle event


18
19
20
21
# File 'lib/missions/events/expired.rb', line 18

def handle_event
  mission.failed! # if mission.expired? && !mission.completed? TODO?
  update_mission
end

#typeObject


13
14
15
# File 'lib/missions/events/expired.rb', line 13

def type
  'expired'
end