More progress: Advanced Terraform - Drag and Draw v3.
edit: rediff for r12968
rediff for r13116
Rediff for r12436.
There have been some changes in behavior due to some critical responses I got. Now raise and lower will behave more like the big_raise and big_lower tools in the scedit: This esentially means that a raise operation will NEVER lower a piece of land and a lower operation will NEVER raise a piece of land.
Also, clear tile (= Dynamite) and in scedit placing rocks can now be drawn (holding CTRL, as usual).
complete changelist is here: viewtopic.php?f=33&t=35627&p=662577#p662577
File comment: advanced terraform - drag&draw v3 for r12436
adv_terraform_dragdraw_v3_r12436.diff [28.8 KiB]
Downloaded 363 times
File comment: Drag and draw
terraform.png [ 45.81 KiB | Viewed 19821 times ]
Update: Advanced Terraform - Drag and Draw v2.
Now supports rivers!
(and some stuff fixed)
For complete Changelog see here: viewtopic.php?f=33&t=35627&p=661651#p661651
Okay, it is done. (for now)
I present to you: drag-and-draw terraforming for normal game and scenario editor (when terraform size is set to 1)
A bit sad that no dev has commented on the 2nd step, hope they notice this one now...
It includes the changes i did in the "step 2" patch (see below).
What does it do? Hold CTRL while using the lower, raise or level tool to "draw" the selected terraforming mode in the landscape.
I personally think that maybe it's even more intuitive to switch the behaviors (this new one without CTRL and the area select with CTRL pressed). If I recieve positive feedback, I might add another version with it switched.
oh, and, feedback is very welcome
Step 2 updated to revision 11861.
It does several useful things:
- enables area_terraform in scenario editor when brush size is set to 1
- adds a an error string "Can't level land here..." (1st part)
- adds a an error string "Already flat" (2nd part)
- levelling now uses the Terraform command callback like raising and lowering (this also affects the played sound; is there any logical reason to have the exploding sound for leveling?)
- modifies the levelling code so that it counts the cost on when money runs out and displays not just the required cost for one tile but the estimated cost for the whole rest
- levelling (and generally all terraform actions) in scenario editor now doesn't make tiles brown anymore
Yep, that's it, i think. Here's the patch. Have a look at it, it should work fine... if not, please post a report.
Oh and by the way, the cost estimation for leveling (and thus for all area_terraforming) does not work correctly. That is a known bug since long time in trunk. (Won't promise to fix that...)
Okay, I renamed this thread because the patch i'm making somewhat turned in another direction and thus its name will be "Advanced Terraform".
So what is it about? Well, the final outcome should be that in both normal game and scenario editor you can:
- drag and drop an area for lower, level or raise
- drag and draw* an area while holding CTRL for lower, level or raise
* see picture in mikeel's post below
To do this i have made a patch first that moves the scenario editor terraforming stuff from main_gui.cpp over to terraform_gui.cpp (there's even a TODO by Darkvater in there that he'd do this sometime after 0.4.0
The second step will be to somewhat unify the scenarioeditor- and normal game terraforming. This includes the area terraform that went into trunk short time ago (but is not available in scenario editor yet).
The third and last step will be to implement the new drag-and-draw function. Can't promise anything on that, but I'll try
So, I hope my restructuring/preparation patch will be committed to trunk soon, so i can build on top of that. It doesn't really change anything (if i haven't screwed up badly
) and since it only moves the scenario editor stuff, I even doubt it would break any patches.
Okay, the first step is finished and was added to trunk. Also, some stuff was moved to the newly created terraform_cmd.cpp by Rubidium. This makes stuff more structured and nicer to work on
Because of the changes my little "Area Terraform in Scenario Editor" hack needs a little update.