… | |
… | |
3787 | cf::face::set |
3787 | cf::face::set |
3788 | "res/spell_paths" => FT_RSRC, |
3788 | "res/spell_paths" => FT_RSRC, |
3789 | JSON::XS->new->utf8->canonical->encode ( |
3789 | JSON::XS->new->utf8->canonical->encode ( |
3790 | [map [cf::spellpathnames ($_)], 0 .. NRSPELLPATHS - 1] |
3790 | [map [cf::spellpathnames ($_)], 0 .. NRSPELLPATHS - 1] |
3791 | ); |
3791 | ); |
|
|
3792 | |
|
|
3793 | # command completion |
|
|
3794 | my @commands; |
|
|
3795 | |
|
|
3796 | for (0..cf::arch::skillvec_size - 1) { |
|
|
3797 | my $skill = cf::arch::skillvec $_; |
|
|
3798 | my $name = $skill->name; |
|
|
3799 | my $flags = cf::skill_flags $skill->subtype; |
|
|
3800 | |
|
|
3801 | push @commands, "ready_skill $name" if $flags & (SF_COMBAT | SF_RANGED | SF_GRACE); |
|
|
3802 | push @commands, "use_skill $name" if $flags & (SF_USE | SF_AUTARK | SF_GRACE); |
|
|
3803 | } |
|
|
3804 | |
|
|
3805 | cf::client::set_command_face skill => \@commands; |
3792 | } |
3806 | } |
3793 | |
3807 | |
3794 | sub reload_treasures { |
3808 | sub reload_treasures { |
3795 | load_resource_file "$DATADIR/treasures" |
3809 | load_resource_file "$DATADIR/treasures" |
3796 | or die "unable to load treasurelists\n"; |
3810 | or die "unable to load treasurelists\n"; |