Hi!
Here is another clipboard patch. It is greatly inspired of adf88's Clipboard
(and I took some graphics from its grf). I tried it but I didn't like a few
things so I made my own. Simple as that. Main goals were the diagonal
selection and a low diff footprint.
3 files in the package : the first diff is the clipboard. The second diff is
an extension to the game/scenario/heightmap save/load dialog to support
templates (use the main toolbar, right of the landscape button). Templates are
stored in separate files, the savegame is not affected. The third file is a
.grf containing mouse cursors and the toolbar icon (put it in the "baseset"
folder).
So, how does it work?
1/ The selection is:
- initiated by CTRL+C
- a classic "orthogonal" area
- or an "diagonal" one (use CTRL while selecting)
2/ Once the area is set:
- you can edit the selection with CTRL+E
- then click left to enable/disable any tile (white is selected, blue is
available and red is owned by another player)
- to validate the edition : CTRL+E again or a left click outside of the area
3/ Paste is:
- initiated with CTRL+V
- while the preview, the mousewheel rotates the buffer
- transmitted through a new game command (a multiplayer game is possible if
everyone has the patch)
4/ Buffer history:
A successful paste puts the buffer in the history queue. To access these old
buffers, you just have press BACKSPACE to cycle through them (a new paste put
the buffer on top of the queue). For the moment, the queue is arbitrarily
limited to 16.
I see copypasting as some sort of subcontract so I'm thinking of adding a fee
to each paste operation. To compensate the time gain by money... Speaking of
money, the cost estimation of a paste operation is currently wrong.
This patch requires a network extension provided by enhanced viewport.
[r3]
- fix backspace hotkey
- fix data transfer in multiplayer
[r2]
- Fix compilation with gcc.
[r1]
- Initial version.
[Patch] Copy/paste templates (storable on disk) r3 for 27153
Moderator: OpenTTD Developers
Re: [Patch] Copy/paste templates (storable on disk) r3 for 27153
please fix thi patche
Re: [Patch] Copy/paste templates (storable on disk) r3 for 27153
There is a somewhat similar patch in the CityMania patchpack as LaChupacabra nicely explained here: viewtopic.php?p=1254840#p1254840
Re: [Patch] Copy/paste templates (storable on disk) r3 for 27153
I confirm that it's incredibly unlikely to happen.
Thinking about this patch again, I made it for a friend who never used it even once
Good thing I recorded a video memory of it when I still had an ancient compiled version.
It was a nice feature, but iirc with 1 known issue: templates were not shareable between big and little endian processors.
Good times... And I'm glad to see the OTTD community is still kicking
Who is online
Users browsing this forum: No registered users and 21 guests