This commit is contained in:
indev 2020-04-10 13:54:26 +03:00
commit c7d31396c4
5 changed files with 21 additions and 18 deletions

View File

@ -4114,10 +4114,10 @@
"assets/build/windows/x64/python.exe": "https://files.ballistica.net/cache/ba1/25/a7/dc87c1be41605eb6fefd0145144c", "assets/build/windows/x64/python.exe": "https://files.ballistica.net/cache/ba1/25/a7/dc87c1be41605eb6fefd0145144c",
"assets/build/windows/x64/python37.dll": "https://files.ballistica.net/cache/ba1/b9/e4/d912f56e42e9991bcbb4c804cfcb", "assets/build/windows/x64/python37.dll": "https://files.ballistica.net/cache/ba1/b9/e4/d912f56e42e9991bcbb4c804cfcb",
"assets/build/windows/x64/pythonw.exe": "https://files.ballistica.net/cache/ba1/6c/bb/b6f52c306aa4e88061510e96cefe", "assets/build/windows/x64/pythonw.exe": "https://files.ballistica.net/cache/ba1/6c/bb/b6f52c306aa4e88061510e96cefe",
"build/prefab/linux/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/ff/6b/d0873927a179b2a85a3dea2da18a", "build/prefab/linux/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/6b/88/a8f82a340a0fba36edfe95298871",
"build/prefab/linux/release/ballisticacore": "https://files.ballistica.net/cache/ba1/ac/48/72f261d7884a21cb79feef2d0a02", "build/prefab/linux/release/ballisticacore": "https://files.ballistica.net/cache/ba1/d3/72/4ad974215d1cfd0db7f14af5f6c3",
"build/prefab/mac/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/e7/e8/6cb5ba8c688986b322dd998c0320", "build/prefab/mac/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/82/c3/388d9a77f8bde608d7cdf2891ad3",
"build/prefab/mac/release/ballisticacore": "https://files.ballistica.net/cache/ba1/91/76/6037c47265319bcbf4e448307a57", "build/prefab/mac/release/ballisticacore": "https://files.ballistica.net/cache/ba1/6c/6f/d2ffeecb1e9a18678b1ec1695198",
"build/prefab/windows/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/43/23/d3e915b7c5222535ea723538d778", "build/prefab/windows/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/77/68/e7ac990ee0ec25dd6a459e637d9f",
"build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/ce/98/72177f47655d61fedb069cb2e279" "build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/e8/ce/1091fea9004ca76f6b8ccde8b839"
} }

View File

@ -34,7 +34,7 @@ NOTE: This file was autogenerated by gendummymodule; do not edit by hand.
""" """
# (hash we can use to see if this file is out of date) # (hash we can use to see if this file is out of date)
# SOURCES_HASH=13501269283550798144571003636886602232 # SOURCES_HASH=126196922259492504803685031830587478733
# I'm sorry Pylint. I know this file saddens you. Be strong. # I'm sorry Pylint. I know this file saddens you. Be strong.
# pylint: disable=useless-suppression # pylint: disable=useless-suppression
@ -1987,8 +1987,8 @@ def get_connection_to_host_info() -> dict:
return dict() return dict()
def get_display_resolution() -> Tuple[int, int]: def get_display_resolution() -> Optional[Tuple[int, int]]:
"""get_display_resolution() -> Tuple[int, int] """get_display_resolution() -> Optional[Tuple[int, int]]
(internal) (internal)
@ -2183,12 +2183,12 @@ def get_package_texture(package: ba.AssetPackage, name: str) -> ba.Texture:
return ba.Texture() return ba.Texture()
def get_price(item: str) -> str: def get_price(item: str) -> Optional[str]:
"""get_price(item: str) -> str """get_price(item: str) -> Optional[str]
(internal) (internal)
""" """
return str() return ""
def get_public_login_id() -> str: def get_public_login_id() -> str:

View File

@ -256,6 +256,7 @@ class GraphicsSettingsWindow(ba.Window):
on_value_change_call=self._set_gvr_render_target_scale) on_value_change_call=self._set_gvr_render_target_scale)
else: else:
native_res = _ba.get_display_resolution() native_res = _ba.get_display_resolution()
assert native_res is not None
choices = ['Auto', 'Native'] choices = ['Auto', 'Native']
choices_display = [ choices_display = [
ba.Lstr(resource='autoText'), ba.Lstr(resource='autoText'),
@ -283,7 +284,7 @@ class GraphicsSettingsWindow(ba.Window):
# set pixel-scale instead # set pixel-scale instead
current_res = _ba.get_display_resolution() current_res = _ba.get_display_resolution()
if current_res is None: if current_res is None:
current_res = (str(min(100, max(10, int(round( current_res2 = (str(min(100, max(10, int(round(
ba.app.config.resolve('Screen Pixel Scale') ba.app.config.resolve('Screen Pixel Scale')
* 100.0))))) + '%') # yapf: disable * 100.0))))) + '%') # yapf: disable
popup.PopupMenu( popup.PopupMenu(
@ -292,7 +293,7 @@ class GraphicsSettingsWindow(ba.Window):
width=120, width=120,
scale=popup_menu_scale, scale=popup_menu_scale,
choices=['100%', '88%', '75%', '63%', '50%'], choices=['100%', '88%', '75%', '63%', '50%'],
current_choice=current_res, current_choice=current_res2,
on_value_change_call=self._set_pixel_scale) on_value_change_call=self._set_pixel_scale)
else: else:
raise Exception('obsolete path; discrete resolutions' raise Exception('obsolete path; discrete resolutions'

View File

@ -209,8 +209,9 @@ class SpecialOfferWindow(ba.Window):
# Total-value if they supplied it. # Total-value if they supplied it.
total_worth_item = offer.get('valueItem', None) total_worth_item = offer.get('valueItem', None)
if total_worth_item is not None: if total_worth_item is not None:
total_worth_price = get_clean_price( price = _ba.get_price(total_worth_item)
_ba.get_price(total_worth_item)) assert price is not None
total_worth_price = get_clean_price(price)
if total_worth_price is not None: if total_worth_price is not None:
total_worth_text = ba.Lstr(resource='store.totalWorthText', total_worth_text = ba.Lstr(resource='store.totalWorthText',
subs=[('${TOTAL_WORTH}', subs=[('${TOTAL_WORTH}',

View File

@ -292,8 +292,9 @@ def instantiate_store_item_display(item_name: str,
{}).get(item_name) {}).get(item_name)
total_worth_price: Optional[str] total_worth_price: Optional[str]
if total_worth_item is not None: if total_worth_item is not None:
total_worth_price = get_clean_price( price = _ba.get_price(total_worth_item)
_ba.get_price(total_worth_item)) assert price is not None
total_worth_price = get_clean_price(price)
else: else:
total_worth_price = None total_worth_price = None