chuigda / Project-705

中国式家长 - 山寨版
7 stars 1 forks source link

Compilation functions are implemented incorrectly #48

Closed chuigda closed 1 year ago

chuigda commented 1 year ago

In function compileBase:

https://github.com/chuigda/Project-705/blob/a9cce636d564144c454a4cd6f41985f5fa91d30f/backstage/src/loader/compile.ts#L91-L100

The input scope (which is the scope of the whole module) is always used, regardless of the scope specification inside the item. And almost all item compilation do the same. Taking Skill as example:

https://github.com/chuigda/Project-705/blob/a9cce636d564144c454a4cd6f41985f5fa91d30f/backstage/src/loader/compile.ts#L102-L125

By this time no piece of code is really using the scope inside items. However this needs to be fixed since downstream modders may expect this feature to function properly.