diff --git a/lib/aethyr/core/actions/commands/command_action.rb b/lib/aethyr/core/actions/commands/command_action.rb index 344bcb95b40d15a7d65381427cb72c385e3c23a0..789a7b01dbddcc056819a6f33bbaa378db275202 100644 --- a/lib/aethyr/core/actions/commands/command_action.rb +++ b/lib/aethyr/core/actions/commands/command_action.rb @@ -13,10 +13,10 @@ module Aethyr #Looks in player's inventory and room for name. #Then checks at global level for GOID. def find_object(name, event) - if event[:actor].nil? + if self[:actor].nil? return $manager.find(name, nil) || $manager.get_object(name) else - return $manager.find(name, event[:actor]) || $manager.find(name, event[:actor].container) || $manager.get_object(name) + return $manager.find(name, self[:actor]) || $manager.find(name, self[:actor].container) || $manager.get_object(name) end end end diff --git a/lib/aethyr/core/event.rb b/lib/aethyr/core/event.rb index c24ce884daf5b3e76028e9f2e775c755fbe26465..21cfb3501ee5ec45646f21c5ca1fe0ce1c3a2b0d 100644 --- a/lib/aethyr/core/event.rb +++ b/lib/aethyr/core/event.rb @@ -61,18 +61,8 @@ class Event < OpenStruct #name must be a symbol which is the same as the module which handles the event. # #An optional hash can be passed in as well to define attributes. - def initialize(type, args = nil) + def initialize(**args) super args - self.type = type - end - - #This is the event type. <i>Depreciated.</i> - def type - @table[:type] - end - - def type= value - @table[:type] = value end #Retrieve an attribute.