Summary: tech_researched signal called with wrong tech
(patch included)
                 Project: Freeciv
            Submitted by: matz
            Submitted on: Sunday 08/30/2009 at 20:15
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: None
         Planned Release: None



When a new technology is researched the tech_researched signal gets called
with the newly selected research target instead of the technology which has
just been researched. It seems that this bug has been introduced in SVN
revision #15849. 

Steps to reproduce:
1. Add the following snippet to script.lua of a ruleset

function tech_researched_callback(tech, player, source)
  notify.event(nil,nil,0,'Player ' .. player.name .. ' just researched ' .. 
signal.connect("tech_researched", "tech_researched_callback")

2. start a game with that ruleset
3. Select Alphabet to research and Bronze Working as goal
4. Wait till Alphabet is researched
5. Message "Player X just researched Bronze Working" is shown.
Expected message would be "Player X just researched Alphabet"

The attached patch fixes the problem.


File Attachments:

Date: Sunday 08/30/2009 at 20:15  Name: 2009-08-30_tech_researched.patch 
Size: 823B   By: matz



Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to