Skip to content

Commit 59804a3

Browse files
committed
Add and sort some hook aliases
Also added all aliases to the docs at the top of each file for consistency with some other files.
1 parent 7f37c35 commit 59804a3

10 files changed

+27
-16
lines changed

hooks/TPCFmtGentext.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
* Registers the following template hooks:
66
*
77
* {{thcrap_gentext}} / {{gentext}}
8-
* {{trophy}}
8+
* {{thcrap_trophy}} / {{trophy}}
9+
* {{thcrap_ability}} / {{ability}}
910
*
1011
* @file
1112
* @author Nmlgc
@@ -49,7 +50,11 @@ public static function onAbility( &$tpcState, &$title, &$temp ) {
4950
return true;
5051
}
5152
}
53+
5254
TouhouPatchCenter::registerHook( 'thcrap_gentext', 'TPCFmtGentext::onGentext' );
55+
TouhouPatchCenter::registerHook( 'thcrap_trophy', 'TPCFmtGentext::onTrophy' );
56+
TouhouPatchCenter::registerHook( 'thcrap_ability', 'TPCFmtGentext::onAbility' );
57+
// Short versions
5358
TouhouPatchCenter::registerHook( 'gentext', 'TPCFmtGentext::onGentext' );
5459
TouhouPatchCenter::registerHook( 'trophy', 'TPCFmtGentext::onTrophy' );
5560
TouhouPatchCenter::registerHook( 'ability', 'TPCFmtGentext::onAbility' );

hooks/TPCFmtMissions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Parser for th095 and th125 mission descriptions.
55
* Registers the following template hooks:
66
*
7-
* {{thcrap_mission}}
7+
* {{thcrap_mission}} / {{mission}}
88
*
99
* @file
1010
* @author Egor

hooks/TPCFmtMsg.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
* Parser for Team Shanghai Alice .msg dialogs.
55
* Registers the following template hooks:
66
*
7-
* {{thcrap_msg}}
8-
* {{thcrap_msg_assist}}
7+
* {{thcrap_msg}} / {{dialogtable}} / {{dt}}
8+
* {{thcrap_msg_assist}} / {{msgassist}}
9+
* {{thcrap_msg/footer}} / {{dialogtable/footer}} / {{dt/footer}}
10+
* {{thcrap_msg_parse}} / {{msgparse}}
911
*
1012
* @file
1113
* @author Nmlgc
@@ -184,9 +186,11 @@ public static function onMsgParse( &$tpcState, &$title, &$temp ) {
184186
TouhouPatchCenter::registerHook( 'thcrap_msg', 'TPCFmtMsg::onMsg' );
185187
TouhouPatchCenter::registerHook( 'thcrap_msg_assist', 'TPCFmtMsg::onMsgAssist' );
186188
TouhouPatchCenter::registerHook( 'thcrap_msg/footer', 'TPCFmtMsg::onMsgFooter' );
189+
TouhouPatchCenter::registerHook( 'thcrap_msg_parse', 'TPCFmtMsg::onMsgParse' );
187190
// Short versions
188-
TouhouPatchCenter::registerHook( 'dt', 'TPCFmtMsg::onMsg' );
189191
TouhouPatchCenter::registerHook( 'dialogtable', 'TPCFmtMsg::onMsg' );
190-
TouhouPatchCenter::registerHook( 'dt/footer', 'TPCFmtMsg::onMsgFooter' );
192+
TouhouPatchCenter::registerHook( 'dt', 'TPCFmtMsg::onMsg' );
191193
TouhouPatchCenter::registerHook( 'msgassist', 'TPCFmtMsg::onMsgAssist' );
194+
TouhouPatchCenter::registerHook( 'dialogtable/footer', 'TPCFmtMsg::onMsgFooter' );
195+
TouhouPatchCenter::registerHook( 'dt/footer', 'TPCFmtMsg::onMsgFooter' );
192196
TouhouPatchCenter::registerHook( 'msgparse', 'TPCFmtMsg::onMsgParse' );

hooks/TPCFmtMusic.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Parser for Music Room comments.
55
* Registers the following template hooks:
66
*
7-
* {{thcrap_music}}
7+
* {{thcrap_music}} / {{musicroom}}
88
*
99
* @file
1010
* @author Nmlgc
@@ -44,6 +44,7 @@ public static function onMusic( &$tpcState, &$title, &$temp ) {
4444
return true;
4545
}
4646
}
47+
4748
TouhouPatchCenter::registerHook( 'thcrap_music', 'TPCFmtMusic::onMusic' );
4849
// Short versions
4950
TouhouPatchCenter::registerHook( 'musicroom', 'TPCFmtMusic::onMusic' );

hooks/TPCFmtSpells.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Parser for Team Shanghai Alice spell cards.
55
* Registers the following template hooks:
66
*
7-
* {{thcrap_spell}}
7+
* {{thcrap_spell}} / {{spell_card}}
88
*
99
* @file
1010
* @author Nmlgc

hooks/TPCFmtStrings.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
* Parser for hardcoded strings.
55
* Registers the following template hooks:
66
*
7-
* {{thcrap_string_def}}
8-
* {{thcrap_string_loc}}
7+
* {{thcrap_string_def}} / {{stringdef}}
98
*
109
* @file
1110
* @author Nmlgc
@@ -39,6 +38,7 @@ public static function onDef( &$tpcState, &$title, &$temp ) {
3938
return true;
4039
}
4140
}
41+
4242
TouhouPatchCenter::registerHook( 'thcrap_string_def', 'TPCFmtStrings::onDef' );
4343
// Short versions
4444
TouhouPatchCenter::registerHook( 'stringdef', 'TPCFmtStrings::onDef' );

hooks/TPCFmtTasofro.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Registers the following template hooks:
66
*
77
* {{tt}}
8+
* {{tt/stagename}}
89
*
910
* @file
1011
* @author Nmlgc

hooks/TPCInclude.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* {{thcrap_include}}
99
* {{thcrap_tl_include}}
1010
* {{thcrap_prefix_include}}
11-
* {{thcrap_prefix_file_include}}
11+
* {{thcrap_prefix_file_include}} / {{thcrap_image}}
1212
*/
1313

1414
use MediaWiki\MediaWikiServices;

hooks/TPCInfo.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* Registers the following template hooks:
66
*
77
* {{thcrap_patch_info}}
8-
* {{thcrap_game_info}}
98
*
109
* @file
1110
* @author Nmlgc

hooks/TPCVersions.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
* Parser for version information.
55
* Registers the following template hooks:
66
*
7-
* {{thcrap_ver_info}}
8-
* {{thcrap_ver_info/Header}}
7+
* {{thcrap_version_info}} / {{thcrap_ver_info}}
8+
* {{thcrap_version_info/header}} / {{thcrap_ver_info/header}}
99
*
1010
* @file
1111
* @author Nmlgc
@@ -38,7 +38,8 @@ public static function onVerInfo( &$tpcState, $title, $temp ) {
3838
}
3939
}
4040

41-
TouhouPatchCenter::registerHook( 'thcrap_version_info/header', 'TPCVersions::onVerInfoHeader' );
42-
TouhouPatchCenter::registerHook( 'thcrap_ver_info/header', 'TPCVersions::onVerInfoHeader' );
4341
TouhouPatchCenter::registerRestrictedHook( 'thcrap_version_info', 'TPCVersions::onVerInfo' );
42+
TouhouPatchCenter::registerHook( 'thcrap_version_info/header', 'TPCVersions::onVerInfoHeader' );
43+
// Short versions
4444
TouhouPatchCenter::registerRestrictedHook( 'thcrap_ver_info', 'TPCVersions::onVerInfo' );
45+
TouhouPatchCenter::registerHook( 'thcrap_ver_info/header', 'TPCVersions::onVerInfoHeader' );

0 commit comments

Comments
 (0)