News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

Draggable delete button

Started by Celli, May 12, 2023, 07:14:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Celli

Several times I encounter a situation when I want to delete something, like 10x5 tiles, but I have to go over each tile to have it deleted, for example a neighborhood in a city. This is because (at least in pak128) the delete option (R) only deletes one tile. I think R/Delete option should be draggable like the plant trees option (screenshot). It would be ideal because if I want to delete something of one-tile, i click once, if I want to delete a larger area of buildings, trees etc., just by clicking and dragging would make it so much faster and easier in my opinion.


Matthew

I agree that this would be a nice functionality to have.

However, I think implementing a draggable demolish tool would be a missed opportunity.

I think a better solution would be to implement a draggable General-Purpose Selection Tool:
  • You drag to set a rectangular area between two co-ordinates.
  • The function implementing this takes a parameter (set by a Ctrl+Click submenu) that determines which object types to select in that area: tiles, ways, wayobjects, citybuildings, convoys.... any object with co-ordinates.
  • A Selection Dialogue then pops up with tabs for each object type and appropriate actions for them. For example, the ways tab might have Demolish and Upgrade actions, while the vehicles tab has Sell, Withdraw, Retire, and Transfer to Line Actions.
  • A further step would be to list the selected objects in each tab and allow players to further filter and (de)select them. E.g. first you select all the Convoys in the rectangle, then filter them by waytype in the Convoys tab.

Creatingd the General-Purpose Selection Tool, the Selections Dialog UI, and the Actions framework (i.e. calling a function such as Sell for all the convoys in the selection list), would be a major project. The power of the proposal is that adding many more Actions then becomes easier. You 'just' need to connect existing functions such as Sell. Of course, there would be many problems and bugs to solve for each Action as well; I'm not saying it would be easy, just easier than implementing new tools for each one. And it would open up new possibilities too (at least for Extended), such as 'Sell Lines to Other Player'.

I have thought this for a long time but haven't posted it because it's all too easy to suggest coding tasks for other people. But since this thread has been started, perhaps this idea will catch someone's imagination.
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

Yona-TYT

A quick solution would be to use a Script tool to perform this function. :P