Commands for the bailiff #3921

Closed
opened 2023-03-03 16:43:37 +00:00 by AliasAlreadyTaken · 8 comments

Let's make a single command for the bailiff and also let the users ask the bailiff what he is doing

/bailiff

-come

--here : Teleports the bailiff near you

--to player A: Teleports the bailiff to player A

--to A: Teleports the bailiff to location A

--to xyz abc: Teleports the bailiff to coordinates abc

--help: Tells the user what he can do with this command.

-look :

--here : Looks at the position where you are

--at me : Looks and keeps looking at you

--at a : Looks and keeps looking player a

--at xyz abc: Looks at the position abc

--help : Tells the user what he can do with this command.

-report

--me : Tells you what the bailiff is doing

--to a : Tells a player what the bailiff is doing

-patrol: Bailiff resumes his patrol

-next: Bailiff goes to the next station

Let's make a single command for the bailiff and also let the users ask the bailiff what he is doing /bailiff -come --here : Teleports the bailiff near you --to player A: Teleports the bailiff to player A --to A: Teleports the bailiff to location A --to xyz abc: Teleports the bailiff to coordinates abc --help: Tells the user what he can do with this command. -look : --here : Looks at the position where you are --at me : Looks and keeps looking at you --at a : Looks and keeps looking player a --at xyz abc: Looks at the position abc --help : Tells the user what he can do with this command. -report --me : Tells you what the bailiff is doing --to a : Tells a player what the bailiff is doing -patrol: Bailiff resumes his patrol -next: Bailiff goes to the next station
AliasAlreadyTaken added the
1. kind/enhancement
2. prio/good first issue
labels 2023-03-03 16:43:46 +00:00
AliasAlreadyTaken self-assigned this 2023-03-09 22:08:36 +00:00
AliasAlreadyTaken added this to the 1.1.118 milestone 2023-04-20 16:01:34 +00:00
Author
Owner

Findings so far:

  1. /stream come 500000 does teleport the bailiff to this very location:

image

  1. commands need logging added to them

  2. I managed to hang the server like in an infinite loop, but cannot reproduce it for now. I was testing /stream come here combinations. This is purely informational until we can reproduce somehow or whiteboxing yields a clue.

  3. Nice: /stream come to p Bailiff : Teleport Bailiff to Bailiff? Huh?

  4. /stream come to pos 1 2 3 4 leads to pos x=1,y=2,z=3

  5. /stream come to pos 1 2 3 4 leads to pos x=1,y=2,z=99999999999999 actually sends the bailiff to this position. Boom! That causes the server hang like in 3.

  6. Should a /stream look here keep looking at the position even after a /stream come here or similar? Or does the latter overwrite the former?

  7. Should /stream look at p AliasAlreadyTaken resume after logout of AliasAlreadyTaken ?

  8. Should /stream look at p AliasAlreadyTaken toggle toggle watching the person?

  9. For sanity reasons we should have /stream look at pos 1 -999900000000000000000000000000000000000000000000000000000000000 3 return an error and only allow positions within the map.

  10. Love the morph command! Is there an unmorph? /stream morph to p AliasAlreadyTaken

  11. While the stream is morphed into me, should /stream report patrol send the bailiff back to patrol? Seems like this command toggles the patrol instead of report the next patrol station?

  12. Likewise, /stream report next sends the bailiff to the next station, instead of reporting their next station. If that is intended, maybe not use "report", but "patrol" instead?

  13. Would be good to have commands that do not immediately result in an action like /stream set interval teleport 9 return some comment to the issuer

  14. Would be good if the "set" commands revealed the current setting when sent without parameter, like so /stream set interval reload

Findings so far: 1. `/stream come 500000` does teleport the bailiff to this very location: ![image](/attachments/86f0cb4c-1c88-4c94-b332-03dc6e8c741e) 2. commands need logging added to them 3. I managed to hang the server like in an infinite loop, but cannot reproduce it for now. I was testing /stream come here combinations. This is purely informational until we can reproduce somehow or whiteboxing yields a clue. 4. Nice: `/stream come to p Bailiff` : `Teleport Bailiff to Bailiff? Huh?` 5. `/stream come to pos 1 2 3 4` leads to pos x=1,y=2,z=3 6. `/stream come to pos 1 2 3 4` leads to pos x=1,y=2,z=99999999999999 actually sends the bailiff to this position. Boom! That causes the server hang like in 3. 7. Should a `/stream look here` keep looking at the position even after a `/stream come here` or similar? Or does the latter overwrite the former? 8. Should `/stream look at p AliasAlreadyTaken` resume after logout of AliasAlreadyTaken ? 9. Should `/stream look at p AliasAlreadyTaken toggle` toggle watching the person? 10. For sanity reasons we should have `/stream look at pos 1 -999900000000000000000000000000000000000000000000000000000000000 3` return an error and only allow positions within the map. 11. Love the morph command! Is there an unmorph? `/stream morph to p AliasAlreadyTaken` 12. While the stream is morphed into me, should `/stream report patrol` send the bailiff back to patrol? Seems like this command toggles the patrol instead of report the next patrol station? 13. Likewise, `/stream report next` sends the bailiff to the next station, instead of reporting their next station. If that is intended, maybe not use "report", but "patrol" instead? 14. Would be good to have commands that do not immediately result in an action like `/stream set interval teleport 9` return some comment to the issuer 15. Would be good if the "set" commands revealed the current setting when sent without parameter, like so `/stream set interval reload`
6.6 KiB
  1. I don't see where the problem is... Is there one?

  2. I'll add that

  3. Thanks :D I added that to prevent an infinite loop like "/stream come to p Bailiff 2 toggle". Is that what you meant with 3?

5./6. Where is the difference? I don't understand.

  1. "/stream look here" only sets the camera/player rotation once, it doesn't effect Bailiff's position at all.

  2. No, Bailiff's state will be reset after log out, see l.221ff. (register_globalstep)

  3. Yes, I don't have a better name for that :P

  4. I'll add that as well

  5. There is no real unmorph command, but "/stream come here" does the same thing

  6. Oh my bad, I read your message wrong, thought it would be "/stream report patrol" instead of "stream patrol"

  7. Same as 12

  8. Eh... I don't understand...

  9. "/stream report me" outputs all settings, but I can add that as well.

1. I don't see where the problem is... Is there one? 2. I'll add that 4. Thanks :D I added that to prevent an infinite loop like "/stream come to p Bailiff 2 toggle". Is that what you meant with 3? 5./6. Where is the difference? I don't understand. 7. "/stream look here" only sets the camera/player rotation once, it doesn't effect Bailiff's position at all. 8. No, Bailiff's state will be reset after log out, see l.221ff. (register_globalstep) 9. Yes, I don't have a better name for that :P 10. I'll add that as well 11. There is no real unmorph command, but "/stream come here" does the same thing 12. Oh my bad, I read your message wrong, thought it would be "/stream report patrol" instead of "stream patrol" 13. Same as 12 14. Eh... I don't understand... 15. "/stream report me" outputs all settings, but I can add that as well.

Alias:

  1. /stream come 500000 does teleport the bailiff to this very location:

image

TheTrueBeginner:

  1. I don't see where the problem is... Is there one?

check the screenshot, thats way way way outside world boundaries

> Alias: > > 1. `/stream come 500000` does teleport the bailiff to this very location: > > ![image](/attachments/86f0cb4c-1c88-4c94-b332-03dc6e8c741e) > >> TheTrueBeginner: >> 1. I don't see where the problem is... Is there one? check the screenshot, thats way way way outside world boundaries
Member

i'm surprised the bailiff's client didn't crash out there, that used to be a thing

i'm surprised the bailiff's client didn't crash out there, that used to be a thing
Author
Owner

That did crash us the testserver, see 3.

That did crash us the testserver, see 3.
AliasAlreadyTaken modified the milestone from 1.1.118 to 1.1.119 2023-04-25 07:23:32 +00:00
AliasAlreadyTaken added the
4. step/ready to QA test
label 2023-05-07 19:50:49 +00:00
Author
Owner
  1. I don't see where the problem is... Is there one?

Yes, the server crashes when the bailiff is teleported far outside the map. Is there a way to allow only positions inside the map?

We made a similar function here:

https://gitea.your-land.de/your-land/yl_commons/src/branch/yl_stable/util/pos.lua#L27

  1. I'll add that

👍

  1. Thanks :D I added that to prevent an infinite loop like "/stream come to p Bailiff 2 toggle". Is that what you meant with 3?

No actionable item, just a "well done" 👍

This means that when by accident an additional number is given, the command still works. Not sure but it's "more clean" if in this case we tell the sender of the command he made some mistake, instead of silently executing a semi-wrong command.

  1. Where is the difference? I don't understand.

This means that the bailiff could be teleported outside the map, this crashes the server like in 3. Same solution like for 1: check the target position whether it is legal and inside the map

  1. "/stream look here" only sets the camera/player rotation once, it doesn't effect Bailiff's position at all.

👍

  1. No, Bailiff's state will be reset after log out, see l.221ff. (register_globalstep)

👍

  1. Yes, I don't have a better name for that :P

👍

  1. I'll add that as well

👍 You could use the same function as in 1.

  1. There is no real unmorph command, but "/stream come here" does the same thing

Would be less guessing if there was an unmorph command, it certainly can do the same as /stream come here

  1. Oh my bad, I read your message wrong, thought it would be "/stream report patrol" instead of "stream patrol"

👍

  1. Same as 12

👍

  1. Eh... I don't understand...

If a command immediately results in an action, the person who sends the command can observe the action. If a command does not result in an observable action, it might be a good idea to tell the user what the bailiff did. Liek in the Example, the bailiff could say "I set this key to that value"

  1. "/stream report me" outputs all settings, but I can add that as well.

👍

> 1. I don't see where the problem is... Is there one? Yes, the server crashes when the bailiff is teleported far outside the map. Is there a way to allow only positions inside the map? We made a similar function here: https://gitea.your-land.de/your-land/yl_commons/src/branch/yl_stable/util/pos.lua#L27 > 2. I'll add that 👍 > 4. Thanks :D I added that to prevent an infinite loop like "/stream come to p Bailiff 2 toggle". Is that what you meant with 3? No actionable item, just a "well done" 👍 > 5. This means that when by accident an additional number is given, the command still works. Not sure but it's "more clean" if in this case we tell the sender of the command he made some mistake, instead of silently executing a semi-wrong command. > 6. Where is the difference? I don't understand. This means that the bailiff could be teleported outside the map, this crashes the server like in 3. Same solution like for 1: check the target position whether it is legal and inside the map > 7. "/stream look here" only sets the camera/player rotation once, it doesn't effect Bailiff's position at all. 👍 > 8. No, Bailiff's state will be reset after log out, see l.221ff. (register_globalstep) 👍 > 9. Yes, I don't have a better name for that :P 👍 > 10. I'll add that as well 👍 You could use the same function as in 1. > 11. There is no real unmorph command, but "/stream come here" does the same thing Would be less guessing if there was an unmorph command, it certainly can do the same as /stream come here > 12. Oh my bad, I read your message wrong, thought it would be "/stream report patrol" instead of "stream patrol" 👍 > 13. Same as 12 👍 > 14. Eh... I don't understand... If a command immediately results in an action, the person who sends the command can observe the action. If a command does not result in an observable action, it might be a good idea to tell the user what the bailiff did. Liek in the Example, the bailiff could say "I set this key to that value" > 15. "/stream report me" outputs all settings, but I can add that as well. 👍
Author
Owner

QA

happy QA noises

QA *happy QA noises*
AliasAlreadyTaken added the
ugh/QA OK
label 2023-05-14 18:25:10 +00:00
Member

i didn't test all the features, but this is live.

i didn't test all the features, but this is live.
flux closed this issue 2023-05-18 19:23:35 +00:00
flux added
5. result/fixed
and removed
4. step/ready to QA test
labels 2023-05-18 19:23:56 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: your-land/bugtracker#3921
No description provided.