The-International-Screeps-Bot / The-International-Open-Source

An automated bot for the coding game Screeps.com
MIT License
104 stars 35 forks source link

Complier compliance & BandAid fix for operator.ts #775

Closed realacesu closed 9 months ago

realacesu commented 9 months ago

Changed all constants/general imports to use relative importing to file importing it

Changed constants/general.ts and commented a non power task. if we take this approach ALL tasks must have all task function declarations in the role files. Going forward, add these and maybe error with not implemented and creep debug info to see what called it because it shouldn't be called. This is generally avoided because creeps individually select tasks and are not assigned. We will likely never see this.

realacesu commented 9 months ago

oops added notmycreeps.invader, this addition doesn't break anything as it still passes invaders to enemy

CarsonBurke commented 9 months ago

I like idea of notMyCreeps including invaders :)

CarsonBurke commented 9 months ago

I'm experiencing zero issues with constants on the unstable branch without using this PR. What is the reason behind the relative imports?

I like the invader thing. Could you make a separate PR for that please? I will happily merge that ASAP

realacesu commented 9 months ago

I'm experiencing zero issues with constants on the unstable branch without using this PR. What is the reason behind the relative imports?

On node 16.20.2, and 20.10.0 This was occurring for me, with no changes to the unstable branch

realacesu commented 9 months ago

Adding relative imports took away the require that was present on the top of the file after the banner

CarsonBurke commented 9 months ago

Adding relative imports took away the require that was present on the top of the file after the banner

Which file and which banner? sorry.

CarsonBurke commented 9 months ago

I'm experiencing zero issues with constants on the unstable branch without using this PR. What is the reason behind the relative imports?

On node 16.20.2, and 20.10.0 This was occurring for me, with no changes to the unstable branch

v16.17.1, no issues for me

realacesu commented 9 months ago

Adding relative imports took away the require that was present on the top of the file after the banner

Which file and which banner? sorry.

Build output. Complied main.js output

Banner comes from rollup cfg

realacesu commented 9 months ago

Node v16.17.1 same issue without PR. Unsure why its doing this