@@ -74,7 +74,7 @@ class CardResource < ApplicationResource # rubocop:disable Metrics/ClassLength
74
74
75
75
unless @object . num_extra_faces . zero?
76
76
@object . face_indices . each do |index |
77
- f = { index :, images : images ( @object . latest_printing_id , face_index : index ) }
77
+ f = { index :, images : images ( @object . latest_printing_id , @object . designed_by , face_index : index ) }
78
78
f [ :base_link ] = @object . faces_base_link [ index ] if @object . faces_base_link [ index ]
79
79
f [ :display_subtypes ] = @object . faces_display_subtypes [ index ] if @object . faces_display_subtypes [ index ]
80
80
f [ :card_subtype_ids ] = @object . faces_card_subtype_ids [ index ] . compact if @object . faces_card_subtype_ids [ index ]
@@ -93,7 +93,7 @@ class CardResource < ApplicationResource # rubocop:disable Metrics/ClassLength
93
93
attribute :restrictions , :hash
94
94
attribute :latest_printing_id , :string
95
95
attribute :latest_printing_images , :hash do
96
- images ( @object . latest_printing_id , has_narrative_image : @object . narrative_text . present? )
96
+ images ( @object . latest_printing_id , @object . designed_by , has_narrative_image : @object . narrative_text . present? )
97
97
end
98
98
99
99
filter :card_cycle_id , :string do
@@ -163,16 +163,16 @@ class CardResource < ApplicationResource # rubocop:disable Metrics/ClassLength
163
163
164
164
private
165
165
166
- def images ( id , has_narrative_image : false , face_index : nil )
166
+ def images ( id , designed_by , has_narrative_image : false , face_index : nil )
167
167
url_prefix = Rails . configuration . x . printing_images . nrdb_classic_prefix
168
168
face_suffix = "-#{ face_index } " unless face_index . nil?
169
169
image_sizes = {
170
170
'tiny' => "#{ url_prefix } /tiny/#{ id } #{ face_suffix } .jpg" ,
171
171
'small' => "#{ url_prefix } /small/#{ id } #{ face_suffix } .jpg" ,
172
172
'medium' => "#{ url_prefix } /medium/#{ id } #{ face_suffix } .jpg" ,
173
- 'large' => "#{ url_prefix } /large/#{ id } #{ face_suffix } .jpg" ,
174
- 'xlarge' => "#{ url_prefix } /xlarge/#{ id } #{ face_suffix } .webp"
173
+ 'large' => "#{ url_prefix } /large/#{ id } #{ face_suffix } .jpg"
175
174
}
175
+ image_sizes [ :xlarge ] = "#{ url_prefix } /xlarge/#{ id } #{ face_suffix } .webp" if designed_by == 'null_signal_games'
176
176
177
177
image_sizes [ 'narrative' ] = "#{ url_prefix } /xlarge/#{ id } #{ face_suffix } -narrative.webp" if has_narrative_image
178
178
0 commit comments