URL:
http://gna.org/bugs/?14217
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
Release:
Discussion Lock: Any
Operating System: None
Planned Release: None
___
Details:
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 ' ..
methods_tech_type_rule_name(tech))
end
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
http://gna.org/bugs/download.php?file_id=6539
___
Reply to this item at:
http://gna.org/bugs/?14217
___
Message sent via/by Gna!
http://gna.org/
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev