From ed6e659d23224f8b6fb9b340adaf043bd38d53a2 Mon Sep 17 00:00:00 2001 From: Marco Date: Wed, 5 Mar 2025 16:22:57 +0100 Subject: [PATCH] Export script with path --- Export.ps1 | 2 +- Scenes/Items/Yin_Yang_Orb.tscn | 5 +++-- Scenes/Maps/Tutorial.tscn | 5 +++-- Scenes/test.tscn | 4 ++-- Shaders/scan_lines.gdshader | 10 +++++----- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Export.ps1 b/Export.ps1 index 46837b14..3a559d31 100644 --- a/Export.ps1 +++ b/Export.ps1 @@ -1,6 +1,6 @@ # Define paths $gitVersionPath = "dotnet-gitversion.exe" -$godotPath = "F:\Apps\Godot_v4.4\Godot_v4.4-rc1_mono_win64.exe" +$godotPath = $env:GODOT $buildDir = ".\build" $configFile = "export_presets.cfg" $zipOutputDir = ".\release" diff --git a/Scenes/Items/Yin_Yang_Orb.tscn b/Scenes/Items/Yin_Yang_Orb.tscn index 31992465..034dba06 100644 --- a/Scenes/Items/Yin_Yang_Orb.tscn +++ b/Scenes/Items/Yin_Yang_Orb.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=5 format=3 uid="uid://ihy1ew7bo6no"] +[gd_scene load_steps=6 format=3 uid="uid://ihy1ew7bo6no"] [ext_resource type="Script" uid="uid://b3h7b30kerf60" path="res://Scripts/Interactables/ItemPickup.cs" id="1_a80ku"] [ext_resource type="Resource" uid="uid://b0qheywm2wej3" path="res://Resources/Items/Yin_Yang_Orb.tres" id="2_a80ku"] +[ext_resource type="Script" uid="uid://epnwjptvks3t" path="res://Scripts/Resources/LootItem.cs" id="2_cgnjk"] [ext_resource type="Texture2D" uid="uid://efghydyw2q8o" path="res://Sprites/Items/YingYangOrb.png" id="3_a80ku"] [sub_resource type="CircleShape2D" id="CircleShape2D_jtwy2"] @@ -10,7 +11,7 @@ collision_layer = 4 collision_mask = 2 script = ExtResource("1_a80ku") -LootTable = [ExtResource("2_a80ku")] +LootTable = Array[ExtResource("2_cgnjk")]([ExtResource("2_a80ku")]) [node name="Sprite2D" type="Sprite2D" parent="."] texture = ExtResource("3_a80ku") diff --git a/Scenes/Maps/Tutorial.tscn b/Scenes/Maps/Tutorial.tscn index 7fa9658f..24b1b5e1 100644 --- a/Scenes/Maps/Tutorial.tscn +++ b/Scenes/Maps/Tutorial.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=50 format=4 uid="uid://bpnahwxmjgb6t"] +[gd_scene load_steps=51 format=4 uid="uid://bpnahwxmjgb6t"] [ext_resource type="Script" uid="uid://doxmbokehw8ci" path="res://Scripts/GameManager.cs" id="1_qxyfr"] [ext_resource type="PackedScene" uid="uid://c4pr2707hbeph" path="res://Scenes/Actors/fsm_player.tscn" id="2_ajkcn"] +[ext_resource type="Script" uid="uid://epnwjptvks3t" path="res://Scripts/Resources/LootItem.cs" id="3_covcf"] [ext_resource type="Script" uid="uid://mja0rk7n2kln" path="res://Scripts/Resources/MapStartDataResource.cs" id="4_g48r8"] [ext_resource type="TileSet" uid="uid://6k28roiljylj" path="res://Tilesets/factory_tileset.tres" id="5_2m462"] [ext_resource type="Script" uid="uid://krean0uywtms" path="res://Scripts/TilemapAvoidance.cs" id="6_bnfdx"] @@ -37,7 +38,7 @@ [sub_resource type="Resource" id="Resource_6wo78"] script = ExtResource("4_g48r8") EggIndex = 0 -StartingEquipment = [] +StartingEquipment = Array[ExtResource("3_covcf")]([]) [sub_resource type="Resource" id="Resource_hppa0"] script = ExtResource("14_wc2f3") diff --git a/Scenes/test.tscn b/Scenes/test.tscn index 7252e48c..42249a71 100644 --- a/Scenes/test.tscn +++ b/Scenes/test.tscn @@ -215,7 +215,7 @@ SpawnMarkers = Dictionary[int, NodePath]({ 2: NodePath("Factory Tilemaps/LevelProps/BossDebugTeleporterDestination"), 255: NodePath("Factory Tilemaps/Debug Room/DebugRoomStartPosition") }) -StartingEquipment = [ExtResource("4_swym2"), ExtResource("5_nqier")] +StartingEquipment = Array[ExtResource("6_8tdlb")]([ExtResource("4_swym2"), ExtResource("5_nqier")]) MapStartData = SubResource("Resource_6sau4") metadata/_edit_lock_ = true @@ -971,7 +971,7 @@ position = Vector2(-2000, -736) [node name="ControlPad8" parent="Factory Tilemaps/LevelProps" node_paths=PackedStringArray("Targets") instance=ExtResource("12_hfkf1")] position = Vector2(-2027, -735) Targets = [NodePath("../HorizontalForceField")] -Requirements = [ExtResource("84_ma1ta")] +Requirements = Array[ExtResource("6_8tdlb")]([ExtResource("84_ma1ta")]) [node name="Ammo6" parent="Factory Tilemaps/LevelProps" instance=ExtResource("34_17pjh")] position = Vector2(-872, -220) diff --git a/Shaders/scan_lines.gdshader b/Shaders/scan_lines.gdshader index 44d0aaf1..b96dee52 100644 --- a/Shaders/scan_lines.gdshader +++ b/Shaders/scan_lines.gdshader @@ -10,18 +10,18 @@ uniform bool use_texture_alpha = false; group_uniforms ScanLines; /** Color to use for the scanning lines. */ uniform vec4 line_color : source_color = vec4(0.0, 1.0, 0.0, 1.0); -/** Scanning lines thickness. */ +/** Scanning lines thickness. */ uniform float line_thickness : hint_range(0.0, 1.0) = 0.01; group_uniforms ScanLinesMovement; /** Scan lines speed. */ uniform float speed : hint_range(0.0, 20.0) = 1.0; /** Restrict scan lines in X and Y to the bounds specified by their vectors. Texture goes from 0.0 to 1.0, so the default value does not restrict. */ -uniform vec2 x_line_bounds = vec2(0.0, 1.0); +uniform vec2 x_line_bounds = vec2(0.0, 1.0); uniform vec2 y_line_bounds = vec2(0.0, 1.0); float highlight(float point, float progress) { - return smoothstep(progress - line_thickness, progress, point) - + return smoothstep(progress - line_thickness, progress, point) - smoothstep(progress, progress + line_thickness, point); } @@ -60,7 +60,7 @@ void fragment() { // will serve as a nice interpolation variable. This will always be from // 0.0 to 1.0. float fract_time = fract(time); - + // Generate a random point between vec2(lower_bound) and vec2(upper_bound). This // will be the start vector from where the scan lines should start. vec2 rand_vector = vec2( @@ -76,7 +76,7 @@ void fragment() { // Generate the actual point to draw now. This is a simple interpolation between // the start vector and the end vector. vec2 moving_point = mix(rand_vector, next_rand_vector, fract_time); - // Get the color multiplier, this will tell us if we need to draw a line or not. + // Get the color multiplier, this will tell us if we need to draw a line or not. float color_mult = point_to_color(UV, moving_point); // Get the sprite's texture, mapped to its UV. vec4 texture_color = texture(TEXTURE, UV);