From e8cb6811035338df6eee650664b943444b3ae00a Mon Sep 17 00:00:00 2001 From: Rendo Date: Sat, 26 Jul 2025 05:02:44 +0500 Subject: [PATCH] Modifier frenzy --- scenes/entities/Zombies/bucket_zombie.tscn | 51 +++++---- scenes/entities/Zombies/cone_zombie.tscn | 2 +- scenes/entities/Zombies/hobo.tscn | 46 ++++---- scenes/entities/Zombies/zombie.tscn | 51 +++++---- scenes/entities/plants/spikeweed.tscn | 22 +++- scripts/entities/AnimationStatistics.cs | 17 +++ ...tics.cs.uid => AnimationStatistics.cs.uid} | 0 scripts/entities/EatingStatistics.cs | 16 --- scripts/gui/choose_your_seeds/Previewport.cs | 104 +++++++++++------- scripts/resources/entities/EntityResource.cs | 2 + translations/plants.csv | 6 +- translations/plants.en.translation | Bin 3230 -> 3298 bytes translations/plants.ru.translation | Bin 4597 -> 4669 bytes translations/zombies.csv | 24 ++-- translations/zombies.en.translation | Bin 1974 -> 2002 bytes translations/zombies.ru.translation | Bin 2797 -> 2829 bytes 16 files changed, 198 insertions(+), 143 deletions(-) create mode 100644 scripts/entities/AnimationStatistics.cs rename scripts/entities/{EatingStatistics.cs.uid => AnimationStatistics.cs.uid} (100%) delete mode 100644 scripts/entities/EatingStatistics.cs diff --git a/scenes/entities/Zombies/bucket_zombie.tscn b/scenes/entities/Zombies/bucket_zombie.tscn index 3db0b72..2982093 100644 --- a/scenes/entities/Zombies/bucket_zombie.tscn +++ b/scenes/entities/Zombies/bucket_zombie.tscn @@ -66,58 +66,58 @@ use_parent_material = false [node name="RightUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="1"] use_parent_material = false -scale = Vector2(0.999833, 0.999833) +scale = Vector2(0.999829, 0.999829) [node name="RightLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg" index="1"] -scale = Vector2(0.999837, 0.999837) +scale = Vector2(0.999834, 0.999834) [node name="RightFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg" index="0"] -scale = Vector2(0.999834, 0.999834) +scale = Vector2(0.999831, 0.999831) [node name="LeftUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="2"] use_parent_material = false scale = Vector2(0.999831, 0.999831) [node name="LeftLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg" index="1"] -scale = Vector2(0.999827, 0.999827) +scale = Vector2(0.999831, 0.999831) [node name="LeftFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg" index="1"] -scale = Vector2(0.999829, 0.999829) +scale = Vector2(0.99983, 0.99983) [node name="Body" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="3"] use_parent_material = false -scale = Vector2(0.999826, 0.999826) +scale = Vector2(0.999832, 0.999832) [node name="RightUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="0"] use_parent_material = false -scale = Vector2(0.999823, 0.999823) +scale = Vector2(0.999827, 0.999827) [node name="RightLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm" index="1"] -scale = Vector2(0.999828, 0.999828) +scale = Vector2(0.999821, 0.999821) [node name="RightHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm" index="0"] -scale = Vector2(0.99983, 0.99983) +scale = Vector2(0.999827, 0.999827) [node name="Tie" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="2"] -rotation = -0.107529 -skew = -0.000208616 +rotation = 0.0622776 +skew = -0.000231266 [node name="Head" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="3"] -scale = Vector2(0.999828, 0.999828) +scale = Vector2(0.999831, 0.999831) [node name="Right_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="0"] -position = Vector2(-16, -8.00001) +position = Vector2(-16, -8) [node name="Left_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="1"] position = Vector2(-4, -9) [node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="2"] -position = Vector2(-2.86646, 2.6777) -rotation = -0.0751099 -scale = Vector2(0.999826, 0.999826) +position = Vector2(-3.00076, 2.9987) +rotation = 0.00604386 +scale = Vector2(0.999828, 0.999828) [node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="1"] -scale = Vector2(0.999826, 0.999826) +scale = Vector2(0.999828, 0.999828) [node name="Hat" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="4"] position = Vector2(-6, -8) @@ -129,23 +129,23 @@ texture = ExtResource("3_0nlp0") degradationStages = Array[Texture]([ExtResource("3_0nlp0"), ExtResource("4_xx7fu"), ExtResource("5_v1iwd")]) [node name="LeftUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="4"] -scale = Vector2(0.999827, 0.999827) +scale = Vector2(0.999824, 0.999824) [node name="Left_Lower_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile" index="0"] -rotation = -0.113972 -scale = Vector2(1, 1) +rotation = 0.0585546 +scale = Vector2(0.999996, 0.999996) [node name="Left_Hand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm" index="0"] show_behind_parent = false -position = Vector2(-0.999829, 12.9978) -rotation = -0.0939467 -scale = Vector2(0.999653, 0.999653) +position = Vector2(-0.99983, 12.9978) +rotation = -0.0258424 +scale = Vector2(0.99965, 0.99965) [node name="LeftLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm" index="2"] -scale = Vector2(0.999832, 0.999832) +scale = Vector2(0.999826, 0.999826) [node name="LeftHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm" index="0"] -scale = Vector2(0.999823, 0.999823) +scale = Vector2(0.99982, 0.99982) [node name="Left_Hand" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm/LeftHand" index="0"] texture = SubResource("AtlasTexture_wfem3") @@ -164,7 +164,6 @@ _damage = SubResource("Resource_lea3a") [node name="Mover" parent="." index="4"] _speed = SubResource("Resource_v1iwd") -_speedControlMult = 0.47838 [node name="HitPlayer" parent="." index="5"] playlist = Array[AudioStream]([ExtResource("5_lt6ps"), ExtResource("6_kedip")]) diff --git a/scenes/entities/Zombies/cone_zombie.tscn b/scenes/entities/Zombies/cone_zombie.tscn index bb7ddf1..19edda0 100644 --- a/scenes/entities/Zombies/cone_zombie.tscn +++ b/scenes/entities/Zombies/cone_zombie.tscn @@ -57,7 +57,7 @@ scale = Vector2(0.999835, 0.999835) scale = Vector2(0.999833, 0.999833) [node name="LeftLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg" index="1"] -scale = Vector2(0.999832, 0.999832) +scale = Vector2(0.999833, 0.999833) [node name="LeftFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg" index="1"] scale = Vector2(0.999829, 0.999829) diff --git a/scenes/entities/Zombies/hobo.tscn b/scenes/entities/Zombies/hobo.tscn index e001554..4c4d03e 100644 --- a/scenes/entities/Zombies/hobo.tscn +++ b/scenes/entities/Zombies/hobo.tscn @@ -1,7 +1,6 @@ -[gd_scene load_steps=66 format=3 uid="uid://bgqmwsb6ynm81"] +[gd_scene load_steps=65 format=3 uid="uid://bgqmwsb6ynm81"] [ext_resource type="PackedScene" uid="uid://co11v3w8hbwgf" path="res://scenes/entities/Zombies/zombie.tscn" id="1_fnu7s"] -[ext_resource type="Script" uid="uid://bcc7skl7ts6sh" path="res://scripts/systems/effects/Effect.cs" id="2_yb81c"] [ext_resource type="Resource" uid="uid://dsg1vjx76ifgu" path="res://assets/effects/GarlicEffect.tres" id="3_b583s"] [ext_resource type="Script" uid="uid://dt5uj25u0g6y3" path="res://scripts/particles/FallParticle.cs" id="3_tu6af"] [ext_resource type="Script" uid="uid://c5v2og85t7s6j" path="res://scripts/entities/zombies/behaviours/HoboBehaviour.cs" id="4_5selg"] @@ -761,7 +760,7 @@ mult_value = 1.0 [node name="Hobo" node_paths=PackedStringArray("_armor") instance=ExtResource("1_fnu7s")] _armor = NodePath("CanArmor") MaxHP = 185.0 -_effectImmunities = Array[ExtResource("2_yb81c")]([ExtResource("3_b583s")]) +_effectImmunities = [ExtResource("3_b583s")] [node name="CanvasGroup" parent="." index="0"] material = SubResource("ShaderMaterial_vn3j1") @@ -773,16 +772,16 @@ scale = Vector2(0.999902, 0.999902) texture = SubResource("AtlasTexture_txjqc") [node name="RightUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="1"] -scale = Vector2(0.999834, 0.999834) +scale = Vector2(0.999831, 0.999831) [node name="Right_Upper_Leg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg" index="0"] texture = SubResource("AtlasTexture_b583s") [node name="RightLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg" index="1"] -scale = Vector2(0.999833, 0.999833) +scale = Vector2(0.999832, 0.999832) [node name="RightFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg" index="0"] -scale = Vector2(0.999832, 0.999832) +scale = Vector2(0.999835, 0.999835) [node name="Right_Foot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg/RightFoot" index="0"] texture = SubResource("AtlasTexture_uoit3") @@ -791,7 +790,7 @@ texture = SubResource("AtlasTexture_uoit3") texture = SubResource("AtlasTexture_vn3j1") [node name="LeftUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="2"] -scale = Vector2(0.999829, 0.999829) +scale = Vector2(0.99983, 0.99983) [node name="Left_Upper_Leg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg" index="0"] texture = SubResource("AtlasTexture_yb81c") @@ -803,22 +802,22 @@ scale = Vector2(0.999832, 0.999832) texture = SubResource("AtlasTexture_nlwsb") [node name="LeftFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg" index="1"] -scale = Vector2(0.999816, 0.999816) +scale = Vector2(0.999814, 0.999814) [node name="Left_Foot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg/LeftFoot" index="0"] texture = SubResource("AtlasTexture_8y6c0") [node name="Body" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="3"] -scale = Vector2(0.999826, 0.999826) +scale = Vector2(0.999824, 0.999824) [node name="RightUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="0"] -scale = Vector2(0.999828, 0.999828) +scale = Vector2(0.999827, 0.999827) [node name="Right_Upper_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm" index="0"] texture = SubResource("AtlasTexture_nc6p3") [node name="RightLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm" index="1"] -scale = Vector2(0.999817, 0.999817) +scale = Vector2(0.999815, 0.999815) [node name="Right_Hand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm/RightHand" index="0"] texture = SubResource("AtlasTexture_y0p2l") @@ -830,7 +829,7 @@ texture = SubResource("AtlasTexture_op0h6") texture = SubResource("AtlasTexture_0s5wm") [node name="Tie" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="2"] -rotation = 0.0254695 +rotation = 0.0332545 scale = Vector2(1e-05, 1e-05) [node name="Tie" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Tie" index="0"] @@ -867,24 +866,19 @@ texture = SubResource("AtlasTexture_5selg") position = Vector2(-4.9999, -5.0002) shape = SubResource("CapsuleShape2D_4248q") -[node name="Head" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="4"] -scale = Vector2(0.999827, 0.999827) - [node name="Head" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle" index="0"] texture = SubResource("AtlasTexture_pjhfy") [node name="Right_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="0"] -position = Vector2(-16, -8) -scale = Vector2(1, 1) +position = Vector2(-16, -8.00001) [node name="Left_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="1"] position = Vector2(-4, -9) -scale = Vector2(1, 1) [node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="2"] position = Vector2(-3, 3) -rotation = -0.0414244 -scale = Vector2(0.999831, 0.999831) +rotation = -0.0540862 +scale = Vector2(0.999834, 0.999834) texture = SubResource("AtlasTexture_7cvmi") offset = Vector2(-14, -2) @@ -916,7 +910,7 @@ _threshold = 0.333 _observedArmor = NodePath("../../../../../../../../../../CanArmor") [node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="1"] -scale = Vector2(0.999831, 0.999831) +scale = Vector2(0.999834, 0.999834) [node name="TrashcanLid" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="4"] position = Vector2(-0.0022974, -17.0131) @@ -931,23 +925,24 @@ editor_settings/show_bone_gizmo = false remote_path = NodePath("../../HeadParticle/Head/TrashcanLid/Trashcan_lid") [node name="LeftUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="5"] -scale = Vector2(0.999823, 0.999823) +scale = Vector2(0.999825, 0.999825) [node name="Left_Upper_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm" index="0"] texture = SubResource("AtlasTexture_tebih") [node name="Left_Lower_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile" index="0"] -rotation = 0.0229755 -scale = Vector2(0.999996, 0.999996) +rotation = 0.0299982 +scale = Vector2(0.999995, 0.999995) texture = SubResource("AtlasTexture_auxav") [node name="Left_Hand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm" index="0"] position = Vector2(-0.99983, 12.9978) +rotation = 0.0 scale = Vector2(0.999652, 0.999652) texture = SubResource("AtlasTexture_dntsa") [node name="LeftLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm" index="2"] -scale = Vector2(0.999826, 0.999826) +scale = Vector2(0.999825, 0.999825) [node name="LeftHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm" index="0"] scale = Vector2(0.999822, 0.999822) @@ -971,6 +966,7 @@ advance_expression_base_node = NodePath("../Behaviour") [node name="Mover" parent="." index="4"] _speed = SubResource("Resource_4248q") +_speedControlMult = 0.0 [node name="HitPlayer" parent="." index="5"] playlist = Array[AudioStream]([ExtResource("8_4248q"), ExtResource("9_tu6af")]) diff --git a/scenes/entities/Zombies/zombie.tscn b/scenes/entities/Zombies/zombie.tscn index 7f5a54f..89dd057 100644 --- a/scenes/entities/Zombies/zombie.tscn +++ b/scenes/entities/Zombies/zombie.tscn @@ -9,7 +9,7 @@ [ext_resource type="Texture2D" uid="uid://dacgbwohpmeed" path="res://assets/sprites/zombies/basic.png" id="6_xnora"] [ext_resource type="Script" uid="uid://c3cfnrmnnuqms" path="res://addons/floatmodifiers/FloatModifiers.cs" id="7_b3p4o"] [ext_resource type="Script" uid="uid://dt5uj25u0g6y3" path="res://scripts/particles/FallParticle.cs" id="7_dn8ha"] -[ext_resource type="Script" uid="uid://dw7v3s4kbu7ma" path="res://scripts/entities/EatingStatistics.cs" id="8_b51fx"] +[ext_resource type="Script" uid="uid://dw7v3s4kbu7ma" path="res://scripts/entities/AnimationStatistics.cs" id="8_b51fx"] [ext_resource type="AnimationNodeStateMachine" uid="uid://dj0blope85bg7" path="res://assets/animations/zombies/basic_zombie_tree.tres" id="8_ckb7n"] [ext_resource type="Script" uid="uid://dau0tfmlfiqmo" path="res://scripts/entities/EntityHPObserver.cs" id="8_mc1kl"] [ext_resource type="Texture2D" uid="uid://dri70dxyks7xh" path="res://assets/sprites/zombies/hobo.png" id="9_b51fx"] @@ -815,7 +815,7 @@ metadata/_edit_lock_ = true [node name="RightUpperLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt"] use_parent_material = true position = Vector2(-6, 3) -scale = Vector2(0.999836, 0.999836) +scale = Vector2(0.999834, 0.999834) rest = Transform2D(1, 0, 0, 1, -6, 3) editor_settings/show_bone_gizmo = false @@ -856,7 +856,7 @@ metadata/_edit_lock_ = true [node name="LeftUpperLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt"] use_parent_material = true position = Vector2(6, 4) -scale = Vector2(0.999836, 0.999836) +scale = Vector2(0.999835, 0.999835) rest = Transform2D(1, 0, 0, 1, 6, 4) editor_settings/show_bone_gizmo = false @@ -868,7 +868,7 @@ metadata/_edit_lock_ = true [node name="LeftLowerLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg"] position = Vector2(-1, 13) -scale = Vector2(0.999833, 0.999833) +scale = Vector2(0.999835, 0.999835) rest = Transform2D(1, 0, 0, 1, -1, 13) editor_settings/show_bone_gizmo = false @@ -880,7 +880,7 @@ metadata/_edit_lock_ = true [node name="LeftFoot" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg"] position = Vector2(6, 10) -scale = Vector2(0.999828, 0.999828) +scale = Vector2(0.999831, 0.999831) rest = Transform2D(1, 0, 0, 1, 6, 10) auto_calculate_length_and_angle = false length = 12.0 @@ -904,7 +904,7 @@ editor_settings/show_bone_gizmo = false z_index = -1 use_parent_material = true position = Vector2(-14, -23) -scale = Vector2(0.999826, 0.999826) +scale = Vector2(0.999827, 0.999827) rest = Transform2D(1, 0, 0, 1, -14, -23) editor_settings/show_bone_gizmo = false @@ -916,13 +916,13 @@ metadata/_edit_lock_ = true [node name="RightLowerArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm"] position = Vector2(-2, 15) -scale = Vector2(0.999831, 0.999831) +scale = Vector2(0.999828, 0.999828) rest = Transform2D(1, 0, 0, 1, -2, 15) editor_settings/show_bone_gizmo = false [node name="RightHand" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm"] position = Vector2(-1, 13) -scale = Vector2(0.999824, 0.999824) +scale = Vector2(0.999827, 0.999827) rest = Transform2D(1, 0, 0, 1, -1, 13) auto_calculate_length_and_angle = false length = 8.0 @@ -950,7 +950,8 @@ metadata/_edit_lock_ = true [node name="Tie" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] position = Vector2(-9, -21) -skew = -0.000473261 +rotation = -0.0584133 +skew = -0.000476003 rest = Transform2D(1, 0, 0, 1, -9, -21) auto_calculate_length_and_angle = false length = 24.0 @@ -965,7 +966,7 @@ metadata/_edit_lock_ = true [node name="Head" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] position = Vector2(-10, -25) -scale = Vector2(0.999825, 0.999825) +scale = Vector2(0.999828, 0.999828) rest = Transform2D(1, 0, 0, 1, -10, -25) editor_settings/show_bone_gizmo = false @@ -987,22 +988,25 @@ offset = Vector2(-20, -24) metadata/_edit_lock_ = true [node name="Right_Eye" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head"] -position = Vector2(-16.0072, -8.007) +position = Vector2(-16, -8.00001) +scale = Vector2(1, 1) texture = SubResource("AtlasTexture_vcc72") centered = false offset = Vector2(-2, -2) metadata/_edit_lock_ = true [node name="Left_Eye" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head"] -position = Vector2(-5.00342, -9.00735) +position = Vector2(-4, -9) +scale = Vector2(1, 1) texture = SubResource("AtlasTexture_kto0i") centered = false offset = Vector2(-2, -2) metadata/_edit_lock_ = true [node name="Jaw" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head"] -position = Vector2(-3, 3) -scale = Vector2(0.999831, 0.999831) +position = Vector2(-2.68751, 2.2458) +rotation = 0.00598567 +scale = Vector2(0.99983, 0.99983) texture = SubResource("AtlasTexture_x5uj2") centered = false offset = Vector2(-12, -2) @@ -1019,7 +1023,7 @@ _observedEntity = NodePath("../../../../../../../..") [node name="Jaw" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head"] position = Vector2(-3, 3) -scale = Vector2(0.999831, 0.999831) +scale = Vector2(0.99983, 0.99983) rest = Transform2D(1, 0, 0, 1, -3, 3) auto_calculate_length_and_angle = false length = 11.0 @@ -1053,7 +1057,7 @@ remote_path = NodePath("../../HeadParticle/Head/Left_Eye") [node name="LeftUpperArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] position = Vector2(-1, -20) -scale = Vector2(0.999831, 0.999831) +scale = Vector2(0.999832, 0.999832) rest = Transform2D(1, 0, 0, 1, -1, -20) editor_settings/show_bone_gizmo = false @@ -1075,8 +1079,8 @@ minTorque = -45.0 maxTorque = 45.0 [node name="Left_Lower_Arm" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile"] -rotation = 1.5708 -scale = Vector2(1, 1) +rotation = 0.0631719 +scale = Vector2(0.999997, 0.999997) texture = SubResource("AtlasTexture_auqeq") centered = false offset = Vector2(-5, 0) @@ -1084,8 +1088,9 @@ metadata/_edit_lock_ = true [node name="Left_Hand" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm"] show_behind_parent = true -position = Vector2(-2.00154, 13.0058) -scale = Vector2(0.999663, 0.999663) +position = Vector2(-0.99983, 12.9978) +rotation = -0.123862 +scale = Vector2(0.999657, 0.999657) texture = SubResource("AtlasTexture_vlvtp") centered = false offset = Vector2(-4, -1) @@ -1101,13 +1106,13 @@ _observedEntity = NodePath("../../../../../../../..") [node name="LeftLowerArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm"] position = Vector2(-2, 14) -scale = Vector2(0.999832, 0.999832) +scale = Vector2(0.999828, 0.999828) rest = Transform2D(1, 0, 0, 1, -2, 14) editor_settings/show_bone_gizmo = false [node name="LeftHand" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm"] position = Vector2(-1, 13) -scale = Vector2(0.999833, 0.999833) +scale = Vector2(0.999826, 0.999826) rest = Transform2D(1, 0, 0, 1, -1, 13) auto_calculate_length_and_angle = false length = 6.0 @@ -1130,6 +1135,7 @@ libraries = { [node name="EatingStatistics" type="Node" parent="CanvasGroup/basic_zombie_walk/AnimationPlayer"] script = ExtResource("8_b51fx") animationName = "basic/eating" +trackToFind = "../../Eatbox" [node name="Hitbox" type="Area2D" parent="."] collision_layer = 8 @@ -1161,6 +1167,7 @@ entity = NodePath("..") [node name="Mover" type="Node" parent="."] script = ExtResource("4_u5syx") _speed = SubResource("Resource_ckb7n") +_speedControlMult = 2.03653 [node name="HitPlayer" type="Node" parent="."] script = ExtResource("12_he8da") diff --git a/scenes/entities/plants/spikeweed.tscn b/scenes/entities/plants/spikeweed.tscn index 00d2935..6375ed5 100644 --- a/scenes/entities/plants/spikeweed.tscn +++ b/scenes/entities/plants/spikeweed.tscn @@ -1,10 +1,20 @@ -[gd_scene load_steps=12 format=3 uid="uid://bdhod5c6o53ha"] +[gd_scene load_steps=15 format=3 uid="uid://bdhod5c6o53ha"] [ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_vmbvr"] +[ext_resource type="Shader" uid="uid://cgc7spjkhsx7c" path="res://assets/shaders/generic_flash.gdshader" id="2_63okc"] [ext_resource type="Texture2D" uid="uid://coafh3mjharxo" path="res://assets/sprites/atlases/plants/spikeweed.png" id="2_ffrjr"] [ext_resource type="Script" uid="uid://co7ttejdo2qot" path="res://scripts/entities/plants/AreaAttack.cs" id="3_hqtbm"] [ext_resource type="AnimationLibrary" uid="uid://cen6ku4y01dyg" path="res://assets/animations/plants/spikeweed.res" id="3_nwshn"] [ext_resource type="Script" uid="uid://dqquodxaijmem" path="res://scripts/entities/plants/behaviours/SpikeweedBehaviour.cs" id="3_uhpn7"] +[ext_resource type="Script" uid="uid://dw7v3s4kbu7ma" path="res://scripts/entities/AnimationStatistics.cs" id="5_yfuxj"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_yfuxj"] +resource_local_to_scene = true +shader = ExtResource("2_63okc") +shader_parameter/FLASH_COLOR = Color(0.78, 0.78, 0.78, 0.501961) +shader_parameter/HIGHLIGHT_COLOR = Color(0.69, 0, 0, 0.282353) +shader_parameter/selected = false +shader_parameter/blend = 0.0 [sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_jleqa"] @@ -40,16 +50,21 @@ internal_id = "spikeweed" MaxHP = 30.0 [node name="Sprite2D" parent="." index="0"] +material = SubResource("ShaderMaterial_yfuxj") texture = ExtResource("2_ffrjr") hframes = 10 vframes = 2 -frame = 6 [node name="AnimationPlayer" parent="." index="1"] libraries = { &"spikeweed": ExtResource("3_nwshn") } +[node name="DPSStatistics" type="Node" parent="AnimationPlayer" index="0"] +script = ExtResource("5_yfuxj") +animationName = "spikeweed/attack" +trackToFind = "Hitbox" + [node name="AnimationTree" parent="." index="2"] tree_root = SubResource("AnimationNodeBlendTree_63okc") parameters/TimeScale/scale = 1.0 @@ -68,5 +83,8 @@ _damage = 6 position = Vector2(0.5, 9) shape = SubResource("RectangleShape2D_1di76") +[node name="FlashController" parent="." index="5"] +shaderMaterial = SubResource("ShaderMaterial_yfuxj") + [connection signal="area_entered" from="Hitbox" to="Behaviour" method="OnHitboxEntered"] [connection signal="area_exited" from="Hitbox" to="Behaviour" method="OnHitboxExited"] diff --git a/scripts/entities/AnimationStatistics.cs b/scripts/entities/AnimationStatistics.cs new file mode 100644 index 0000000..1db029e --- /dev/null +++ b/scripts/entities/AnimationStatistics.cs @@ -0,0 +1,17 @@ +using Godot; + +public partial class AnimationStatistics : Node +{ + [Export] + private string animationName; + [Export] + private string trackToFind; + private float invokationsPerSecond; + public override void _Ready() + { + var animation = GetParent().GetAnimation(animationName); + + var track_id = animation.FindTrack(trackToFind,Animation.TrackType.Method); + invokationsPerSecond = animation.TrackGetKeyCount(track_id)/ animation.Length; + } +} diff --git a/scripts/entities/EatingStatistics.cs.uid b/scripts/entities/AnimationStatistics.cs.uid similarity index 100% rename from scripts/entities/EatingStatistics.cs.uid rename to scripts/entities/AnimationStatistics.cs.uid diff --git a/scripts/entities/EatingStatistics.cs b/scripts/entities/EatingStatistics.cs deleted file mode 100644 index 53d638c..0000000 --- a/scripts/entities/EatingStatistics.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Godot; -using System; - -public partial class EatingStatistics : Node -{ - [Export] - private string animationName; - private float bitesPerSecond; - public override void _Ready() - { - var animation = GetParent().GetAnimation(animationName); - - var track_id = animation.FindTrack("../../Eatbox",Animation.TrackType.Method); - bitesPerSecond = animation.TrackGetKeyCount(track_id)/ animation.Length; - } -} diff --git a/scripts/gui/choose_your_seeds/Previewport.cs b/scripts/gui/choose_your_seeds/Previewport.cs index aa61ca5..f1b29eb 100644 --- a/scripts/gui/choose_your_seeds/Previewport.cs +++ b/scripts/gui/choose_your_seeds/Previewport.cs @@ -48,18 +48,32 @@ public partial class Previewport : SubViewport if (current_display is Entity entity) entity.DisableBrain(); + string descriptionText; + if (resource.isDescriptionParsed == false) + { + var unparsedDescription = Tr(resource.DescriptionKey); + var keys = GetRequestedKeys(unparsedDescription); + FillPlaceholders(keys, resource, current_display); + descriptionText = ReplaceTextUsingDict(keys, unparsedDescription); - var unparsedDescription = Tr(resource.DescriptionKey); - var keys = GetRequestedKeys(unparsedDescription); - FillPlaceholders(keys, resource, current_display); - var parsedDescription = ReplaceTextUsingDict(keys, unparsedDescription); + resource.parsedDescription = descriptionText; + resource.isDescriptionParsed = true; + } + else + { + descriptionText = resource.parsedDescription; + } var rwd = Tr("rwd_" + resource.NameKey); if (rwd == "rwd_" + resource.NameKey) { rwd = ""; } + else + { + rwd += "\n"; + } - description.Text = rwd + "\n" + parsedDescription; + description.Text = rwd + descriptionText; } private Dictionary GetRequestedKeys(string text) @@ -91,7 +105,7 @@ public partial class Previewport : SubViewport var lookedObject = searchList[0]; searchList.RemoveAt(0); - if(lookedObject is Node lookedNode) + if (lookedObject is Node lookedNode) searchList.AddRange(lookedNode.GetChildren()); if (lookedObject is Shooter shooter) { @@ -111,17 +125,12 @@ public partial class Previewport : SubViewport foreach (var key in placeholderDictionary.Keys) { - string modifiers = ""; string request = key.Split('|')[0]; - if (key.Split('|').Length == 2) - { - modifiers = key.Split('|')[1]; - } var namePropertyPair = request.Split('.'); Variant property; if (namePropertyPair.Length == 2) { - if ((namePropertyPair[0] == "?" && lookedObject != searchScene)||(namePropertyPair[0] != "?" && lookedObject is Node node && node.Name != namePropertyPair[0])) + if ((namePropertyPair[0] == "?" && lookedObject != searchScene) || (namePropertyPair[0] != "?" && lookedObject is Node node && node.Name != namePropertyPair[0])) { continue; } @@ -138,33 +147,54 @@ public partial class Previewport : SubViewport float value = property.As(); - if (modifiers != "") - { - foreach (var c in modifiers) - { - switch (c) - { - case '%': - value *= 100; - break; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - value *= c - '0'; - break; - } - } - } - placeholderDictionary[key] = value; } + + + } + + // Apply any modifiers + foreach (var key in placeholderDictionary.Keys) + { + if (key.Split('|').Length < 2) continue; + string[] modifiers = key.Split('|')[1..]; + + float value = placeholderDictionary[key]; + + foreach (var mod in modifiers) + { + if (mod != "") + { + switch (mod[0]) + { + case '%': + value *= 100; + break; + case '*': + if (placeholderDictionary.ContainsKey(mod[1..])) + { + value *= placeholderDictionary[mod[1..]]; + } + else if (float.TryParse(mod[1..], out float result)) + { + value *= result; + } + break; + case '/': + if (placeholderDictionary.ContainsKey(mod[1..])) + { + value /= placeholderDictionary[mod[1..]]; + } + else if (float.TryParse(mod[1..], out float result)) + { + value /= result; + } + break; + } + } + } + + placeholderDictionary[key] = value; } } private string ReplaceTextUsingDict(Dictionary dictionary, string text) diff --git a/scripts/resources/entities/EntityResource.cs b/scripts/resources/entities/EntityResource.cs index bbd654d..c84ec52 100644 --- a/scripts/resources/entities/EntityResource.cs +++ b/scripts/resources/entities/EntityResource.cs @@ -13,4 +13,6 @@ public partial class EntityResource : Resource [Export] public CustomSeedpacketFrame CustomFrame; [Export] public int Order = 0; public string internal_id; + public string parsedDescription; + public bool isDescriptionParsed; } diff --git a/translations/plants.csv b/translations/plants.csv index 8726b69..df4a846 100644 --- a/translations/plants.csv +++ b/translations/plants.csv @@ -40,9 +40,11 @@ Slow percentage: [color=STEEL_BLUE]{Multiplier|%}%[/color].","Очки здор spikeweed,Spikeweed,Колючка spikeweed_desc,"Health points: [color=DARK_RED]{MaxHP}[/color]. Reload time: [color=DARK_RED]{ReloadTime} seconds[/color]. -Damage per second: [color=DARK_RED]{_damage}[/color].","Очки здоровья: [color=DARK_RED]{MaxHP}[/color]. +Damage per second: [color=DARK_RED]{_damage|*invokationsPerSecond}[/color]. +[color=transparent]{invokationsPerSecond}[/color].","Очки здоровья: [color=DARK_RED]{MaxHP}[/color]. Время перезарядки: [color=DARK_RED]{ReloadTime} секунд[/color]. -Урон в секунду: [color=DARK_RED]{_damage}[/color]." +Урон в секунду: [color=DARK_RED]{_damage|*invokationsPerSecond}[/color]. +[color=transparent]{invokationsPerSecond}[/color]." sunflower,Sunflower,Подсолнух sunflower_desc,"Health points: [color=DARK_RED]{MaxHP}[/color] Reload time: [color=DARK_RED]{ReloadTime} seconds[/color]. diff --git a/translations/plants.en.translation b/translations/plants.en.translation index 0fc6e6473a8345799e2a626099243b9ebf6d8dda..5fbc5433ac7c70ea064342829c975456e248b688 100644 GIT binary patch delta 244 zcmbOy`ABlZJx0dwlkYS73;tzcVEDzrz@W&;z|b?N@w3Ndd!}$nMm7e9b3oDCKn#=s zV;=7E<)0_7XR>F!Hu*i1I+F&+WC><9q4Pkc>_8OUMiv_u`x-6&T(*DN=j6Hm1xWu3 zzAi8EpRqRjXsMXizt}v(f6*X@?O`b{oAQAFjIq_|iZ@$xgtPDiO$Ip%WOGn(kTU=* Cay=FR delta 185 zcmaDPIZtxKJx0cDlkYS73+`cIVEDzrz@W&;z|b?N@iY5md!}&71FQ@T=YXQOffy(O z#ys5R%QsD4&t%Uyb@F>Ab*AU+lO>qdg!N%@>%jv3b^LW#*OTXD60q=I0d$q!tCI zCgO}mTSlf+9FyNO`U%OiGcc@Xgy5bzjh~NmP4;IBlf2Erz+eCr24NrqV;=7E z*mtpavH-jC<_pZ%*e3V$a&7*}Wx>wN0CXMLjG*8k FX8@d?DS7|^ diff --git a/translations/zombies.csv b/translations/zombies.csv index a5e85c7..ee7be48 100644 --- a/translations/zombies.csv +++ b/translations/zombies.csv @@ -3,35 +3,35 @@ basic,Basic zombie,Обычный зомби basic_desc,"The most basic zombie that Zomboss has. Health points: [color=darkred]{MaxHP}[/color]. Walk speed: [color=darkred]{Speed} tiles/second[/color]. -Attack speed: [color=darkred]{bitesPerSecond} Hz[/color]. +Attack speed: [color=darkred]{invokationsPerSecond} Hz[/color]. Attack damage: [color=darkred]{Damage}[/color]. ","Самый обычный зомби, который есть у Зомбосса. Очки здоровья: [color=darkred]{MaxHP}[/color]. Скорость ходьбы: [color=darkred]{Speed} клеток/сек[/color]. -Скорость атаки: [color=darkred]{bitesPerSecond} Гц[/color]. +Скорость атаки: [color=darkred]{invokationsPerSecond} Гц[/color]. Урон от атаки: [color=darkred]{Damage}[/color]." buckethead,Buckethead,Ведроголовый buckethead_desc,"Wears metal to protect his remaining brains. Equivalent of ~7 zombies. Health points: [color=darkred]{?.MaxHP}[/color]. Armor points: [color=darkred]{Armor.MaxHP}[/color]. Walk speed: [color=darkred]{Speed} tiles/second[/color]. -Attack speed: [color=darkred]{bitesPerSecond} Hz[/color]. +Attack speed: [color=darkred]{invokationsPerSecond} Hz[/color]. Attack damage: [color=darkred]{Damage}[/color]. ","Носит ведро чтобы защитить остатки мозгов. Равен примерно 7 зомби. Очки здоровья: [color=darkred]{?.MaxHP}[/color]. Очки брони: [color=darkred]{Armor.MaxHP}[/color]. Скорость ходьбы: [color=darkred]{Speed} клеток/сек[/color]. -Скорость атаки: [color=darkred]{bitesPerSecond} Гц[/color]. +Скорость атаки: [color=darkred]{invokationsPerSecond} Гц[/color]. Урон от атаки: [color=darkred]{Damage}[/color]." conehead,Conehead,Конусоголовый conehead_desc,"Armoured version of basic zombie. Equivalent of ~3 zombies. Health points: [color=darkred]{?.MaxHP}[/color]. Armor points: [color=darkred]{Armor.MaxHP}[/color]. Walk speed: [color=darkred]{Speed} tiles/second[/color]. -Attack speed: [color=darkred]{bitesPerSecond} Hz[/color]. +Attack speed: [color=darkred]{invokationsPerSecond} Hz[/color]. Attack damage: [color=darkred]{Damage}[/color]. ","Бронированная версия базового зомби. Равен примерно трём зомби. Очки здоровья: [color=darkred]{?.MaxHP}[/color]. Очки брони: [color=darkred]{Armor.MaxHP}[/color]. Скорость ходьбы: [color=darkred]{Speed} клеток/сек[/color]. -Скорость атаки: [color=darkred]{bitesPerSecond} Гц[/color]. +Скорость атаки: [color=darkred]{invokationsPerSecond} Гц[/color]. Урон от атаки: [color=darkred]{Damage}[/color]." hobo,Trash can zombie,Зомби в мусорке hobo_desc,"Some time in the past he met a great conqueror. Hates to live without his can. Equivalent of ~8 zombies. @@ -39,15 +39,15 @@ hobo_desc,"Some time in the past he met a great conqueror. Hates to live without Health points: [color=darkred]{?.MaxHP}[/color]. Armor points: [color=darkred]{CanArmor.MaxHP}[/color]. Walk speed: [color=darkred]{Speed} tiles/second[/color]. -Run speed: [color=darkred]{Speed|3} tiles/second[/color]. -Attack speed when calm: [color=darkred]{bitesPerSecond} Hz[/color]. -Attack speed when enraged: [color=darkred]{bitesPerSecond|3} Hz[/color]. +Run speed: [color=darkred]{Speed|*3} tiles/second[/color]. +Attack speed when calm: [color=darkred]{invokationsPerSecond} Hz[/color]. +Attack speed when enraged: [color=darkred]{invokationsPerSecond|*3} Hz[/color]. Attack damage: [color=darkred]{Damage}[/color]. ","Однажды повстречал великого полководца. Ненавидит жить без своего ведра. Равен примерно 8 зомби. [color=darkgreen]Имеет иммунитет к эффекту чеснока. [/color] Очки здоровья: [color=darkred]{?.MaxHP}[/color]. Очки брони: [color=darkred]{CanArmor.MaxHP}[/color]. Скорость ходьбы: [color=darkred]{Speed} клеток/сек[/color]. -Скорость бега: [color=darkred]{Speed|3} клеток/сек[/color]. -Скорость атаки в покое: [color=darkred]{bitesPerSecond} Гц[/color]. -Скорость атаки в гневе: [color=darkred]{bitesPerSecond|3} Гц[/color]. +Скорость бега: [color=darkred]{Speed|*3} клеток/сек[/color]. +Скорость атаки в покое: [color=darkred]{invokationsPerSecond} Гц[/color]. +Скорость атаки в гневе: [color=darkred]{invokationsPerSecond|*3} Гц[/color]. Урон от атаки: [color=darkred]{Damage}[/color]. " diff --git a/translations/zombies.en.translation b/translations/zombies.en.translation index 6d939d6cffb7cd1a3a95ff22148034e91d889299..fce99dbfea556532b305e1e5b12304da2be90901 100644 GIT binary patch delta 240 zcmdnSe~Ev?JVwTx$@3ZY1^+WJFqkqjFhm2flGWeSCX??oiicV=F)$bcMFM~rh`_k@ zO3timW(I~oK!FgTJP?7!uSev5-~qB<05L02Zf#4Y;TIsA8;aS0v^)@(PxfY7&cUC{ z_AmRKJlA9c7LUoc%pc$an+;eD7~wpiwCCnEtd@){%r#oZlMPsg0FoXiJlGWeST9fZHiia99F)-)=MZAC*h`_k@ zO3thtW(I~2Kmj+PJP?7!uSev5-~qB91Mz<#UfWV>_#Q}eLopkWmIvaP$=*!MnWOa0 zHveL>U<5O)SPa07$yO|$n|HHXGBPvO7*Dohm7XljE(KCC*_7ReA4vZTkp35ZU0&ip TNWPlYo`)T1Ajn}s!9mUdUeYbV diff --git a/translations/zombies.ru.translation b/translations/zombies.ru.translation index 376f7e36b3ba71c88c6305f4b907203dbea24368..1b3e2e05776671b71fed2d174fd38a49727cefbd 100644 GIT binary patch delta 238 zcmaDW+AFqUEhA&ZXi@YwOEhD4bIS^)oieHb&{U8Norvnv&@Y