Skip to content

Commit 3b1c2ce

Browse files
committed
Make methods in modclass abstract
1 parent 6ca2a43 commit 3b1c2ce

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

modloader/modclass.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,13 @@ class Mod(object):
1010
Execution order is as follows:
1111
:meth:`mod_load` -> :meth:`mod_complete`
1212
"""
13-
# pylint: disable=no-self-use
1413
def mod_info(self):
1514
"""Get the mod info
1615
1716
Returns:
1817
A tuple with the name, version, and author
1918
"""
20-
raise Exception("Mod info isn't overriden")
19+
raise NotImplementedError("Mod info isn't overriden")
2120

2221
def mod_load(self):
2322
"""Executes when the mod is loaded
@@ -27,14 +26,14 @@ def mod_load(self):
2726
See Also:
2827
:meth:`mod_complete`
2928
"""
30-
pass
29+
raise NotImplementedError("Mod load isn't overriden")
3130

3231
def mod_complete(self):
3332
"""Executes when all mods are loaded
3433
3534
This method is useful for dependency loading
3635
"""
37-
pass
36+
raise NotImplementedError("Mod complete isn't overriden")
3837

3938

4039
def loadable_mod(modclass):

mods/anna_post_true/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,6 @@ def mod_load(self):
5353
# After getting the SLDisplayable, append that to the main menu screen.
5454
# That's how we put the button "DEV TEST" on the main menu screen
5555
modast.get_slscreen('main_menu').children.append(target_display)
56+
57+
def mod_complete(self):
58+
pass

mods/byekevin/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,6 @@ def kevin_cb(node):
4747

4848
kevin_credits = modast.search_for_node_with_criteria(true_search, kevin_cb, 800)
4949
kevin_credits.chain(modast.search_for_node_type(kevin_credits, ast.Scene))
50+
51+
def mod_complete(self):
52+
pass

0 commit comments

Comments
 (0)