Refactorio / RedMew

The RedMew scenario code for Factorio.
https://redmew.com
GNU General Public License v3.0
178 stars 80 forks source link

/tpmode feature debouncing would benefit use of teleporting for map making/anti-griefing #575

Open Jayefuu opened 5 years ago

Jayefuu commented 5 years ago

It's working as intended but I would appreciate if someone could look at my suggested changes so that it could be improved to be more useful for short hops and debugging/map making purposes.

@plague006 might this be something you'd be interested in looking at if it's possible if others agree this would be a nice change to have?

Describe the bug Works great from map screen. When using /tpmode from play view when you place a blueprint it teleports you as expected and then your cursor moves to an unghosted location and teleports you again, making it very hard to control where you're going in short hops. I suppose this is the intended behaviour but it can be annoying when using it for map making. It would be nice not to have to go to map view to use tpmode.

Expected behavior It would be very nice if the /tpmode command had a cooldown, i.e. button debounce. This could be achieved by a few ways, but I don't know which technical solution is easiest/best: a) upon teleporting move the building used to place ghost back into the inventory so you don't teleport again. Could be annoying but workable if the admins start using the 1-5 hotkeys to pick up their item for ghosting. b) some kind of software timer that disables TP mode for 500 ms after using it, enough for the player to let off the mouse button. c) move the player cursor back to the player body position at the centre of the screen to stop the ghost being places. I don't know if this is even possible.

Steps to reproduce Steps to reproduce the behavior:

  1. Type /tpmode
  2. Place a ghost while not in map mode
  3. Player skips across surface in multiple teleport hops.
Valansch commented 5 years ago

Imo the tpmode behavior is fine as is. I actually like the way it looks.

mheguy commented 5 years ago

It looks cool, but the behaviour is really annoying when you're actually trying to get somewhere and you end up skipping 2-3 screens away.

Valansch commented 5 years ago

Thats when i switch to map view :D