open-duelyst / duelyst

Duelyst is a digital collectible card game and turn-based strategy hybrid, developed by Counterplay Games.
Creative Commons Zero v1.0 Universal
3.62k stars 556 forks source link

Fix regular expressions for RSX resources scan #215

Closed bestwebdeveloper closed 1 year ago

bestwebdeveloper commented 1 year ago

Summary

Build changes (docker/, gulp/, scripts/, etc.): After updating code syntax to the modern with string literals previous regular expressions stoped working.

It was looking for stringified properties like ["string" + anything + "string"]. Instead of this we now have string${anything}string. So related regular expressions were updated to match this change.

Testing

Have you have tested your changes in the following scenarios? Feel free to check off scenarios which don't apply.

bestwebdeveloper commented 1 year ago

There are few errors left:

 [GP] [WARN] app/view/layers/game/TileLayer.js -> matched RSX search but no resource could be found for: RSX[`${tilePrefix}0${mergedTilePartId}`

This happens due to too short string ("0", it is just too generic and may match most of the resources).

 [GP] [WARN] app/ui/views2/shop/shop_product_view.js -> matched RSX search but no resource could be found for: RSX[this.model.get('icon_image_resource_name')
 [GP] [WARN] app/ui/views2/shop/confirm_purchase_dialog.js -> matched RSX search but no resource could be found for: RSX[this.productData.cover_image_resource_name
 [GP] [WARN] app/ui/views2/shop/confirm_purchase_dialog.js -> matched RSX search but no resource could be found for: RSX[this.productData.icon_image_resource_name
 [GP] [WARN] app/ui/views/helpers.js -> matched RSX search but no resource could be found for: RSX[resourceName
 [GP] [WARN] app/ui/views2/shop/premium_purchase_dialog.js -> matched RSX search but no resource could be found for: RSX[this.productData.cover_image_resource_name
 [GP] [WARN] app/ui/views2/shop/premium_purchase_dialog.js -> matched RSX search but no resource could be found for: RSX[this.productData.icon_image_resource_name

They happen due to runtime property forming therefore there is no way to get them in build time. I guess they were there even before and were considered as acceptable. To say for sure need to get where and how that package.json is used.