In the middle of it
This commit is contained in:
parent
4c64946609
commit
8b3b1a5884
43 changed files with 613 additions and 253 deletions
101
scripts/autoload/config.gd
Normal file
101
scripts/autoload/config.gd
Normal file
|
@ -0,0 +1,101 @@
|
|||
extends Node
|
||||
|
||||
var key = "creature"
|
||||
|
||||
var data = {}
|
||||
|
||||
var default = {
|
||||
"0": {
|
||||
"drag": 0,
|
||||
"identification": 930245150,
|
||||
"offset": "Vector2(0, 0)",
|
||||
"parentId": null,
|
||||
"path": "user://defaultAvatar/body.png",
|
||||
"pos": "Vector2(0, 0)",
|
||||
"rotDrag": 0,
|
||||
"showBlink": 0,
|
||||
"showTalk": 0,
|
||||
"type": "sprite",
|
||||
"xAmp": 9,
|
||||
"xFrq": 0.002,
|
||||
"yAmp": 11,
|
||||
"yFrq": 0.004,
|
||||
"zindex": -1 },
|
||||
"1": {
|
||||
"drag": 1,
|
||||
"identification": 456157398,
|
||||
"offset": "Vector2(0, 0)",
|
||||
"parentId": 930245150,
|
||||
"path": "user://defaultAvatar/head.png",
|
||||
"pos": "Vector2(0, 0)",
|
||||
"rotDrag": 0,
|
||||
"showBlink": 0,
|
||||
"showTalk": 0,
|
||||
"type": "sprite",
|
||||
"xAmp": 0,
|
||||
"xFrq": 0,
|
||||
"yAmp": 0,
|
||||
"yFrq": 0,
|
||||
"zindex": 0 },
|
||||
"2": { "drag": 4, "identification": 928082759, "offset": "Vector2(0, 0)", "parentId": 456157398, "path": "user://defaultAvatar/hair.png", "pos": "Vector2(0, 0)", "rotDrag": 0, "showBlink": 0, "showTalk": 0, "type": "sprite", "xAmp": 0, "xFrq": 0, "yAmp": 0, "yFrq": 0, "zindex": -2 }, "3": { "drag": 0, "identification": 346749260, "offset": "Vector2(0, 0)", "parentId": 456157398, "path": "user://defaultAvatar/mouth1.png", "pos": "Vector2(0, 0)", "rotDrag": 0, "showBlink": 0, "showTalk": 1, "type": "sprite", "xAmp": 0, "xFrq": 0, "yAmp": 0, "yFrq": 0, "zindex": 0 }, "4": { "drag": 0, "identification": 348929106, "offset": "Vector2(0, 0)", "parentId": 456157398, "path": "user://defaultAvatar/mouth2.png", "pos": "Vector2(0, 0)", "rotDrag": 0, "showBlink": 0, "showTalk": 2, "type": "sprite", "xAmp": 0, "xFrq": 0, "yAmp": 0, "yFrq": 0, "zindex": 0 }, "5": { "drag": 0, "identification": 66364456, "offset": "Vector2(0, 0)", "parentId": 456157398, "path": "user://defaultAvatar/eye1.png", "pos": "Vector2(0, 0)", "rotDrag": 0, "showBlink": 1, "showTalk": 2, "type": "sprite", "xAmp": 0, "xFrq": 0, "yAmp": 0, "yFrq": 0, "zindex": 0 }, "6": { "drag": 0, "identification": 261040117, "offset": "Vector2(0, 0)", "parentId": 456157398, "path": "user://defaultAvatar/eye2.png", "pos": "Vector2(0, 0)", "rotDrag": 0, "showBlink": 1, "showTalk": 1, "type": "sprite", "xAmp": 0, "xFrq": 0, "yAmp": 0, "yFrq": 0, "zindex": 0 }, "7": { "drag": 0, "identification": 291459997, "offset": "Vector2(0, 0)", "parentId": 456157398, "path": "user://defaultAvatar/eye3.png", "pos": "Vector2(0, 0)", "rotDrag": 0, "showBlink": 2, "showTalk": 0, "type": "sprite", "xAmp": 0, "xFrq": 0, "yAmp": 0, "yFrq": 0, "zindex": 0 }, "8": { "drag": 0, "identification": 148065686, "offset": "Vector2(-74, 92)", "parentId": 456157398, "path": "user://defaultAvatar/hat.png", "pos": "Vector2(72, -89)", "rotDrag": -2, "showBlink": 0, "showTalk": 0, "type": "sprite", "xAmp": 0, "xFrq": 0, "yAmp": 0, "yFrq": 0, "zindex": 2 } }
|
||||
|
||||
|
||||
var settings: Settings = Settings.new()
|
||||
|
||||
var settingsPath = "user://settings.pngtp"
|
||||
|
||||
func _ready():
|
||||
settings = load(settingsPath)
|
||||
|
||||
func _exit_tree():
|
||||
write_settings(settingsPath)
|
||||
|
||||
|
||||
func read_save(path):
|
||||
if path == "default":
|
||||
return DefaultAvatarData.data
|
||||
|
||||
return load(path)
|
||||
|
||||
func write_save(path):
|
||||
if OS.has_feature('web'):
|
||||
JavaScriptBridge.eval("window.localStorage.setItem('" + key + "', '" + JSON.stringify(data) + "');")
|
||||
else:
|
||||
var file = FileAccess.open(path, FileAccess.WRITE)
|
||||
file.store_line(JSON.stringify(data))
|
||||
file.close()
|
||||
|
||||
func write_settings(path):
|
||||
var file = FileAccess.open(path, FileAccess.WRITE)
|
||||
file.store_line(JSON.stringify(settings))
|
||||
file.close()
|
||||
|
||||
|
||||
func clearSave():
|
||||
|
||||
if OS.has_feature('web'):
|
||||
var JSONstr = JavaScriptBridge.eval("window.localStorage.getItem('" + key + "');")
|
||||
if (JSONstr):
|
||||
JavaScriptBridge.eval("window.localStorage.removeItem('" + key + "');")
|
||||
else:
|
||||
return null
|
||||
else:
|
||||
var file = FileAccess.open("user://" + key + ".save", FileAccess.READ)
|
||||
if not file:
|
||||
return null
|
||||
file.close()
|
||||
var dir = DirAccess.open("user://")
|
||||
dir.remove(key + ".save")
|
||||
data = {}
|
||||
|
||||
func open_site(url):
|
||||
if OS.has_feature('web'):
|
||||
JavaScriptBridge.eval("window.open(\"" + url + "\");")
|
||||
else:
|
||||
print("Could not open site " + url + " without an HTML5 build")
|
||||
|
||||
func switchToSite(url):
|
||||
if OS.has_feature('web'):
|
||||
JavaScriptBridge.eval("window.open(\"" + url + "\", \"_parent\");")
|
||||
else:
|
||||
print("Could not switch to site " + url + " without an HTML5 build")
|
1
scripts/autoload/config.gd.uid
Normal file
1
scripts/autoload/config.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://cxa11b2rlruyu
|
1
scripts/autoload/defaultAvatar.save
Normal file
1
scripts/autoload/defaultAvatar.save
Normal file
File diff suppressed because one or more lines are too long
3
scripts/autoload/defaultAvatarData.gd
Normal file
3
scripts/autoload/defaultAvatarData.gd
Normal file
File diff suppressed because one or more lines are too long
1
scripts/autoload/defaultAvatarData.gd.uid
Normal file
1
scripts/autoload/defaultAvatarData.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://dqsikysw3ch7s
|
355
scripts/autoload/global.gd
Normal file
355
scripts/autoload/global.gd
Normal file
|
@ -0,0 +1,355 @@
|
|||
extends Node
|
||||
|
||||
#Global Node Reference
|
||||
var main = null
|
||||
var spriteEdit = null
|
||||
var fail = null
|
||||
var mouse = null
|
||||
var spriteList = null
|
||||
var chain = null
|
||||
|
||||
var animationTick = 0
|
||||
|
||||
var filtering = false
|
||||
|
||||
#Object Selection
|
||||
var heldSprite: SpriteObject = null
|
||||
var lastArray = []
|
||||
var i = 0
|
||||
|
||||
var reparentMode = false
|
||||
var scrollSelection = 0
|
||||
|
||||
var backgroundColor = Color(0.0,0.0,0.0,0.0)
|
||||
|
||||
#Blink
|
||||
var blinkSpeed = 1.0
|
||||
var blinkChance = 200
|
||||
var blink = false
|
||||
var blinkTick = 0
|
||||
|
||||
#Audio Listener
|
||||
|
||||
var currentMicrophone = null
|
||||
|
||||
var speaking = false
|
||||
var spectrum
|
||||
var volume = 0
|
||||
var volumeSensitivity = 0.0
|
||||
|
||||
var volumeLimit = 0.0
|
||||
var senseLimit = 0.0
|
||||
|
||||
#Speak Signals
|
||||
signal startSpeaking
|
||||
signal stopSpeaking
|
||||
|
||||
var micResetTime = 180
|
||||
|
||||
var updatePusherNode = null
|
||||
|
||||
func _ready():
|
||||
spectrum = AudioServer.get_bus_effect_instance(1, 1)
|
||||
|
||||
if !Saving.settings.has("useStreamDeck"):
|
||||
Saving.settings["useStreamDeck"] = false
|
||||
|
||||
if Saving.settings.has("secondsToMicReset"):
|
||||
Global.micResetTime = Saving.settings["secondsToMicReset"]
|
||||
else:
|
||||
Saving.settings["secondsToMicReset"] = 180
|
||||
|
||||
createMicrophone()
|
||||
|
||||
func createMicrophone():
|
||||
var playa = AudioStreamPlayer.new()
|
||||
var mic = AudioStreamMicrophone.new()
|
||||
playa.stream = mic
|
||||
playa.autoplay = true
|
||||
playa.bus = &"MIC"
|
||||
add_child(playa)
|
||||
currentMicrophone = playa
|
||||
await get_tree().create_timer(micResetTime).timeout
|
||||
if currentMicrophone != playa:
|
||||
return
|
||||
deleteAllMics()
|
||||
currentMicrophone = null
|
||||
await get_tree().create_timer(0.25).timeout
|
||||
createMicrophone()
|
||||
|
||||
func deleteAllMics():
|
||||
for child in get_children():
|
||||
child.queue_free()
|
||||
|
||||
|
||||
func _process(delta):
|
||||
animationTick += 1
|
||||
|
||||
volume = spectrum.get_magnitude_for_frequency_range(20, 20000).length()
|
||||
if currentMicrophone != null:
|
||||
volumeSensitivity = lerp(volumeSensitivity,0.0,delta*2)
|
||||
|
||||
if volume>volumeLimit:
|
||||
volumeSensitivity = 1.0
|
||||
|
||||
var prev = speaking
|
||||
speaking = volumeSensitivity > senseLimit
|
||||
|
||||
if prev != speaking:
|
||||
if speaking:
|
||||
emit_signal("startSpeaking")
|
||||
else:
|
||||
emit_signal("stopSpeaking")
|
||||
|
||||
if main != null and heldSprite != null:
|
||||
if Input.is_action_just_pressed("zDown"):
|
||||
heldSprite.z -= 1
|
||||
heldSprite.setZIndex()
|
||||
pushUpdate("Moved sprite layer.")
|
||||
if Input.is_action_just_pressed("zUp"):
|
||||
heldSprite.z += 1
|
||||
heldSprite.setZIndex()
|
||||
pushUpdate("Moved sprite layer.")
|
||||
if main.editMode:
|
||||
if Input.is_action_just_pressed("reparent"):
|
||||
reparentMode = !reparentMode
|
||||
Global.chain.enable(reparentMode)
|
||||
|
||||
else:
|
||||
reparentMode = false
|
||||
Global.chain.enable(reparentMode)
|
||||
|
||||
if main.editMode:
|
||||
if reparentMode:
|
||||
RenderingServer.set_default_clear_color(Color.POWDER_BLUE)
|
||||
else:
|
||||
RenderingServer.set_default_clear_color(Color.GRAY)
|
||||
|
||||
|
||||
blinking()
|
||||
scrollSprites()
|
||||
|
||||
|
||||
if !main.fileSystemOpen:
|
||||
|
||||
if Input.is_action_just_pressed("refresh"):
|
||||
refresh()
|
||||
if Input.is_action_just_pressed("unlink"):
|
||||
unlinkSprite()
|
||||
|
||||
if Input.is_action_pressed("control"):
|
||||
if Input.is_action_just_pressed("saveImages"):
|
||||
saveImagesFromData()
|
||||
|
||||
|
||||
func select(areas):
|
||||
|
||||
if main.fileSystemOpen:
|
||||
return
|
||||
|
||||
for area in areas:
|
||||
if area.is_in_group("penis"):
|
||||
return
|
||||
|
||||
var prevSpr = heldSprite
|
||||
if areas.size() <= 0:
|
||||
heldSprite = null
|
||||
i = 0
|
||||
lastArray = []
|
||||
return
|
||||
|
||||
if areas != lastArray:
|
||||
heldSprite = areas[0].get_parent().get_parent().get_parent()
|
||||
i = 0
|
||||
else:
|
||||
i += 1
|
||||
|
||||
if i >= areas.size():
|
||||
i = 0
|
||||
|
||||
heldSprite = areas[i].get_parent().get_parent().get_parent()
|
||||
|
||||
var count = heldSprite.path.get_slice_count("/") - 1
|
||||
var i1 = heldSprite.path.get_slice("/",count)
|
||||
pushUpdate("Selected sprite \"" + i1 + "\"" + ".")
|
||||
|
||||
heldSprite.set_physics_process(true)
|
||||
|
||||
if reparentMode:
|
||||
if prevSpr == heldSprite:
|
||||
reparentMode = false
|
||||
return
|
||||
if heldSprite.parentId == prevSpr.id:
|
||||
return
|
||||
|
||||
linkSprite(prevSpr,heldSprite)
|
||||
Global.chain.enable(reparentMode)
|
||||
|
||||
lastArray = areas.duplicate()
|
||||
|
||||
spriteEdit.setImage()
|
||||
|
||||
func linkSprite(sprite,newParent):
|
||||
if sprite == newParent:
|
||||
reparentMode = false
|
||||
|
||||
return
|
||||
if newParent.parentId == sprite.id:
|
||||
reparentMode = false
|
||||
return
|
||||
|
||||
if sprite.is_ancestor_of(newParent):
|
||||
pushUpdate("Can't link to own child sprite!")
|
||||
reparentMode = false
|
||||
return
|
||||
|
||||
sprite.reparent(newParent.sprite,true)
|
||||
|
||||
sprite.parentId = newParent.id
|
||||
sprite.parentSprite = newParent
|
||||
|
||||
reparentMode = false
|
||||
|
||||
Global.spriteList.updateData()
|
||||
|
||||
var count = sprite.path.get_slice_count("/") - 1
|
||||
var i1 = sprite.path.get_slice("/",count)
|
||||
|
||||
count = newParent.path.get_slice_count("/") - 1
|
||||
var i2 = newParent.path.get_slice("/",count)
|
||||
|
||||
pushUpdate("Linked sprite \"" + i1 + "\" to sprite \"" + i2 + "\".")
|
||||
newParent.set_physics_process(true)
|
||||
|
||||
func scrollSprites():
|
||||
|
||||
if Input.is_action_pressed("control"):
|
||||
return
|
||||
|
||||
if !main.editMode:
|
||||
return
|
||||
|
||||
if main.fileSystemOpen:
|
||||
return
|
||||
|
||||
for area in mouse.area.get_overlapping_areas():
|
||||
if area.is_in_group("penis"):
|
||||
return
|
||||
|
||||
var scroll = 0
|
||||
|
||||
if heldSprite == null:
|
||||
scrollSelection = 0
|
||||
|
||||
if Input.is_action_just_pressed("scrollUp"):
|
||||
scroll-=1
|
||||
if Input.is_action_just_pressed("scrollDown"):
|
||||
scroll+=1
|
||||
|
||||
if scroll == 0:
|
||||
return
|
||||
|
||||
|
||||
var obj = get_tree().get_nodes_in_group("saved")
|
||||
|
||||
if obj.size() <= 0:
|
||||
return
|
||||
|
||||
scrollSelection += scroll
|
||||
if scrollSelection >= obj.size():
|
||||
scrollSelection = 0
|
||||
elif scrollSelection < 0:
|
||||
scrollSelection = obj.size() - 1
|
||||
|
||||
heldSprite = obj[scrollSelection]
|
||||
|
||||
var count = heldSprite.path.get_slice_count("/") - 1
|
||||
var i1 = heldSprite.path.get_slice("/",count)
|
||||
pushUpdate("Selected sprite \"" + i1 + "\"" + ".")
|
||||
|
||||
heldSprite.set_physics_process(true)
|
||||
|
||||
spriteEdit.setImage()
|
||||
|
||||
func blinking():
|
||||
blinkTick += 1
|
||||
if blinkTick == 0:
|
||||
blink = false
|
||||
if randf_range(-1.0,1.0) > 0.5:
|
||||
blinkTick = (420 * blinkSpeed) + 1
|
||||
if blinkTick > 420 * blinkSpeed:
|
||||
if randi() % int(blinkChance) == 0:
|
||||
blink = true
|
||||
|
||||
blinkTick = -12
|
||||
|
||||
func epicFail(err):
|
||||
print(fail)
|
||||
if fail == null:
|
||||
return
|
||||
|
||||
fail.get_node("type").text = ""
|
||||
match err:
|
||||
ERR_FILE_CORRUPT:
|
||||
fail.get_node("type").text = "FILE CORRUPT"
|
||||
ERR_FILE_NOT_FOUND:
|
||||
fail.get_node("type").text = "FILE NOT FOUND"
|
||||
ERR_FILE_CANT_OPEN:
|
||||
fail.get_node("type").text = "FILE CANT OPEN"
|
||||
ERR_FILE_ALREADY_IN_USE:
|
||||
fail.get_node("type").text = "FILE IN USE"
|
||||
ERR_FILE_NO_PERMISSION:
|
||||
fail.get_node("type").text = "MISSING PERMISSION"
|
||||
ERR_INVALID_DATA:
|
||||
fail.get_node("type").text = "DATA INVALID"
|
||||
ERR_FILE_CANT_READ:
|
||||
fail.get_node("type").text = "CANT READ FILE"
|
||||
|
||||
fail.visible = true
|
||||
await get_tree().create_timer(2.5).timeout
|
||||
fail.visible = false
|
||||
|
||||
func refresh():
|
||||
var objs = get_tree().get_nodes_in_group("saved")
|
||||
for object in objs:
|
||||
object.replaceSprite(object.path)
|
||||
object.sprite.frame = 0
|
||||
object.remadePolygon = false
|
||||
pushUpdate("Refreshed all sprites.")
|
||||
|
||||
func unlinkSprite():
|
||||
if heldSprite == null:
|
||||
return
|
||||
if heldSprite.parentId == null:
|
||||
return
|
||||
|
||||
var glob = heldSprite.global_position
|
||||
glob = Vector2(int(glob.x),int(glob.y))
|
||||
|
||||
heldSprite.get_parent().remove_child(heldSprite)
|
||||
main.origin.add_child(heldSprite)
|
||||
heldSprite.set_owner(main.origin)
|
||||
heldSprite.parentId = null
|
||||
heldSprite.parentSprite = null
|
||||
heldSprite.position = glob - main.origin.position
|
||||
|
||||
Global.spriteList.updateData()
|
||||
pushUpdate("Unlinked sprite.")
|
||||
|
||||
func saveImagesFromData():
|
||||
var sprites = get_tree().get_nodes_in_group("saved")
|
||||
if sprites.size() <= 0:
|
||||
return
|
||||
for sprite in sprites:
|
||||
var img = sprite.imageData
|
||||
var array = sprite.path.split("/",false)
|
||||
var length = sprite.path.length() - array[array.size()-1].length()
|
||||
|
||||
DirAccess.make_dir_recursive_absolute(sprite.path.left(length-1))
|
||||
img.save_png(sprite.path)
|
||||
|
||||
pushUpdate("Saved all avatar images to computer.")
|
||||
|
||||
func pushUpdate(text):
|
||||
if is_instance_valid(updatePusherNode):
|
||||
updatePusherNode.pushUpdate(text)
|
1
scripts/autoload/global.gd.uid
Normal file
1
scripts/autoload/global.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://bmpjqfd2aoh2t
|
77
scripts/autoload/input_handler.gd
Normal file
77
scripts/autoload/input_handler.gd
Normal file
|
@ -0,0 +1,77 @@
|
|||
# Handles background inputs (inputs when unfocused)
|
||||
|
||||
extends Node
|
||||
|
||||
signal key_pressed(key: Key)
|
||||
signal key_released(key: Key)
|
||||
signal all_keys_released
|
||||
#background input capture
|
||||
signal emptiedCapture
|
||||
signal pressedKey
|
||||
var costumeKeys = ["1","2","3","4","5","6","7","8","9","0"]
|
||||
|
||||
var pressed_keys: Array[Key] = []
|
||||
|
||||
func should_fire_signal() -> bool:
|
||||
return get_viewport().gui_get_focus_owner() == null or not DisplayServer.window_is_focused()
|
||||
|
||||
func _process(_delta):
|
||||
# This is a Dictionary[Key, bool] but I can't return typed dicts nor cast them
|
||||
var keys = BackgroundInputCapture.get_keys()
|
||||
for key in keys:
|
||||
if keys[key]:
|
||||
pressed_keys.append(key)
|
||||
if should_fire_signal():
|
||||
key_pressed.emit(key)
|
||||
else:
|
||||
pressed_keys.erase(key)
|
||||
if should_fire_signal():
|
||||
key_released.emit(key)
|
||||
#process_key_presses(keys)
|
||||
#bgInputSprite(keys)
|
||||
#
|
||||
#func process_key_presses(keys_pressed: Dictionary[Key, bool]):
|
||||
#if Global.main.fileSystemOpen:
|
||||
#return
|
||||
#
|
||||
#var keyStrings = keys_pressed.map(
|
||||
#func(i) -> String: return OS.get_keycode_string(i) if !OS.get_keycode_string(i).strip_edges().is_empty() else "Keycode" + str(i)
|
||||
#)
|
||||
#
|
||||
#if keyStrings.size() <= 0:
|
||||
#emit_signal("emptiedCapture")
|
||||
#return
|
||||
#
|
||||
#if settingsMenu.awaitingCostumeInput >= 0:
|
||||
#
|
||||
#if keyStrings[0] == "Keycode1":
|
||||
#if !settingsMenu.hasMouse:
|
||||
#emit_signal("pressedKey")
|
||||
#return
|
||||
#
|
||||
#var currentButton = costumeKeys[settingsMenu.awaitingCostumeInput]
|
||||
#costumeKeys[settingsMenu.awaitingCostumeInput] = keyStrings[0]
|
||||
#Saving.settings["costumeKeys"] = costumeKeys
|
||||
#Global.pushUpdate("Changed costume " + str(settingsMenu.awaitingCostumeInput+1) + " hotkey from \"" + currentButton + "\" to \"" + keyStrings[0] + "\"")
|
||||
#emit_signal("pressedKey")
|
||||
#
|
||||
#for key in keyStrings:
|
||||
#var i = costumeKeys.find(key)
|
||||
#if i >= 0:
|
||||
#changeCostume(i+1)
|
||||
#
|
||||
#
|
||||
## Handles background input for sprites
|
||||
#func bgInputSprite(keys_pressed: Dictionary[Key, bool]):
|
||||
#if fileSystemOpen:
|
||||
#return
|
||||
#
|
||||
#if keys_pressed.size() <= 0:
|
||||
#emit_signal("all_keys_released")
|
||||
#return
|
||||
#
|
||||
#spriteVisToggles.emit(
|
||||
#keys_pressed.map(
|
||||
#func(i) -> String: return OS.get_keycode_string(i) if !OS.get_keycode_string(i).strip_edges().is_empty() else "Keycode" + str(i)
|
||||
#)
|
||||
#)
|
1
scripts/autoload/input_handler.gd.uid
Normal file
1
scripts/autoload/input_handler.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://y12b1vin2hpt
|
4
scripts/avatar_data.gd
Normal file
4
scripts/avatar_data.gd
Normal file
|
@ -0,0 +1,4 @@
|
|||
extends Resource
|
||||
class_name AvatarData
|
||||
|
||||
@export var sprites: Array[SpriteData] = []
|
1
scripts/avatar_data.gd.uid
Normal file
1
scripts/avatar_data.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://b73on8ic2acsv
|
18
scripts/settings.gd
Normal file
18
scripts/settings.gd
Normal file
|
@ -0,0 +1,18 @@
|
|||
extends Resource
|
||||
class_name Settings
|
||||
|
||||
@export_global_file var lastAvatar: String = ""
|
||||
@export_range(0, 1, 0.05) var volume: float = 0.185
|
||||
@export_range(0, 1, 0.05) var sense = 0.25
|
||||
@export var windowSize = Vector2i(1280, 720)
|
||||
@export var useStreamDeck = false
|
||||
@export var bounce = 250
|
||||
@export var gravity = 1000
|
||||
@export var maxFPS: int = 60
|
||||
@export var secondsToMicReset: float = 180
|
||||
@export var backgroundColor: Color = Color.TRANSPARENT
|
||||
@export var filtering = false
|
||||
@export var costumeKeys: Array[Key] = [KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8, KEY_9, KEY_0]
|
||||
@export var blinkSpeed: float = 1.0
|
||||
@export var blinkChance = 200
|
||||
@export var bounceOnCostumeChange = false
|
1
scripts/settings.gd.uid
Normal file
1
scripts/settings.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://dmeqvexvccsav
|
26
scripts/sprite_data.gd
Normal file
26
scripts/sprite_data.gd
Normal file
|
@ -0,0 +1,26 @@
|
|||
extends Resource
|
||||
class_name SpriteData
|
||||
|
||||
@export var anim_speed = 0
|
||||
@export var clipped = false
|
||||
@export var costume_layers: Array[bool] = [true, true, true, true, true, true, true, true, true, true]
|
||||
@export var drag = 0
|
||||
@export var frames = 1
|
||||
@export var ignore_bounce = false
|
||||
@export var image: Texture
|
||||
@export var offset = Vector2(0, 0)
|
||||
@export_global_file var path = "user://defaultAvatar/body.png"
|
||||
@export var pos = Vector2(0, 0)
|
||||
@export var r_limit_max = 180
|
||||
@export var r_limit_min = -180
|
||||
@export var rot_drag = 0
|
||||
@export var show_blink = 0
|
||||
@export var show_talk = 0
|
||||
@export var stretch_amount = 0.25
|
||||
@export var type = "sprite"
|
||||
@export var x_amp = 9
|
||||
@export var x_frq = 0.004
|
||||
@export var y_amp = 11
|
||||
@export var y_frq = 0.008
|
||||
@export var zindex = -1
|
||||
@export var children: Array[SpriteData] = []
|
1
scripts/sprite_data.gd.uid
Normal file
1
scripts/sprite_data.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://b07e67yn4uh6d
|
Loading…
Add table
Add a link
Reference in a new issue