diff --git a/Resources/Items/IcicleRepeater.tres b/Resources/Items/IcicleRepeater.tres new file mode 100644 index 00000000..0c51d894 --- /dev/null +++ b/Resources/Items/IcicleRepeater.tres @@ -0,0 +1,21 @@ +[gd_resource type="Resource" script_class="LootItem" load_steps=4 format=3 uid="uid://bgcgeg187vg1h"] + +[ext_resource type="Texture2D" uid="uid://bxe747rnr5xt7" path="res://Sprites/Items/Ice_Repeater.png" id="2_3abss"] +[ext_resource type="Resource" uid="uid://yuc0v7gojgep" path="res://Resources/Weapons/IcicleRepeater.tres" id="3_5vsuk"] +[ext_resource type="Script" uid="uid://epnwjptvks3t" path="res://Scripts/Resources/LootItem.cs" id="4_k6in2"] + +[resource] +script = ExtResource("4_k6in2") +ItemName = "Icicle Repeater" +ItemDescription = "Fast shooting weapon" +ItemKey = "IcicleRepeater" +Item = 9 +WeaponData = ExtResource("3_5vsuk") +Amount = 1 +Max = 1 +PickupIfMaxed = false +ConsumeOnUse = false +UiType = 1 +Selectable = true +InventorySprite = ExtResource("2_3abss") +DropScenePath = &"res://Scenes/Items/Icicle_Repeater.tscn" diff --git a/Resources/Weapons/IcicleGun.tres b/Resources/Weapons/IcicleGun.tres index 6a259b59..cccd8cc3 100644 --- a/Resources/Weapons/IcicleGun.tres +++ b/Resources/Weapons/IcicleGun.tres @@ -7,9 +7,9 @@ script = ExtResource("2_m8dps") Name = "Icicle Gun" BulletData = ExtResource("1_85ef1") -RateOfFire = 0.1 +RateOfFire = 0.2 BulletCapacity = 4 -ReloadTime = 0.2 +ReloadTime = 0.6 AutoReload = true InfiniteAmmo = true BulletsPerShot = 1 diff --git a/Resources/Weapons/IcicleRepeater.tres b/Resources/Weapons/IcicleRepeater.tres index db9c1c00..1d6a0a49 100644 --- a/Resources/Weapons/IcicleRepeater.tres +++ b/Resources/Weapons/IcicleRepeater.tres @@ -8,13 +8,13 @@ script = ExtResource("2_f4135") Name = "Icicle Gun" BulletData = ExtResource("1_lg8jo") RateOfFire = 0.1 -BulletCapacity = 100 -ReloadTime = 0.4 +BulletCapacity = 8 +ReloadTime = 0.5 AutoReload = true -InfiniteAmmo = true +InfiniteAmmo = false BulletsPerShot = 1 SpreadAngle = 0.0 RandomSpread = 0.0 ItemKey = "IcicleRepeater" -AmmoKey = "" +AmmoKey = "Ammo1" _rotationOffset = 0.0 diff --git a/Scenes/Items/Icicle_Repeater.tscn b/Scenes/Items/Icicle_Repeater.tscn new file mode 100644 index 00000000..35a82584 --- /dev/null +++ b/Scenes/Items/Icicle_Repeater.tscn @@ -0,0 +1,19 @@ +[gd_scene load_steps=5 format=3 uid="uid://cnhgvn2salyxl"] + +[ext_resource type="Script" uid="uid://b3h7b30kerf60" path="res://Scripts/Interactables/ItemPickup.cs" id="1_qo3uh"] +[ext_resource type="Resource" uid="uid://bgcgeg187vg1h" path="res://Resources/Items/IcicleRepeater.tres" id="2_qo3uh"] +[ext_resource type="Texture2D" uid="uid://bxe747rnr5xt7" path="res://Sprites/Items/Ice_Repeater.png" id="3_sb7le"] + +[sub_resource type="CircleShape2D" id="CircleShape2D_jtwy2"] + +[node name="IcicleRepeater" type="Area2D" groups=["Interactable"]] +collision_layer = 4 +collision_mask = 2 +script = ExtResource("1_qo3uh") +LootTable = [ExtResource("2_qo3uh")] + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = ExtResource("3_sb7le") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("CircleShape2D_jtwy2") diff --git a/Scenes/test.tscn b/Scenes/test.tscn index 1c9f97b5..11a22a95 100644 --- a/Scenes/test.tscn +++ b/Scenes/test.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=112 format=4 uid="uid://bv451a8wgty4u"] +[gd_scene load_steps=113 format=4 uid="uid://bv451a8wgty4u"] [ext_resource type="Script" uid="uid://doxmbokehw8ci" path="res://Scripts/GameManager.cs" id="1_8tmoj"] [ext_resource type="PackedScene" uid="uid://c4pr2707hbeph" path="res://Scenes/Actors/fsm_player.tscn" id="2_ksslq"] @@ -48,6 +48,7 @@ [ext_resource type="PackedScene" uid="uid://clh3333ycrk3x" path="res://Scenes/Items/Shield_Pickup.tscn" id="31_5ews6"] [ext_resource type="PackedScene" uid="uid://doqmmuuuprl3s" path="res://Scenes/Interactable/Computer.tscn" id="31_243ec"] [ext_resource type="PackedScene" uid="uid://cwtw1l6y54roe" path="res://Scenes/Activable/DialogueStarter.tscn" id="32_68v02"] +[ext_resource type="PackedScene" uid="uid://cnhgvn2salyxl" path="res://Scenes/Items/Icicle_Repeater.tscn" id="32_xof4a"] [ext_resource type="PackedScene" uid="uid://cmr6fclttrpkb" path="res://Scenes/Items/Ammo1.tscn" id="34_17pjh"] [ext_resource type="PackedScene" uid="uid://byjq8xpx4crfd" path="res://Scenes/Interactable/control_pad_blue_keycard.tscn" id="35_gdbcj"] [ext_resource type="PackedScene" uid="uid://d0yes7huiyisw" path="res://Scenes/Items/Blue_Keycard.tscn" id="35_rblsn"] @@ -193,7 +194,7 @@ ActivationType = 0 Targets = Array[NodePath]([NodePath("../Rumia")]) WaitForCompletion = true -[sub_resource type="Resource" id="Resource_pqe7f"] +[sub_resource type="Resource" id="Resource_ati1v"] resource_local_to_scene = true script = ExtResource("49_0si7g") Target = NodePath(".") @@ -406,6 +407,9 @@ position = Vector2(-751, -412) [node name="ShieldPickup" parent="Factory Tilemaps/Debug Room" instance=ExtResource("31_5ews6")] position = Vector2(-751, -395) +[node name="IcicleRepeater" parent="Factory Tilemaps/Debug Room" instance=ExtResource("32_xof4a")] +position = Vector2(-729, -347) + [node name="Part2" type="Node2D" parent="Factory Tilemaps"] [node name="Mainframe" parent="Factory Tilemaps/Part2" instance=ExtResource("13_acrmt")] @@ -783,7 +787,7 @@ Events = Array[Object]([SubResource("Resource_068l7"), SubResource("Resource_l3n [node name="BossBattleStartScript" parent="Factory Tilemaps/LevelProps" instance=ExtResource("43_kf3qc")] position = Vector2(-1487, -396) -Events = Array[Object]([SubResource("Resource_4f4id"), SubResource("Resource_s2o7m"), SubResource("Resource_b1dht"), SubResource("Resource_xrgpy"), SubResource("Resource_pqe7f")]) +Events = Array[Object]([SubResource("Resource_4f4id"), SubResource("Resource_s2o7m"), SubResource("Resource_b1dht"), SubResource("Resource_xrgpy"), SubResource("Resource_ati1v")]) [node name="Enemy13" parent="Factory Tilemaps/LevelProps" instance=ExtResource("47_u1ve6")] position = Vector2(-1657, -788) diff --git a/Scripts/Weapon.cs b/Scripts/Weapon.cs index c5512973..183996c8 100644 --- a/Scripts/Weapon.cs +++ b/Scripts/Weapon.cs @@ -41,6 +41,12 @@ public partial class Weapon : Node2D _gameManager = this.GetGameManager(); _inventoryManager = this.GetInventoryManager(); + + // Start full + if (WeaponData != null) + { + LoadedAmmo = WeaponData.BulletCapacity; + } } public void Reload() diff --git a/Sprites/Items/Ice_Repeater.aseprite b/Sprites/Items/Ice_Repeater.aseprite new file mode 100644 index 00000000..f518104e --- /dev/null +++ b/Sprites/Items/Ice_Repeater.aseprite @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2041f13eb8111187687ea887c26541a8526e43c61e202f006d2363a6ad6fa3a5 +size 902 diff --git a/Sprites/Items/Ice_Repeater.png b/Sprites/Items/Ice_Repeater.png new file mode 100644 index 00000000..b88a39a6 --- /dev/null +++ b/Sprites/Items/Ice_Repeater.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:624dd2f9f24615b9347dbb4a8f0c72919723d95d6f5ee9d87970e72dc4c92548 +size 206 diff --git a/Sprites/Items/Ice_Repeater.png.import b/Sprites/Items/Ice_Repeater.png.import new file mode 100644 index 00000000..f901f1ca --- /dev/null +++ b/Sprites/Items/Ice_Repeater.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bxe747rnr5xt7" +path="res://.godot/imported/Ice_Repeater.png-a519c7bbe2fe7768f9927989ff738985.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/Items/Ice_Repeater.png" +dest_files=["res://.godot/imported/Ice_Repeater.png-a519c7bbe2fe7768f9927989ff738985.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1