diff --git a/conf/config.yaml b/conf/config.yaml index b5da3ca1e142ef7477c75182f8f1350b2b2c2341..af129658ac2bfb40d3b0178a154c0fe8ddd875b8 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -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 diff --git a/lib/aethyr/core/actions/action.rb b/lib/aethyr/core/actions/action.rb index 8c4448c19322379bb99ea3a2ac90487d591acb5b..3e40235499bafa38dd72c7be1f5d1178c36775ab 100644 --- a/lib/aethyr/core/actions/action.rb +++ b/lib/aethyr/core/actions/action.rb @@ -1,14 +1,22 @@ 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 diff --git a/lib/aethyr/core/actions/action_groups.rb b/lib/aethyr/core/actions/action_groups.rb new file mode 100644 index 0000000000000000000000000000000000000000..62938e24699cbb088865b43c7439cb6fd5fea3cd --- /dev/null +++ b/lib/aethyr/core/actions/action_groups.rb @@ -0,0 +1,22 @@ +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 diff --git a/lib/aethyr/core/actions/command_action.rb b/lib/aethyr/core/actions/command_action.rb index 31c844a5cf62a90e7d052c99e5e607d7d95af0cc..d576d78144b8b830c4326ae0e663fc7c0347b4c0 100644 --- a/lib/aethyr/core/actions/command_action.rb +++ b/lib/aethyr/core/actions/command_action.rb @@ -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