Module:Params/doc/link to the code
From Kenshi Wiki
More actions
< Module:Params | doc
This is a helper template for the documentation of Module:Params that creates a link to the line in the Lua code where a function or a modifier is declared.
Usage
{{module:params/doc/link to the code|squeezing}}→ squeezing{{module:params/doc/link to the code|cutting|Lorem ipsum}}→ Lorem ipsum
Complete list of the links generated
sequentialnon-sequentialall_sortedreassortedsettingsqueezingfilling_the_gapsclearingcuttingcroppingpurgingbackpurgingrotatingsorting_sequential_valuesimposingprovidingdiscardingwith_name_matchingwith_name_not_matchingwith_value_matchingwith_value_not_matchingtrimming_valuesmapping_by_callingmapping_by_invokingmapping_by_magicrenaming_by_callingrenaming_by_replacingrenaming_by_invokingrenaming_by_magicrenaming_by_replacinggrouping_by_callingcountconcat_and_callconcat_and_invokerenaming_by_magicvalue_oflistlist_valuesfor_eachcall_for_eachinvoke_for_eachmagic_for_eachcall_for_each_valueinvoke_for_each_valuemagic_for_each_valuecall_for_each_groupself
Updating the list
After each update in the code of Module:Params the list of line numbers stored in this template needs to be updated. If you use GNU or other Unix-like operating systems you can do that automatically by launching:
grep -n '^library.\|^static_iface.' params.lua | sed 's/\(library\|static_iface\)\(\.\|\['\''\)\|'\''\]\|\s*=\s*function\s*([^)]\+)//g;s/^\([0-9]\+\):\(.\+\)$/ | \2 = L-\1/g'