-
Notifications
You must be signed in to change notification settings - Fork 524
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
New admin command: spawnrefund #2359
base: master
Are you sure you want to change the base?
Conversation
This PR is labelled "Need Discussion" so that it can be discussed among admins, to make sure I haven't missed anything crucial. |
A few points and questions.
|
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
The Delta-V changelog job that we've based ours off of doesn't use a few of the newer changelog features (admin-only flags, order, etc.), I've done a little bit of editing of the changelog.js script so it shouldn't clobber any of these changes we've made to the file locally, and can refer to a few known changelog files from the contents of the PR. Largely untested, might pick it up tomorrow. (why is it written in node, nothing else is written in node) |
ec32e66
to
7f2b54f
Compare
Conflicts fixed, history slightly cleaned up. This is ready to go if there are no changes you want me to make. :D |
About the PR
spawnrefund
AdminRefund
Why / Balance
Every once in a while, admins have to issue refunds. The server might crash, or a player sells someone else's ship, or a bug causes someone to be deleted, or raiders kill everyone on Frontier. Whatever the reason, refunds are sometimes needed. Unfortunately spawning exact amounts of spesos is awful. You have to spawn stacks of spesos and combine or split, which takes ages. Most admins seem to just round up to the nearest reasonable multiple so it doesn't take a decade. It's also a bit of a nightmare to ensure you don't drop money on the ground, as you can't spawn things directly into your own hand.
The
spawnrefund
command is intended to help with all of this.Usage:
spawnrefund <amount> [reason]
Examples:
spawnrefund 52000
spawnrefund 52000 "for JeanGreytide, other player sold their ship"
To limit abuse, the command imposes the following restrictions:
The command logs every successful refund to the admin log. For ease of tracking, the message includes the word "refund", and there's a whole new log category called AdminRefund.
The command is called
spawnrefund
rather than something more generic, likespawnspesos
orspawnmoney
, because admins shouldn't really be spawning money for anything other than refunds.How to test
deadmin
and try to use the command. Be rejected (and dejected).readmin
and possess a body. Use the command, be told you have to be a ghost.ghost
and use the command again. Be told you need a free hand.aghost
and use the command again. Get money in your hand.spawnrefund hello
. Be toldhello
is not a valid integer.spawnrefund 0
andspawnrefund -100
. Be told the values are out of range.Media
Success
Admin log:
Admin log message includes:
Failure states
Non-admin attempt:
Admin, not attached to a ghost:
Non-admin ghost:
No free hand:
Also shows a brief popup over the ghost in case you type the command into the chat console (
/spawnrefund ...
):Argument validation errors:
Requirements
Breaking changes
None.
Changelog
🆑
spawnrefund
, for spawning an exact number of spesos. To be used for the rare refund only, as the name suggests.