Module:Params/doc/link to the code: Difference between revisions
From Kenshi Wiki
More actions
< Module:Params | doc
Prd created the page Module:Params/doc/link to the code using a non-default content model "wikitext" |
No edit summary |
||
| Line 1: | Line 1: | ||
<includeonly>{{safesubst:<noinclude />#if:{{{1|}}} | |||
|[[Module:Params#{{safesubst:<noinclude />#switch:{{{1}}} | |||
| sequential = L-553 | |||
| non-sequential = L-565 | |||
| all_sorted = L-575 | |||
| reassorted = L-586 | |||
| setting = L-597 | |||
| squeezing = L-632 | |||
| filling_the_gaps = L-652 | |||
| clearing = L-682 | |||
| cutting = L-697 | |||
| cropping = L-732 | |||
| purging = L-776 | |||
| backpurging = L-795 | |||
| rotating = L-822 | |||
| sorting_sequential_values = L-906 | |||
| imposing = L-937 | |||
| providing = L-947 | |||
| discarding = L-958 | |||
| with_name_matching = L-980 | |||
| with_name_not_matching = L-1007 | |||
| with_value_matching = L-1034 | |||
| with_value_not_matching = L-1061 | |||
| trimming_values = L-1086 | |||
| mapping_by_calling = L-1096 | |||
| mapping_by_invoking = L-1115 | |||
| mapping_by_magic = L-1142 | |||
| mapping_by_replacing = L-1159 | |||
| renaming_by_calling = L-1184 | |||
| renaming_by_invoking = L-1203 | |||
| renaming_by_magic = L-1230 | |||
| renaming_by_replacing = L-1247 | |||
| grouping_by_calling = L-1276 | |||
| count = L-1309 | |||
| concat_and_call = L-1322 | |||
| concat_and_invoke = L-1341 | |||
| concat_and_magic = L-1368 | |||
| value_of = L-1382 | |||
| list = L-1406 | |||
| list_values = L-1437 | |||
| for_each = L-1465 | |||
| call_for_each = L-1496 | |||
| invoke_for_each = L-1534 | |||
| magic_for_each = L-1576 | |||
| call_for_each_value = L-1614 | |||
| invoke_for_each_value = L-1650 | |||
| magic_for_each_value = L-1692 | |||
| call_for_each_group = L-1728 | |||
| self = L-1802 | |||
| #default = nowhere | |||
}}|{{safesubst:<noinclude />#if:{{{2|}}}|{{{2}}}|{{{1}}}}}]] | |||
|[[Module:Params]] | |||
}}</includeonly><noinclude>{{Documentation|heading=[[File:Test Template Info-Icon - Version (2).svg|50px|alt=|link=]] Template documentation}}</noinclude> | |||
Latest revision as of 02:28, 15 February 2025
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'