diff --git a/Item/CharArmor/CharArmor.lua b/Item/CharArmor/CharArmor.lua index d1b9296..5f3fd61 100644 --- a/Item/CharArmor/CharArmor.lua +++ b/Item/CharArmor/CharArmor.lua @@ -24,6 +24,8 @@ end --- --- @param smwSetObject table function p.addSmwProperties( apiData, frameArgs, smwSetObject ) + local common = require( 'Module:Common' ) + smwCommon.addSmwProperties( apiData, frameArgs, @@ -38,6 +40,11 @@ function p.addSmwProperties( apiData, frameArgs, smwSetObject ) smwCommon.setFromTable( setData, apiData:get( 'clothing.resistances' ), 'type', 'multiplier', 'ModifierDamageTaken', translate ) + -- Todo make format FN of Module:Common/SMW "public" + for key, value in pairs( setData ) do + setData[ key ] = common.formatNum( value ) + end + mw.smw.set( setData ) end @@ -141,4 +148,4 @@ function p.getShortDescription( frameArgs, smwData ) end -return p \ No newline at end of file +return p