From e0924443ccb369406fc9a8e0638b292568027741 Mon Sep 17 00:00:00 2001 From: Jeffrey Phillips Freeman <jeffrey.freeman@syncleus.com> Date: Wed, 24 Feb 2021 23:22:51 -0500 Subject: [PATCH] Moved remaining handlers out of the generic file and into their own files. --- lib/aethyr/core/input_handlers/close.rb | 2 +- lib/aethyr/core/input_handlers/date.rb | 50 +++++ lib/aethyr/core/input_handlers/feel.rb | 48 +++++ lib/aethyr/core/input_handlers/fill.rb | 48 +++++ lib/aethyr/core/input_handlers/generic.rb | 230 ---------------------- lib/aethyr/core/input_handlers/listen.rb | 48 +++++ lib/aethyr/core/input_handlers/satiety.rb | 64 ++++++ lib/aethyr/core/input_handlers/smell.rb | 48 +++++ lib/aethyr/core/input_handlers/status.rb | 48 +++++ lib/aethyr/core/input_handlers/taste.rb | 48 +++++ lib/aethyr/core/input_handlers/time.rb | 50 +++++ lib/aethyr/core/input_handlers/who.rb | 48 +++++ lib/aethyr/core/input_handlers/write.rb | 47 +++++ 13 files changed, 548 insertions(+), 231 deletions(-) create mode 100644 lib/aethyr/core/input_handlers/date.rb create mode 100644 lib/aethyr/core/input_handlers/feel.rb create mode 100644 lib/aethyr/core/input_handlers/fill.rb delete mode 100644 lib/aethyr/core/input_handlers/generic.rb create mode 100644 lib/aethyr/core/input_handlers/listen.rb create mode 100644 lib/aethyr/core/input_handlers/satiety.rb create mode 100644 lib/aethyr/core/input_handlers/smell.rb create mode 100644 lib/aethyr/core/input_handlers/status.rb create mode 100644 lib/aethyr/core/input_handlers/taste.rb create mode 100644 lib/aethyr/core/input_handlers/time.rb create mode 100644 lib/aethyr/core/input_handlers/who.rb create mode 100644 lib/aethyr/core/input_handlers/write.rb diff --git a/lib/aethyr/core/input_handlers/close.rb b/lib/aethyr/core/input_handlers/close.rb index 49790b3..db4c5d1 100644 --- a/lib/aethyr/core/input_handlers/close.rb +++ b/lib/aethyr/core/input_handlers/close.rb @@ -36,7 +36,7 @@ EOF end def initialize(player) - super(player, ["close"], help_entries: CloseHandler.create_help_entries) + super(player, ["close", "shut"], help_entries: CloseHandler.create_help_entries) end def self.object_added(data) diff --git a/lib/aethyr/core/input_handlers/date.rb b/lib/aethyr/core/input_handlers/date.rb new file mode 100644 index 0000000..5656b57 --- /dev/null +++ b/lib/aethyr/core/input_handlers/date.rb @@ -0,0 +1,50 @@ +require "aethyr/core/actions/commands/date" +require "aethyr/core/registry" +require "aethyr/core/input_handlers/command_handler" + +module Aethyr + module Core + module Commands + module Date + class DateHandler < Aethyr::Extend::CommandHandler + + def self.create_help_entries + help_entries = [] + + command = "date" + see_also = nil + syntax_formats = ["DATE"] + aliases = nil + content = <<'EOF' +Date + +Shows the current date in Aethyr. + +EOF + help_entries.push(Aethyr::Core::Help::HelpEntry.new(command, content: content, syntax_formats: syntax_formats, see_also: see_also, aliases: aliases)) + + return help_entries + end + + + def initialize(player) + super(player, ["date"], help_entries: DateHandler.create_help_entries) + end + + def self.object_added(data) + super(data, self) + end + + def player_input(data) + super(data) + case data[:input] + when /^date$/i + $manager.submit_action(Aethyr::Core::Actions::Date::DateCommand.new(@player, {})) + end + end + end + Aethyr::Extend::HandlerRegistry.register_handler(DateHandler) + end + end + end +end diff --git a/lib/aethyr/core/input_handlers/feel.rb b/lib/aethyr/core/input_handlers/feel.rb new file mode 100644 index 0000000..848220a --- /dev/null +++ b/lib/aethyr/core/input_handlers/feel.rb @@ -0,0 +1,48 @@ +require "aethyr/core/actions/commands/feel" +require "aethyr/core/registry" +require "aethyr/core/input_handlers/command_handler" + +module Aethyr + module Core + module Commands + module Feel + class FeelHandler < Aethyr::Extend::CommandHandler + + def self.create_help_entries + help_entries = [] + + command = "feel" + see_also = nil + syntax_formats = ["FEEL [target]"] + aliases = nil + content = <<'EOF' +Feel the specified target. + +EOF + help_entries.push(Aethyr::Core::Help::HelpEntry.new(command, content: content, syntax_formats: syntax_formats, see_also: see_also, aliases: aliases)) + + return help_entries + end + + + def initialize(player) + super(player, ['feel'], help_entries: FeelHandler.create_help_entries) + end + + def self.object_added(data) + super(data, self) + end + + def player_input(data) + super(data) + case data[:input] + when /^(feel)(\s+(.+))?$/i + $manager.submit_action(Aethyr::Core::Actions::Feel::FeelCommand.new(@player, { :target => $3})) + end + end + end + Aethyr::Extend::HandlerRegistry.register_handler(FeelHandler) + end + end + end +end diff --git a/lib/aethyr/core/input_handlers/fill.rb b/lib/aethyr/core/input_handlers/fill.rb new file mode 100644 index 0000000..c160125 --- /dev/null +++ b/lib/aethyr/core/input_handlers/fill.rb @@ -0,0 +1,48 @@ +require "aethyr/core/actions/commands/fill" +require "aethyr/core/registry" +require "aethyr/core/input_handlers/command_handler" + +module Aethyr + module Core + module Commands + module Fill + class FillHandler < Aethyr::Extend::CommandHandler + + def self.create_help_entries + help_entries = [] + + command = "fill" + see_also = nil + syntax_formats = ["FILL [container] FROM [source]"] + aliases = nil + content = <<'EOF' +Fill a container from a source + +EOF + help_entries.push(Aethyr::Core::Help::HelpEntry.new(command, content: content, syntax_formats: syntax_formats, see_also: see_also, aliases: aliases)) + + return help_entries + end + + + def initialize(player) + super(player, ["fill"], help_entries: FillHandler.create_help_entries) + end + + def self.object_added(data) + super(data, self) + end + + def player_input(data) + super(data) + case data[:input] + when /^fill\s+(\w+)\s+from\s+(\w+)$/i + $manager.submit_action(Aethyr::Core::Actions::Fill::FillCommand.new(@player, { :object => $1, :from => $2})) + end + end + end + Aethyr::Extend::HandlerRegistry.register_handler(FillHandler) + end + end + end +end diff --git a/lib/aethyr/core/input_handlers/generic.rb b/lib/aethyr/core/input_handlers/generic.rb deleted file mode 100644 index 1f7be28..0000000 --- a/lib/aethyr/core/input_handlers/generic.rb +++ /dev/null @@ -1,230 +0,0 @@ -require "aethyr/core/actions/commands/feel" -require "aethyr/core/actions/commands/listen" -require "aethyr/core/actions/commands/smell" -require "aethyr/core/actions/commands/taste" -require "aethyr/core/actions/commands/write" -require "aethyr/core/actions/commands/who" -require "aethyr/core/actions/commands/date" -require "aethyr/core/actions/commands/time" -require "aethyr/core/actions/commands/fill" -require "aethyr/core/actions/commands/status" -require "aethyr/core/actions/commands/satiety" -require "aethyr/core/actions/commands/health" -require 'aethyr/core/issues' -require "aethyr/core/registry" -require "aethyr/core/input_handlers/command_handler" - -module Aethyr - module Core - module Commands - module Generic - class GenericHandler < Aethyr::Extend::CommandHandler - - def self.create_help_entries - help_entries = [] - - - - - command = "satiety" - see_also = ["STAT", "HEALTH"] - syntax_formats = ["HUNGER", "SATIETY"] - aliases = nil - content = <<'EOF' -Shows you how hungry you are. - -You can be: - completely stuffed - full and happy - full and happy - satisfied - not hungry - slightly hungry - slightly hungry - peckish - hungry - very hungry - famished - starving - literally dying of hunger - -EOF - help_entries.push(Aethyr::Core::Help::HelpEntry.new(command, content: content, syntax_formats: syntax_formats, see_also: see_also, aliases: aliases)) - - - - command = "status" - see_also = ["INVENTORY", "HUNGER", "HEALTH"] - syntax_formats = ["STATUS", "STAT", "ST"] - aliases = nil - content = <<'EOF' -Shows your current health, hunger/satiety, and position. - -EOF - help_entries.push(Aethyr::Core::Help::HelpEntry.new(command, content: content, syntax_formats: syntax_formats, see_also: see_also, aliases: aliases)) - - - - command = "fill" - see_also = nil - syntax_formats = ["FILL [container] FROM [source]"] - aliases = nil - content = <<'EOF' -Fill a container from a source - -EOF - help_entries.push(Aethyr::Core::Help::HelpEntry.new(command, content: content, syntax_formats: syntax_formats, see_also: see_also, aliases: aliases)) - - - - command = "date_time" - see_also = nil - syntax_formats = ["DATE"] - aliases = nil - content = <<'EOF' -Date and Time - - TIME - -Shows the current date and time in Aethyr. Not completely done yet, but it is a first step. - -EOF - help_entries.push(Aethyr::Core::Help::HelpEntry.new(command, content: content, syntax_formats: syntax_formats, see_also: see_also, aliases: aliases)) - - - - command = "who" - see_also = nil - syntax_formats = ["WHO"] - aliases = nil - content = <<'EOF' -This will list everyone else who is currently in Aethyr and where they happen to be at the moment. - -EOF - help_entries.push(Aethyr::Core::Help::HelpEntry.new(command, content: content, syntax_formats: syntax_formats, see_also: see_also, aliases: aliases)) - - - - - - - command = "write" - see_also = nil - syntax_formats = ["WRITE [target]"] - aliases = nil - content = <<'EOF' -Write something on the specified target. - -EOF - help_entries.push(Aethyr::Core::Help::HelpEntry.new(command, content: content, syntax_formats: syntax_formats, see_also: see_also, aliases: aliases)) - - - - command = "taste" - see_also = nil - syntax_formats = ["TASTE [target]"] - aliases = nil - content = <<'EOF' -Taste the specified target. - -EOF - help_entries.push(Aethyr::Core::Help::HelpEntry.new(command, content: content, syntax_formats: syntax_formats, see_also: see_also, aliases: aliases)) - - - - command = "smell" - see_also = nil - syntax_formats = ["SMELL [target]"] - aliases = nil - content = <<'EOF' -Smell the specified target. - -EOF - help_entries.push(Aethyr::Core::Help::HelpEntry.new(command, content: content, syntax_formats: syntax_formats, see_also: see_also, aliases: aliases)) - - - - command = "listen" - see_also = nil - syntax_formats = ["LISTEN [target]"] - aliases = nil - content = <<'EOF' -Listen to the specified target. - -EOF - help_entries.push(Aethyr::Core::Help::HelpEntry.new(command, content: content, syntax_formats: syntax_formats, see_also: see_also, aliases: aliases)) - - - - command = "feel" - see_also = nil - syntax_formats = ["FEEL [target]"] - aliases = nil - content = <<'EOF' -Feel the specified target. - -EOF - help_entries.push(Aethyr::Core::Help::HelpEntry.new(command, content: content, syntax_formats: syntax_formats, see_also: see_also, aliases: aliases)) - - return help_entries - end - - - def initialize(player) - super(player, ['date', 'feel', 'taste', 'smell', 'sniff', 'lick', 'listen', 'hunger', 'satiety', 'shut', 'status', 'stat', 'st', 'time', 'typo', 'who', 'write'], help_entries: GenericHandler.create_help_entries) - end - - def self.object_added(data) - super(data, self) - end - - def player_input(data) - super(data) - case data[:input] - when /^(satiety|hunger)$/i - $manager.submit_action(Aethyr::Core::Actions::Satiety::SatietyCommand.new(@player, {})) - when /^(st|stat|status)$/i - $manager.submit_action(Aethyr::Core::Actions::Status::StatusCommand.new(@player, {})) - when /^write\s+(.*)/i - $manager.submit_action(Aethyr::Core::Actions::Write::WriteCommand.new(@player, { :target => $1.strip})) - when /^(listen)(\s+(.+))?$/i - $manager.submit_action(Aethyr::Core::Actions::Listen::ListenCommand.new(@player, { :target => $3})) - when /^(smell|sniff)(\s+(.+))?$/i - $manager.submit_action(Aethyr::Core::Actions::Smell::SmellCommand.new(@player, { :target => $3})) - when /^(taste|lick)(\s+(.+))?$/i - $manager.submit_action(Aethyr::Core::Actions::Taste::TasteCommand.new(@player, { :target => $3})) - when /^(feel)(\s+(.+))?$/i - $manager.submit_action(Aethyr::Core::Actions::Feel::FeelCommand.new(@player, { :target => $3})) - when /^fill\s+(\w+)\s+from\s+(\w+)$/i - $manager.submit_action(Aethyr::Core::Actions::Fill::FillCommand.new(@player, { :object => $1, :from => $2})) - when /^who$/i - $manager.submit_action(Aethyr::Core::Actions::Who::WhoCommand.new(@player, {})) - when /^time$/i - $manager.submit_action(Aethyr::Core::Actions::Time::TimeCommand.new(@player, {})) - when /^date$/i - $manager.submit_action(Aethyr::Core::Actions::Date::DateCommand.new(@player, {})) - end - end - - private - #Display health. - - - - - - - - - - - - - - end - - Aethyr::Extend::HandlerRegistry.register_handler(GenericHandler) - end - end - end -end diff --git a/lib/aethyr/core/input_handlers/listen.rb b/lib/aethyr/core/input_handlers/listen.rb new file mode 100644 index 0000000..cc204ec --- /dev/null +++ b/lib/aethyr/core/input_handlers/listen.rb @@ -0,0 +1,48 @@ +require "aethyr/core/actions/commands/listen" +require "aethyr/core/registry" +require "aethyr/core/input_handlers/command_handler" + +module Aethyr + module Core + module Commands + module Listen + class ListenHandler < Aethyr::Extend::CommandHandler + + def self.create_help_entries + help_entries = [] + + command = "listen" + see_also = nil + syntax_formats = ["LISTEN [target]"] + aliases = nil + content = <<'EOF' +Listen to the specified target. + +EOF + help_entries.push(Aethyr::Core::Help::HelpEntry.new(command, content: content, syntax_formats: syntax_formats, see_also: see_also, aliases: aliases)) + + return help_entries + end + + + def initialize(player) + super(player, ["listen"], help_entries: ListenHandler.create_help_entries) + end + + def self.object_added(data) + super(data, self) + end + + def player_input(data) + super(data) + case data[:input] + when /^(listen)(\s+(.+))?$/i + $manager.submit_action(Aethyr::Core::Actions::Listen::ListenCommand.new(@player, { :target => $3})) + end + end + end + Aethyr::Extend::HandlerRegistry.register_handler(ListenHandler) + end + end + end +end diff --git a/lib/aethyr/core/input_handlers/satiety.rb b/lib/aethyr/core/input_handlers/satiety.rb new file mode 100644 index 0000000..d65b2c9 --- /dev/null +++ b/lib/aethyr/core/input_handlers/satiety.rb @@ -0,0 +1,64 @@ + +require "aethyr/core/actions/commands/satiety" +require "aethyr/core/registry" +require "aethyr/core/input_handlers/command_handler" + +module Aethyr + module Core + module Commands + module Satiety + class SatietyHandler < Aethyr::Extend::CommandHandler + + def self.create_help_entries + help_entries = [] + + command = "satiety" + see_also = ["STAT", "HEALTH"] + syntax_formats = ["HUNGER", "SATIETY"] + aliases = ["hunger"] + content = <<'EOF' +Shows you how hungry you are. + +You can be: + completely stuffed + full and happy + full and happy + satisfied + not hungry + slightly hungry + slightly hungry + peckish + hungry + very hungry + famished + starving + literally dying of hunger + +EOF + help_entries.push(Aethyr::Core::Help::HelpEntry.new(command, content: content, syntax_formats: syntax_formats, see_also: see_also, aliases: aliases)) + + return help_entries + end + + + def initialize(player) + super(player, ["hunger", "satiety"], help_entries: SatietyHandler.create_help_entries) + end + + def self.object_added(data) + super(data, self) + end + + def player_input(data) + super(data) + case data[:input] + when /^(satiety|hunger)$/i + $manager.submit_action(Aethyr::Core::Actions::Satiety::SatietyCommand.new(@player, {})) + end + end + end + Aethyr::Extend::HandlerRegistry.register_handler(SatietyHandler) + end + end + end +end diff --git a/lib/aethyr/core/input_handlers/smell.rb b/lib/aethyr/core/input_handlers/smell.rb new file mode 100644 index 0000000..029961d --- /dev/null +++ b/lib/aethyr/core/input_handlers/smell.rb @@ -0,0 +1,48 @@ +require "aethyr/core/actions/commands/smell" +require "aethyr/core/registry" +require "aethyr/core/input_handlers/command_handler" + +module Aethyr + module Core + module Commands + module Smell + class SmellHandler < Aethyr::Extend::CommandHandler + + def self.create_help_entries + help_entries = [] + + command = "smell" + see_also = nil + syntax_formats = ["SMELL [target]"] + aliases = ["sniff"] + content = <<'EOF' +Smell the specified target. + +EOF + help_entries.push(Aethyr::Core::Help::HelpEntry.new(command, content: content, syntax_formats: syntax_formats, see_also: see_also, aliases: aliases)) + + return help_entries + end + + + def initialize(player) + super(player, ["smell", "sniff"], help_entries: SmellHandler.create_help_entries) + end + + def self.object_added(data) + super(data, self) + end + + def player_input(data) + super(data) + case data[:input] + when /^(smell|sniff)(\s+(.+))?$/i + $manager.submit_action(Aethyr::Core::Actions::Smell::SmellCommand.new(@player, { :target => $3})) + end + end + end + Aethyr::Extend::HandlerRegistry.register_handler(SmellHandler) + end + end + end +end diff --git a/lib/aethyr/core/input_handlers/status.rb b/lib/aethyr/core/input_handlers/status.rb new file mode 100644 index 0000000..5ec4ba5 --- /dev/null +++ b/lib/aethyr/core/input_handlers/status.rb @@ -0,0 +1,48 @@ +require "aethyr/core/actions/commands/status" +require "aethyr/core/registry" +require "aethyr/core/input_handlers/command_handler" + +module Aethyr + module Core + module Commands + module Status + class StatusHandler < Aethyr::Extend::CommandHandler + + def self.create_help_entries + help_entries = [] + + command = "status" + see_also = ["INVENTORY", "HUNGER", "HEALTH"] + syntax_formats = ["STATUS", "STAT", "ST"] + aliases = nil + content = <<'EOF' +Shows your current health, hunger/satiety, and position. + +EOF + help_entries.push(Aethyr::Core::Help::HelpEntry.new(command, content: content, syntax_formats: syntax_formats, see_also: see_also, aliases: aliases)) + + return help_entries + end + + + def initialize(player) + super(player, ["st", "stat", "status"], help_entries: StatusHandler.create_help_entries) + end + + def self.object_added(data) + super(data, self) + end + + def player_input(data) + super(data) + case data[:input] + when /^(st|stat|status)$/i + $manager.submit_action(Aethyr::Core::Actions::Status::StatusCommand.new(@player, {})) + end + end + end + Aethyr::Extend::HandlerRegistry.register_handler(StatusHandler) + end + end + end +end diff --git a/lib/aethyr/core/input_handlers/taste.rb b/lib/aethyr/core/input_handlers/taste.rb new file mode 100644 index 0000000..f02037c --- /dev/null +++ b/lib/aethyr/core/input_handlers/taste.rb @@ -0,0 +1,48 @@ +require "aethyr/core/actions/commands/taste" +require "aethyr/core/registry" +require "aethyr/core/input_handlers/command_handler" + +module Aethyr + module Core + module Commands + module Taste + class TasteHandler < Aethyr::Extend::CommandHandler + + def self.create_help_entries + help_entries = [] + + command = "taste" + see_also = nil + syntax_formats = ["TASTE [target]"] + aliases = ["lick"] + content = <<'EOF' +Taste the specified target. + +EOF + help_entries.push(Aethyr::Core::Help::HelpEntry.new(command, content: content, syntax_formats: syntax_formats, see_also: see_also, aliases: aliases)) + + return help_entries + end + + + def initialize(player) + super(player, ["lick", "taste"], help_entries: TasteHandler.create_help_entries) + end + + def self.object_added(data) + super(data, self) + end + + def player_input(data) + super(data) + case data[:input] + when /^(taste|lick)(\s+(.+))?$/i + $manager.submit_action(Aethyr::Core::Actions::Taste::TasteCommand.new(@player, { :target => $3})) + end + end + end + Aethyr::Extend::HandlerRegistry.register_handler(TasteHandler) + end + end + end +end diff --git a/lib/aethyr/core/input_handlers/time.rb b/lib/aethyr/core/input_handlers/time.rb new file mode 100644 index 0000000..a64ef74 --- /dev/null +++ b/lib/aethyr/core/input_handlers/time.rb @@ -0,0 +1,50 @@ +require "aethyr/core/actions/commands/time" +require "aethyr/core/registry" +require "aethyr/core/input_handlers/command_handler" + +module Aethyr + module Core + module Commands + module Time + class TimeHandler < Aethyr::Extend::CommandHandler + + def self.create_help_entries + help_entries = [] + + command = "time" + see_also = nil + syntax_formats = ["TIME"] + aliases = nil + content = <<'EOF' +Time + +Shows the current time in Aethyr. + +EOF + help_entries.push(Aethyr::Core::Help::HelpEntry.new(command, content: content, syntax_formats: syntax_formats, see_also: see_also, aliases: aliases)) + + return help_entries + end + + + def initialize(player) + super(player, ["time"], help_entries: TimeHandler.create_help_entries) + end + + def self.object_added(data) + super(data, self) + end + + def player_input(data) + super(data) + case data[:input] + when /^time$/i + $manager.submit_action(Aethyr::Core::Actions::Time::TimeCommand.new(@player, {})) + end + end + end + Aethyr::Extend::HandlerRegistry.register_handler(TimeHandler) + end + end + end +end diff --git a/lib/aethyr/core/input_handlers/who.rb b/lib/aethyr/core/input_handlers/who.rb new file mode 100644 index 0000000..e7e028f --- /dev/null +++ b/lib/aethyr/core/input_handlers/who.rb @@ -0,0 +1,48 @@ +require "aethyr/core/actions/commands/who" +require "aethyr/core/registry" +require "aethyr/core/input_handlers/command_handler" + +module Aethyr + module Core + module Commands + module Who + class WhoHandler < Aethyr::Extend::CommandHandler + + def self.create_help_entries + help_entries = [] + + command = "who" + see_also = nil + syntax_formats = ["WHO"] + aliases = nil + content = <<'EOF' +This will list everyone else who is currently in Aethyr and where they happen to be at the moment. + +EOF + help_entries.push(Aethyr::Core::Help::HelpEntry.new(command, content: content, syntax_formats: syntax_formats, see_also: see_also, aliases: aliases)) + + return help_entries + end + + + def initialize(player) + super(player, ["who"], help_entries: WhoHandler.create_help_entries) + end + + def self.object_added(data) + super(data, self) + end + + def player_input(data) + super(data) + case data[:input] + when /^who$/i + $manager.submit_action(Aethyr::Core::Actions::Who::WhoCommand.new(@player, {})) + end + end + end + Aethyr::Extend::HandlerRegistry.register_handler(WhoHandler) + end + end + end +end diff --git a/lib/aethyr/core/input_handlers/write.rb b/lib/aethyr/core/input_handlers/write.rb new file mode 100644 index 0000000..afde91d --- /dev/null +++ b/lib/aethyr/core/input_handlers/write.rb @@ -0,0 +1,47 @@ +require "aethyr/core/actions/commands/write" +require "aethyr/core/registry" +require "aethyr/core/input_handlers/command_handler" + +module Aethyr + module Core + module Commands + module Write + class WriteHandler < Aethyr::Extend::CommandHandler + + def self.create_help_entries + help_entries = [] + command = "write" + see_also = nil + syntax_formats = ["WRITE [target]"] + aliases = nil + content = <<'EOF' +Write something on the specified target. + +EOF + help_entries.push(Aethyr::Core::Help::HelpEntry.new(command, content: content, syntax_formats: syntax_formats, see_also: see_also, aliases: aliases)) + + return help_entries + end + + + def initialize(player) + super(player, ["write"], help_entries: WriteHandler.create_help_entries) + end + + def self.object_added(data) + super(data, self) + end + + def player_input(data) + super(data) + case data[:input] + when /^write\s+(.*)/i + $manager.submit_action(Aethyr::Core::Actions::Write::WriteCommand.new(@player, { :target => $1.strip})) + end + end + end + Aethyr::Extend::HandlerRegistry.register_handler(WriteHandler) + end + end + end +end -- GitLab