IGameFeatures

class mobase.IGameFeatures

Bases: object

Interface for the game features, accessible through IOrganizer.gameFeatures().

Methods Summary

gameFeature(feature_type)

Retrieve the given game feature, if one exists.

registerFeature(**kwds)

Helper for @overload to raise when called.

unregisterFeature(feature)

Unregister the given game feature.

unregisterFeatures(feature_type)

Unregister all features of the given type registered by the calling plugin.

Methods Documentation

gameFeature(feature_type)

Retrieve the given game feature, if one exists.

Return type:

TypeVar(GameFeatureType)

Parameters:

feature_type – The class of feature to retrieve.

Returns:

The game feature corresponding to the given type, or None if the feature is

not available.

registerFeature(**kwds)

Helper for @overload to raise when called.

unregisterFeature(feature)

Unregister the given game feature.

This function is safe to use even if the given feature was never registered.

Return type:

bool

Parameters:

feature – Feature to unregister.

Returns:

True if the feature was successfully unregistered, False otherwise.

unregisterFeatures(feature_type)

Unregister all features of the given type registered by the calling plugin.

This function is safe to use even if the plugin has no feature of the given type register.

Return type:

int

Parameters:

feature_type – The class of feature to unregister.

Returns:

The number of unregistered features.