Compare commits

..

4 Commits
1.5_rc1 ... 1.5

Author SHA1 Message Date
Vasyl Horbachenko
ba8112280d Merge pull request #66 from shdwp/develop
Develop
2019-05-31 16:49:03 +03:00
Vasyl Horbachenko
4cc373595c Update README.md 2019-05-31 16:39:18 +03:00
Vasyl Horbachenko
4c5a2650d1 Merge pull request #58 from JohanAberg/patch-1
ValueError: negative radius
2019-05-21 04:50:30 +03:00
Johan Aberg
b99cdfb5c3 ValueError: negative radius
When cp.base.strength is zero 0, radius_m becomes negative and an ValueError is raised.

INFO:root:Commision Al Maktoum: {<class 'dcs.vehicles.Armor.APC_BTR_80'>: 3}
ERROR:root:<class 'ValueError'>
Traceback (most recent call last):
  File "tkinter\__init__.py", line 1702, in __call__
  File "ui\window.py", line 156, in dismiss
  File "ui\mainmenu.py", line 29, in display
  File "ui\overviewcanvas.py", line 590, in update
  File "ui\overviewcanvas.py", line 252, in draw
  File "ui\overviewcanvas.py", line 312, in draw_map
  File "ui\overviewcanvas.py", line 331, in draw_bases
ValueError: negative radius

Proposed fix:
radius_m = max(radius * cp.base.strength - 2, 0)
2019-04-04 19:10:59 +13:00
2 changed files with 1 additions and 8 deletions

View File

@@ -4,13 +4,6 @@
Uses [pydcs](http://github.com/pydcs/dcs) for mission generation.
## Installation
1. Download and install **Python 3.6.0** package from https://www.python.org/downloads/release/python-360/ (look at the bottom under *Files*; any option will do if it matches your architecture) with default set of options (you need to have *Install launcher for all users (recommended)* checked)
1. Download archived release (https://github.com/shdwp/dcs_liberation/releases; **not source code zip**, file should be named **dcs_liberation_xx.zip**)
1. Unzip the archive somewhere. Path does not matter. **Application will not work** if you start it without extracting
1. Run **start.bat**
1. If **"Windows protected your PC"** popup appears on your computer (windows blocks any application unknown to it), you can click on **"More info"** and **"Run anyway"**
## Tutorials
* [Manual](https://github.com/shdwp/dcs_liberation/wiki/Manual)

View File

@@ -320,7 +320,7 @@ class OverviewCanvas:
for cp in self.game.theater.controlpoints:
coords = self._transform_point(cp.position)
radius = 12 * math.pow(cp.importance, 1)
radius_m = radius * cp.base.strength - 2
radius_m = max(radius * cp.base.strength - 2, 0)
if cp.captured:
color = self._player_color()