[patch] Clipboard (a/k/a "Copy and Paste")

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Dante123
Chief Executive
Chief Executive
Posts: 671
Joined: 11 Aug 2009 16:10
Location: The Nederlands
Contact:

Re: Clipboard (a/k/a "Copy and Paste")

Post by Dante123 »

welcome back :D
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Clipboard (a/k/a "Copy and Paste")

Post by petert »

adf88, I have a problem compiling your patch against the latest revision (r18844). I've compiled, but when I open OpenTTD and try to copy/paste something, the copy paste GUI does not appear. Is this due to the fact that clipboard_gui.cpp is written completely in comments?

I can post the patch file for the latest revision, if you want.
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: Clipboard (a/k/a "Copy and Paste")

Post by adf88 »

Yes, there is no GUI yet. Commented code inside clipboard_gui.cpp is just an old copy-past patch code.
However, you can press Ctrl+C/Ctrl+V to copy/paste or Ctrl+(Left|Right|Up|Down) to rotate/flip.

Terraforming and clearing are unavailable. I'm currently working on them. It's the most complicated task, as I want to make pasting user-friendly which involves:
- terraform only as much as needed to paste temaplate
- clear as much as needed to paste temaplate
- checking if a template can be fully pasted before making any action

Stations and waypoints won't paste. Much of work is done but some algorithms are missing. When terraforming/clearing is finished I'll work on stations.

Locks won't paste too. The purpose is to put locks automatically on slopes, they won't be copied at all.
:] don't worry, be happy and checkout my patches
lordwurst
Engineer
Engineer
Posts: 10
Joined: 30 Oct 2008 08:00

Re: Clipboard (a/k/a "Copy and Paste")

Post by lordwurst »

is there any grf-file where the ney funktions are included already?
would realy like to test it.
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Clipboard (a/k/a "Copy and Paste")

Post by petert »

lordwurst wrote:is there any grf-file where the ney funktions are included already?
would realy like to test it.
The copy-paste feature cannot be implemented via a NewGRF file, and the patch hasn't been update for a while, so no use putting out a binary.
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: Clipboard (a/k/a "Copy and Paste")

Post by adf88 »

petert wrote:the patch hasn't been update for a while, so no use putting out a binary.
The work goes slowly, but it goes. I'll update the patch when it will be able to run :) .
Currently I'm working on the "Multiplayer Server List Filtering" so it's ready for OTTD 1.0 release.
:] don't worry, be happy and checkout my patches
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Clipboard (a/k/a "Copy and Paste")

Post by ChillCore »

Hi lordwurst.

As petert said patches can not be used in OpenTTD the same way you play with grfs.
Instead the code has to be changed and recompiled.
The patchfiles are for altering the source code before recompiling.
The link below will tell you what you need and how to do it if you want to give it a try.
http://wiki.openttd.org/Category:Compiling_OpenTTD
There is a sticky where you can ask questions if you run into problems.

As an aternative you may want to scroll back a few pages and see if there is allready a compiled binary if you just want to see what the patch is about or if you are not able to compile yourself.

Petert, it is nice of you to tell people what they can not do, even nicer would be to point them in the direction of things they can do or at least try.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
lordwurst
Engineer
Engineer
Posts: 10
Joined: 30 Oct 2008 08:00

Re: Clipboard (a/k/a "Copy and Paste")

Post by lordwurst »

ok... when do you think the first compiled version will be uploaded??
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Clipboard (a/k/a "Copy and Paste")

Post by ChillCore »

As an aternative you may want to scroll back a few pages and see if there is allready a compiled binary if you just want to see what the patch is about or if you are not able to compile yourself.
Or have some patience.
To reply to your question: When it is uploaded.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Clipboard (a/k/a "Copy and Paste")

Post by petert »

lordwurst wrote:ok... when do you think the first compiled version will be uploaded??
If you really don't want to wait, just download this 0.7.3 version, it has Copy and Paste in it: http://www.tt-forums.net/viewtopic.php?p=823142#p823142
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: Clipboard (a/k/a "Copy and Paste")

Post by adf88 »

lordwurst wrote:ok... when do you think the first compiled version will be uploaded??
Hmmm, that's a difficult question. Alfa release will be in March probably.

copy&paste for 0.7.3 patch applies well to 0.7.5 too.
:] don't worry, be happy and checkout my patches
User avatar
Ammler
President
President
Posts: 953
Joined: 18 Jun 2006 18:18
Location: Switzerland
Contact:

Re: Clipboard (a/k/a "Copy and Paste")

Post by Ammler »

Might it be possible to make again (like Frostregen did) a patch, which is able to install on server side to slow down or disable c&p users.
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: Clipboard (a/k/a "Copy and Paste")

Post by adf88 »

Yes, of course. I was planning that from the beginning.
:] don't worry, be happy and checkout my patches
hallan
Engineer
Engineer
Posts: 3
Joined: 03 Sep 2008 19:10

Re: Clipboard (a/k/a "Copy and Paste")

Post by hallan »

Hello,
did you make a copy paste fot 7.5.0??
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Clipboard (a/k/a "Copy and Paste")

Post by Alberth »

hallan wrote:Hello,
did you make a copy paste fot 7.5.0??
Afaik there is no version 7.5.0, wait a few decades first.
lordwurst
Engineer
Engineer
Posts: 10
Joined: 30 Oct 2008 08:00

Re: Clipboard (a/k/a "Copy and Paste")

Post by lordwurst »

i just saw that this tread more or less died... is there still someone working on it?? it would be to bad if the patch would not be finished
Starbud
Traffic Manager
Traffic Manager
Posts: 211
Joined: 05 Mar 2007 00:48
Location: Sweden
Contact:

Re: Clipboard (a/k/a "Copy and Paste")

Post by Starbud »

I'm under the impression that is is being worked on when there is time and motivation to do so :)

I think i read somewhere that work is about making it work for the 1.0.0 version.
I'm someone who will really like this patch, i have liked the former versions A LOT and they have helped my development in construction A LOT and saved A LOT of time and given the ability to build very much more efficient networks :)
http://openttd.org - i love building stuff :)
Someones play with pics http://dimalimsliv.blogg.se
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Clipboard (a/k/a "Copy and Paste")

Post by Bilbo »

Last known version of old copy & paste patch for 0.7.3 here: http://www.tt-forums.net/viewtopic.php?p=822863#p822863

Maybe that would work for 0.7.5 (the differences between 0.7.3 and 0.7.5 are usually only a bugfixes), maybe it'll need just some minor modification. But porting it to trunk or 1.0.0 may need some rather large changes.

I don't know of any version of old copy & paste patch that works with 1.0.0 or trunk.
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
Klaatu
Engineer
Engineer
Posts: 43
Joined: 04 Aug 2003 14:58

Re: Clipboard (a/k/a "Copy and Paste")

Post by Klaatu »

Of course, old copy & paste has virtually nothing to do with this patch, other than similar functionality.

Like Starbud, I too look forward to this patch being updated to work with 1.0. I am actually not playing OTTD until then, as I do not like playing without this functionality being in game.

I wish adf88 the best of luck to have time and inclination to work on this and release a version that will work with 1.0. If I knew of some way to contribute to his efforts to update clipboard, I would (to the extent I could anyway).
Starbud
Traffic Manager
Traffic Manager
Posts: 211
Joined: 05 Mar 2007 00:48
Location: Sweden
Contact:

Re: Clipboard (a/k/a "Copy and Paste")

Post by Starbud »

Ok this is just one wish among many but i still place my wish:
My wish is multitrack autorouter, maybe with signals too.
It does somewhat replace the copy&paste but just for mainlines.
Trackpatterns of some kind.
I guess i will have to code it myself to show exactly what i mean.
I guess i could dream upp lots of diffrent lovely tools and ways to design the game from ground up but i havent contributed any code at all so until then it will just be dreams i have, tho lovely ones.
http://openttd.org - i love building stuff :)
Someones play with pics http://dimalimsliv.blogg.se
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 29 guests