This commit is contained in:
2026-04-26 13:55:25 +03:00
parent a8b3e9f5ea
commit 5bff9a287d
5 changed files with 42 additions and 25 deletions

View File

@@ -103,8 +103,6 @@ def get_pending_command():
farm_cmd = _fetch_pending_of_type(c, 'farm_loot', player_id)
farm_upgrade_cmd = _fetch_pending_of_type(c, 'farm_upgrade', player_id)
research_cmd = _fetch_pending_of_type(c, 'research', player_id)
scan_market_cmd = _fetch_pending_of_type(c, 'scan_market', player_id)
accept_market_offer_cmd = _fetch_pending_of_type(c, 'accept_market_offer', player_id)
sync_req = _check_and_reset_sync(c, player_id)
# Also return current farm settings so TM knows loot_option
@@ -123,8 +121,6 @@ def get_pending_command():
'build': build_cmd,
'recruit': recruit_cmd,
'market': market_cmd,
'scan_market': scan_market_cmd,
'accept_market_offer': accept_market_offer_cmd,
'research': research_cmd,
'farm': farm_cmd,
'farm_upgrade': farm_upgrade_cmd,

View File

@@ -284,8 +284,8 @@ def create_command():
return jsonify({'error': f'missing field: {field}'}), 400
cmd_type = data['type']
if cmd_type not in ('build', 'recruit', 'market_offer', 'farm_loot', 'farm_upgrade', 'research', 'scan_market', 'accept_market_offer'):
return jsonify({'error': 'type must be build, recruit, market_offer, farm_loot, farm_upgrade, research, scan_market, or accept_market_offer'}), 400
if cmd_type not in ('build', 'recruit', 'market_offer', 'farm_loot', 'farm_upgrade', 'research'):
return jsonify({'error': 'type must be build, recruit, market_offer, farm_loot, farm_upgrade, or research'}), 400
# Reject if the Tampermonkey client is offline (no state push in last 150 s)
conn = get_db()