Skip to content

Commit

Permalink
⚡ 改善: [SW2] 魔法データの系統選択において、妖精魔法関連を optgroup にまとめる (#147)
Browse files Browse the repository at this point in the history
Co-Authored-By: ViVi <44130782+ViVi-shark@users.noreply.github.com>
  • Loading branch information
yutorize and ViVi-shark committed May 23, 2024
1 parent 911c47a commit d9d3d26
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions _core/lib/edit.pl
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,10 @@ sub option {
$text .= '<optgroup label="'.$value.'">';
$label = 1;
}
elsif($value eq 'close_group') {
$text .= '</optgroup>';
$label = 0;
}
else {
if($value =~ s/\|\<(.*?)\>$//){ $view = $1 } else { $view = $value }
$text .= '<option value="'.$value.'"'.($::pc{$name} eq $value ? ' selected':'').'>'.$view;
Expand Down
7 changes: 6 additions & 1 deletion _core/lib/sw2/edit-arts.pl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@
my @craft_classes;
foreach(@data::class_names){
if($_ eq 'フェアリーテイマー'){
push(@magic_classes, '基本妖精魔法', '属性妖精魔法(土)', '属性妖精魔法(水・氷)', '属性妖精魔法(炎)', '属性妖精魔法(風)', '属性妖精魔法(光)', '属性妖精魔法(闇)', '特殊妖精魔法');
push(
@magic_classes,
'label=妖精魔法',
'基本妖精魔法', '属性妖精魔法(土)', '属性妖精魔法(水・氷)', '属性妖精魔法(炎)', '属性妖精魔法(風)', '属性妖精魔法(光)', '属性妖精魔法(闇)', '特殊妖精魔法',
'close_group'
);
}
elsif($_ eq 'コンジャラー'){
push(@magic_classes, $data::class{$_}{magic}{jName}, '深智魔法');
Expand Down

0 comments on commit d9d3d26

Please sign in to comment.