45 lines
1.2 KiB
Elixir
45 lines
1.2 KiB
Elixir
defmodule Odinsea.Scripting.Supervisor do
|
|
@moduledoc """
|
|
Supervisor for the Scripting system.
|
|
|
|
Manages all scripting-related processes:
|
|
- Script Manager (base script loading and caching)
|
|
- NPC Script Manager (NPC conversations)
|
|
- Portal Script Manager (portal scripts)
|
|
- Reactor Script Manager (reactor scripts)
|
|
- Event Script Manager (event/party quest scripts)
|
|
"""
|
|
|
|
use Supervisor
|
|
|
|
@doc """
|
|
Starts the scripting supervisor.
|
|
"""
|
|
@spec start_link(keyword()) :: Supervisor.on_start()
|
|
def start_link(init_arg) do
|
|
Supervisor.start_link(__MODULE__, init_arg, name: __MODULE__)
|
|
end
|
|
|
|
@impl true
|
|
def init(_init_arg) do
|
|
children = [
|
|
# Base script manager - handles loading and caching
|
|
Odinsea.Scripting.Manager,
|
|
|
|
# NPC Script Manager - handles NPC conversations
|
|
Odinsea.Scripting.NPCManager,
|
|
|
|
# Portal Script Manager - handles scripted portals
|
|
Odinsea.Scripting.PortalManager,
|
|
|
|
# Reactor Script Manager - handles reactor interactions
|
|
Odinsea.Scripting.ReactorManager,
|
|
|
|
# Event Script Manager - handles events and party quests
|
|
Odinsea.Scripting.EventManager
|
|
]
|
|
|
|
Supervisor.init(children, strategy: :one_for_one)
|
|
end
|
|
end
|