From de2cd93ebcacb37af501b46a60d11b25913dfa1f Mon Sep 17 00:00:00 2001 From: David Gay Date: Thu, 3 Jun 2021 20:16:22 -0400 Subject: New title: Aspirant --- app/controllers/game_controller.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/controllers') diff --git a/app/controllers/game_controller.rb b/app/controllers/game_controller.rb index c506aa6..f8b9973 100644 --- a/app/controllers/game_controller.rb +++ b/app/controllers/game_controller.rb @@ -179,6 +179,11 @@ class GameController < ApplicationController unless @results.any? @results.push({ type: "message", body: "You come up empty." }) end + + # HACK: To display any titles that were gained indirectly (not as part of the activity results). + current_char.title_awards.where(created_at: 5.seconds.ago..).each do |title_award| + @results.push({ type: "title", title: title_award.title }) + end end rescue ItemQuantityError current_char.stop_activity -- cgit v1.2.3