Files
BreakEscape/config/routes.rb
Z. Cliffe Schreuders 61afc0a666 Refactor character assets and player preferences
- Deleted unused character images: woman_in_science_lab_coat.png and woman_with_black_long_hair_bow_in_hair_long_sleeve_(1).png.
- Added new padlock icon asset for UI.
- Introduced player_preferences.css for styling the player preferences configuration screen.
- Updated game.js to load new character atlases with simplified filenames.
- Enhanced player.js to create custom idle animations for characters.
- Implemented sprite-grid.js for sprite selection UI, including a preview feature.
- Updated database schema to include break_escape_player_preferences table for storing player settings.
- Modified convert_pixellab_to_spritesheet.py to map character names to simplified filenames and extract headshots from character images.
2026-02-12 14:35:14 +00:00

45 lines
2.0 KiB
Ruby

BreakEscape::Engine.routes.draw do
# Static files - caught by routes and served by lightweight controller
# This ensures files are served from the engine's public directory
# Constraint { path: /.*/ } ensures we capture the full path including filename with extension
get '/css/*path', to: 'static_files#serve', constraints: { path: /.*/ }
get '/js/*path', to: 'static_files#serve', constraints: { path: /.*/ }
get '/assets/*path', to: 'static_files#serve', constraints: { path: /.*/ }
get '/stylesheets/*path', to: 'static_files#serve', constraints: { path: /.*/ }
get '/:filename.html', to: 'static_files#serve', constraints: { filename: /test-.*|index/ }
# Mission selection
resources :missions, only: [:index, :show]
# Player configuration
get 'configuration', to: 'player_preferences#show', as: :configuration
patch 'configuration', to: 'player_preferences#update'
# Game management
resources :games, only: [:new, :show, :create] do
member do
# Scenario and NPC data
get 'scenario' # Returns full scenario_data JSON (for compatibility)
get 'scenario_map' # Returns minimal layout metadata for navigation
get 'ink' # Returns NPC script (JIT compiled)
get 'room/:room_id', to: 'games#room', as: 'room' # Returns room data for lazy-loading
get 'container/:container_id', to: 'games#container' # Returns locked container contents
# Game state and actions
put 'sync_state' # Periodic state sync
post 'unlock' # Validate unlock attempt
post 'inventory' # Update inventory
# Objectives system
get 'objectives' # Get current objective state
post 'objectives/tasks/:task_id', to: 'games#complete_task', as: 'complete_task'
put 'objectives/tasks/:task_id', to: 'games#update_task_progress', as: 'update_task_progress'
# VM/Flag integration
post 'flags', to: 'games#submit_flag' # Submit CTF flag for validation
end
end
root to: 'missions#index'
end