Storage Component (toolboxes, backpacks, etc) (#57)
* Fix Finish and update submodule Comments code, changes network messages FIXES THE USE INTERACTION SO YOU CAN ACTUALLY ACTIVATE THINGS NOW Need engine commits We'll figure out what to do about this shit later eh mates? Maybe have a script in the build process that automatically moves them over to godot/scenes Changes some prototypes and fixes stuff Fixes some more bugs, makes storage values show up properly Part 3 Part 2 Storage Take 1 * Doneso
This commit is contained in:
committed by
Pieter-Jan Briers
parent
74193d1182
commit
ea05c593aa
@@ -4,6 +4,7 @@
|
||||
components:
|
||||
- type: Transform
|
||||
- type: Item
|
||||
Size: 5
|
||||
- type: Clickable
|
||||
- type: BoundingBox
|
||||
- type: Physics
|
||||
@@ -18,6 +19,10 @@
|
||||
sprite: Items/toolbox_r.png
|
||||
- type: Icon
|
||||
icon: Items/toolbox_r.png
|
||||
- type: Storage
|
||||
Capacity: 60
|
||||
- type: Item
|
||||
Size: 9999
|
||||
|
||||
- type: entity
|
||||
name: "Mechanical Toolbox With Handle"
|
||||
@@ -28,6 +33,10 @@
|
||||
sprite: Items/toolbox_b.png
|
||||
- type: Icon
|
||||
icon: Items/toolbox_b.png
|
||||
- type: Storage
|
||||
Capacity: 60
|
||||
- type: Item
|
||||
Size: 9999
|
||||
|
||||
- type: entity
|
||||
name: "Electrical Toolbox With Handle"
|
||||
@@ -38,6 +47,10 @@
|
||||
sprite: Items/toolbox_y.png
|
||||
- type: Icon
|
||||
icon: Items/toolbox_y.png
|
||||
- type: Storage
|
||||
Capacity: 60
|
||||
- type: Item
|
||||
Size: 9999
|
||||
|
||||
- type: entity
|
||||
name: "Extra-Grip™ Mop"
|
||||
@@ -48,6 +61,8 @@
|
||||
sprite: Items/mop.png
|
||||
- type: Icon
|
||||
icon: Items/mop.png
|
||||
- type: Item
|
||||
Size: 10
|
||||
|
||||
#handheld lights
|
||||
- type: entity
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
- type: Icon
|
||||
icon: Objects/gun.png
|
||||
- type: HitscanWeapon
|
||||
- type: Item
|
||||
Size: 24
|
||||
|
||||
- type: entity
|
||||
name: GUN
|
||||
@@ -19,3 +21,6 @@
|
||||
- type: Icon
|
||||
icon: Objects/projectileweapon.png
|
||||
- type: ProjectileWeapon
|
||||
- type: Item
|
||||
Size: 24
|
||||
|
||||
207
Resources/Scenes/Storage/Storage.tscn
Normal file
207
Resources/Scenes/Storage/Storage.tscn
Normal file
@@ -0,0 +1,207 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://Scenes/SS14Window/closewindow.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=1]
|
||||
|
||||
content_margin_left = -1.0
|
||||
content_margin_right = -1.0
|
||||
content_margin_top = -1.0
|
||||
content_margin_bottom = -1.0
|
||||
bg_color = Color( 0.234375, 0.234375, 0.234375, 1 )
|
||||
draw_center = true
|
||||
border_width_left = 0
|
||||
border_width_top = 0
|
||||
border_width_right = 0
|
||||
border_width_bottom = 0
|
||||
border_color = Color( 0.8, 0.8, 0.8, 1 )
|
||||
border_blend = false
|
||||
corner_radius_top_left = 0
|
||||
corner_radius_top_right = 0
|
||||
corner_radius_bottom_right = 0
|
||||
corner_radius_bottom_left = 0
|
||||
corner_detail = 8
|
||||
expand_margin_left = 0.0
|
||||
expand_margin_right = 0.0
|
||||
expand_margin_top = 0.0
|
||||
expand_margin_bottom = 0.0
|
||||
shadow_color = Color( 0, 0, 0, 0.6 )
|
||||
shadow_size = 0
|
||||
anti_aliasing = true
|
||||
anti_aliasing_size = 1
|
||||
|
||||
[node name="SS14Window" type="Panel" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 100.0
|
||||
margin_top = 38.0
|
||||
margin_right = 361.0
|
||||
margin_bottom = 406.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
|
||||
[node name="Contents" type="Container" parent="." index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = 10.0
|
||||
margin_top = 40.0
|
||||
margin_right = -10.0
|
||||
margin_bottom = -12.0
|
||||
rect_min_size = Vector2( 50, 50 )
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
_sections_unfolded = [ "Anchor", "Margin", "Mouse", "Rect" ]
|
||||
|
||||
[node name="VSplitContainer" type="VSplitContainer" parent="Contents" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 1
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
split_offset = 0
|
||||
collapsed = false
|
||||
dragger_visibility = 0
|
||||
_sections_unfolded = [ "Anchor", "Grow Direction", "Hint", "Margin", "Rect" ]
|
||||
|
||||
[node name="Information" type="Label" parent="Contents/VSplitContainer" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 241.0
|
||||
margin_bottom = 14.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 4
|
||||
text = "Items: 0 Volume: 0/0 Stuff"
|
||||
align = 1
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
_sections_unfolded = [ "Anchor", "Margin" ]
|
||||
|
||||
[node name="ListScrollContainer" type="ScrollContainer" parent="Contents/VSplitContainer" index="1"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_top = 26.0
|
||||
margin_right = 241.0
|
||||
margin_bottom = 316.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = true
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 1
|
||||
scroll_horizontal_enabled = true
|
||||
scroll_horizontal = 0
|
||||
scroll_vertical_enabled = true
|
||||
scroll_vertical = 0
|
||||
_sections_unfolded = [ "Anchor", "Focus", "Grow Direction", "Hint", "Margin", "Material", "Mouse", "Pause", "Rect", "Scroll", "Size Flags", "Theme", "Visibility" ]
|
||||
|
||||
[node name="EntityList" type="VBoxContainer" parent="Contents/VSplitContainer/ListScrollContainer" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 241.0
|
||||
margin_bottom = 176.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 1
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 1
|
||||
alignment = 1
|
||||
_sections_unfolded = [ "Anchor", "Focus", "Hint", "Margin", "Mouse", "Rect", "Size Flags", "Theme", "custom_constants" ]
|
||||
|
||||
[node name="Header" type="Panel" parent="." index="1"]
|
||||
|
||||
editor/display_folded = true
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 0.0
|
||||
margin_bottom = 25.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
custom_styles/panel = SubResource( 1 )
|
||||
_sections_unfolded = [ "Margin", "Mouse", "custom_styles" ]
|
||||
|
||||
[node name="Header Text" type="Label" parent="Header" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_right = -25.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 4
|
||||
text = "Storage Item"
|
||||
align = 1
|
||||
valign = 1
|
||||
clip_text = true
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
_sections_unfolded = [ "Margin", "Mouse" ]
|
||||
|
||||
[node name="CloseButton" type="TextureButton" parent="Header" index="1"]
|
||||
|
||||
anchor_left = 1.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = -25.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
texture_normal = ExtResource( 1 )
|
||||
expand = true
|
||||
stretch_mode = 5
|
||||
_sections_unfolded = [ "Margin", "Textures" ]
|
||||
|
||||
|
||||
160
Resources/Scenes/Storage/StorageEntity.tscn
Normal file
160
Resources/Scenes/Storage/StorageEntity.tscn
Normal file
@@ -0,0 +1,160 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id=1]
|
||||
|
||||
content_margin_left = -1.0
|
||||
content_margin_right = -1.0
|
||||
content_margin_top = -1.0
|
||||
content_margin_bottom = -1.0
|
||||
|
||||
[node name="StorageEntity" type="PanelContainer" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
custom_styles/panel = SubResource( 1 )
|
||||
_sections_unfolded = [ "Focus", "Hint", "Material", "Mouse", "Size Flags", "Theme", "Visibility", "custom_styles" ]
|
||||
|
||||
[node name="Button" type="Button" parent="." index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 1024.0
|
||||
margin_bottom = 600.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
flat = false
|
||||
align = 1
|
||||
_sections_unfolded = [ "Grow Direction", "Size Flags" ]
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="." index="1"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 1024.0
|
||||
margin_bottom = 600.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
alignment = 0
|
||||
_sections_unfolded = [ "Anchor", "Grow Direction", "Hint", "Margin", "Mouse", "Rect", "Size Flags", "Theme", "custom_constants" ]
|
||||
|
||||
[node name="TextureWrap" type="Control" parent="HBoxContainer" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 32.0
|
||||
margin_bottom = 600.0
|
||||
rect_min_size = Vector2( 32, 32 )
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
_sections_unfolded = [ "Mouse", "Rect" ]
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="HBoxContainer/TextureWrap" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = true
|
||||
mouse_filter = 2
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
stretch_mode = 0
|
||||
_sections_unfolded = [ "Focus", "Grow Direction", "Hint", "Margin", "Mouse", "Rect", "Size Flags", "Theme" ]
|
||||
|
||||
[node name="Name" type="Label" parent="HBoxContainer" index="1"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 36.0
|
||||
margin_top = 293.0
|
||||
margin_right = 95.0
|
||||
margin_bottom = 307.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 4
|
||||
text = "Backpack"
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
_sections_unfolded = [ "Anchor" ]
|
||||
|
||||
[node name="Control" type="Control" parent="HBoxContainer" index="2"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 99.0
|
||||
margin_right = 1024.0
|
||||
margin_bottom = 600.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 1
|
||||
_sections_unfolded = [ "Mouse", "Size Flags" ]
|
||||
|
||||
[node name="Size" type="Label" parent="HBoxContainer/Control" index="0"]
|
||||
|
||||
anchor_left = 1.0
|
||||
anchor_top = 0.5
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -38.0
|
||||
margin_top = -7.0
|
||||
margin_right = -5.0
|
||||
margin_bottom = 7.0
|
||||
grow_horizontal = 0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 4
|
||||
text = "Size 6"
|
||||
align = 2
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
_sections_unfolded = [ "Margin", "Mouse" ]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user