As #1 to optimize the memory used by the ground.
<details>
<summary>Otherwise get on my old VAIO:</summary>
```
radeon: Failed to allocate a buffer:
radeon: size : 1134551040 bytes
radeon: alignment : 4096 bytes
radeon: domains : 2
radeon: flags : 0
radeon: Failed to allocate a buffer:
radeon: size : 1134551040 bytes
radeon: alignment : 4096 bytes
radeon: domains : 2
radeon: flags : 0
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: BufferCreationError(OutOfMemory)', src/support/mod.rs:197:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```
</details>
To solve this issue uses the [`old_vaio`](http://gitea.lemnoslife.com:3006/Benjamin_Loison/LemnosLife_Rust/src/branch/old_vaio) branch.
This Python script allows us to know the biggest drop between a tile extremity and another (without considering its diagonal).
<details>
<summary>Python script:</summary>
```python
import os
path = 'Extensions/LemnosLife/Map/Altis/Ground/'
os.chdir(path)
biggestDrop = 0
def getFloat(s):
return -100 if s == 'N' else float(s)
for _, _, files in os.walk('.'):
for file in files:
with open(file) as f:
lines = f.read().splitlines()
for line, lineBelow in zip(lines, lines[1:-1]):
columns = line.split()
columnsBelow = lineBelow.split()
for column, columnBelow in zip(columns, columnsBelow):
column = getFloat(column)
columnBelow = getFloat(columnBelow)
drop = abs(column - columnBelow)
if drop > biggestDrop:
biggestDrop = drop
for column, columnRight in zip(columns, columns[1:-1]):
column = getFloat(column)
columnRight = getFloat(columnRight)
drop = abs(column - columnRight)
if drop > biggestDrop:
biggestDrop = drop
break
print(biggestDrop) # 16.17
```
</details>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
As #1 to optimize the memory used by the ground.
Otherwise get on my old VAIO:
To solve this issue uses the
old_vaiobranch.This Python script allows us to know the biggest drop between a tile extremity and another (without considering its diagonal).
Python script:
Benjamin_Loison referenced this issue2022-11-03 03:12:41 +01:00