finelagusaz / the_Cassini_Division

ゴースト「カッシーニの空隙」
0 stars 0 forks source link

cassis_mouse.dic のリファクタリング #4

Open finelagusaz opened 2 years ago

finelagusaz commented 2 years ago

課題

もう少し深掘り

改善案

master シェル向けの反応と追加シェル向けの反応を分割する

判定ごとに辞書を分割する

Pros

Cons


案1

わけるならこれぐらいが落とし所か?

案2

あまり分離してないかも

案3

steve02081504 commented 2 years ago

Perhaps you could consider using the newer version of yaya's dicdir function to sort dic files to keep everything more organised like this: png

https://emily.shillest.net/ayaya/?%E3%83%9E%E3%83%8B%E3%83%A5%E3%82%A2%E3%83%AB/%E6%96%87%E6%B3%95/1.%E5%9F%BA%E7%A4%8E%E8%A8%AD%E5%AE%9A#h85cc54a

steve02081504 commented 2 years ago

If you are considering manually appending a different response to each shell, you might consider using logic like the following

OnShellXXX{
    if ISFUNC('OnShellXXX_'+ShellID){ //like OnShellXXX_master
        EVAL('OnShellXXX_'+ShellID) //call it
        return
    }
    else
        //default reaction or error msg here
}