Editing Module:GainLoss
From Fallen London Wiki
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 91: | Line 91: | ||
-- represented by " CP" or " x" followed by a word boundary (checked via frontier patterns) | -- represented by " CP" or " x" followed by a word boundary (checked via frontier patterns) | ||
if is_pyramidal and amount and not (mw.ustring.find(amount, ' CP%f[%A]') or mw.ustring.find(amount, ' x%f[%A]')) then | if is_pyramidal and amount and not (mw.ustring.find(amount, ' CP%f[%A]') or mw.ustring.find(amount, ' x%f[%A]')) then | ||
− | return wrap_error_message('Error, | + | return wrap_error_message('Error, ' .. name .. ' is a Pyramidal quality but the change amount did not specify "<code> CP</code>" or "<code> x</code>".', '[[Category:Module GainLoss effects with ambiguous Pyramidal quality]]') |
end | end | ||
-- If reset was provided, make sure that this is a quality | -- If reset was provided, make sure that this is a quality | ||
if reset and game_type ~= 'Quality' then | if reset and game_type ~= 'Quality' then | ||
− | return wrap_error_message('Error, | + | return wrap_error_message('Error, ' .. name .. ' is a(n) ' .. game_type .. ' and does not support the <code>reset</code> parameter.') |
end | end | ||
-- If menace_location was provided, validate it | -- If menace_location was provided, validate it | ||
Line 107: | Line 107: | ||
} | } | ||
if menace_location and LOCATION_TO_MENACE[menace_location] ~= name then | if menace_location and LOCATION_TO_MENACE[menace_location] ~= name then | ||
− | return wrap_error_message('Error, ' .. menace_location .. ' is not a valid <code>Menace location</code> input for | + | return wrap_error_message('Error, ' .. menace_location .. ' is not a valid <code>Menace location</code> input for ' .. name .. '.') |
end | end | ||