ModDataContent

class mobase.ModDataContent

Bases: ABC

The ModDataContent feature is used (when available) to indicate to users the content of mods in the “Content” column.

The feature exposes a list of possible content types, each associated with an ID, a name and an icon. The icon is the path to either:

  • A Qt resource or;

  • A file on the disk.

In order to facilitate the implementation, MO2 already provides a set of icons that can be used. Those icons are all under :/MO/gui/content (e.g. :/MO/gui/content/plugin or :/MO/gui/content/music `).

The list of available icons is:

  • plugin: plugin-icon

  • skyproc: skyproc-icon

  • texture: texture-icon

  • music: music-icon

  • sound: sound-icon

  • interface: interface-icon

  • skse: skse-icon

  • script: script-icon

  • mesh: mesh-icon

  • string: string-icon

  • bsa: bsa-icon

  • menu: menu-icon

  • inifile: inifile-icon

  • modgroup: modgroup-icon

Methods Summary

getAllContents()

rtype:

List[Content]

getContentsFor(filetree)

Retrieve the list of contents in the given tree.

Methods Documentation

abstract getAllContents()
Return type:

List[Content]

Returns:

The list of all possible contents for the corresponding game.

abstract getContentsFor(filetree)

Retrieve the list of contents in the given tree.

Return type:

List[int]

Parameters:

filetree – The tree corresponding to the mod to retrieve contents for.

Returns:

The IDs of the content in the given tree.