Added speed hack for vesna

This commit is contained in:
Jonathan
2025-08-06 21:25:28 +02:00
parent d7ac1c6c22
commit 6aa7530502
5 changed files with 84 additions and 48 deletions
+22
View File
@@ -0,0 +1,22 @@
@tool
extends EditorPlugin
func _enter_tree() -> void:
if !ProjectSettings.has_setting("babushka/hacks/speed_hack"):
ProjectSettings.set_setting("babushka/hacks/speed_hack",-1)
var property_info = {
"name": "babushka/hacks/speed_hack",
"type": TYPE_FLOAT,
"hint": PROPERTY_HINT_RANGE,
"hint_string": "-1,20,0.5"
}
ProjectSettings.add_property_info(property_info)
ProjectSettings.set_initial_value("babushka/hacks/speed_hack",-1)
func _exit_tree() -> void:
# Clean-up of the plugin goes here.
pass
@@ -0,0 +1 @@
uid://buwfplh0xji8q
+7
View File
@@ -0,0 +1,7 @@
[plugin]
name="BabushkaHelpers"
description=""
author="Cozy Raven"
version=""
script="babushkahelpers.gd"
+1 -1
View File
@@ -181,7 +181,7 @@ movie_writer/movie_file="/home/kaddi/Documents/Repos/Godot/Babushka/_clips/clip.
[editor_plugins] [editor_plugins]
enabled=PackedStringArray("res://addons/SignalVisualizer/plugin.cfg", "res://addons/anthonyec.camera_preview/plugin.cfg", "res://addons/dialogic/plugin.cfg") enabled=PackedStringArray("res://addons/SignalVisualizer/plugin.cfg", "res://addons/anthonyec.camera_preview/plugin.cfg", "res://addons/babushkahelpers/plugin.cfg", "res://addons/dialogic/plugin.cfg")
[file_customization] [file_customization]
@@ -1,4 +1,3 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Babushka.scripts.CSharp.Common.Inventory; using Babushka.scripts.CSharp.Common.Inventory;
using Babushka.scripts.CSharp.Common.Services; using Babushka.scripts.CSharp.Common.Services;
@@ -58,6 +57,13 @@ public partial class PlayerMovement : CharacterBody2D
currentVelocity *= 0.7f; currentVelocity *= 0.7f;
} }
// speed hack
var setting = ProjectSettings.GetSetting("babushka/hacks/speed_hack",-1).AsSingle();
if (setting > 0)
{
currentVelocity *= setting;
}
Velocity = currentVelocity; Velocity = currentVelocity;
MoveAndSlide(); MoveAndSlide();
} }