From b641d0ce715d955ca141ec1cb95896e4a34c3f4c Mon Sep 17 00:00:00 2001 From: Griatch Date: Sat, 5 Jun 2021 17:20:33 +0200 Subject: [PATCH] Moved mapsystem contrib to right location --- .../contrib/map_and_pathfind/example_map.py | 56 +++++++++++++++++++ .../contrib/map_and_pathfind}/mapsystem.py | 0 evennia/contrib/map_and_pathfind/tests.py | 8 +++ 3 files changed, 64 insertions(+) create mode 100644 evennia/contrib/map_and_pathfind/example_map.py rename {map_and_pathfind => evennia/contrib/map_and_pathfind}/mapsystem.py (100%) create mode 100644 evennia/contrib/map_and_pathfind/tests.py diff --git a/evennia/contrib/map_and_pathfind/example_map.py b/evennia/contrib/map_and_pathfind/example_map.py new file mode 100644 index 0000000000..24b2301163 --- /dev/null +++ b/evennia/contrib/map_and_pathfind/example_map.py @@ -0,0 +1,56 @@ + +MAP = r""" + 1 1 1 1 1 1 1 1 1 1 2 + + 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 + + 0 # + \ + 1 #-#-#-# + |\ | + 2 #-#+#+#-----# + | | + 3 #-#---#-#-#-#-# + | |x|x| + 4 o-#-#-# #-#-# + \ |x|x| + 5 o-o-#-# #-#-# + / + 6 # + \ + 7 #-#-#-# + | | + 8 #-#-#d# # + ^ + 9 #-# # + +10 + +11 + +12 + +13 + +14 + +15 + +16 + +17 + +18 + +19 + +20 +""" + + +LEGEND = {} + + +MAP_DATA = { + "map": MAP, + "legend": LEGEND, +} diff --git a/map_and_pathfind/mapsystem.py b/evennia/contrib/map_and_pathfind/mapsystem.py similarity index 100% rename from map_and_pathfind/mapsystem.py rename to evennia/contrib/map_and_pathfind/mapsystem.py diff --git a/evennia/contrib/map_and_pathfind/tests.py b/evennia/contrib/map_and_pathfind/tests.py new file mode 100644 index 0000000000..e8a47d6721 --- /dev/null +++ b/evennia/contrib/map_and_pathfind/tests.py @@ -0,0 +1,8 @@ +""" + +Tests for the Mapsystem + +""" + +from django.unittest import TestCase, mock +from . import mapsystem