update add modules
This commit is contained in:
@@ -98,15 +98,27 @@ def get_pending_command():
|
||||
build_cmd = _fetch_pending_of_type(c, 'build', player_id)
|
||||
recruit_cmd = _fetch_pending_of_type(c, 'recruit', player_id)
|
||||
market_cmd = _fetch_pending_of_type(c, 'market_offer', player_id)
|
||||
farm_cmd = _fetch_pending_of_type(c, 'farm_loot', player_id)
|
||||
sync_req = _check_and_reset_sync(c, player_id)
|
||||
|
||||
# Also return current farm settings so TM knows loot_option
|
||||
farm_row = c.execute(
|
||||
'SELECT enabled, loot_option FROM farm_settings WHERE player_id = ?', (player_id,)
|
||||
).fetchone()
|
||||
farm_settings = {
|
||||
'enabled': bool(farm_row['enabled']) if farm_row else False,
|
||||
'loot_option': farm_row['loot_option'] if farm_row else 1
|
||||
}
|
||||
|
||||
conn.commit()
|
||||
conn.close()
|
||||
|
||||
return jsonify({
|
||||
'build': build_cmd,
|
||||
'recruit': recruit_cmd,
|
||||
'market': market_cmd,
|
||||
'build': build_cmd,
|
||||
'recruit': recruit_cmd,
|
||||
'market': market_cmd,
|
||||
'farm': farm_cmd,
|
||||
'farm_settings': farm_settings,
|
||||
'sync_requested': sync_req
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user