diff --git a/project.godot b/project.godot index 673bc2e..3aaf06e 100644 --- a/project.godot +++ b/project.godot @@ -127,6 +127,7 @@ cheat_unlock_all={ [internationalization] locale/translations=PackedStringArray("res://translations/plants.en.translation", "res://translations/plants.ru.translation", "res://translations/zombies.en.translation", "res://translations/zombies.ru.translation", "res://translations/gui.en.translation", "res://translations/gui.ru.translation", "res://translations/rewards.en.translation", "res://translations/rewards.ru.translation") +locale/test="en" [layer_names] diff --git a/scenes/entities/Zombies/bucket_zombie.tscn b/scenes/entities/Zombies/bucket_zombie.tscn index d15f225..3db0b72 100644 --- a/scenes/entities/Zombies/bucket_zombie.tscn +++ b/scenes/entities/Zombies/bucket_zombie.tscn @@ -66,56 +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) [node name="RightLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg" index="1"] -scale = Vector2(0.999832, 0.999832) +scale = Vector2(0.999837, 0.999837) [node name="RightFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg" index="0"] -scale = Vector2(0.999831, 0.999831) +scale = Vector2(0.999834, 0.999834) [node name="LeftUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="2"] use_parent_material = false -scale = Vector2(0.999833, 0.999833) +scale = Vector2(0.999831, 0.999831) [node name="LeftLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg" index="1"] -scale = Vector2(0.999834, 0.999834) +scale = Vector2(0.999827, 0.999827) [node name="LeftFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg" index="1"] -scale = Vector2(0.999825, 0.999825) +scale = Vector2(0.999829, 0.999829) [node name="Body" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="3"] use_parent_material = false -scale = Vector2(0.999824, 0.999824) +scale = Vector2(0.999826, 0.999826) [node name="RightUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="0"] use_parent_material = false -scale = Vector2(0.999829, 0.999829) +scale = Vector2(0.999823, 0.999823) [node name="RightLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm" index="1"] scale = Vector2(0.999828, 0.999828) +[node name="RightHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm" index="0"] +scale = Vector2(0.99983, 0.99983) + [node name="Tie" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="2"] -rotation = 0.107886 -skew = -0.00020051 +rotation = -0.107529 +skew = -0.000208616 [node name="Head" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="3"] -scale = Vector2(0.999824, 0.999824) +scale = Vector2(0.999828, 0.999828) [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.00133, 2.99776) -rotation = 0.01047 -scale = Vector2(0.999827, 0.999827) +position = Vector2(-2.86646, 2.6777) +rotation = -0.0751099 +scale = Vector2(0.999826, 0.999826) [node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="1"] -scale = Vector2(0.999827, 0.999827) +scale = Vector2(0.999826, 0.999826) [node name="Hat" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="4"] position = Vector2(-6, -8) @@ -127,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.999829, 0.999829) +scale = Vector2(0.999827, 0.999827) [node name="Left_Lower_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile" index="0"] -rotation = 0.101436 -scale = Vector2(0.999999, 0.999999) +rotation = -0.113972 +scale = Vector2(1, 1) [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.99983, 12.9978) -rotation = -0.0447677 -scale = Vector2(0.999657, 0.999657) +position = Vector2(-0.999829, 12.9978) +rotation = -0.0939467 +scale = Vector2(0.999653, 0.999653) [node name="LeftLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm" index="2"] -scale = Vector2(0.999829, 0.999829) +scale = Vector2(0.999832, 0.999832) [node name="LeftHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm" index="0"] -scale = Vector2(0.999827, 0.999827) +scale = Vector2(0.999823, 0.999823) [node name="Left_Hand" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm/LeftHand" index="0"] texture = SubResource("AtlasTexture_wfem3") @@ -162,7 +164,7 @@ _damage = SubResource("Resource_lea3a") [node name="Mover" parent="." index="4"] _speed = SubResource("Resource_v1iwd") -_speedControlMult = 0.552086 +_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 ea04334..bb7ddf1 100644 --- a/scenes/entities/Zombies/cone_zombie.tscn +++ b/scenes/entities/Zombies/cone_zombie.tscn @@ -48,7 +48,7 @@ material = SubResource("ShaderMaterial_b8kja") scale = Vector2(0.999835, 0.999835) [node name="RightLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg" index="1"] -scale = Vector2(0.999836, 0.999836) +scale = Vector2(0.999837, 0.999837) [node name="RightFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg" index="0"] scale = Vector2(0.999835, 0.999835) @@ -60,13 +60,13 @@ scale = Vector2(0.999833, 0.999833) scale = Vector2(0.999832, 0.999832) [node name="LeftFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg" index="1"] -scale = Vector2(0.99983, 0.99983) +scale = Vector2(0.999829, 0.999829) [node name="Body" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="3"] scale = Vector2(0.999829, 0.999829) [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="RightLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm" index="1"] scale = Vector2(0.999828, 0.999828) @@ -75,21 +75,21 @@ scale = Vector2(0.999828, 0.999828) scale = Vector2(0.999827, 0.999827) [node name="Tie" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="2"] -rotation = 0.126303 +rotation = -0.043512 skew = -0.000153303 [node name="Head" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="3"] scale = Vector2(0.999828, 0.999828) [node name="Right_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="0"] -position = Vector2(-16, -8) +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) [node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="2"] -position = Vector2(-3.00155, 2.99737) -rotation = 0.0122573 +position = Vector2(-2.94596, 2.86958) +rotation = -0.0303934 scale = Vector2(0.999829, 0.999829) [node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="1"] @@ -126,12 +126,12 @@ shape = SubResource("CircleShape2D_67t4t") scale = Vector2(0.999832, 0.999832) [node name="Left_Lower_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile" index="0"] -rotation = 0.118753 +rotation = -0.0461189 scale = Vector2(1, 1) [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.0524103 +rotation = -0.0380157 scale = Vector2(0.999658, 0.999658) [node name="LeftLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm" index="2"] @@ -145,7 +145,6 @@ _damage = SubResource("Resource_011r0") [node name="Mover" parent="." index="4"] _speed = SubResource("Resource_b6mal") -_speedControlMult = 0.801687 [node name="HitPlayer" parent="." index="5"] playlist = Array[AudioStream]([ExtResource("7_0amn8"), ExtResource("7_67t4t")]) diff --git a/scenes/entities/Zombies/hobo.tscn b/scenes/entities/Zombies/hobo.tscn index ff44005..e001554 100644 --- a/scenes/entities/Zombies/hobo.tscn +++ b/scenes/entities/Zombies/hobo.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=65 format=3 uid="uid://bgqmwsb6ynm81"] +[gd_scene load_steps=66 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"] @@ -26,6 +27,7 @@ resource_local_to_scene = true shader = ExtResource("23_nc6p3") shader_parameter/FLASH_COLOR = Color(1, 0.709804, 0.439216, 0.5) +shader_parameter/HIGHLIGHT_COLOR = Color(1, 0.709804, 0.439216, 0.5) shader_parameter/blend = 0.0 shader_parameter/selected = false @@ -759,7 +761,7 @@ mult_value = 1.0 [node name="Hobo" node_paths=PackedStringArray("_armor") instance=ExtResource("1_fnu7s")] _armor = NodePath("CanArmor") MaxHP = 185.0 -_effectImmunities = [ExtResource("3_b583s")] +_effectImmunities = Array[ExtResource("2_yb81c")]([ExtResource("3_b583s")]) [node name="CanvasGroup" parent="." index="0"] material = SubResource("ShaderMaterial_vn3j1") @@ -771,16 +773,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.999826, 0.999826) +scale = Vector2(0.999834, 0.999834) [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.99983, 0.99983) +scale = Vector2(0.999833, 0.999833) [node name="RightFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg" index="0"] -scale = Vector2(0.999826, 0.999826) +scale = Vector2(0.999832, 0.999832) [node name="Right_Foot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg/RightFoot" index="0"] texture = SubResource("AtlasTexture_uoit3") @@ -789,25 +791,25 @@ texture = SubResource("AtlasTexture_uoit3") texture = SubResource("AtlasTexture_vn3j1") [node name="LeftUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="2"] -scale = Vector2(0.999828, 0.999828) +scale = Vector2(0.999829, 0.999829) [node name="Left_Upper_Leg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg" index="0"] texture = SubResource("AtlasTexture_yb81c") [node name="LeftLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg" index="1"] -scale = Vector2(0.999829, 0.999829) +scale = Vector2(0.999832, 0.999832) [node name="Left_Lower_Leg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg" index="0"] texture = SubResource("AtlasTexture_nlwsb") [node name="LeftFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg" index="1"] -scale = Vector2(0.999818, 0.999818) +scale = Vector2(0.999816, 0.999816) [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.999828, 0.999828) +scale = Vector2(0.999826, 0.999826) [node name="RightUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="0"] scale = Vector2(0.999828, 0.999828) @@ -816,7 +818,7 @@ scale = Vector2(0.999828, 0.999828) texture = SubResource("AtlasTexture_nc6p3") [node name="RightLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm" index="1"] -scale = Vector2(0.999814, 0.999814) +scale = Vector2(0.999817, 0.999817) [node name="Right_Hand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm/RightHand" index="0"] texture = SubResource("AtlasTexture_y0p2l") @@ -828,7 +830,7 @@ texture = SubResource("AtlasTexture_op0h6") texture = SubResource("AtlasTexture_0s5wm") [node name="Tie" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="2"] -rotation = 0.0564365 +rotation = 0.0254695 scale = Vector2(1e-05, 1e-05) [node name="Tie" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Tie" index="0"] @@ -873,14 +875,16 @@ 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) [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.0917904 -scale = Vector2(0.999825, 0.999825) +rotation = -0.0414244 +scale = Vector2(0.999831, 0.999831) texture = SubResource("AtlasTexture_7cvmi") offset = Vector2(-14, -2) @@ -912,7 +916,7 @@ _threshold = 0.333 _observedArmor = NodePath("../../../../../../../../../../CanArmor") [node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="1"] -scale = Vector2(0.999825, 0.999825) +scale = Vector2(0.999831, 0.999831) [node name="TrashcanLid" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="4"] position = Vector2(-0.0022974, -17.0131) @@ -927,24 +931,23 @@ 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.999826, 0.999826) +scale = Vector2(0.999823, 0.999823) [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.0509104 -scale = Vector2(1, 1) +rotation = 0.0229755 +scale = Vector2(0.999996, 0.999996) 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 = 3.72659e-09 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.99983, 0.99983) +scale = Vector2(0.999826, 0.999826) [node name="LeftHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm" index="0"] scale = Vector2(0.999822, 0.999822) @@ -956,6 +959,9 @@ libraries = { &"hobo": ExtResource("8_yb81c") } +[node name="EatingStatistics" parent="CanvasGroup/basic_zombie_walk/AnimationPlayer" index="0"] +animationName = "hobo/eating_without_arms" + [node name="Eatbox" parent="." index="2"] _damage = SubResource("Resource_n380g") @@ -965,7 +971,6 @@ 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 fdb0f60..7f5a54f 100644 --- a/scenes/entities/Zombies/zombie.tscn +++ b/scenes/entities/Zombies/zombie.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=60 format=3 uid="uid://co11v3w8hbwgf"] +[gd_scene load_steps=61 format=3 uid="uid://co11v3w8hbwgf"] [ext_resource type="Script" uid="uid://dildme6epx8l4" path="res://scripts/entities/zombies/RuntimeZombieData.cs" id="1_qq3f1"] [ext_resource type="Material" uid="uid://jr0vpg030jqv" path="res://assets/ZombieMaterial.tres" id="2_b51fx"] @@ -9,6 +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="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"] @@ -949,7 +950,6 @@ metadata/_edit_lock_ = true [node name="Tie" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] position = Vector2(-9, -21) -rotation = 0.066195 skew = -0.000473261 rest = Transform2D(1, 0, 0, 1, -9, -21) auto_calculate_length_and_angle = false @@ -987,22 +987,21 @@ 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, -8) +position = Vector2(-16.0072, -8.007) 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(-4, -9) +position = Vector2(-5.00342, -9.00735) 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.00081, 2.99862) -rotation = 0.00642401 +position = Vector2(-3, 3) scale = Vector2(0.999831, 0.999831) texture = SubResource("AtlasTexture_x5uj2") centered = false @@ -1076,7 +1075,7 @@ minTorque = -45.0 maxTorque = 45.0 [node name="Left_Lower_Arm" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile"] -rotation = 0.0622378 +rotation = 1.5708 scale = Vector2(1, 1) texture = SubResource("AtlasTexture_auqeq") centered = false @@ -1085,8 +1084,7 @@ 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(-0.99983, 12.9978) -rotation = -0.0274679 +position = Vector2(-2.00154, 13.0058) scale = Vector2(0.999663, 0.999663) texture = SubResource("AtlasTexture_vlvtp") centered = false @@ -1129,6 +1127,10 @@ libraries = { &"basic": ExtResource("9_y6afe") } +[node name="EatingStatistics" type="Node" parent="CanvasGroup/basic_zombie_walk/AnimationPlayer"] +script = ExtResource("8_b51fx") +animationName = "basic/eating" + [node name="Hitbox" type="Area2D" parent="."] collision_layer = 8 collision_mask = 0 diff --git a/scripts/entities/EatingStatistics.cs b/scripts/entities/EatingStatistics.cs new file mode 100644 index 0000000..53d638c --- /dev/null +++ b/scripts/entities/EatingStatistics.cs @@ -0,0 +1,16 @@ +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/entities/EatingStatistics.cs.uid b/scripts/entities/EatingStatistics.cs.uid new file mode 100644 index 0000000..35b26bf --- /dev/null +++ b/scripts/entities/EatingStatistics.cs.uid @@ -0,0 +1 @@ +uid://dw7v3s4kbu7ma diff --git a/scripts/gui/choose_your_seeds/Previewport.cs b/scripts/gui/choose_your_seeds/Previewport.cs index fe83db1..aa61ca5 100644 --- a/scripts/gui/choose_your_seeds/Previewport.cs +++ b/scripts/gui/choose_your_seeds/Previewport.cs @@ -53,8 +53,13 @@ public partial class Previewport : SubViewport var keys = GetRequestedKeys(unparsedDescription); FillPlaceholders(keys, resource, current_display); var parsedDescription = ReplaceTextUsingDict(keys, unparsedDescription); + var rwd = Tr("rwd_" + resource.NameKey); + if (rwd == "rwd_" + resource.NameKey) + { + rwd = ""; + } - description.Text = Tr("rwd_" + resource.NameKey) + "\n" + parsedDescription; + description.Text = rwd + "\n" + parsedDescription; } private Dictionary GetRequestedKeys(string text) @@ -105,27 +110,61 @@ public partial class Previewport : SubViewport } foreach (var key in placeholderDictionary.Keys) + { + string modifiers = ""; + string request = key.Split('|')[0]; + if (key.Split('|').Length == 2) { - var namePropertyPair = key.Split('.'); - Variant property; - if (namePropertyPair.Length == 2) - { - if ((namePropertyPair[0] == "?" && lookedObject != searchScene)||(namePropertyPair[0] != "?" && lookedObject is Node node && node.Name != namePropertyPair[0])) - { - continue; - } - property = lookedObject.Get(namePropertyPair[1]); - } - else - { - property = lookedObject.Get(namePropertyPair[0]); - } - if (property.VariantType == Variant.Type.Nil) + 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])) { continue; } - placeholderDictionary[key] = property.As(); + property = lookedObject.Get(namePropertyPair[1]); } + else + { + property = lookedObject.Get(namePropertyPair[0]); + } + if (property.VariantType == Variant.Type.Nil) + { + continue; + } + + 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; + } } } private string ReplaceTextUsingDict(Dictionary dictionary, string text) diff --git a/translations/plants.csv b/translations/plants.csv index 08cb32b..8726b69 100644 --- a/translations/plants.csv +++ b/translations/plants.csv @@ -1,82 +1,82 @@ keys,en,ru aloe,Aloe,Алоэ -aloe_desc,"Health points: [color=DARK_RED]6 bites[/color] -Reload time: [color=DARK_RED]15 seconds[/color]. -Ability recharge time: [color=DARK_RED]20 seconds[/color]. -Heals plant when it has [color=DARK_RED]third[/color] of its health.","Очки здоровья: [color=dark_red]{MaxHP}[/color]. +aloe_desc,"Health points: [color=DARK_RED]{MaxHP}[/color] +Reload time: [color=DARK_RED]{ReloadTime} seconds[/color]. +Ability recharge time: [color=DARK_RED]{wait_time} seconds[/color]. +Heals plant when it has [color=DARK_RED]{_hpTreshold|%}%[/color] of its health.","Очки здоровья: [color=dark_red]{MaxHP}[/color]. Время перезарядки: [color=dark_red]{ReloadTime} секунд[/color]. Время перезарядки способности: [color=dark_red]{wait_time} секунд[/color]. -Лечит растения [color=DARK_RED] с {_hpTreshold} долей[/color] здоровья." +Лечит растения [color=DARK_RED] с {_hpTreshold|%}% [/color] здоровья." garlic,Garlic,Чеснок -garlic_desc,"Health points: [color=DARK_RED]40 bites[/color] -Reload time: [color=DARK_RED]15 seconds[/color].","Очки здоровья: [color=DARK_RED]{MaxHP}[/color] +garlic_desc,"Health points: [color=DARK_RED]{MaxHP}[/color] +Reload time: [color=DARK_RED]{ReloadTime} seconds[/color].","Очки здоровья: [color=DARK_RED]{MaxHP}[/color] Время перезарядки: [color=DARK_RED]{ReloadTime} секунд[/color]." peashooter,Peashooter,Горохострел -peashooter_desc,"Health points: [color=DARK_RED]6 bites[/color]. -Reload time: [color=DARK_RED]5 seconds[/color]. -Pea damage: [color=DARK_RED]1 pea[/color]. -Firerate: [color=DARK_RED]1.5 seconds[/color].","Очки здоровья: [color=DARK_RED]{MaxHP}[/color]. +peashooter_desc,"Health points: [color=DARK_RED]{MaxHP}[/color]. +Reload time: [color=DARK_RED]{ReloadTime} seconds[/color]. +Pea damage: [color=DARK_RED]{_damage}[/color]. +Firerate: [color=DARK_RED]{FireTimer.wait_time} seconds[/color].","Очки здоровья: [color=DARK_RED]{MaxHP}[/color]. Время перезарядки: [color=DARK_RED]{ReloadTime} секунд[/color]. Урон от гороха: [color=DARK_RED]{_damage}[/color]. Задержка стрельбы: [color=DARK_RED]{FireTimer.wait_time} секунды[/color]." potatomine,Potato mine,Картофельная мина -potatomine_desc,"Health points: [color=DARK_RED]4 bites[/color]. -Reload time: [color=DARK_RED]25 seconds[/color]. -Explosion damage: [color=DARK_RED]600 peas[/color]. -Prime time: [color=DARK_RED]15 seconds[/color].","Очки здоровья: [color=DARK_RED]{MaxHP}[/color]. -Время перезарядки: [color=DARK_RED]{ReloadTime} seconds[/color]. +potatomine_desc,"Health points: [color=DARK_RED]{MaxHP}[/color]. +Reload time: [color=DARK_RED]{ReloadTime} seconds[/color]. +Explosion damage: [color=DARK_RED]{damage}[/color]. +Prime time: [color=DARK_RED]{PrimeTimer.wait_time} seconds[/color].","Очки здоровья: [color=DARK_RED]{MaxHP}[/color]. +Время перезарядки: [color=DARK_RED]{ReloadTime} секунд[/color]. Урон от взрыва: [color=DARK_RED]{damage}[/color]. Время роста: [color=DARK_RED]{PrimeTimer.wait_time} секунд[/color]." snowpea,Snowpea,Снежный горох -snowpea_desc,"Health points: [color=DARK_RED]6 bites[/color]. -Reload time: [color=DARK_RED]5 seconds[/color]. -Pea damage: [color=DARK_RED]1 pea[/color]. -Firerate: [color=DARK_RED]1.5 seconds[/color]. -Slow percentage: [color=STEEL_BLUE]25%[/color].","Очки здоровья: [color=DARK_RED]{MaxHP}[/color]. +snowpea_desc,"Health points: [color=DARK_RED]{MaxHP}[/color]. +Reload time: [color=DARK_RED]{ReloadTime} seconds[/color]. +Pea damage: [color=DARK_RED]{_damage}[/color]. +Firerate: [color=DARK_RED]{FireTimer.wait_time} seconds[/color]. +Slow percentage: [color=STEEL_BLUE]{Multiplier|%}%[/color].","Очки здоровья: [color=DARK_RED]{MaxHP}[/color]. Время перезарядки: [color=DARK_RED]{ReloadTime} секунд[/color]. Урон от гороха: [color=DARK_RED]{_damage}[/color]. Задержка стрельбы: [color=DARK_RED]{FireTimer.wait_time} секунды[/color]. -Доля замедления: [color=STEEL_BLUE]{Multiplier}[/color]." +Процент замедления: [color=STEEL_BLUE]{Multiplier|%}%[/color]." spikeweed,Spikeweed,Колючка -spikeweed_desc,"Health points: [color=DARK_RED]6 bites[/color]. -Reload time: [color=DARK_RED]5 seconds[/color]. -Damage per second: [color=DARK_RED]0.9 peas[/color].","Очки здоровья: [color=DARK_RED]{MaxHP}[/color]. +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]. Время перезарядки: [color=DARK_RED]{ReloadTime} секунд[/color]. Урон в секунду: [color=DARK_RED]{_damage}[/color]." sunflower,Sunflower,Подсолнух -sunflower_desc,"Health points: [color=DARK_RED]6 bites[/color] -Reload time: [color=DARK_RED]5 seconds[/color]. -Initial sun production time: [color=DARK_RED]12 seconds[/color]. -Sun production time: [color=DARK_RED]24 seconds[/color](After first sun produced).","Очки здоровья: [color=DARK_RED]{MaxHP}[/color] +sunflower_desc,"Health points: [color=DARK_RED]{MaxHP}[/color] +Reload time: [color=DARK_RED]{ReloadTime} seconds[/color]. +Initial sun production time: [color=DARK_RED]{StartTimer.wait_time} seconds[/color]. +Sun production time: [color=DARK_RED]{Timer.wait_time} seconds[/color](After first sun produced).","Очки здоровья: [color=DARK_RED]{MaxHP}[/color] Время перезарядки: [color=DARK_RED]{ReloadTime} секунд[/color]. Изначальная задержка выработки солнца: [color=DARK_RED]{StartTimer.wait_time} секунд[/color]. Задержка выработки солнца: [color=DARK_RED]{Timer.wait_time} секунды[/color](После первого солнца)." threepeater,Threepeater,Тристрел -threepeater_desc,"Health points: [color=DARK_RED]6 bites[/color]. -Reload time: [color=DARK_RED]5 seconds[/color]. -Pea damage: [color=DARK_RED]1 pea[/color] ([color=DARK_RED]3 pea[/color] when in close quarters). -Firerate: [color=DARK_RED]1.6 seconds[/color].","Очки здоровья: [color=DARK_RED]{MaxHP}[/color]. +threepeater_desc,"Health points: [color=DARK_RED]{MaxHP}[/color]. +Reload time: [color=DARK_RED]{ReloadTime} seconds[/color]. +Pea damage: [color=DARK_RED]{_damage}[/color]. +Firerate: [color=DARK_RED]{FireTimer.wait_time} seconds[/color].","Очки здоровья: [color=DARK_RED]{MaxHP}[/color]. Время перезарядки: [color=DARK_RED]{ReloadTime} секунд[/color]. Урон от гороха: [color=DARK_RED]{_damage}[/color]. Задержка стрельбы: [color=DARK_RED]{FireTimer.wait_time} секунд[/color]." wallnut,Wallnut,Стенорех -wallnut_desc,"Health points: [color=DARK_RED]120 bites[/color] -Reload time: [color=DARK_RED]20 seconds[/color].","Очки здоровья: [color=DARK_RED]{MaxHP}[/color] +wallnut_desc,"Health points: [color=DARK_RED]{MaxHP}[/color] +Reload time: [color=DARK_RED]{ReloadTime} seconds[/color].","Очки здоровья: [color=DARK_RED]{MaxHP}[/color] Время перезарядки: [color=DARK_RED]{ReloadTime} секунд[/color]." nerdus,Pickly cactus,Колкий кактус nerdus_desc,"He is very critical about other’s behaviour. He likes to pay people back in kind. -Health points: [color=darkred] 400 bites[/color]. -Reload time: [color=darkred] 10 seconds[/color]. -Damage conversion: [color=darkred]1 bite = 1.6 peas [/color].","Он очень критичен к поведению других. Ему нравится отплачивать людям добром за добро. +Health points: [color=darkred] {MaxHP}[/color]. +Reload time: [color=darkred] {ReloadTime} seconds[/color]. +Damage conversion: [color=darkred]1 bite = {bitesToPeas} peas [/color].","Он очень критичен к поведению других. Ему нравится отплачивать людям добром за добро. Очки здоровья: [color=darkred] {MaxHP}[/color]. Время перезарядки: [color=darkred]{ReloadTime} секунд[/color]. Конвертация урона: [color=darkred]1 укус = {bitesToPeas} горошин [/color]." cucumber,Cucumber,Огурец cucumber_desc,"He has a little trouble with differentiating left and right, so he doesn't make this choice at all. -Health points: [color=darkred] 6 bites[/color]. -Reload time: [color=darkred] 5 seconds[/color]. -Seed damage: [color=darkred] 4 peas[/color]. -Firerate: [color=darkred] 5 seconds[/color].","Он имеет небольшие проблемы с различением левого и правого, поэтому он не думает об этом вовсе. +Health points: [color=darkred] {MaxHP}[/color]. +Reload time: [color=darkred] {ReloadTime} seconds[/color]. +Seed damage: [color=darkred] {_damage}[/color]. +Firerate: [color=darkred] {FireTimer.wait_time} seconds[/color].","Он имеет небольшие проблемы с различением левого и правого, поэтому он не думает об этом вовсе. Очки здоровья: [color=darkred] {MaxHP}[/color]. Время перезарядки: [color=darkred]{ReloadTime} секунд[/color]. Урон семечка: [color=darkred] {_damage}[/color]. diff --git a/translations/plants.en.translation b/translations/plants.en.translation index 2b07ed4..0fc6e64 100644 Binary files a/translations/plants.en.translation and b/translations/plants.en.translation differ diff --git a/translations/plants.ru.translation b/translations/plants.ru.translation index 9adc0ae..a017b32 100644 Binary files a/translations/plants.ru.translation and b/translations/plants.ru.translation differ diff --git a/translations/rewards.csv b/translations/rewards.csv index 5b21923..4e77c62 100644 --- a/translations/rewards.csv +++ b/translations/rewards.csv @@ -1,5 +1,5 @@ key,en,ru -rwd_aloe,Heals plants right in front of him that have third of hp.,"Лечит растения спереди от него, если у них треть здоровья." +rwd_aloe,Heals damaged plants in front of him.,Лечит раненые растения спереди от него. rwd_cucumber,Shoots deadly projectiles up and down.,Стреляет смертоносными снарядами вверх и вниз. rwd_garlic,Redirects zombies on another lanes.,Перенаправляет зомби на другие линии. rwd_nerdus,Returns taken damage and redirects zombies that get hit.,Возвращает полученный урон и перенаправляет зомби на другие линии. diff --git a/translations/rewards.en.translation b/translations/rewards.en.translation index dcc6bfe..2283c31 100644 Binary files a/translations/rewards.en.translation and b/translations/rewards.en.translation differ diff --git a/translations/rewards.ru.translation b/translations/rewards.ru.translation index 03ce233..214dd3f 100644 Binary files a/translations/rewards.ru.translation and b/translations/rewards.ru.translation differ diff --git a/translations/zombies.csv b/translations/zombies.csv index 244f161..a5e85c7 100644 --- a/translations/zombies.csv +++ b/translations/zombies.csv @@ -1,53 +1,53 @@ keys,en,ru basic,Basic zombie,Обычный зомби basic_desc,"The most basic zombie that Zomboss has. -Health points: [color=darkred]7 peas[/color]. -Walk speed: [color=darkred]0.2 tiles/second[/color]. -Attack speed: [color=darkred]2.67 Hz[/color]. -Attack damage: [color=darkred]1 bite[/color]. ","Самый обычный зомби, который есть у Зомбосса. +Health points: [color=darkred]{MaxHP}[/color]. +Walk speed: [color=darkred]{Speed} tiles/second[/color]. +Attack speed: [color=darkred]{bitesPerSecond} Hz[/color]. +Attack damage: [color=darkred]{Damage}[/color]. ","Самый обычный зомби, который есть у Зомбосса. Очки здоровья: [color=darkred]{MaxHP}[/color]. Скорость ходьбы: [color=darkred]{Speed} клеток/сек[/color]. -Скорость атаки: [color=darkred]2.67 Гц[/color]. +Скорость атаки: [color=darkred]{bitesPerSecond} Гц[/color]. Урон от атаки: [color=darkred]{Damage}[/color]." buckethead,Buckethead,Ведроголовый buckethead_desc,"Wears metal to protect his remaining brains. Equivalent of ~7 zombies. -Health points: [color=darkred]7 peas[/color]. -Armour points: [color=darkred]39 peas[/color]. -Walk speed: [color=darkred]0.2 tiles/second[/color]. -Attack speed: [color=darkred]2.67 Hz[/color]. -Attack damage: [color=darkred]1 bite[/color]. ","Носит ведро чтобы защитить остатки мозгов. Равен примерно 7 зомби. +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 damage: [color=darkred]{Damage}[/color]. ","Носит ведро чтобы защитить остатки мозгов. Равен примерно 7 зомби. Очки здоровья: [color=darkred]{?.MaxHP}[/color]. Очки брони: [color=darkred]{Armor.MaxHP}[/color]. Скорость ходьбы: [color=darkred]{Speed} клеток/сек[/color]. -Скорость атаки: [color=darkred]2.67 Гц[/color]. +Скорость атаки: [color=darkred]{bitesPerSecond} Гц[/color]. Урон от атаки: [color=darkred]{Damage}[/color]." conehead,Conehead,Конусоголовый conehead_desc,"Armoured version of basic zombie. Equivalent of ~3 zombies. -Health points: [color=darkred]7 peas[/color]. -Armour points: [color=darkred]13 peas[/color]. -Walk speed: [color=darkred]0.2 tiles/second[/color]. -Attack speed: [color=darkred]2.67 Hz[/color]. -Attack damage: [color=darkred]1 bite[/color]. ","Бронированная версия базового зомби. Равен примерно трём зомби. +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 damage: [color=darkred]{Damage}[/color]. ","Бронированная версия базового зомби. Равен примерно трём зомби. Очки здоровья: [color=darkred]{?.MaxHP}[/color]. Очки брони: [color=darkred]{Armor.MaxHP}[/color]. Скорость ходьбы: [color=darkred]{Speed} клеток/сек[/color]. -Скорость атаки: [color=darkred]2.67 Гц[/color]. +Скорость атаки: [color=darkred]{bitesPerSecond} Гц[/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. [color=darkgreen]He is immune to garlic-like effects. [/color] -Health points: [color=darkred]13 peas[/color]. -Armour points: [color=darkred]39 peas[/color]. -Walk speed: [color=darkred]0.2 tiles/second[/color]. -Run speed: [color=darkred]0.6 tiles/second[/color]. -Attack speed when calm: [color=darkred]1 Hz[/color]. -Attack speed when enraged: [color=darkred]8 Hz[/color]. -Attack damage: [color=darkred]1 bite[/color]. ","Однажды повстречал великого полководца. Ненавидит жить без своего ведра. Равен примерно 8 зомби. +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]. +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]0.6 клеток/сек[/color]. -Скорость атаки в покое: [color=darkred]1 Гц[/color]. -Скорость атаки в гневе: [color=darkred]8 Гц[/color]. -Урон от атаки: [color=darkred]{Damge}[/color]. " +Скорость бега: [color=darkred]{Speed|3} клеток/сек[/color]. +Скорость атаки в покое: [color=darkred]{bitesPerSecond} Гц[/color]. +Скорость атаки в гневе: [color=darkred]{bitesPerSecond|3} Гц[/color]. +Урон от атаки: [color=darkred]{Damage}[/color]. " diff --git a/translations/zombies.en.translation b/translations/zombies.en.translation index 88a3679..6d939d6 100644 Binary files a/translations/zombies.en.translation and b/translations/zombies.en.translation differ diff --git a/translations/zombies.ru.translation b/translations/zombies.ru.translation index 0efed47..376f7e3 100644 Binary files a/translations/zombies.ru.translation and b/translations/zombies.ru.translation differ