Topic: What is the difference between swamp and dead?
kaputtnik Topic Opener |
Posted at: 2015-11-25, 09:05
Is there a difference between dead terrains and swamp? Or: Why isn't swamp shown as dead in the editor? AFAIK there is nor difference. Both are impassable and irreclaimable (no buildings, no immovables) Top Quote |
|||||||||||||||||||||
GunChleoc |
Posted at: 2015-11-25, 10:40
The terrain types in C++ are:
And assigned from Lua as:
The Editor terrain tool then has the following rules for the tooltips (I am using pseudocode for readability):
Swamp is defined as The definitions in C++ also have implications on the placing of immovables, walkability etc. That code works on the edges between the terrains though and is quite tricky. The extra property for "dead" is "kDead", which can places additional restrictions on walkability next to the terrain. Edited: 2015-11-25, 10:46
Busy indexing nil values Top Quote |
|||||||||||||||||||||
king_of_nowhere |
Posted at: 2015-11-25, 10:57
basically, you can make roadds on the edges of swamp, touchinng the terrain. you can't make roads at the edges of lava. Top Quote |
|||||||||||||||||||||
kaputtnik Topic Opener |
Posted at: 2015-11-25, 17:43
Aha, thats what i've searched for thanks @ GunChleoc I want to change the terms of the vars, better: I've done this. Because it's tricky, as you said, i wanted to ask for the special cases of swamp because it needs an exception. More on my changes i will write in a bugreport with an attached branch. For now: These changes does not affect compatibility with old maps, because only the name of a terrain is stored in a map. Top Quote |
|||||||||||||||||||||
GunChleoc |
Posted at: 2015-11-25, 18:01
Yes, you can rename the "is" values without any problems. Do you feel up to giving them identical names in C++ too? If not, I can take care of it once you have done what you can Busy indexing nil values Top Quote |
|||||||||||||||||||||
kaputtnik Topic Opener |
Posted at: 2015-11-25, 18:23
Pushed a bug report with an attached branch Everyone is called to test this branch, maybe i've overlooked some special cases. Comments are welcome to the bug report. Top Quote |
|||||||||||||||||||||
GunChleoc |
Posted at: 2015-12-04, 14:04
I have done a code redesign now to get rid of some old complicated code duplication. I am in favour of renaming "impassable" to "unwalkable" - water is "navigable and impassable" in this branch, which looks like a contradiction. Busy indexing nil values Top Quote |
|||||||||||||||||||||
kaputtnik Topic Opener |
Posted at: 2015-12-04, 20:59
Hm, i couldn't find "unwalkable" either in dict.cc nor in dict.leo.org. But if you think it is better then we should use it Currently i play test the last changes. Top Quote |
|||||||||||||||||||||
GunChleoc |
Posted at: 2015-12-05, 01:16
http://findwords.info/term/unwalkable
Oxford English Dictionary Busy indexing nil values Top Quote |
|||||||||||||||||||||
GunChleoc |
Posted at: 2015-12-10, 14:44
This has been merged in r7665. Busy indexing nil values Top Quote |