Compare commits

...

3 commits

Author SHA1 Message Date
09c99b6cf5 Updated C# Projects
Added EFC to C# Project.
Godot Project adds C# Functionality.
2025-06-13 02:46:20 -05:00
dcf1c7c5c9 Updated Globals Autoload
Added Twitch services
2025-06-13 02:45:31 -05:00
ee8d8bcc22 Add GodotGifLoader
Added GodotGifLoader, which uses the GodotGif GDExtension GIF Loader to load GIF files.
2025-06-13 02:44:25 -05:00
5 changed files with 94 additions and 2 deletions

View file

@ -0,0 +1,21 @@
@icon("res://addons/twitcher/assets/media-loader-icon.svg")
@tool
extends NativeImageTransformer
## Godot Addon GIF parser written as GDExtension. Most of the time stable but there
## are GIF's that may not work cause the file didn't follow the GIF specification.
class_name GodotGifTransformer
func is_supported_animation() -> bool:
return true
func convert_image(path: String, buffer_in: PackedByteArray, output_path: String) -> SpriteFrames:
var tex: SpriteFrames
if buffer_in.size() > 0:
tex = GifManager.sprite_frames_from_buffer(buffer_in)
else:
tex = GifManager.sprite_frames_from_file(path)
ResourceSaver.save(tex, output_path, ResourceSaver.SaverFlags.FLAG_COMPRESS)
tex.take_over_path(path)
return tex

View file

@ -0,0 +1 @@
uid://cor04lg8wc05p

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=12 format=3 uid="uid://b8whblp2hgrp"]
[gd_scene load_steps=22 format=3 uid="uid://b8whblp2hgrp"]
[ext_resource type="Script" uid="uid://6nrfqrw53c1s" path="res://Library/Singletons/Globals.cs" id="1_gsl6h"]
[ext_resource type="Script" uid="uid://i8st3lv0lidh" path="res://addons/twitcher/twitch_service.gd" id="1_ocehi"]
@ -7,6 +7,13 @@
[ext_resource type="Script" uid="uid://b3n3et8mebjcc" path="res://addons/twitcher/auth/twitch_oauth_scopes.gd" id="4_fcooh"]
[ext_resource type="Resource" uid="uid://c4scwuk8q0r40" path="res://addons/twitcher/lib/oOuch/default_key_provider.tres" id="5_65rqk"]
[ext_resource type="Script" uid="uid://b52xp7c23ucfk" path="res://addons/twitcher/lib/oOuch/oauth_token.gd" id="6_lppa0"]
[ext_resource type="Script" uid="uid://cw30cwveway65" path="res://addons/twitcher/generated/twitch_api.gd" id="8_3e7ys"]
[ext_resource type="Script" uid="uid://blmhj3j00yk45" path="res://addons/twitcher/eventsub/twitch_eventsub.gd" id="9_qouv8"]
[ext_resource type="Script" uid="uid://d4lyup0vy1wtu" path="res://addons/twitcher/media/twitch_media_loader.gd" id="10_3qd2c"]
[ext_resource type="Texture2D" uid="uid://g1dbcjksbotw" path="res://addons/twitcher/assets/fallback_texture.tres" id="11_cw8vs"]
[ext_resource type="Script" uid="uid://cor04lg8wc05p" path="res://Library/Helpers/godotgif_loader.gd" id="12_3e7ys"]
[ext_resource type="Script" uid="uid://dcq1bvfrqimqq" path="res://addons/twitcher/chat/twitch_chat.gd" id="13_7pyia"]
[ext_resource type="Script" uid="uid://cnmohrdxqihr0" path="res://addons/twitcher/generated/twitch_user.gd" id="14_ai0at"]
[sub_resource type="Resource" id="Resource_54bgt"]
script = ExtResource("2_gsl6h")
@ -36,6 +43,39 @@ _crypto_key_provider = ExtResource("5_65rqk")
_identifier = "EditorToken"
_cache_path = "user://auth.conf"
[sub_resource type="Resource" id="Resource_qouv8"]
script = ExtResource("12_3e7ys")
fallback_texture = ExtResource("11_cw8vs")
metadata/_custom_type_script = "uid://cor04lg8wc05p"
[sub_resource type="Resource" id="Resource_3qd2c"]
script = ExtResource("14_ai0at")
id = "104753997"
login = "casperdragonwolf"
display_name = "CasperDragonWolf"
type = ""
broadcaster_type = "affiliate"
description = "I'm a hobbyist developer dealing in many different languages, currently using Godot and C# to build games, apps, and plugins. I have a semi-decent library of games that I will occasionally play, and I just try to chill, and have fun!"
profile_image_url = "https://static-cdn.jtvnw.net/jtv_user_pictures/b2c4c6bb-9cb4-4433-b664-6431beb040c7-profile_image-300x300.png"
offline_image_url = "https://static-cdn.jtvnw.net/jtv_user_pictures/e80f180c-c6e6-4647-ae76-adb0fbe6c122-channel_offline_image-1920x1080.jpeg"
view_count = 0
email = ""
created_at = "2015-10-19T21:33:45Z"
[sub_resource type="Resource" id="Resource_cw8vs"]
script = ExtResource("14_ai0at")
id = "104753997"
login = "casperdragonwolf"
display_name = "CasperDragonWolf"
type = ""
broadcaster_type = "affiliate"
description = "I'm a hobbyist developer dealing in many different languages, currently using Godot and C# to build games, apps, and plugins. I have a semi-decent library of games that I will occasionally play, and I just try to chill, and have fun!"
profile_image_url = "https://static-cdn.jtvnw.net/jtv_user_pictures/b2c4c6bb-9cb4-4433-b664-6431beb040c7-profile_image-300x300.png"
offline_image_url = "https://static-cdn.jtvnw.net/jtv_user_pictures/e80f180c-c6e6-4647-ae76-adb0fbe6c122-channel_offline_image-1920x1080.jpeg"
view_count = 0
email = ""
created_at = "2015-10-19T21:33:45Z"
[node name="Globals" type="Node"]
script = ExtResource("1_gsl6h")
@ -45,3 +85,31 @@ oauth_setting = SubResource("Resource_km1mv")
scopes = SubResource("Resource_to4h6")
token = SubResource("Resource_3e7ys")
metadata/_custom_type_script = "uid://i8st3lv0lidh"
[node name="TwitchAPI" type="Node" parent="TwitchService"]
script = ExtResource("8_3e7ys")
token = SubResource("Resource_3e7ys")
oauth_setting = SubResource("Resource_km1mv")
metadata/_custom_type_script = "uid://cw30cwveway65"
[node name="TwitchEventsub" type="Node" parent="TwitchService" node_paths=PackedStringArray("api")]
script = ExtResource("9_qouv8")
api = NodePath("../TwitchAPI")
scopes = SubResource("Resource_to4h6")
metadata/_custom_type_script = "uid://blmhj3j00yk45"
[node name="TwitchMediaLoader" type="Node" parent="TwitchService" node_paths=PackedStringArray("api")]
script = ExtResource("10_3qd2c")
api = NodePath("../TwitchAPI")
image_transformer = SubResource("Resource_qouv8")
metadata/_custom_type_script = "uid://d4lyup0vy1wtu"
[node name="TwitchChat" type="Node" parent="TwitchService" node_paths=PackedStringArray("media_loader", "eventsub", "api")]
script = ExtResource("13_7pyia")
broadcaster_user = SubResource("Resource_3qd2c")
sender_user = SubResource("Resource_cw8vs")
media_loader = NodePath("../TwitchMediaLoader")
eventsub = NodePath("../TwitchEventsub")
api = NodePath("../TwitchAPI")
subscribe_on_ready = false
metadata/_custom_type_script = "uid://dcq1bvfrqimqq"

View file

@ -6,6 +6,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="GodotSharpExtras" Version="0.5.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.17" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.17" />
<PackageReference Include="PokeApiNet" Version="4.0.0" />
</ItemGroup>
</Project>

View file

@ -12,7 +12,7 @@ config_version=5
config/name="PokePurple"
config/description="Poke`mon Twitch Community Game"
config/features=PackedStringArray("4.4")
config/features=PackedStringArray("4.4", "C#")
config/icon="res://icon.png"
[autoload]