diff --git a/2022/11-setlist/Gemfile b/2022/11-setlist/Gemfile index 244904c..c69c057 100644 --- a/2022/11-setlist/Gemfile +++ b/2022/11-setlist/Gemfile @@ -1,3 +1,4 @@ source 'https://rubygems.org' gem 'squib' +gem 'game_icons' diff --git a/2022/11-setlist/Gemfile.lock b/2022/11-setlist/Gemfile.lock new file mode 100644 index 0000000..724b597 --- /dev/null +++ b/2022/11-setlist/Gemfile.lock @@ -0,0 +1,68 @@ +GEM + remote: https://rubygems.org/ + specs: + cairo (1.17.8) + native-package-installer (>= 1.0.3) + pkg-config (>= 1.2.2) + red-colors + cairo-gobject (3.5.1) + cairo (>= 1.16.2) + glib2 (= 3.5.1) + classy_hash (1.0.0) + fiddle (1.1.1) + game_icons (0.46.0.20221129) + gdk_pixbuf2 (3.5.1) + gio2 (= 3.5.1) + gio2 (3.5.1) + fiddle + gobject-introspection (= 3.5.1) + glib2 (3.5.1) + native-package-installer (>= 1.0.3) + pkg-config (>= 1.3.5) + gobject-introspection (3.5.1) + glib2 (= 3.5.1) + highline (2.0.3) + matrix (0.4.2) + mercenary (0.4.0) + native-package-installer (1.1.5) + nokogiri (1.13.10-x64-mingw32) + racc (~> 1.4) + pango (3.5.1) + cairo-gobject (= 3.5.1) + gobject-introspection (= 3.5.1) + pkg-config (1.5.1) + racc (1.6.2) + rainbow (3.1.1) + red-colors (0.3.0) + matrix + roo (2.9.0) + nokogiri (~> 1) + rubyzip (>= 1.3.0, < 3.0.0) + rsvg2 (3.5.1) + cairo-gobject (= 3.5.1) + gdk_pixbuf2 (= 3.5.1) + ruby-progressbar (1.11.0) + rubyzip (2.3.2) + squib (0.18.0) + cairo (~> 1.17) + classy_hash (= 1.0.0) + gio2 (~> 3.4) + gobject-introspection (~> 3.4) + highline (= 2.0.3) + mercenary (= 0.4.0) + nokogiri (~> 1.11) + pango (~> 3.4) + rainbow (~> 3.0) + roo (~> 2.8) + rsvg2 (~> 3.4) + ruby-progressbar (~> 1.11) + +PLATFORMS + x64-mingw32 + +DEPENDENCIES + game_icons + squib + +BUNDLED WITH + 2.1.4 diff --git a/2022/11-setlist/data.yml b/2022/11-setlist/data.yml index eabe6f2..afbfe36 100644 --- a/2022/11-setlist/data.yml +++ b/2022/11-setlist/data.yml @@ -10,11 +10,11 @@ - name: Breakup Song volume: ff effect: +3 {a}. +2 additional {a} if any band has played a Love Song - blurb: You may hate yourself for loving it, but you oughta know that these songs pack a punch. + blurb: You may hate yourself for loving it, but you oughta know that these songs pack a punch. - name: Love Song volume: mp effect: +2 {a}. +3 additional {a} if Love Song is the loudest song in your set. - blurb: I forgot how this goes, but it's all coming back to me now. + blurb: I forgot how this goes, but it's all coming back to me now. - name: Power Ballad volume: ff effect: +3 {a} diff --git a/2022/11-setlist/deck.rb b/2022/11-setlist/deck.rb index 6292f5b..483787e 100644 --- a/2022/11-setlist/deck.rb +++ b/2022/11-setlist/deck.rb @@ -1,6 +1,33 @@ require 'squib' +require 'game_icons' + +AUDIENCE = GameIcons.get('delapouite/person'). + recolor(fg: 'black', bg: 'white', fg_opacity: 1.0, bg_opacity: 0.0). + string +MUSIC = GameIcons.get('delapouite/musical-score'). + recolor(fg: 'black', bg: 'white', fg_opacity: 1.0, bg_opacity: 0.0). + string + +data = Squib.yaml file: 'data.yml' + +Squib::Deck.new(cards: 18) do + use_layout file: 'economy.yml' + use_layout file: 'layout.yml' + background color: 'white' + cut_zone + safe_zone + + text layout: :title, str: data.name + + svg layout: :art, data: MUSIC + + rect layout: :description + text layout: :description, str: data.effect.zip(data.blurb).map { |e, b| + "#{e}#{b ? "\n#{b}" : nil}" + } do |embed| + embed.svg key: '{a}', width: 32, height: 32, data: AUDIENCE + end + text layout: :type, markup: true, str: data.volume.map { |v| "#{v}" } -Squib::Deck.new(cards: 3, layout: 'layout.yml') do - text str: 'Hello, World!' save format: :png end