コード例 #1
0
 def setUp(self):
     ShinyTestCase.setUp(self)
     from shinymud.models.area import Area
     self.area = Area.create({'name':'foo'})
     self.room = self.area.new_room()
     self.item = self.area.new_item()
     self.npc = self.area.new_npc()
コード例 #2
0
 def setUp(self):
     ShinyTestCase.setUp(self)
     # add a builder
     from shinymud.data import config
     from shinymud.models.player import Player
     from shinymud.models.area import Area
     from shinymud.commands.build_commands import build_list
     from shinymud.modes.build_mode import BuildMode
     self.bob = Player(('bob', 'bar'))
     self.bob.mode = None
     self.bob.playerize({'name':'bob'})
     self.world.player_add(self.bob)
     self.bob.mode = BuildMode(self.bob)
     self.bob.permissions = self.bob.permissions | config.BUILDER
コード例 #3
0
    def setUp(self):
        ShinyTestCase.setUp(self)
        from shinymud.models.player import Player
        from shinymud.models.area import Area
        from shinymud.models.room import Room
        from shinymud.modes.build_mode import BuildMode
        from shinymud.data import config

        self.bob = Player(("bob", "bar"))
        self.bob.mode = None
        self.bob.playerize({"name": "bob"})
        self.world.player_add(self.bob)
        self.bob.mode = BuildMode(self.bob)
        self.bob.permissions = self.bob.permissions | config.BUILDER

        self.area = Area.create({"name": "foo"})
コード例 #4
0
    def setUp(self):
        ShinyTestCase.setUp(self)
        from shinymud.models.player import Player
        from shinymud.models.area import Area
        from shinymud.models.room import Room
        from shinymud.modes.build_mode import BuildMode
        from shinymud.data import config

        self.bob = Player(('bob', 'bar'))
        self.bob.mode = None
        self.bob.playerize({'name': 'bob'})
        self.world.player_add(self.bob)
        self.bob.mode = BuildMode(self.bob)
        self.bob.permissions = self.bob.permissions | config.BUILDER

        self.area = Area.create({'name': 'foo'})
コード例 #5
0
ファイル: test_ai_packs.py プロジェクト: ElecRei/ShinyMUD
 def setUp(self):
     ShinyTestCase.setUp(self)
     from shinymud.models.player import Player
     from shinymud.models.npc import Npc
     from shinymud.models.area import Area
     from shinymud.models.room import Room
     from shinymud.modes.build_mode import BuildMode
     from shinymud.data import config
     
     self.PERMS = config.PERMS
     
     #"bob" is created so we can tell build mode functions which player called them.
     #We probably don't need bob since this functionality is only important when permissions
     #are concerned in build commands. We'll create and pass him in anyways for now.
     self.bob = Player(('bob', 'bar'))
     self.bob.mode = None
     self.bob.playerize({'name':'bob'})
     self.world.player_add(self.bob)
     self.bob.mode = BuildMode(self.bob)
     self.bob.permissions = self.bob.permissions | self.PERMS['builder']
     
     self.area = Area.create({'name': 'foo'})
コード例 #6
0
ファイル: test_ai_packs.py プロジェクト: semtle/ShinyMUD
    def setUp(self):
        ShinyTestCase.setUp(self)
        from shinymud.models.player import Player
        from shinymud.models.npc import Npc
        from shinymud.models.area import Area
        from shinymud.models.room import Room
        from shinymud.modes.build_mode import BuildMode
        from shinymud.data import config

        self.PERMS = config.PERMS

        #"bob" is created so we can tell build mode functions which player called them.
        #We probably don't need bob since this functionality is only important when permissions
        #are concerned in build commands. We'll create and pass him in anyways for now.
        self.bob = Player(('bob', 'bar'))
        self.bob.mode = None
        self.bob.playerize({'name': 'bob'})
        self.world.player_add(self.bob)
        self.bob.mode = BuildMode(self.bob)
        self.bob.permissions = self.bob.permissions | self.PERMS['builder']

        self.area = Area.create({'name': 'foo'})
コード例 #7
0
ファイル: test_npc.py プロジェクト: ElecRei/ShinyMUD
 def setUp(self):
     ShinyTestCase.setUp(self)
     from shinymud.models.player import Player
     from shinymud.models.npc import Npc
     from shinymud.models.area import Area
     from shinymud.models.room import Room
     from shinymud.modes.build_mode import BuildMode
     from shinymud.data import config
     
     self.PERMS = config.PERMS
     
     self.bob = Player(('bob', 'bar'))
     self.bob.mode = None
     self.bob.playerize({'name':'bob'})
     self.world.player_add(self.bob)
     self.bob.mode = BuildMode(self.bob)
     self.bob.permissions = self.bob.permissions | self.PERMS['builder']
     
     self.area = Area.create({'name': 'foo'})
     self.room = self.area.new_room()
     
     self.area2 = Area.create({'name': 'SimCity'})
     self.area2_script = self.area2.new_script()
コード例 #8
0
ファイル: test_npc.py プロジェクト: semtle/ShinyMUD
    def setUp(self):
        ShinyTestCase.setUp(self)
        from shinymud.models.player import Player
        from shinymud.models.npc import Npc
        from shinymud.models.area import Area
        from shinymud.models.room import Room
        from shinymud.modes.build_mode import BuildMode
        from shinymud.data import config

        self.PERMS = config.PERMS

        self.bob = Player(('bob', 'bar'))
        self.bob.mode = None
        self.bob.playerize({'name': 'bob'})
        self.world.player_add(self.bob)
        self.bob.mode = BuildMode(self.bob)
        self.bob.permissions = self.bob.permissions | self.PERMS['builder']

        self.area = Area.create({'name': 'foo'})
        self.room = self.area.new_room()

        self.area2 = Area.create({'name': 'SimCity'})
        self.area2_script = self.area2.new_script()
コード例 #9
0
ファイル: test_db.py プロジェクト: ElecRei/ShinyMUD
 def setUp(self):
     ShinyTestCase.setUp(self)
     table = "CREATE TABLE foo (id INTEGER PRIMARY KEY,val1 TEXT,val2 INTEGER)"
     self.world.db.conn.execute(table)
コード例 #10
0
ファイル: test_room.py プロジェクト: ElecRei/ShinyMUD
    def setUp(self):
        ShinyTestCase.setUp(self)
        from shinymud.models.area import Area

        self.area = Area.create({"name": "blarg"})
        self.room = self.area.new_room()
コード例 #11
0
ファイル: test_room.py プロジェクト: semtle/ShinyMUD
 def setUp(self):
     ShinyTestCase.setUp(self)
     from shinymud.models.area import Area
     self.area = Area.create({'name': 'blarg'})
     self.room = self.area.new_room()
コード例 #12
0
ファイル: test_player.py プロジェクト: semtle/ShinyMUD
 def setUp(self):
     ShinyTestCase.setUp(self)
     from shinymud.models.area import Area
     self.area = Area.create({'name': 'boo'})
コード例 #13
0
ファイル: test_db.py プロジェクト: semtle/ShinyMUD
 def setUp(self):
     ShinyTestCase.setUp(self)
     table = "CREATE TABLE foo (id INTEGER PRIMARY KEY,val1 TEXT,val2 INTEGER)"
     self.world.db.conn.execute(table)
コード例 #14
0
ファイル: test_player.py プロジェクト: ElecRei/ShinyMUD
 def setUp(self):
     ShinyTestCase.setUp(self)
     from shinymud.models.area import Area
     self.area = Area.create({'name':'boo'})