mirror of
https://github.com/cliffe/BreakEscape.git
synced 2026-02-21 11:18:08 +00:00
Refactor whitespace and comments for consistency in BreakEscape controllers and models
- Cleaned up unnecessary whitespace in `games_controller.rb`, `missions_controller.rb`, `game.rb`, `mission.rb`, `routes.rb`, `seeds.rb`, and migration files to enhance code readability. - Standardized comment formatting across various files to maintain consistency and improve clarity.
This commit is contained in:
@@ -62,9 +62,9 @@ module BreakEscape
|
||||
elsif params[:standalone_flags].present?
|
||||
flags = if params[:standalone_flags].is_a?(Array)
|
||||
params[:standalone_flags]
|
||||
else
|
||||
else
|
||||
params[:standalone_flags].split(',').map(&:strip).reject(&:blank?)
|
||||
end
|
||||
end
|
||||
initial_player_state['standalone_flags'] = flags
|
||||
end
|
||||
|
||||
@@ -424,7 +424,7 @@ module BreakEscape
|
||||
authorize @game if defined?(Pundit)
|
||||
|
||||
task_id = params[:task_id]
|
||||
|
||||
|
||||
unless task_id.present?
|
||||
return render json: { success: false, error: 'Missing task_id' }, status: :bad_request
|
||||
end
|
||||
@@ -453,7 +453,7 @@ module BreakEscape
|
||||
end
|
||||
|
||||
result = @game.update_task_progress!(task_id, progress)
|
||||
|
||||
|
||||
Rails.logger.debug "[BreakEscape] Task progress updated: #{task_id} = #{progress}"
|
||||
render json: result
|
||||
end
|
||||
|
||||
@@ -27,7 +27,7 @@ module BreakEscape
|
||||
# - Standalone mode: Flag input form
|
||||
redirect_to "/break_escape/games/new?mission_id=#{@mission.id}"
|
||||
else
|
||||
# Legacy behavior for non-VM missions - auto-create game
|
||||
# Legacy behavior for non-VM missions - auto-create game
|
||||
@game = Game.find_or_create_by!(
|
||||
player: current_player,
|
||||
mission: @mission
|
||||
|
||||
Reference in New Issue
Block a user