matt81093 / endgame-singularity

Automatically exported from code.google.com/p/endgame-singularity
0 stars 0 forks source link

Finance button has stopped functioning as should #61

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Play for a little while
2. Check finances sometimes 
3. At one moment, the Finance button bring up the same menu as 'Menu' does

What is the expected output? What do you see instead?

Financial info should be displayed.

What version of the product are you using? On what operating system?

Debian 4.0 unstable, Python 2.5.2

Please provide any additional information below.

Started a new (easy) game after checking out from the latest SVN, this
error still persist when I save the game, exit Singularity, start it up
again and load the same game. The error is gone when I start a new game.

An error occurs every time in the console, when I click on it:

Exception in function show at Sun Oct 19 15:05:10 2008 EEST:
Traceback (most recent call last):
  File
"/home/henrik/sorts/svn/endgame-singularity-read-only/code/safety.py", line
58, in safe_call
    return func(*args, **kwargs)
  File
"/home/henrik/sorts/svn/endgame-singularity-read-only/code/graphics/dialog.py",
line 176, in show
    result = self.handle(event)
  File
"/home/henrik/sorts/svn/endgame-singularity-read-only/code/graphics/dialog.py",
line 275, in handle
    return self.call_handlers(handlers, event)
  File
"/home/henrik/sorts/svn/endgame-singularity-read-only/code/graphics/dialog.py",
line 287, in call_handlers
    handler(event)
  File
"/home/henrik/sorts/svn/endgame-singularity-read-only/code/graphics/button.py",
line 109, in handle_event
    self.activate_with_sound(event)
  File
"/home/henrik/sorts/svn/endgame-singularity-read-only/code/graphics/button.py",
line 122, in activate_with_sound
    self.activated(event)
  File
"/home/henrik/sorts/svn/endgame-singularity-read-only/code/graphics/button.py",
line 151, in activated
    self.function(*self.args, **self.kwargs)
  File
"/home/henrik/sorts/svn/endgame-singularity-read-only/code/graphics/button.py",
line 182, in show_dialog
    raise constants.Handled, dialog.call_dialog(self.dialog, self)
  File
"/home/henrik/sorts/svn/endgame-singularity-read-only/code/graphics/dialog.py",
line 89, in call_dialog
    retval = dialog.show()
  File
"/home/henrik/sorts/svn/endgame-singularity-read-only/code/screens/finance.py",
line 61, in show
    return super(FinanceScreen, self).show()
  File
"/home/henrik/sorts/svn/endgame-singularity-read-only/code/graphics/dialog.py",
line 162, in show
    Dialog.top.maybe_update()
  File
"/home/henrik/sorts/svn/endgame-singularity-read-only/code/graphics/widget.py",
line 288, in maybe_update
    self.update()
  File
"/home/henrik/sorts/svn/endgame-singularity-read-only/code/graphics/widget.py",
line 292, in update
    self.prepare_for_redraw()
  File
"/home/henrik/sorts/svn/endgame-singularity-read-only/code/graphics/widget.py",
line 284, in prepare_for_redraw
    child.prepare_for_redraw()
  File
"/home/henrik/sorts/svn/endgame-singularity-read-only/code/graphics/widget.py",
line 284, in prepare_for_redraw
    child.prepare_for_redraw()
  File
"/home/henrik/sorts/svn/endgame-singularity-read-only/code/graphics/widget.py",
line 271, in prepare_for_redraw
    self.rebuild()
  File
"/home/henrik/sorts/svn/endgame-singularity-read-only/code/screens/finance.py",
line 49, in rebuild
    financial_report, cpu_report = self.make_reports()
  File
"/home/henrik/sorts/svn/endgame-singularity-read-only/code/screens/finance.py",
line 65, in make_reports
    cash_info, cpu_info = g.pl.give_time(seconds_left, dry_run=True)
  File
"/home/henrik/sorts/svn/endgame-singularity-read-only/code/player.py", line
366, in give_time
    cash_info.pool_jobs = pool_job_cash
UnboundLocalError: local variable 'pool_job_cash' referenced before assignment

Original issue reported on code.google.com by ahve...@gmail.com on 19 Oct 2008 at 12:17

GoogleCodeExporter commented 9 years ago
Which version of Singularity is this?

Original comment by funnyman3595 on 19 Oct 2008 at 8:10

GoogleCodeExporter commented 9 years ago
Revision: 901
The strange that it is that the problem corrected itself somewhere in the 
middle of
the game. When the problem occurred in the first place, I tried loading the 
savegame
multiple times - the effect was still the same.

Original comment by ahve...@gmail.com on 19 Oct 2008 at 10:56

GoogleCodeExporter commented 9 years ago
Just a variable that wasn't getting set when it should be zero.  That's the one 
that
means "Job cash via CPU Pool", it doesn't even get its own line in the display 
at the
moment.  Put all your bases to sleep to reproduce 100%.

Fixed in git (40ab26) and SVN (r903).

Original comment by funnyman3595 on 19 Oct 2008 at 11:11

GoogleCodeExporter commented 9 years ago

Original comment by funnyman3595 on 19 Oct 2008 at 11:12