Skip to content

Commit

Permalink
Added relationship status to MSP module
Browse files Browse the repository at this point in the history
  • Loading branch information
Solanya committed Feb 10, 2019
1 parent a97e1fb commit 1c5e8ef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion totalRP3/modules/register/msp/register_msp.lua
Expand Up @@ -40,7 +40,7 @@ local function onStart()
-- LibMSP support code
--*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
msp_RPAddOn = "Total RP 3";
msp:AddFieldsToTooltip({'PX', 'RC', 'IC', 'CO', 'TR'});
msp:AddFieldsToTooltip({'PX', 'RC', 'IC', 'CO', 'TR', 'RS'});

--*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
-- Update
Expand Down Expand Up @@ -125,6 +125,7 @@ local function onStart()
msp.my['HH'] = dataTab.RE;
msp.my['HB'] = dataTab.BP;
msp.my['NT'] = dataTab.FT;
msp.my['RS'] = tostring(dataTab.RS or 0);
-- Clear fields that may or may not exist in the updated profile.
msp.my['MO'] = nil;
msp.my['NH'] = nil;
Expand Down Expand Up @@ -331,6 +332,9 @@ local function onStart()
if field == "AH" and value and tonumber(value) then
value = value .. " cm";
end
if field == "RS" and value then
value = tonumber(value);
end
profile.characteristics[CHARACTERISTICS_FIELDS[field]] = value;
-- Hack for spaced name tolerated in MRP
if field == "NA" and not profile.characteristics[CHARACTERISTICS_FIELDS[field]] then
Expand Down

0 comments on commit 1c5e8ef

Please sign in to comment.