1
0
Fork 0

Compare commits

...

2 Commits

  1. 11
      Resources/Sprites/frame0000.png.import
  2. 11
      Resources/Sprites/frame0001.png.import
  3. 11
      Resources/Sprites/frame0002.png.import
  4. 11
      Resources/Sprites/frame0003.png.import
  5. 11
      Resources/Sprites/frame0004.png.import
  6. 11
      Resources/Sprites/frame0005.png.import
  7. 11
      Resources/Sprites/frame0006.png.import
  8. 11
      Resources/Sprites/frame0007.png.import
  9. 11
      Resources/Sprites/frame0008.png.import
  10. 11
      Resources/Sprites/frame0009.png.import
  11. 54
      copyPat.gd

@ -3,26 +3,25 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://c0q4k8pg67x0t"
path.s3tc="res://.godot/imported/frame0000.png-541d8bc778e6cbbdc8e432fb4896d23f.s3tc.ctex"
path="res://.godot/imported/frame0000.png-541d8bc778e6cbbdc8e432fb4896d23f.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
"vram_texture": false
}
[deps]
source_file="res://Mods/copyPat/Resources/Sprites/frame0000.png"
dest_files=["res://.godot/imported/frame0000.png-541d8bc778e6cbbdc8e432fb4896d23f.s3tc.ctex"]
dest_files=["res://.godot/imported/frame0000.png-541d8bc778e6cbbdc8e432fb4896d23f.ctex"]
[params]
compress/mode=2
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""

@ -3,26 +3,25 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cg2qsgsfjytbo"
path.s3tc="res://.godot/imported/frame0001.png-98b6d91eb7e60e7ea9da2190c5a1444f.s3tc.ctex"
path="res://.godot/imported/frame0001.png-98b6d91eb7e60e7ea9da2190c5a1444f.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
"vram_texture": false
}
[deps]
source_file="res://Mods/copyPat/Resources/Sprites/frame0001.png"
dest_files=["res://.godot/imported/frame0001.png-98b6d91eb7e60e7ea9da2190c5a1444f.s3tc.ctex"]
dest_files=["res://.godot/imported/frame0001.png-98b6d91eb7e60e7ea9da2190c5a1444f.ctex"]
[params]
compress/mode=2
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""

@ -3,26 +3,25 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://rlt4xf6i2lwq"
path.s3tc="res://.godot/imported/frame0002.png-eebe31c149513c211724df17e6d00ba8.s3tc.ctex"
path="res://.godot/imported/frame0002.png-eebe31c149513c211724df17e6d00ba8.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
"vram_texture": false
}
[deps]
source_file="res://Mods/copyPat/Resources/Sprites/frame0002.png"
dest_files=["res://.godot/imported/frame0002.png-eebe31c149513c211724df17e6d00ba8.s3tc.ctex"]
dest_files=["res://.godot/imported/frame0002.png-eebe31c149513c211724df17e6d00ba8.ctex"]
[params]
compress/mode=2
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""

@ -3,26 +3,25 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cnj3ytdbosr22"
path.s3tc="res://.godot/imported/frame0003.png-3ea029b60cd63160ac773c549e33c00c.s3tc.ctex"
path="res://.godot/imported/frame0003.png-3ea029b60cd63160ac773c549e33c00c.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
"vram_texture": false
}
[deps]
source_file="res://Mods/copyPat/Resources/Sprites/frame0003.png"
dest_files=["res://.godot/imported/frame0003.png-3ea029b60cd63160ac773c549e33c00c.s3tc.ctex"]
dest_files=["res://.godot/imported/frame0003.png-3ea029b60cd63160ac773c549e33c00c.ctex"]
[params]
compress/mode=2
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""

@ -3,26 +3,25 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dpilq5sol1qaa"
path.s3tc="res://.godot/imported/frame0004.png-7819cbb3e99a8826fe515742b3d67886.s3tc.ctex"
path="res://.godot/imported/frame0004.png-7819cbb3e99a8826fe515742b3d67886.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
"vram_texture": false
}
[deps]
source_file="res://Mods/copyPat/Resources/Sprites/frame0004.png"
dest_files=["res://.godot/imported/frame0004.png-7819cbb3e99a8826fe515742b3d67886.s3tc.ctex"]
dest_files=["res://.godot/imported/frame0004.png-7819cbb3e99a8826fe515742b3d67886.ctex"]
[params]
compress/mode=2
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""

@ -3,26 +3,25 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bib1jji1dxnre"
path.s3tc="res://.godot/imported/frame0005.png-c1aab9bb59dd0f9c6ef9ffc7f3432728.s3tc.ctex"
path="res://.godot/imported/frame0005.png-c1aab9bb59dd0f9c6ef9ffc7f3432728.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
"vram_texture": false
}
[deps]
source_file="res://Mods/copyPat/Resources/Sprites/frame0005.png"
dest_files=["res://.godot/imported/frame0005.png-c1aab9bb59dd0f9c6ef9ffc7f3432728.s3tc.ctex"]
dest_files=["res://.godot/imported/frame0005.png-c1aab9bb59dd0f9c6ef9ffc7f3432728.ctex"]
[params]
compress/mode=2
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""

@ -3,26 +3,25 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://ddleraq15mf45"
path.s3tc="res://.godot/imported/frame0006.png-1153f7b9849d779827eef7a5e37f6a7d.s3tc.ctex"
path="res://.godot/imported/frame0006.png-1153f7b9849d779827eef7a5e37f6a7d.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
"vram_texture": false
}
[deps]
source_file="res://Mods/copyPat/Resources/Sprites/frame0006.png"
dest_files=["res://.godot/imported/frame0006.png-1153f7b9849d779827eef7a5e37f6a7d.s3tc.ctex"]
dest_files=["res://.godot/imported/frame0006.png-1153f7b9849d779827eef7a5e37f6a7d.ctex"]
[params]
compress/mode=2
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""

@ -3,26 +3,25 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://inbtpiu0dei2"
path.s3tc="res://.godot/imported/frame0007.png-ff4cac87646ef5b186ab232475f2e046.s3tc.ctex"
path="res://.godot/imported/frame0007.png-ff4cac87646ef5b186ab232475f2e046.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
"vram_texture": false
}
[deps]
source_file="res://Mods/copyPat/Resources/Sprites/frame0007.png"
dest_files=["res://.godot/imported/frame0007.png-ff4cac87646ef5b186ab232475f2e046.s3tc.ctex"]
dest_files=["res://.godot/imported/frame0007.png-ff4cac87646ef5b186ab232475f2e046.ctex"]
[params]
compress/mode=2
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""

@ -3,26 +3,25 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bn4q1e3jwi8f4"
path.s3tc="res://.godot/imported/frame0008.png-772a67101bbace68d40c4dfd5eeeca61.s3tc.ctex"
path="res://.godot/imported/frame0008.png-772a67101bbace68d40c4dfd5eeeca61.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
"vram_texture": false
}
[deps]
source_file="res://Mods/copyPat/Resources/Sprites/frame0008.png"
dest_files=["res://.godot/imported/frame0008.png-772a67101bbace68d40c4dfd5eeeca61.s3tc.ctex"]
dest_files=["res://.godot/imported/frame0008.png-772a67101bbace68d40c4dfd5eeeca61.ctex"]
[params]
compress/mode=2
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""

@ -3,26 +3,25 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bb0g2obo0qc5o"
path.s3tc="res://.godot/imported/frame0009.png-b6fdfcfb97cdc3ede3a515d3b2a45bcc.s3tc.ctex"
path="res://.godot/imported/frame0009.png-b6fdfcfb97cdc3ede3a515d3b2a45bcc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
"vram_texture": false
}
[deps]
source_file="res://Mods/copyPat/Resources/Sprites/frame0009.png"
dest_files=["res://.godot/imported/frame0009.png-b6fdfcfb97cdc3ede3a515d3b2a45bcc.s3tc.ctex"]
dest_files=["res://.godot/imported/frame0009.png-b6fdfcfb97cdc3ede3a515d3b2a45bcc.ctex"]
[params]
compress/mode=2
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""

@ -1,23 +1,49 @@
extends Mod_Base
@export var headpats_scene: PackedScene
@export var triggers: Array[String] = ["copyPat", "pats copygirl"]
@export var countdown: float = 12.0
var triggers = {
"": ["\\bcopyPat\\b", "pats copygirl\\b"],
"Kuerb1": ["\\bkuerb1Pats\\b", "\\bkuerb1PatPat\\b", "pats [kK]uerb[1y]\\b"],
}
func _ready() -> void:
add_tracked_setting("countdown", "Seconds active", { "min": 0.0, "max": 3600.0 })
func handle_channel_chat_message(_cheerer_username: String, _cheerer_display_name: String, message: String, _bits_count: int) -> void:
for trigger in triggers:
if message.contains(trigger):
var skel = get_skeleton()
if not skel: return
for nickname in triggers:
for regex in triggers[nickname]:
if RegEx.create_from_string(regex).search(message):
var skeleton = find_skeleton(nickname)
if not skeleton: return
play_headpat_anim(skeleton)
var node = skel.get_node("copyPat_BoneAttachment");
if not node:
node = headpats_scene.instantiate()
skel.add_child(node)
add_autodelete_object(node)
node.lifetime = countdown
# Returns the skeleton of the avatar with the specified nickname. An empty
# string will refer to the current user. Otherwise will try to find a player
# with that nickname, assuming the copyMultiplayer mod is active.
func find_skeleton(nickname: String) -> Skeleton3D:
if nickname:
var copyMP = $"../copyMultiplayer"
if not copyMP: return null
func _ready() -> void:
add_tracked_setting("triggers", "Trigger phrases", { })
add_tracked_setting("countdown", "Seconds active", { "min": 0.0, "max": 3600.0 })
for controller in copyMP.get_all_sync_controllers():
if controller.nickname == nickname:
return controller.skeleton
return null
else:
return get_skeleton()
func play_headpat_anim(skeleton: Skeleton3D) -> void:
var existing = skeleton.get_node_or_null("copyPat_BoneAttachment");
if existing:
existing.queue_free()
skeleton.remove_child(existing)
var node = headpats_scene.instantiate()
skeleton.add_child(node)
add_autodelete_object(node)
node.lifetime = countdown

Loading…
Cancel
Save