def __init__(self, world, identifier, bulk, max_stack=1, start_stack=1, item_type=""): RPGEntity.__init__(self, world, identifier) self.containable.bulk = bulk self.containable.max_stack = max_stack self.containable.current_stack = start_stack self.containable.item_type = item_type
def setUp(self): unittest.TestCase.setUp(self) self.world = self.GameWorld() self.wearer = RPGEntity(self.world, "wearer") self.arms_item = RPGEntity(self.world, "arms_item") self.arms_item.equipable.possible_slots = ["l_arm", "r_arm"] self.l_arm_item = RPGEntity(self.world, "l_arm_item") self.l_arm_item.equipable.possible_slots = ["l_arm"] self.r_arm_item = RPGEntity(self.world, "r_arm_item") self.r_arm_item.equipable.possible_slots = ["r_arm"] self.t_arm_item = RPGEntity(self.world, "t_arm_item") self.t_arm_item.equipable.possible_slots = ["t_arm"] self.two_hand_item = RPGEntity(self.world, "two_hand_item") self.two_hand_item.equipable.possible_slots = ["l_arm,r_arm", "head"]
def __init__(self, world, identifier): RPGEntity.__init__(self, world, identifier) self.char_stats.gender = "male" # Initialize the char_stats component
def __init__(self, world, identifier, max_bulk, max_slots): RPGEntity.__init__(self, world, identifier) self.container.max_bulk = max_bulk self.container.max_slots = max_slots
def __init__(self, world, identifier, bulk): RPGEntity.__init__(self, world, identifier) self.containable.bulk = bulk
def __init__(self, world, identifier, max_bulk, slots): RPGEntity.__init__(self, world, identifier) self.container.children = slots self.container.max_bulk = max_bulk