# HG changeset patch # User Jeremy Thurgood # Date 1284137237 -7200 # Node ID 0ce08d5e2acb98b49d49c90c57bc21bc88ea288c # Parent 6ef7cc57b94bf401e1509a7a2820fcaa4729084d pyflakes-induced cleanup. diff -r 6ef7cc57b94b -r 0ce08d5e2acb gamelib/endscreen.py --- a/gamelib/endscreen.py Thu Sep 09 11:11:37 2010 +0200 +++ b/gamelib/endscreen.py Fri Sep 10 18:47:17 2010 +0200 @@ -3,9 +3,7 @@ # Victory screen for the game from albow.screen import Screen -from albow.controls import Button from albow.resource import get_image -from albow.layout import Column from gamelib.widgets import BoomImageButton diff -r 6ef7cc57b94b -r 0ce08d5e2acb gamelib/gamescreen.py --- a/gamelib/gamescreen.py Thu Sep 09 11:11:37 2010 +0200 +++ b/gamelib/gamescreen.py Fri Sep 10 18:47:17 2010 +0200 @@ -8,7 +8,6 @@ from albow.screen import Screen from pygame import Rect, mouse from pygame.color import Color -from pygame.locals import BLEND_ADD from constants import SCREEN, BUTTON_SIZE, SCENE_SIZE, LEAVE from cursor import CursorWidget diff -r 6ef7cc57b94b -r 0ce08d5e2acb gamelib/menu.py --- a/gamelib/menu.py Thu Sep 09 11:11:37 2010 +0200 +++ b/gamelib/menu.py Fri Sep 10 18:47:17 2010 +0200 @@ -3,10 +3,7 @@ # Main menu for the game from albow.screen import Screen -from albow.controls import Image, Button, Label -from albow.layout import Column from albow.resource import get_image -from pygame import Rect from gamelib.widgets import BoomImageButton diff -r 6ef7cc57b94b -r 0ce08d5e2acb gamelib/scenes/bridge.py --- a/gamelib/scenes/bridge.py Thu Sep 09 11:11:37 2010 +0200 +++ b/gamelib/scenes/bridge.py Fri Sep 10 18:47:17 2010 +0200 @@ -12,9 +12,9 @@ from gamelib.state import Scene, Item, Thing, Result from gamelib.sound import get_current_playlist from gamelib.constants import DEBUG -from gamelib.scenewidgets import (InteractText, InteractNoImage, - InteractRectUnion, InteractImage, - InteractAnimated, GenericDescThing) +from gamelib.scenewidgets import (InteractNoImage, InteractRectUnion, + InteractImage, InteractAnimated, + GenericDescThing) from gamelib.scenes.game_constants import PLAYER_ID from gamelib.scenes.game_widgets import Door, BaseCamera, make_jim_dialog diff -r 6ef7cc57b94b -r 0ce08d5e2acb gamelib/scenes/crew_quarters.py --- a/gamelib/scenes/crew_quarters.py Thu Sep 09 11:11:37 2010 +0200 +++ b/gamelib/scenes/crew_quarters.py Fri Sep 10 18:47:17 2010 +0200 @@ -2,8 +2,7 @@ from gamelib.cursor import CursorSprite from gamelib.state import Scene, Item, Thing, Result -from gamelib.scenewidgets import (InteractText, InteractNoImage, - InteractRectUnion, InteractImage, +from gamelib.scenewidgets import (InteractNoImage, InteractImage, InteractAnimated, GenericDescThing) from gamelib.scenes.game_constants import PLAYER_ID diff -r 6ef7cc57b94b -r 0ce08d5e2acb gamelib/scenes/cryo.py --- a/gamelib/scenes/cryo.py Thu Sep 09 11:11:37 2010 +0200 +++ b/gamelib/scenes/cryo.py Fri Sep 10 18:47:17 2010 +0200 @@ -5,14 +5,11 @@ from albow.music import change_playlist, get_music, PlayList from albow.resource import get_image -from gamelib import speech -from gamelib.sound import get_sound from gamelib.cursor import CursorSprite from gamelib.state import Scene, Item, CloneableItem, Thing, Result -from gamelib.constants import DEBUG -from gamelib.scenewidgets import (InteractText, InteractNoImage, - InteractRectUnion, InteractImage, - InteractAnimated, GenericDescThing) +from gamelib.scenewidgets import (InteractNoImage, InteractRectUnion, + InteractImage, InteractAnimated, + GenericDescThing) from gamelib.scenes.game_constants import PLAYER_ID from gamelib.scenes.game_widgets import Door, make_jim_dialog diff -r 6ef7cc57b94b -r 0ce08d5e2acb gamelib/scenes/engine.py --- a/gamelib/scenes/engine.py Thu Sep 09 11:11:37 2010 +0200 +++ b/gamelib/scenes/engine.py Fri Sep 10 18:47:17 2010 +0200 @@ -3,9 +3,9 @@ from albow.resource import get_image from gamelib.cursor import CursorSprite from gamelib.state import Scene, Item, Thing, Result -from gamelib.scenewidgets import (InteractText, InteractNoImage, - InteractRectUnion, InteractImage, - InteractAnimated, GenericDescThing) +from gamelib.scenewidgets import (InteractNoImage, InteractRectUnion, + InteractImage, InteractAnimated, + GenericDescThing) from gamelib.scenes.game_constants import PLAYER_ID from gamelib.scenes.game_widgets import Door, make_jim_dialog diff -r 6ef7cc57b94b -r 0ce08d5e2acb gamelib/scenes/machine.py --- a/gamelib/scenes/machine.py Thu Sep 09 11:11:37 2010 +0200 +++ b/gamelib/scenes/machine.py Fri Sep 10 18:47:17 2010 +0200 @@ -2,8 +2,7 @@ from gamelib.state import Scene, Item, Thing, Result from gamelib.cursor import CursorSprite -from gamelib.scenewidgets import (InteractText, InteractNoImage, - InteractRectUnion, InteractImage, +from gamelib.scenewidgets import (InteractNoImage, InteractImage, InteractAnimated, GenericDescThing) from gamelib.scenes.game_widgets import Door diff -r 6ef7cc57b94b -r 0ce08d5e2acb gamelib/scenes/manual.py --- a/gamelib/scenes/manual.py Thu Sep 09 11:11:37 2010 +0200 +++ b/gamelib/scenes/manual.py Fri Sep 10 18:47:17 2010 +0200 @@ -1,17 +1,11 @@ """The inside of the maintenance manual.""" -import random +from albow.music import change_playlist -from albow.music import change_playlist, get_music, PlayList -from albow.resource import get_image - -from gamelib.cursor import CursorSprite -from gamelib.state import Scene, Item, Thing, Result +from gamelib.state import Scene, Thing from gamelib.sound import get_current_playlist from gamelib.scenewidgets import InteractNoImage, InteractImage -from gamelib.scenes.game_constants import PLAYER_ID - # classes related the computer detail diff -r 6ef7cc57b94b -r 0ce08d5e2acb gamelib/scenes/map.py --- a/gamelib/scenes/map.py Thu Sep 09 11:11:37 2010 +0200 +++ b/gamelib/scenes/map.py Fri Sep 10 18:47:17 2010 +0200 @@ -7,7 +7,7 @@ Many parts of the ship are derelict and inaccessible. """ -from gamelib.state import Scene, Item, Thing, Result +from gamelib.state import Scene, Thing, Result from gamelib.scenewidgets import InteractRectUnion from gamelib.scenes.game_constants import PLAYER_ID diff -r 6ef7cc57b94b -r 0ce08d5e2acb gamelib/scenes/mess.py --- a/gamelib/scenes/mess.py Thu Sep 09 11:11:37 2010 +0200 +++ b/gamelib/scenes/mess.py Fri Sep 10 18:47:17 2010 +0200 @@ -1,13 +1,12 @@ """Mess where crew eat. Fun stuff.""" -from random import choice, randint +from random import randint from gamelib.state import Scene, Item, CloneableItem, Thing, Result from gamelib.cursor import CursorSprite from gamelib.sound import get_sound from gamelib import constants -from gamelib.scenewidgets import (InteractText, InteractNoImage, - InteractRectUnion, InteractImage, +from gamelib.scenewidgets import (InteractNoImage, InteractImage, InteractImageRect, InteractAnimated, GenericDescThing) diff -r 6ef7cc57b94b -r 0ce08d5e2acb gamelib/state.py --- a/gamelib/state.py Thu Sep 09 11:11:37 2010 +0200 +++ b/gamelib/state.py Fri Sep 10 18:47:17 2010 +0200 @@ -2,7 +2,7 @@ import copy -from albow.resource import get_image, get_font +from albow.resource import get_image from albow.utils import frame_rect from widgets import BoomLabel from pygame.rect import Rect @@ -271,7 +271,6 @@ if text is None: return None label = BoomLabel(text) - font = get_font(15, 'VeraBd.ttf') label.set_margin(5) label.border_width = 1 label.border_color = (0, 0, 0) diff -r 6ef7cc57b94b -r 0ce08d5e2acb gamelib/tests/game_logic_utils.py --- a/gamelib/tests/game_logic_utils.py Thu Sep 09 11:11:37 2010 +0200 +++ b/gamelib/tests/game_logic_utils.py Fri Sep 10 18:47:17 2010 +0200 @@ -1,10 +1,6 @@ import unittest -import pygame -from pygame.locals import SWSURFACE - from gamelib import state -from gamelib.constants import SCREEN # Monkey-patch albow.resource.get_image to not do alpha-conversion, diff -r 6ef7cc57b94b -r 0ce08d5e2acb gamelib/widgets.py --- a/gamelib/widgets.py Thu Sep 09 11:11:37 2010 +0200 +++ b/gamelib/widgets.py Fri Sep 10 18:47:17 2010 +0200 @@ -10,7 +10,7 @@ from albow.resource import get_font, get_image from pygame.color import Color from pygame.rect import Rect -from pygame.draw import lines +from pygame.draw import lines as draw_lines from pygame import mouse from constants import BUTTON_SIZE @@ -93,7 +93,7 @@ r = surface.get_rect() w = 2 top, bottom, left, right = r.top, r.bottom, r.left, r.right - lines(surface, self._frame_color, False, [ + draw_lines(surface, self._frame_color, False, [ (left, bottom), (left, top), (right-w, top), (right-w, bottom) ], w)