tricsi 1,144 #309222 Posted January 10, 2016 А здесь что? C:\Users\Maxim\AppData\Roaming\wargaming.net\World of Warplanes\logs вероятнее всего... res/scripts/common/_aircrafts_db.pyc да я по привычке в корне смотрел.. и тут взгляни Quote Share this post Link to post Short link Share on other sites
SkepticalFox 1,445 #309223 Posted January 10, 2016 (edited) del Edited February 3, 2016 by ShadowHunterRUS Quote Share this post Link to post Short link Share on other sites
tricsi 1,144 #309225 Posted January 10, 2016 (edited) Я вижу самый простой план действий: Создать xml-файл с БД техники и поставлять его вместе с плагином. не, слишком много весит всё это, долго будет парситься. более 170 единиц техники..+ в HD + ангар (и не один) Edited January 10, 2016 by tricsi 1 Quote Share this post Link to post Short link Share on other sites
SkepticalFox 1,445 #309226 Posted January 10, 2016 (edited) более 170 единиц техники215, если быть точным+ ангарС ним вообще проблем нет) Попробуем автоматизировать... from xml.dom.minidom import getDOMImplementation from _aircrafts_db import DB impl = getDOMImplementation() doc = impl.createDocument(None, 'root', None) elem = doc.documentElement for ac in DB.aircraft: __aircraft_node = doc.createElement('aircraft') __aircraft_name = doc.createElement('name') __aircraft_name.appendChild(doc.createTextNode('%s' % ac.name)) __aircraft_node.appendChild(__aircraft_name) __aircraft_id = doc.createElement('id') __aircraft_id.appendChild(doc.createTextNode('%s' % ac.id)) __aircraft_node.appendChild(__aircraft_id) __aircraft_level = doc.createElement('level') __aircraft_level.appendChild(doc.createTextNode('%s' % ac.level)) __aircraft_node.appendChild(__aircraft_level) __aircraft_type = doc.createElement('type') __aircraft_type.appendChild(doc.createTextNode('%s' % ac.planeType)) __aircraft_node.appendChild(__aircraft_type) __aircraft_country = doc.createElement('country') __aircraft_country.appendChild(doc.createTextNode('%s' % ac.country)) __aircraft_node.appendChild(__aircraft_country) elem.appendChild(__aircraft_node) with open('aircrafts.xml', 'w') as f: f.write(doc.toprettyxml())Результат:aircrafts.xml Edited January 14, 2016 by ShadowHunterRUS 1 Quote Share this post Link to post Short link Share on other sites
tricsi 1,144 #309232 Posted January 10, 2016 у меня панели нет Quote Share this post Link to post Short link Share on other sites
SkepticalFox 1,445 #309233 Posted January 10, 2016 у меня панели нетПанели? 1 Quote Share this post Link to post Short link Share on other sites
tricsi 1,144 #309235 Posted January 10, 2016 Панели? как для танков 1 Quote Share this post Link to post Short link Share on other sites
SkepticalFox 1,445 #309236 Posted January 10, 2016 как для танковКак видишь там простая заглушка: def register(): pass Quote Share this post Link to post Short link Share on other sites
tricsi 1,144 #309238 Posted January 10, 2016 Как видишь там простая заглушка: так как я не программист, для меня это ничего не значит :))) руки чешутся открыть и посмотреть ))) Quote Share this post Link to post Short link Share on other sites
SkepticalFox 1,445 #309241 Posted January 10, 2016 (edited) . Edited January 28, 2023 by SkepticalFox Quote Share this post Link to post Short link Share on other sites
tricsi 1,144 #309278 Posted January 11, 2016 Да есть там панель... теперь) вечером с работы посмотрю (там клиент качать (( (надо...) Quote Share this post Link to post Short link Share on other sites
SkepticalFox 1,445 #309283 Posted January 11, 2016 (edited) . Edited January 28, 2023 by SkepticalFox Quote Share this post Link to post Short link Share on other sites
tricsi 1,144 #309335 Posted January 11, 2016 Завтра обнова... http://worldofwarplanes.ru/news/update-193/ офигенная обнова обновления 1.9.3 (59,3 МБ) весь клиент вроде больше 12Гб...качает...медленно ппц, замёрз блин Quote Share this post Link to post Short link Share on other sites
SkepticalFox 1,445 #309337 Posted January 11, 2016 (edited) . Edited January 28, 2023 by SkepticalFox 1 Quote Share this post Link to post Short link Share on other sites
SkepticalFox 1,445 #309450 Posted January 12, 2016 Обновил первый пост. 1 Quote Share this post Link to post Short link Share on other sites
StranikS_Scan 4,203 #309451 Posted January 12, 2016 def curve_track(self, track_elem): cu_positions = [] invert = False for pos in track_elem.getElementsByTagName('position'): vector3 = [float(x) for x in pos.firstChild.nodeValue.strip().split()] x = +vector3[0] y = +vector3[2] z = +vector3[1] cu_positions.append( Vector( (x, y, z, 0.01) ) ) if not len(cu_positions): 1. Не понятно, где инициализируются x, y, z. Наверно не хватает x = y = z = 0. 2. вместо [float(x) for x in pos.firstChild.nodeValue.strip().split()] быстрее будет map(float, pos.firstChild.nodeValue.strip().split()) 3. В строке not len(cu_positions) не нужен len лишнее действие, проверку на пустоту списка можно делать так if not cu_positions: 1 Quote Share this post Link to post Short link Share on other sites
SkepticalFox 1,445 #309452 Posted January 12, 2016 (edited) . Edited January 28, 2023 by SkepticalFox Quote Share this post Link to post Short link Share on other sites
StranikS_Scan 4,203 #309455 Posted January 12, 2016 Там не +=, а = + Ха, действительно ))))) Эх, после Си/С++ такое тяжко осознавать Угу, я по началу тоже все рвался писать Length(S)>0 ))))) 1 Quote Share this post Link to post Short link Share on other sites
SkepticalFox 1,445 #309457 Posted January 12, 2016 (edited) . Edited January 28, 2023 by SkepticalFox Quote Share this post Link to post Short link Share on other sites
SkepticalFox 1,445 #309553 Posted January 13, 2016 (edited) del Edited January 14, 2016 by ShadowHunterRUS Quote Share this post Link to post Short link Share on other sites