Collaborative changes
This commit is contained in:
@@ -27,8 +27,12 @@ public partial class InventoryMenu : Control, IInventoryMenu
|
||||
|
||||
[Node] public Label ItemStats { get; set; }
|
||||
|
||||
[Node] public Label Augment { get; set; }
|
||||
|
||||
[Node] public Label ItemAugment { get; set; }
|
||||
|
||||
[Node] public Label ItemAugmentTitle { get; set; }
|
||||
|
||||
[Node] public TextureRect ItemAugmentTexture { get; set; }
|
||||
|
||||
[Node] public ActionPanel ActionPanel { get; set; }
|
||||
@@ -149,7 +153,9 @@ public partial class InventoryMenu : Control, IInventoryMenu
|
||||
ItemStats.Text = selectedItem.Item.Value.StatDescription;
|
||||
ItemStats.Visible = !string.IsNullOrEmpty(ItemStats.Text);
|
||||
ItemAugmentTexture.Texture = null;
|
||||
Augment.Text = GetAugmentSubtitle(selectedItem.Item.Value);
|
||||
ItemAugment.Text = GetAugmentText(selectedItem.Item.Value);
|
||||
ItemAugmentTitle.Text = GetAugmentTitleText(selectedItem.Item.Value);
|
||||
}
|
||||
|
||||
private void ResetInventoryState()
|
||||
@@ -178,7 +184,7 @@ public partial class InventoryMenu : Control, IInventoryMenu
|
||||
ItemActionResultContainer.Show();
|
||||
ItemActionResultContainer.GrabFocus();
|
||||
ItemActionResultLabel.Text = obj;
|
||||
await ToSignal(GetTree().CreateTimer(2f), "timeout");
|
||||
await ToSignal(GetTree().CreateTimer(1f), "timeout");
|
||||
ItemActionResultContainer.Hide();
|
||||
ItemActionResultLabel.Text = string.Empty;
|
||||
_blocking = false;
|
||||
@@ -240,6 +246,56 @@ public partial class InventoryMenu : Control, IInventoryMenu
|
||||
}
|
||||
|
||||
private string GetAugmentText(IBaseInventoryItem item)
|
||||
{
|
||||
if (item is IAugmentableItem augmentable && augmentable.Augment != null)
|
||||
{
|
||||
ItemAugmentTexture.Texture = augmentable.Augment.AugmentTexture;
|
||||
return $"{augmentable.Augment.AugmentDescription}";
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
private string GetAugmentSubtitle(IBaseInventoryItem item)
|
||||
{
|
||||
if (item is IAugmentableItem augmentable && augmentable.Augment != null)
|
||||
{
|
||||
return $"Augment";
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
private string GetAugmentTitleText(IBaseInventoryItem item)
|
||||
{
|
||||
if (item is IAugmentableItem augmentable && augmentable.Augment != null)
|
||||
return $"{augmentable.Augment.AugmentName}";
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
private string GetAugmentText(Weapon item)
|
||||
{
|
||||
if (item is IAugmentableItem augmentable && augmentable.Augment != null)
|
||||
{
|
||||
ItemAugmentTexture.Texture = augmentable.Augment.AugmentTexture;
|
||||
return $"{augmentable.Augment.AugmentName}{System.Environment.NewLine}{augmentable.Augment.AugmentDescription}";
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
private string GetAugmentText(Armor item)
|
||||
{
|
||||
if (item is IAugmentableItem augmentable && augmentable.Augment != null)
|
||||
{
|
||||
ItemAugmentTexture.Texture = augmentable.Augment.AugmentTexture;
|
||||
return $"{augmentable.Augment.AugmentName}{System.Environment.NewLine}{augmentable.Augment.AugmentDescription}";
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
private string GetAugmentText(Accessory item)
|
||||
{
|
||||
if (item is IAugmentableItem augmentable && augmentable.Augment != null)
|
||||
{
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://c005nd0m2eim"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cglxk7v8hpesn" path="res://src/ui/inventory_menu/ItemSlot.cs" id="1_yttxt"]
|
||||
[ext_resource type="Texture2D" uid="uid://c4m6m3pv8704k" path="res://src/items/weapons/textures/kubel.png" id="3_t6dim"]
|
||||
[ext_resource type="Texture2D" uid="uid://c4m6m3pv8704k" path="res://src/items/weapons/textures/KUBEL.PNG" id="3_t6dim"]
|
||||
[ext_resource type="StyleBox" uid="uid://bxuy4tnftibfq" path="res://src/options/SelectedOptionsBox.tres" id="4_lt1pw"]
|
||||
[ext_resource type="StyleBox" uid="uid://bl15q835s4ene" path="res://src/options/UnselectedOptionsBox.tres" id="4_rf22b"]
|
||||
[ext_resource type="FontFile" uid="uid://0syyay37admf" path="res://src/ui/fonts/georgiab.ttf" id="4_t6dim"]
|
||||
@@ -35,6 +35,7 @@ vertical_alignment = 1
|
||||
|
||||
[node name="ItemTexture" type="TextureRect" parent="ItemInfo"]
|
||||
unique_name_in_owner = true
|
||||
texture_filter = 2
|
||||
custom_minimum_size = Vector2(50, 50)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("3_t6dim")
|
||||
@@ -69,7 +70,8 @@ text = "Cross Sword"
|
||||
|
||||
[node name="AugmentTexture" type="TextureRect" parent="ItemInfo/Control"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(50, 50)
|
||||
texture_filter = 2
|
||||
custom_minimum_size = Vector2(30, 30)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user