Skip to content

Commit

Permalink
捨て牌画像表示
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolat committed Jul 16, 2024
1 parent a5840e6 commit b7bf6a0
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion ghost/master/ex/Nostr/nostr.kis
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ OnNostr: $(
clear @a2;
split @a2 ${@c} \n;
setstr @pai $@a2[0];
echo \0\_q${@pai}\e;
setstr @url $(N.GetPaiUrl ${@pai});
echo \0\_q\_b[${@url},centerx,centery,--option=opaque,--option=use_self_alpha,--option=background]\e;
) else if $[ $(match ${@content} naku?) >= 0 ] $(
clear @a;
split @a ${@content} " ";
Expand Down Expand Up @@ -64,3 +65,27 @@ OnNostr: $(
);
);
)

=kis
function N.GetPaiUrl $(
setstr @pai $(substr $@arg[1] 1 1)$(substr $@arg[1] 0 1);
if $[ ${@pai} == "z1" ] $(
setstr @name east;
) else if $[ ${@pai} == "z2" ] $(
setstr @name south;
) else if $[ ${@pai} == "z3" ] $(
setstr @name west;
) else if $[ ${@pai} == "z4" ] $(
setstr @name north;
) else if $[ ${@pai} == "z5" ] $(
setstr @name white;
) else if $[ ${@pai} == "z6" ] $(
setstr @name green;
) else if $[ ${@pai} == "z7" ] $(
setstr @name red;
) else $(
setstr @name ${@pai};
);
return https://awayuki.github.io/emoji/mahjong-${@name}.png;
);
=end

0 comments on commit b7bf6a0

Please sign in to comment.