BundleManager

Handles loading/parsing/initializing all bundles. AKA where the magic happens

Constructor

new BundleManager(state)

Parameters:
Name Type Description
state GameState

Methods

loadArea(bundle, areaName, areaPath)

Parameters:
Name Type Description
bundle string
areaName string
areaPath string

loadAreas(bundle, areasDir)

Parameters:
Name Type Description
bundle string
areasDir string

loadBehaviors(bundle, behaviorsDir)

Parameters:
Name Type Description
bundle string
behaviorsDir string

loadBundle(bundle, bundlePath)

Parameters:
Name Type Description
bundle string

Bundle name

bundlePath string

Path to bundle directory

loadBundles()

Load in all bundles

loadChannels(bundle, channelsFile)

Parameters:
Name Type Description
bundle string
channelsFile string

loadClasses(bundle, classesDir)

Parameters:
Name Type Description
bundle string
classesDir string

loadCommands(bundle, commandsDir)

Parameters:
Name Type Description
bundle string
commandsDir string

loadEffects(bundle, effectsDir)

Parameters:
Name Type Description
bundle string
effectsDir string

loadEntityScript(factory, entityRef, scriptPath)

Parameters:
Name Type Description
factory EntityFactory

Instance of EntityFactory that the item/npc will be loaded into

entityRef EntityReference
scriptPath string

loadHelp(bundle, helpDir)

Parameters:
Name Type Description
bundle string
helpDir string

loadInputEvents(bundle, inputEventsDir)

Parameters:
Name Type Description
bundle string
inputEventsDir string

loadItems(area, itemsFile)

Load all items from a given area.

Parameters:
Name Type Description
area Area
itemsFile string

File containing items to load

loadNpcs(area, npcsFile)

Load all npcs from a given area.

Parameters:
Name Type Description
area Area
npcsFile string

File containing npcs to load

loadPlayerEvents(bundle, eventsFile)

Load/initialize player. See the Player Event guide

Parameters:
Name Type Description
bundle string
eventsFile string

event js file to load

loadQuests(area, questsFile)

Parameters:
Name Type Description
area Area
questsFile string

loadRooms(area, roomsFile)

Parameters:
Name Type Description
area Area
roomsFile string

loadSkills(bundle, skillsDir)

Parameters:
Name Type Description
bundle string
skillsDir string