diff --git a/.gitignore b/.gitignore index d52d599..c93fd77 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,6 @@ # Godot-specific ignores .import/ export.cfg -export_presets.cfg # Mono-specific ignores .mono/ diff --git a/Main.gd b/Main.gd index 04e3dec..dcee09f 100644 --- a/Main.gd +++ b/Main.gd @@ -1,67 +1,20 @@ extends Node -var strings = [ - "Someone asks where to find an unreleased song", - "Akira gets aggro at someone in chat on stream-mods", - "Darkwing_j makes an appearance", - "Lopar makes a poll", - "Inquiry about how to join the non-existent Discord server", - "Mods get distracted by stream-mod chat", - "Annoying Jojo reference", - "Akira beats everyone else to something", - "Someone makes a business request in chat", - "Sub Bomb of 20+", - "AutoMod catches a perfectly normal message", - "Insomniac_Rap Raid", - "Jirard Raid", - "We timeout someone", - "We ban someone", - "We delete a message", - "Hugspam", - "Broken Shigi", - "Mood Flip", - "Someone asks who made Saitou's graphics", - "AutoMod catches an actual bad message", - "Tax Cheer", - "Fireworks Cheer", - "Star Cheer", - "Hype Train", - "Raid right at the end of the stream", - "We add a new word to the AutoMod block list", - "DSKoopa Raid", - "Someone just finished Rakuen", - "Someone spams a request in chat", - "Someone asks for personal information", - "We ask someone to stop spamming", - "Someone asks about effects/echo", - "Widetou appears", - "Oddtou appears", - "Saitou is Missing", - "Rapid-Fire Requests", - "Hype Train reaches max level", - "We DM someone", - "Someone asks about musical equipment", - "Someone asks for piano tutorials", - "Someone tries to post a link in chat", - "Buck Bumble", - "We need Google Translate's assistance", - "Someone claims a song sounds like something else", - "BWA HA HA", - "Overuse of the @supershigi tag", - "Hello from AN ENTIRE COUNTRY!", - "Akira and someone else say the same thing simultaneously", - "A dimpy person turns out to be cool", - "Live Learn", - "Someone needs to read the room", - "DJ Oddtou", - "Anime song request", - "Someone else sees/hears before us", - "Self-advertising", - "DEEP DREAM", - "TIMING" -] +var strings func _ready(): + $HTTPRequest.connect("request_completed", self, "_on_request_completed") + $HTTPRequest.request("https://lunarpenguin.net/stuff/stream-bingo/bingo-squares.json") + +func _been_clicked(what): + var button = get_node("squares/%s/Marker" % what) + button.visible = !button.visible + pass # Replace with function body. + +func _on_request_completed(result, response_code, headers, body): + var json = JSON.parse(body.get_string_from_utf8()) + strings = json.result + randomize() var rng = RandomNumberGenerator.new() rng.randomize() @@ -76,8 +29,3 @@ func _ready(): get_node("squares/%s/Label" % j).set_text(strings[i]) get_node("squares/%s/Marker" % j).set_frame(rng.randi_range(0,3)) get_node("squares/%s/Marker" % j).modulate = Color(1,1,1,0.5) - -func _been_clicked(what): - var button = get_node("squares/%s/Marker" % what) - button.visible = !button.visible - pass # Replace with function body. diff --git a/Main.tscn b/Main.tscn index 081a939..ff9ce89 100644 --- a/Main.tscn +++ b/Main.tscn @@ -876,6 +876,8 @@ autowrap = true __meta__ = { "_edit_use_anchors_": false } + +[node name="HTTPRequest" type="HTTPRequest" parent="."] [connection signal="been_clicked" from="squares/1" to="." method="_been_clicked"] [connection signal="pressed" from="squares/1" to="squares/1" method="_on_pressed"] [connection signal="been_clicked" from="squares/2" to="." method="_been_clicked"] diff --git a/bingo-squares.json b/bingo-squares.json new file mode 100644 index 0000000..67a0f39 --- /dev/null +++ b/bingo-squares.json @@ -0,0 +1,60 @@ +[ + "Someone asks where to find an unreleased song", + "Akira gets aggro at someone in chat on stream-mods", + "Darkwing_j makes an appearance", + "Lopar makes a poll", + "Inquiry about how to join the non-existent Discord server", + "Mods get distracted by stream-mod chat", + "Annoying Jojo reference", + "Akira beats everyone else to something", + "Someone makes a business request in chat", + "Sub Bomb of 20+", + "AutoMod catches a perfectly normal message", + "Insomniac_Rap Raid", + "Jirard Raid", + "We timeout someone", + "We ban someone", + "We delete a message", + "Hugspam", + "Broken Shigi", + "Mood Flip", + "Someone asks who made Saitou's graphics", + "AutoMod catches an actual bad message", + "Tax Cheer", + "Fireworks Cheer", + "Star Cheer", + "Hype Train", + "Raid right at the end of the stream", + "We add a new word to the AutoMod block list", + "DSKoopa Raid", + "Someone just finished Rakuen", + "Someone spams a request in chat", + "Someone asks for personal information", + "We ask someone to stop spamming", + "Someone asks about effects/echo", + "Widetou appears", + "Oddtou appears", + "Saitou is Missing", + "Rapid-Fire Requests", + "Hype Train reaches max level", + "We DM someone", + "Someone asks about musical equipment", + "Someone asks for piano tutorials", + "Someone tries to post a link in chat", + "Buck Bumble", + "We need Google Translate's assistance", + "Someone claims a song sounds like something else", + "BWA HA HA", + "Overuse of the @supershigi tag", + "Hello from AN ENTIRE COUNTRY!", + "Akira and someone else say the same thing simultaneously", + "A dimpy person turns out to be cool", + "Live Learn", + "Someone needs to read the room", + "DJ Oddtou", + "Anime song request", + "Someone else sees/hears before us", + "Self-advertising", + "DEEP DREAM", + "TIMING" +] \ No newline at end of file diff --git a/victory.tscn b/victory.tscn new file mode 100644 index 0000000..247cbf4 --- /dev/null +++ b/victory.tscn @@ -0,0 +1,14 @@ +[gd_scene format=2] + +[node name="victory" type="Node2D"] + +[node name="Particles2D" type="CPUParticles2D" parent="."] +position = Vector2( 182.944, 128.238 ) +amount = 64 +emission_shape = 1 +emission_sphere_radius = 128.0 +spread = 124.35 +radial_accel = 70.97 +radial_accel_random = 0.25 +hue_variation = 1.0 +hue_variation_random = 1.0