HackerExperience / Helix

GNU Affero General Public License v3.0
53 stars 10 forks source link

Storyline (Mission + Steps + Contacts + Email) #267

Closed renatomassaro closed 6 years ago

renatomassaro commented 6 years ago

This PR introduces the Story service, responsible for handling single-player campaign (Missions), Contacts (storyline characters) and Email (Player <> Contact communication). A mission is made of Steps. One step is the smallest action required to progress on the Storyline.

TODO

Incidental:


This change is Reviewable

renatomassaro commented 6 years ago

Reviewed 66 of 66 files at r1. Review status: all files reviewed at latest revision, 8 unresolved discussions.


lib/account/websocket/channel/account/requests/email_reply.ex, line 7 at r1 (raw file):

  Helix.Websocket.Request.register()

  defimpl Helix.Websocket.Requestable do

doc


lib/event/dispatcher/story.ex, line 2 at r1 (raw file):

defmodule Helix.Event.Dispatcher.Story do

doc


lib/story/action/story.ex, line 11 at r1 (raw file):


  alias Helix.Story.Event.Step.Proceeded, as: StepProceededEvent
  alias Helix.Story.Event.Email.Sent, as: EmailSentEvent

sort


lib/story/event/handler/story.ex, line 69 at r1 (raw file):

  end

  @spec handle_action(:complete | :fail | :noop, Step.t(struct)) ::

Move possible steppable actions to a type owned by Steppable


lib/story/model/step/macros.ex, line 19 at r1 (raw file):

  defmacro step(name, contact \\ nil, do: block) do
    quote do
      defmodule unquote(name) do

moduledoc false


lib/story/model/step/macros.ex, line 25 at r1 (raw file):

        Helix.Story.Model.Step.register()

        defimpl Helix.Story.Model.Steppable do

moduledoc false


lib/story/model/step/macros.ex, line 112 at r1 (raw file):

  defmacro filter(step, event, meta, opts) do
    quote do
      def handle_event(unquote(step), unquote(event), unquote(meta)) do

doc false


lib/story/model/step/macros.ex, line 147 at r1 (raw file):

    for email <- valid_emails do
      quote do
        def handle_event(

doc falsenn


Comments from Reviewable

renatomassaro commented 6 years ago

Reviewed 6 of 6 files at r2. Review status: all files reviewed at latest revision, 8 unresolved discussions.


lib/account/websocket/channel/account/requests/email_reply.ex, line 7 at r1 (raw file):

Previously, renatomassaro (Renato Massaro) wrote…
doc

Done.


lib/event/dispatcher/story.ex, line 2 at r1 (raw file):

Previously, renatomassaro (Renato Massaro) wrote…
doc

Done.


lib/story/action/story.ex, line 11 at r1 (raw file):

Previously, renatomassaro (Renato Massaro) wrote…
sort

Done.


lib/story/event/handler/story.ex, line 69 at r1 (raw file):

Previously, renatomassaro (Renato Massaro) wrote…
Move possible `steppable` actions to a type owned by Steppable

Done.


lib/story/model/step/macros.ex, line 19 at r1 (raw file):

Previously, renatomassaro (Renato Massaro) wrote…
moduledoc false

Done.


lib/story/model/step/macros.ex, line 25 at r1 (raw file):

Previously, renatomassaro (Renato Massaro) wrote…
moduledoc false

Done.


lib/story/model/step/macros.ex, line 112 at r1 (raw file):

Previously, renatomassaro (Renato Massaro) wrote…
doc false

Done.


lib/story/model/step/macros.ex, line 147 at r1 (raw file):

Previously, renatomassaro (Renato Massaro) wrote…
doc falsenn

Done.


Comments from Reviewable