This file is indexed.

/usr/lib/games/solarwolf/game.py is in solarwolf 1.5-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
"""game module, place for global game state"""

import os
from pygame.rect import Rect
from cStringIO import StringIO




#various data constants
start_lives = 3

ship_fastspeed = 7
ship_slowspeed = 5
shot_speed = 3

guard_speed = 4
guard_fire = .01
fire_factor = .15


arena = Rect(55, 50, 590, 490)

poweruptime = 1200.0
powerupspeed = 2.0
powerupwait = 26.0 #45.0
asteroidspeed = 1.4

timeleft = 0.0
timetick = 0.0
timefactor = 12.2    #how quickly time drops (bigger = slower)
speedmult = 0

musictime = 1000 * 120 #two minutes

text_length = 80  #frames text is displayed in-game


site_url = 'http://pygame.org/shredwheat/solarwolf'
news_url = 'http://pygame.org/shredwheat/solarwolf/thenews.html'



#number of insults must match num of complements, be careful
Complements = (
    'Keep it up!',
    'Looking Great!',
    'Hotshot',
    'Too Hot to Handle',
    'Bring it on',
    'Beautiful',
    'Own the Zone',
    'Too Cool For School',
    'So Hot Right Now',
    'Smooth Moves'
)
Insults = (
    'Not so good',
    'Ouch',
    'Rookie',
    'Sloppy',
    'Choke Choke',
    'Not Today',
    'Hall of Shame',
    'Wrong way',
    'Clumsy, Clumsy',
    'Medic',
)



player = None
name_maxlength = 10     #longest name
max_players = 5         #most player accounts available

#clock info
clock = None
clockticks = 1


#current gamehandler class instance
#this should be set by function creating new handler
handler = None
thread = None  #any background thread
stopthread = 0 #request thread terminate



#these are the defualt 'setup' controlled by Preferences
music = 2
volume = 2
display = 1
help = 0
thruster = 0
comments = 1


def get_resource(filename):
    fullname = os.path.join('data', filename)
    return fullname


def make_dataname(filename):
    if os.name == 'posix':
        home = os.environ['HOME']
        fullhome = os.path.join(home, '.solarwolf')
        if not os.path.isdir(fullhome):
            try: os.mkdir(fullhome, 0755)
            except OSError: fullhome = home
        filename = os.path.join(fullhome, filename)
    else:
        filename = get_resource(filename)
    filename = os.path.abspath(filename)
    filename = os.path.normpath(filename)
    return filename

version = "1.5"
DEBUG = 0