91 Commits

Author SHA1 Message Date
Eriks K
ffbbd25e54 Code cleanup 2020-07-09 14:42:40 +03:00
Eriks K
0061503581 passed int instead of Country to travel 2020-07-09 08:27:48 +03:00
Eriks Karls
6a9b574454 class serialization 2020-07-09 08:09:58 +03:00
Eriks K
94c416faa5 Battle, BattleSide, BattleDivision repr and str definitions 2020-07-08 18:27:48 +03:00
Eriks K
ba840765be Moving away from passing object ids around and towards passing objects and even using object functions 2020-07-08 17:30:22 +03:00
Eriks K
6c8dbcd99e Updated fighting division chooser 2020-07-04 12:28:02 +03:00
Eriks K
bcb27da54f Summer challange shanged battle list API 2020-07-04 00:31:26 +03:00
Eriks Karls
5bd3d72a63 Quickfix for summer terrains 2020-07-03 23:54:32 +03:00
Eriks K
ed96143c80 Flake8
Battle.div is no longer a defaultdict, but should raise error if trying to access division which isn't assigned
2020-06-25 14:17:05 +03:00
Eriks K
66f0e648df Citizen.to_json() bugfixed and optimised 2020-06-18 10:10:22 +03:00
Eriks K
a825917a98 WAM/Employ bugfix
Company sorting bugfix
2020-06-16 16:59:56 +03:00
Eriks K
b480ed7230 Companies and holdings created as python objects from Dicts 2020-06-15 16:02:36 +03:00
Eriks K
ff869e0403 Bomb deploy bugfix 2020-06-15 15:47:48 +03:00
Eriks K
5712007e3f Typos 2020-05-14 14:30:02 +03:00
Eriks K
ac4fc9baab Less intrusive reporting 2020-05-14 12:11:39 +03:00
Eriks K
05964f6c58 CitizenEconomy.get_market_offers() fixed 2020-05-12 13:45:32 +03:00
Eriks Karls
904fd4efc8 Moved utils.report_promo to classes.Reporter.report_promo 2020-04-23 14:39:42 +03:00
Eriks Karls
2aa1cbd79e PEP8 2020-04-23 14:28:26 +03:00
Eriks Karls
260344bcbe fix 2020-03-05 10:00:22 +02:00
Eriks Karls
d4a3719645 telegram queue never cleared 2020-03-04 11:34:03 +02:00
Eriks Karls
93f2f2887f Added wheel of fortune endpoints, restructured work as manager, limiting log row length to 120 characters 2020-03-03 13:07:39 +02:00
Eriks Karls
bf5f3d74b3 Remove depricated Config.wt property
Add Config.ot for overtime enabling/disabling
2020-02-26 18:43:27 +02:00
Eriks Karls
b76ea2c4ae Medal notifications 2020-02-26 12:09:36 +02:00
Eriks Karls
ce02a39158 Move eRepublik API helper class to seperate file and split up class into logical pieces 2020-02-24 17:19:06 +02:00
Eriks Karls
fd1880c50f Some notifications are still being displayed the old way 2020-02-19 18:52:40 +02:00
Eriks Karls
f6433908b4 New notifications API 2020-02-18 20:11:34 +02:00
Eriks Karls
a2cf479135 Some TelegramBot tweaks 2020-01-16 13:49:24 +02:00
Eriks Karls
00b87dc832 when full energy update citizen info would stop working because trying to get timedelta from now - _last_full_energy_report 2020-01-14 13:43:10 +02:00
Eriks Karls
15e6deebda Battle initialization without valid data should be avoided to not run into strange and hard to trace bugs.
Jsonification updates - if simplejson is available some packages are importing simplejson with try-except and later throwing simplejson errors which should be cought when calling .json() on every request.
Fixed error logging
2020-01-13 21:33:50 +02:00
Eriks Karls
1f07f2e270 Update:
Citizen.set_default_weapon() - eRepublik should return list with all available weapon qualities, but when a battle is just launched, they return only dict with barehands
Citizen.fight() - no longer calls self.set_default_weapon()
Citizen.find_battle_and_fight() - now calls self.set_default_weapon() just before fighting
Citizen.update_war_info() - returns previous battle list if responses 'last_updated' isn't more than 30s old

New:
Citizen.get_battle_for_war(war_id) - returns Battle instance for specific war, if battle is active for given war
2020-01-13 10:28:42 +02:00
Eriks Karls
42431134e1 UA update 2020-01-07 11:30:40 +02:00
Eriks Karls
bedaeeefd1 Battle division update 2020-01-07 11:15:40 +02:00
Eriks Karls
3599dc40fc More logging, Citizen.get_raw_surplus() fixed and moved to Citizen.my_companies.get_wam_raw_usage() 2020-01-02 22:42:40 +02:00
Eriks Karls
e374aa8a54 Implemented division switching,
improved multi bomb deploy with auto traveling,
Citizen.fight() simplified battle data gathering logic -> Citizen.shoot logic improved
Citizen.all_battles are now defaultdict with default value of empty/invalid battle, for times when trying to do things with battle which is not in all_battle dict
2019-12-18 16:25:52 +02:00
Eriks Karls
12aee23739 Variable and method redeclaration 2019-12-18 11:44:18 +02:00
Eriks Karls
39093accd0 Type hinting. Class parameter defined lists where shared accross instances. 2019-12-13 19:30:43 +02:00
Eriks Karls
aba8c15fd3 AutoPost medals 2019-12-03 15:22:35 +02:00
Eriks Karls
f294506a2d Updated wars list, added default weapon choosing (q7 - ground, bare hands - air) 2019-12-03 09:52:53 +02:00
Eriks Karls
ec1141a46e set serialization 2019-11-21 14:04:43 +02:00
Eriks Karls
90bec82630 12th anniversary minimal methods 2019-11-21 11:06:29 +02:00
Eriks Karls
aedfbf4465 12th anniversary endpoints 2019-11-21 10:42:55 +02:00
Eriks Karls
ef27960ff1 no message 2019-10-30 19:35:40 +02:00
Eriks Karls
c48af9a891 Thread stopping 2019-10-30 18:16:18 +02:00
Eriks Karls
1abfdb71ac Code cleanup and serialization improvements 2019-10-30 16:55:33 +02:00
Eriks Karls
06d8d1c0b5 Telegram threading queue has been messing with error reporting 2019-10-29 16:05:22 +02:00
Eriks Karls
adda8dcb54 Structure requests by year/month/date folders, to keep requests in cleaner format.
The same medal kind (Maverick div BHs) can have different reward value - group them by kind-reward.
Citizen.post bugfix (with no data and json arguments) TODO: Must check where post is called without data or json
2019-10-28 14:17:45 +02:00
Eriks Karls
94a87091a4 Allow full energy reports once every half an hour 2019-10-17 19:15:17 +03:00
Eriks Karls
c0b97f112d TelegramBot.send_message should always append to send queue 2019-10-16 15:10:38 +03:00
Eriks Karls
b1eefcc662 CSRF Attack Detecked loop on POST requests. 2019-10-15 20:03:22 +03:00
Eriks Karls
074da3adbe Telegram reporter queue bug 2019-10-14 19:21:00 +03:00