Cataclysm-dda: Don't prompt for a direction for an action if there is only one direction possible

Created on 20 Aug 2019  路  4Comments  路  Source: CleverRaven/Cataclysm-DDA

Is your feature request related to a problem? Please describe.
I just set fire to a door I wanted to pick the lock of. The problem is, the steps for picking a lock and setting a fire are basically the same - open the action menu, hit a key, pick a direction.

Describe the solution you'd like
I remembered this change to the "control vehicle" action: #32541

It would be nice to have this feature for:

  • [x] Picking a lock
  • [ ] Using a crowbar
  • [ ] Cutting metal bars
  • [ ] Chopping a log
  • [ ] Chopping a tree
  • [ ] Filling a pit
  • [ ] Siphoning a vehicle
  • [ ] Mopping a spill (+ option to mop all around?)
  • [ ] Clearing rubble (+ option to clear all around?)

There should be many cases in which there is only one adjacent tile on which you are able use said action, and in these cases one should not be asked which tile to use said action on.

Describe alternatives you've considered
Leave everything as it is. It's working fine, typing too fast and not reading the prompt could be considered to be my problem.

Additional context
none

<Suggestion / Discussion> Controls / Input Quality of Life

All 4 comments

I moved the issue to checkboxes, @BaumgeistOne, are there any other scenarios where this would be possible?

Scenarios:

Good candidates

  • vehicle::use_harness = select creature to harness
  • iuse::hammer, iuse::crowbar = where to pry
  • iuse::clear_rubble = where to clear. Could be more that one, then the payer probably wants to clear them all?
  • iuse::siphon - if only one vehicle nearby
  • iuse::oxytorch, iuse::hacksaw, iuse::boltcutters - where to cut metal (bars)
  • iuse::mop - if there is only one tile with dirty liquids (but the check looks complicated).

Questinonable:

  • iuse::fishing_rod = where to fish. Usually it does not matter, event if more than one tile available, no?)
  • iuse::extinguisher = spray on single monster, or on fire?
  • iuse::fill_pit = where to fill. Could still be only one pit, right?
  • iuse::tazer = if only one monster is nearby?
  • iuse::cable_attach - if there is only one vehicle, even if it is all around the player. Could be helpful in some cases (sleeping in the car while recharging by cable), but also could be bad in other cases (connecting two vehicles, need to mind the cable length and where to attach it).
  • iuse::chop_tree, iuse::chop_logs - if only one tree nearby. It could be dangerous to auto select the tree

Bad candidates. Unlikely to be a single direction, so just for example:

  • player::dismount = where to dismount
  • place_trap_actor::use= where to place a trap
  • firestarter_actor::prep_firestarter_use = where to light a fire
  • deploy_furn_actor::use = where to deploy a furniture
  • iuse::jackhammer, iuse::pickaxe = where to drill/mine
  • etc.

Hey, thanks for coding this, ipcyborg! :)

I mostly agree with your list of actions. A few remarks:

Mopping and clearing rubble could have the option of just clearing all tiles around the player (if I want to clear that stuff, I usually want to clear it all around) - but I don't know if this should better be handled in a different issue?

Chopping logs I would consider a good candidate too: there are enough lonely logs just lying around in the woods. Same with pits.

Chopping a tree is also a good candidate - if there is just one tree around the player, they probably want to chop that one with this action. Just have to make sure that the prompt in which direction the tree should fall is not omitted - that one is important.

Fishing should not ask for a direction, ever. Just take the first tile that fits.

I'm not sure about using an extinguisher, I haven't used one. If it has an effect on monster, it probably is not a good candidate for this.

Thanks @ipcyborg ! Works perfectly.

Was this page helpful?
0 / 5 - 0 ratings