| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
|---|---|---|---|---|---|---|---|---|---|
| 0003376 | Spring engine | Lua | public | 2012-12-23 11:59 | 2013-01-05 14:14 | ||||
| Reporter | silentwings | ||||||||
| Assigned To | Kloot | ||||||||
| Priority | normal | Severity | minor | Reproducibility | always | ||||
| Status | resolved | Resolution | no change required | ||||||
| Product Version | 91.0 | ||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0003376: Spring.GetAllFeatures works in unsynced lua but Spring.FeatureCreated doesn't | ||||||||
| Description | (But Spring.FeatureCreated can only tell you stuff you could have found out anyway from Spring.GetAllFeatures - and Spring.FeatureCreated is much less intensive in lots of situations) I think the problem is that there is nothing to handle FeatureCreated in https://github.com/spring/spring/blob/develop/cont/LuaUI/widgets.lua. For example the following code will run perfectly as a gadget (with 'widget'<->'gadget' switched), but won't have any effect as a widget: function widget:FeatureCreated(featureID, allyTeam) Spring.Echo("FeatureCreated called") end  | ||||||||
| Tags | No tags attached. | ||||||||
| Checked infolog.txt for Errors | |||||||||
| Attached Files | 
 | ||||||||
 Notes	 | 
|
| 
				
		 silentwings (reporter) 2012-12-23 21:44  | 
	Same applied to FeatureDestroyed | 
| 
				
		 jK (developer) 2012-12-25 13:04  | 
	there is a team & los check for all such callins (UnitCreated, ....) | 
| 
				
		 Jazcash (reporter) 2012-12-27 04:33  | 
	I don't understand :< What's the call-in for a feature created or destroyed? Like Silent said, nothing in here about features at all: https://github.com/spring/spring/blob/develop/cont/LuaUI/widgets.lua | 
| 
				
		 zerver (reporter) 2012-12-27 16:45  | 
	AFAIK there is no FeatureCreated for unsynced Lua. What maybe should exist is a FeatureEnteredLOS. Silentwings is correct that GetAllFeatures is not an optimal solution because it returns lots of data and can therefore be slow. | 
| 
				
		 Jazcash (reporter) 2012-12-27 18:23  | 
	Features are always in LOS anyway though? Or is that just BA? | 
| 
				
		 silentwings (reporter) 2013-01-05 10:08 Last edited: 2013-01-05 10:09  | 
	
		We tried adding FeatureCreated to the widget handler in BA and it seems to work fine, see: http://imolarpg.dyndns.org/trac/balatest/changeset/884. So I guess these commands do exist in unsynced lua and were accidentally missed from the default widgets.lua. edit: For some reason it re-opened the bug after I posted this comment, which was not my intention.  | 
 Issue History			 | 
		|||
| Date Modified | Username | Field | Change | 
|---|---|---|---|
| 2012-12-23 11:59 | silentwings | New Issue | |
| 2012-12-23 21:44 | silentwings | Note Added: 0009529 | |
| 2012-12-25 13:04 | jK | Note Added: 0009533 | |
| 2012-12-25 13:04 | jK | Status | new => feedback | 
| 2012-12-27 04:34 | Jazcash | Note Added: 0009535 | |
| 2012-12-27 16:45 | zerver | Note Added: 0009536 | |
| 2012-12-27 18:23 | Jazcash | Note Added: 0009538 | |
| 2013-01-05 10:08 | silentwings | Note Added: 0009561 | |
| 2013-01-05 10:08 | silentwings | Status | feedback => new | 
| 2013-01-05 10:09 | silentwings | Note Edited: 0009561 | View Revisions | 
| 2013-01-05 14:14 | Kloot | Status | new => resolved | 
| 2013-01-05 14:14 | Kloot | Resolution | open => no change required | 
| 2013-01-05 14:14 | Kloot | Assigned To | => Kloot | 

	
