Skip to content
Snippets Groups Projects
Commit 4b43d9b9 authored by Jeffrey Phillips Freeman's avatar Jeffrey Phillips Freeman :boom:
Browse files

Tweaked actions and action groups.

parent d64f05a1
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,7 @@
:restart_delay: 10
:address: 0.0.0.0
:intro_file: intro.txt
:start_room: 16326a80-4ec1-91b7-cfad-3e3d79b7a619
:start_room: 46cf2781-1e5e-d6e4-18e6-ea72ea437aa9
:restart_limit: 15
:mccp: false
:mssp: false
module Aethyr
module Core
module Actions
class Action
def initialize(**data)
@data = data.freeze
module Action
def concurrency
return :single
end
def action()
end
end
class Event
include Aethyr::Core::Actions::Action
def initialize(**data)
@data = data.freeze
end
end
end
end
end
module Aethyr
module Core
module Actions
class ActionGroup
attr_reader :concurrency
def initialize(concurrency, *actions)
@actions = *actions
@concurrency = concurrency
raise "Invalid concurrency type" if @concurrency != :parallel && @concurrency != :sequenial
raise "actions needs to have at least two values" if @actions.nil? || @actions.length < 2
end
def each
@actions.each { |e| yield e }
end
end
end
end
end
......@@ -3,7 +3,7 @@ require "aethyr/core/actions/action"
module Aethyr
module Core
module Actions
class CommandAction < Action
class CommandAction < Event
def initialize(actor, **data)
super(**data)
@player = actor
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment