Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to make Rampart public #35

Open
connorshea opened this issue Aug 30, 2021 · 1 comment
Open

Unable to make Rampart public #35

connorshea opened this issue Aug 30, 2021 · 1 comment

Comments

@connorshea
Copy link

  1. Create a section of wall with a one tile hole
  2. Create a rampart in that one tile hole
  3. Click the rampart
  4. Click "Make public"
  5. Get error in console running xxscreeps
Unhandled error. Endpoint: /api/game/add-object-intent
 /Users/connorshea/code/xxscreeps/src/backend/endpoints/game/intents.ts:20
			throw new TypeError('Invalid parameters');
			      ^

TypeError: Invalid parameters
    at Object.execute (/Users/connorshea/code/xxscreeps/src/backend/endpoints/game/intents.ts:20:10)
    at null.<anonymous> (/Users/connorshea/code/xxscreeps/src/backend/endpoints/index.ts:23:33)
    at dispatch (/Users/connorshea/code/xxscreeps/node_modules/koa-compose/index.js:42:32)
    at /Users/connorshea/code/xxscreeps/node_modules/koa-router/lib/router.js:372:16
    at dispatch (/Users/connorshea/code/xxscreeps/node_modules/koa-compose/index.js:42:32)
    at /Users/connorshea/code/xxscreeps/node_modules/koa-compose/index.js:34:12
    at dispatch (/Users/connorshea/code/xxscreeps/node_modules/koa-router/lib/router.js:377:31)
    at dispatch (/Users/connorshea/code/xxscreeps/node_modules/koa-compose/index.js:42:32)
    at null.<anonymous> (/Users/connorshea/code/xxscreeps/src/mods/backend/password/backend.ts:34:10)
    at dispatch (/Users/connorshea/code/xxscreeps/node_modules/koa-compose/index.js:42:32)
@connorshea
Copy link
Author

One thing I did notice from the code is that this doesn't use the my convenience method to determine ownership. Probably not relevant, but a nice bit of code cleanup :P

if (rampart['#user'] === me) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant