Fix restorative

This commit is contained in:
2026-02-12 23:28:51 -08:00
parent 9615e1e251
commit 68b1455c53
8 changed files with 34 additions and 27 deletions

View File

@@ -1,7 +1,9 @@
using Chickensoft.AutoInject;
using Chickensoft.Introspection;
using Godot;
using System.Linq;
using Zennysoft.Game.Abstractions;
using Zennysoft.Ma.Adapter;
namespace Zennysoft.Game.Ma;
@@ -10,7 +12,10 @@ public partial class Restorative : Node3D, IHealthPack
{
public override void _Notification(int what) => this.Notify(what);
[Dependency] protected IPlayer _player => this.DependOn(() => GetParent().GetChildren().OfType<IPlayer>().Single());
[Node] public Area3D Pickup { get; set; } = default!;
public double RestoreAmount => 4;
[Export]
public int RestoreAmount { get; set; } = 4;
}

View File

@@ -1,20 +1,22 @@
[gd_scene load_steps=3 format=3 uid="uid://dofju2wfj12y4"]
[gd_scene load_steps=4 format=3 uid="uid://dofju2wfj12y4"]
[ext_resource type="Script" uid="uid://qjvotbwutcb5" path="res://src/items/restorative/Restorative.cs" id="1_3beyl"]
[ext_resource type="Texture2D" uid="uid://d07kcaqe682l1" path="res://src/items/ammo/textures/AirGeo.png" id="2_6y0d4"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_o8f22"]
radius = 0.13613
radius = 0.120977
height = 1.09613
[node name="Restorative" type="Node3D"]
script = ExtResource("1_3beyl")
[node name="Sprite3D" type="Sprite3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.363669, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.205191, 0)
pixel_size = 0.025
billboard = 2
texture_filter = 0
render_priority = 100
texture = ExtResource("2_6y0d4")
[node name="Pickup" type="Area3D" parent="."]
unique_name_in_owner = true
@@ -22,5 +24,5 @@ collision_layer = 4
collision_mask = 0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Pickup"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.348749, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.190116, 0)
shape = SubResource("CapsuleShape3D_o8f22")