2025-07-21 21:49 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0003961Spring engineGeneralpublic2013-08-25 02:22
ReporterFLOZi 
Assigned ToKloot 
PrioritylowSeveritytrivialReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version94.1.1+git 
Summary0003961: Armordefs.lua requires a key-value map rather than array, but the value isn't used
DescriptionWhen armor.txt was introduced, the engine tdf parser required that each key had a value, so they were filled with junk and ignored.

When trepan came along and lua-ised armor.txt into armordefs.lua, he was unaware that the values were junk, so he kept the key-value map instead of using a straightforward array.

https://github.com/spring/spring/blob/94.1/rts/Sim/Misc/DamageArrayHandler.cpp#L54

This requires that games either have defs with the junk in them or an extra snippet to convert: http://springrts.com/wiki/Armordefs.lua#Example

It'd be nice if this historical error was finally corrected.
Additional InformationWRT backwards compatibility, the base content armordefs.lua could be modified such that games using armor.txt need not be modified. Those using their own armordefs.lua will in most (all?) cases merely need to remove the extra snippet of code.
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0011375

Kloot (developer)

done (4b5cc048fca2595ae5e3196ee2d54d22d0a9e9f8)
+Notes

-Issue History
Date Modified Username Field Change
2013-08-25 00:29 FLOZi New Issue
2013-08-25 02:22 Kloot Note Added: 0011375
2013-08-25 02:22 Kloot Status new => resolved
2013-08-25 02:22 Kloot Fixed in Version => 94.1.1+git
2013-08-25 02:22 Kloot Resolution open => fixed
2013-08-25 02:22 Kloot Assigned To => Kloot
+Issue History