From 3cc816c58cbba8c9ca549da17a025a82f337c267 Mon Sep 17 00:00:00 2001 From: Griatch Date: Thu, 25 Jun 2015 23:30:51 +0200 Subject: [PATCH] Remove contrib-import that causes also unused contribs to clash with typeclass-names in custom game folder. This turns off api2doc parsing of contribs, but it's a worthwhile cost to pay. Even so, we will still clash when e.g. using the TutorialWorld while trying to setup some common typeclass names, like "Weapon". We may need to change the contrib typeclass names in the long run to make them less likely to clash; or otherwise separate them from the standard library; this is a future issue though. This change resolves #766. --- evennia/contrib/__init__.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/evennia/contrib/__init__.py b/evennia/contrib/__init__.py index d976747514..ff710f52c1 100644 --- a/evennia/contrib/__init__.py +++ b/evennia/contrib/__init__.py @@ -5,9 +5,16 @@ useful but are deemed too game-specific to go into the core library. See README.md for more info. """ -# imports for apidoc -import evennia -evennia._init() -import barter, dice, extended_room, menu_login, talking_npc -import chargen, email_login, gendersub, menusystem, slow_exit -import tutorial_world, tutorial_examples +# imports for apidoc / turned off, due to typeclass-clashes; if imported +# like this; Django finds these typeclasses and makes for example Weapon +# unavailable to the user to add (since it exists in tutorialworld). We might +# need to change all names of contrib typeclasses (name them e.g. ContribTutorialWeapon +# or something); For now, we can un-comment this block ONLY for creating apidocs, +# but even so, you will get clashes when both using the tutorialworld and your +# own code, so somthing needs to be done here. See issue #766. /Griatch + +#import evennia +#evennia._init() +#import barter, dice, extended_room, menu_login, talking_npc +#import chargen, email_login, gendersub, menusystem, slow_exit +#import tutorial_world, tutorial_examples