Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial attempt at a basic vending machine, located in the breakroom #322

Merged
merged 3 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
19 changes: 19 additions & 0 deletions addons/cogito/Assets/Audio/vending_machine_sfx.ogg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[remap]

importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://6thelsn58odx"
path="res://.godot/imported/vending_machine_sfx.ogg-3f07f398ea4fff5864b2a68ca3092113.oggvorbisstr"

[deps]

source_file="res://addons/cogito/Assets/Audio/vending_machine_sfx.ogg"
dest_files=["res://.godot/imported/vending_machine_sfx.ogg-3f07f398ea4fff5864b2a68ca3092113.oggvorbisstr"]

[params]

loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://s3qcosabxkgd"
path.bptc="res://.godot/imported/CogitoHealthPotion_vending_machine_sprite.png-7f92801afb8bb7f2ce1d7674dbff7483.bptc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}

[deps]

source_file="res://addons/cogito/Assets/Graphics/CogitoHealthPotion_vending_machine_sprite.png"
dest_files=["res://.godot/imported/CogitoHealthPotion_vending_machine_sprite.png-7f92801afb8bb7f2ce1d7674dbff7483.bptc.ctex"]

[params]

compress/mode=2
compress/high_quality=true
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=2
compress/channel_pack=0
mipmaps/generate=true
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=0
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ 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
detect_3d/compress_to=0
16 changes: 12 additions & 4 deletions addons/cogito/CogitoObjects/cogito_button.gd
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,11 @@ func interact(_player_interaction_component:PlayerInteractionComponent):

player_interaction_component = _player_interaction_component

if currency_check and currency_check.currency_cost != 0:
if not currency_check.check_for_currency(player_interaction_component.get_parent()):
player_interaction_component.send_hint(null, currency_check.not_enough_currency_hint)
return
# moved to press(), as currency should only be charged when press is valid
#if currency_check and currency_check.currency_cost != 0:
#if not currency_check.check_for_currency(player_interaction_component.get_parent()):
#player_interaction_component.send_hint(null, currency_check.not_enough_currency_hint)
#return

if !allows_repeated_interaction and has_been_used:
player_interaction_component.send_hint(null, has_been_used_hint)
Expand All @@ -85,6 +86,13 @@ func interact(_player_interaction_component:PlayerInteractionComponent):


func press():
# only run the currency check once the press is validated and triggered
# otherwise you can charge for a transaction and still not press the button
if currency_check and currency_check.currency_cost != 0:
if not currency_check.check_for_currency(player_interaction_component.get_parent()):
player_interaction_component.send_hint(null, currency_check.not_enough_currency_hint)
return

pressed.emit()
Audio.play_sound_3d(press_sound).global_position = global_position

Expand Down
103 changes: 103 additions & 0 deletions addons/cogito/CogitoObjects/cogito_vendor.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
extends Node3D

##How much stock the vendor starts with
@export var starting_amount : int = 3
@export var object_to_spawn : PackedScene
@export var spawn_delay : float = 1.5
@export var spawn_rotation : Vector3 = Vector3.ZERO
@export var purchased_hint_text : String = "Purchased a Health Potion"
@export var have_stock_text : String = "In Stock"
@export var stock_empty_text : String = "Sold Out"
@export_group("Sound Settings")
@export var dispensing_sound : AudioStream

@onready var cogito_button = $GenericButton
@onready var currency_check : CurrencyCheck = $GenericButton/CurrencyCheck
@onready var spawn_point : Marker3D = $Spawnpoint
@onready var stock_label = $StaticBody3D/StockLabel
@onready var stock_counter : Label3D = $StaticBody3D/StockCounter

var player_interaction_component : PlayerInteractionComponent
var currency_attribute : CogitoCurrency

var amount_remaining : int
var is_dispensing : bool


func _ready():
add_to_group("save_object_state")
amount_remaining = starting_amount
_update_vendor_state()
cogito_button.allows_repeated_interaction = amount_remaining > 1
# spawn delay must be shorter than the press cooldown or spawn count could be affected
if spawn_delay >= cogito_button.press_cooldown_time:
spawn_delay = cogito_button.press_cooldown_time - 0.1
printerr("spawn_delay exceeded button press cooldown time. It has been set to " + str(spawn_delay))
currency_check.connect("transaction_success", Callable(self, "_on_transaction_success"))
var player_node = CogitoSceneManager._current_player_node
player_interaction_component = (player_node as CogitoPlayer).player_interaction_component
for attribute in player_node.find_children("", "CogitoCurrency", false):
if attribute is CogitoCurrency and attribute.currency_name == currency_check.currency_name:
currency_attribute = attribute
break


func _on_transaction_success() -> void:
# communicate the event
player_interaction_component.send_hint(currency_attribute.currency_icon, purchased_hint_text)

# update vendor
amount_remaining -= 1
_update_vendor_state()

# dispense object
is_dispensing = true
_delayed_object_spawn()


func _delayed_object_spawn() -> void:
if dispensing_sound:
Audio.play_sound_3d(dispensing_sound).global_position = spawn_point.global_position

await get_tree().create_timer(spawn_delay).timeout
is_dispensing = false

var spawned_object = object_to_spawn.instantiate()
spawned_object.position = spawn_point.global_position
spawned_object.rotation = spawn_rotation
get_tree().current_scene.add_child(spawned_object)


func _update_vendor_state() -> void:
# when only 1 is left have the button handle it's own behavior
if amount_remaining == 0:
cogito_button.allows_repeated_interaction = false
stock_label.text = stock_empty_text
elif stock_label.text != have_stock_text:
stock_label.text = have_stock_text

stock_counter.text = str(amount_remaining)


func set_state():
starting_amount = amount_remaining
_update_vendor_state()

if is_dispensing:
_delayed_object_spawn()


func save():
var state_dict = {
"node_path" : self.get_path(),
"amount_remaining" : amount_remaining,
"is_dispensing" : is_dispensing,
"pos_x" : position.x,
"pos_y" : position.y,
"pos_z" : position.z,
"rot_x" : rotation.x,
"rot_y" : rotation.y,
"rot_z" : rotation.z,

}
return state_dict
14 changes: 9 additions & 5 deletions addons/cogito/DemoScenes/COGITO_3_Lobby.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=363 format=3 uid="uid://e31n36p8i6an"]
[gd_scene load_steps=364 format=3 uid="uid://e31n36p8i6an"]

[ext_resource type="Script" path="res://addons/cogito/SceneManagement/cogito_scene.gd" id="1_dracg"]
[ext_resource type="Texture2D" uid="uid://sdcljx8f5dhj" path="res://addons/cogito/Assets/hdris/kloofendal_48d_partly_cloudy_puresky_2k.hdr" id="2_a8imk"]
Expand Down Expand Up @@ -71,6 +71,7 @@
[ext_resource type="PackedScene" uid="uid://dlhn1jwgx0wjr" path="res://addons/cogito/DemoScenes/DemoPrefabs/table_coffee_glass.tscn" id="61_jhsd0"]
[ext_resource type="PackedScene" uid="uid://c0mrdx8eegxuj" path="res://addons/cogito/DemoScenes/DemoPrefabs/rug_round.tscn" id="62_m13s3"]
[ext_resource type="PackedScene" uid="uid://c2t21qbkevaof" path="res://addons/cogito/DemoScenes/DemoPrefabs/cogito_demo_hint.tscn" id="62_y3og2"]
[ext_resource type="PackedScene" uid="uid://vlqfhilpj650" path="res://addons/cogito/DemoScenes/DemoPrefabs/vending_machine.tscn" id="63_uchdi"]
[ext_resource type="AudioStream" uid="uid://bnqnuewmntcyp" path="res://addons/cogito/Assets/Audio/Kenney/UiAudio/error_008.ogg" id="65_cw5kp"]
[ext_resource type="PackedScene" uid="uid://6k5rvlwcpys1" path="res://addons/cogito/DemoScenes/DemoPrefabs/generic_switch.tscn" id="66_4pwwj"]
[ext_resource type="PackedScene" uid="uid://qxbx5yllijej" path="res://addons/cogito/DemoScenes/DemoPrefabs/chair_modern_frame_cushion.tscn" id="67_qkgep"]
Expand Down Expand Up @@ -129,7 +130,7 @@ volumetric_fog_temporal_reprojection_amount = 0.85
density = 0.04
albedo = Color(0.694118, 0.694118, 0.694118, 1)

[sub_resource type="Resource" id="Resource_iiwmy"]
[sub_resource type="Resource" id="Resource_a1mo5"]
resource_local_to_scene = true
script = ExtResource("4_0kggm")
grid = true
Expand Down Expand Up @@ -2423,7 +2424,7 @@ shadow_mesh = SubResource("ArrayMesh_3ecdw")
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_upcaa"]
data = PackedVector3Array(0.6928, 0.0903, -1.6, 0, 0.0903, -1.2, 0.6128, 0.0903, -0.88, 0.6128, 0.0903, -0.88, 0.7728, 0.0903, -0.88, 0.6928, 0.0903, -1.6, 0.7728, 0.0903, -0.88, 1.3856, 0.0903, -1.2, 0.6928, 0.0903, -1.6, 0.7728, 0.0903, -0.88, 0.7728, 0.0903, -0.72, 1.3856, 0.0903, -1.2, 0.6128, 0.0903, -0.72, 0.6128, 0.0903, -0.88, 0, 0.0903, -1.2, 0.6928, 0.0903, 0, 0.6128, 0.0903, -0.72, 0, 0.0903, -1.2, 0.6928, 0.0903, 0, 0.7728, 0.0903, -0.72, 0.6128, 0.0903, -0.72, 0, 0.0903, -0.4, 0.6928, 0.0903, 0, 0, 0.0903, -1.2, 0, 0.0903, -1.2, 0, 0.0903, -0.8, 0, 0.0903, -0.4, 0.6928, 0.0903, 0, 1.3856, 0.0903, -0.4, 0.7728, 0.0903, -0.72, 1.3856, 0.0903, -0.4, 1.3856, 0.0903, -1.2, 0.7728, 0.0903, -0.72, 1.3856, 0.0903, -0.4, 1.3856, 0.0903, -0.8, 1.3856, 0.0903, -1.2, 0.6928, 0.1935, 0, 0, 0.1935, -0.4, 0, 0.1935, -1.2, 0, 0.1935, -1.2, 0.6928, 0.1935, -1.6, 0.6928, 0.1935, 0, 0.6928, 0.1935, -1.6, 1.3856, 0.1935, -0.4, 0.6928, 0.1935, 0, 0.6928, 0.1935, -1.6, 1.3856, 0.1935, -1.2, 1.3856, 0.1935, -0.4, 0.6928, 0.1935, -1.6, 0.6928, 0.0903, -1.6, 1.3856, 0.0903, -1.2, 1.3856, 0.0903, -1.2, 1.3856, 0.1935, -1.2, 0.6928, 0.1935, -1.6, 1.3856, 0.0903, -0.8, 1.3856, 0.0903, -0.4, 1.3856, 0.1935, -0.4, 1.3856, 0.1935, -0.4, 1.3856, 0.1935, -1.2, 1.3856, 0.0903, -0.8, 1.3856, 0.1935, -1.2, 1.3856, 0.0903, -1.2, 1.3856, 0.0903, -0.8, 1.3856, 0.1935, -0.4, 1.3856, 0.0903, -0.4, 0.6928, 0.0903, 0, 0.6928, 0.0903, 0, 0.6928, 0.1935, 0, 1.3856, 0.1935, -0.4, 0.6928, 0.1935, 0, 0.6928, 0.0903, 0, 0, 0.0903, -0.4, 0, 0.0903, -0.4, 0, 0.1935, -0.4, 0.6928, 0.1935, 0, 0, 0.1935, -1.2, 0, 0.1935, -0.4, 0, 0.0903, -0.4, 0, 0.0903, -0.4, 0, 0.0903, -0.8, 0, 0.1935, -1.2, 0, 0.0903, -0.8, 0, 0.0903, -1.2, 0, 0.1935, -1.2, 0, 0.1935, -1.2, 0, 0.0903, -1.2, 0.6928, 0.0903, -1.6, 0.6928, 0.0903, -1.6, 0.6928, 0.1935, -1.6, 0, 0.1935, -1.2, 0.7728, 0.0903, -0.72, 0.7728, -0.4, -0.72, 0.6128, -0.4, -0.72, 0.6128, -0.4, -0.72, 0.6128, 0.0903, -0.72, 0.7728, 0.0903, -0.72, 0.6128, 0.0903, -0.88, 0.6128, 0.0903, -0.72, 0.6128, -0.4, -0.72, 0.6128, -0.4, -0.72, 0.6128, -0.4, -0.88, 0.6128, 0.0903, -0.88, 0.6128, 0.0903, -0.88, 0.6128, -0.4, -0.88, 0.7728, -0.4, -0.88, 0.7728, -0.4, -0.88, 0.7728, 0.0903, -0.88, 0.6128, 0.0903, -0.88, 0.7728, -0.4, -0.88, 0.7728, -0.4, -0.72, 0.7728, 0.0903, -0.72, 0.7728, 0.0903, -0.72, 0.7728, 0.0903, -0.88, 0.7728, -0.4, -0.88, 0.8128, -0.4, -0.68, 0.8128, -0.44, -0.68, 0.5728, -0.44, -0.68, 0.5728, -0.44, -0.68, 0.5728, -0.4, -0.68, 0.8128, -0.4, -0.68, 0.5728, -0.4, -0.92, 0.5728, -0.4, -0.68, 0.5728, -0.44, -0.68, 0.5728, -0.44, -0.68, 0.5728, -0.44, -0.92, 0.5728, -0.4, -0.92, 0.8128, -0.44, -0.92, 0.8128, -0.44, -0.68, 0.8128, -0.4, -0.68, 0.8128, -0.4, -0.68, 0.8128, -0.4, -0.92, 0.8128, -0.44, -0.92, 0.5728, -0.4, -0.68, 0.5728, -0.4, -0.92, 0.6128, -0.4, -0.72, 0.6128, -0.4, -0.72, 0.8128, -0.4, -0.68, 0.5728, -0.4, -0.68, 0.6128, -0.4, -0.72, 0.7728, -0.4, -0.72, 0.8128, -0.4, -0.68, 0.7728, -0.4, -0.72, 0.7728, -0.4, -0.88, 0.8128, -0.4, -0.68, 0.6128, -0.4, -0.88, 0.6128, -0.4, -0.72, 0.5728, -0.4, -0.92, 0.5728, -0.4, -0.92, 0.8128, -0.4, -0.92, 0.6128, -0.4, -0.88, 0.8128, -0.4, -0.92, 0.7728, -0.4, -0.88, 0.6128, -0.4, -0.88, 0.8128, -0.4, -0.92, 0.8128, -0.4, -0.68, 0.7728, -0.4, -0.88, 0.4928, -0.44, -1, 0.4928, -0.44, -0.6, 0.4928, -0.5, -0.6, 0.4928, -0.5, -0.6, 0.4928, -0.5, -1, 0.4928, -0.44, -1, 0.4928, -0.44, -1, 0.4928, -0.5, -1, 0.8928, -0.5, -1, 0.8928, -0.5, -1, 0.8928, -0.44, -1, 0.4928, -0.44, -1, 0.8928, -0.44, -0.6, 0.8928, -0.5, -0.6, 0.4928, -0.5, -0.6, 0.4928, -0.5, -0.6, 0.4928, -0.44, -0.6, 0.8928, -0.44, -0.6, 0.8928, -0.5, -1, 0.8928, -0.5, -0.6, 0.8928, -0.44, -0.6, 0.8928, -0.44, -0.6, 0.8928, -0.44, -1, 0.8928, -0.5, -1, 0.4928, -0.44, -0.6, 0.4928, -0.44, -1, 0.5728, -0.44, -0.68, 0.5728, -0.44, -0.68, 0.8928, -0.44, -0.6, 0.4928, -0.44, -0.6, 0.5728, -0.44, -0.68, 0.8128, -0.44, -0.68, 0.8928, -0.44, -0.6, 0.8128, -0.44, -0.68, 0.8128, -0.44, -0.92, 0.8928, -0.44, -0.6, 0.5728, -0.44, -0.92, 0.5728, -0.44, -0.68, 0.4928, -0.44, -1, 0.4928, -0.44, -1, 0.8928, -0.44, -1, 0.5728, -0.44, -0.92, 0.8928, -0.44, -1, 0.8128, -0.44, -0.92, 0.5728, -0.44, -0.92, 0.8928, -0.44, -1, 0.8928, -0.44, -0.6, 0.8128, -0.44, -0.92, 0.9128, -0.54, -1.02, 0.4728, -0.54, -1.02, 0.4728, -0.54, -0.58, 0.4728, -0.54, -0.58, 0.9128, -0.54, -0.58, 0.9128, -0.54, -1.02, 0.4928, -0.5, -1, 0.4728, -0.54, -1.02, 0.9128, -0.54, -1.02, 0.9128, -0.54, -1.02, 0.8928, -0.5, -1, 0.4928, -0.5, -1, 0.9128, -0.54, -1.02, 0.9128, -0.54, -0.58, 0.8928, -0.5, -0.6, 0.8928, -0.5, -0.6, 0.8928, -0.5, -1, 0.9128, -0.54, -1.02, 0.8928, -0.5, -0.6, 0.9128, -0.54, -0.58, 0.4728, -0.54, -0.58, 0.4728, -0.54, -0.58, 0.4928, -0.5, -0.6, 0.8928, -0.5, -0.6, 0.4928, -0.5, -0.6, 0.4728, -0.54, -0.58, 0.4728, -0.54, -1.02, 0.4728, -0.54, -1.02, 0.4928, -0.5, -1, 0.4928, -0.5, -0.6, 0.5728, -0.4, -0.92, 0.5728, -0.44, -0.92, 0.8128, -0.44, -0.92, 0.8128, -0.44, -0.92, 0.8128, -0.4, -0.92, 0.5728, -0.4, -0.92)

[sub_resource type="Resource" id="Resource_y0qvc"]
[sub_resource type="Resource" id="Resource_h0p8x"]
resource_local_to_scene = true
script = ExtResource("4_0kggm")
grid = true
Expand Down Expand Up @@ -3165,7 +3166,7 @@ material = SubResource("FogMaterial_4avjx")

[node name="Player" parent="." instance=ExtResource("3_mgle8")]
transform = Transform3D(-1, 0, 7.45058e-07, 0, 1, 0, -7.45058e-07, 0, -1, 3.03073, 0.905039, -17.9321)
inventory_data = SubResource("Resource_iiwmy")
inventory_data = SubResource("Resource_a1mo5")
step_height_camera_lerp = 1.5

[node name="QUESTS" type="Node3D" parent="."]
Expand Down Expand Up @@ -6989,7 +6990,7 @@ shape = SubResource("ConcavePolygonShape3D_upcaa")

[node name="kitchenFridgeContainer2" parent="BREAK_ROOM" instance=ExtResource("57_fdyfl")]
transform = Transform3D(-1, 0, -1.50996e-07, 0, 1, 0, 1.50996e-07, 0, -1, 3.65301, -4.84288e-08, 6.17191)
inventory_data = SubResource("Resource_y0qvc")
inventory_data = SubResource("Resource_h0p8x")

[node name="kitchenMicrowave" parent="BREAK_ROOM" instance=ExtResource("43_rl17a")]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 1.98491, 0.84, 6.39503)
Expand Down Expand Up @@ -7020,6 +7021,9 @@ transform = Transform3D(-0.927595, 0, -0.373587, 0, 1, 0, 0.373587, 0, -0.927595

[node name="rugRound" parent="BREAK_ROOM" instance=ExtResource("62_m13s3")]

[node name="VendingMachine" parent="BREAK_ROOM" instance=ExtResource("63_uchdi")]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 7.35901, 0, 2.81656)

[node name="BATHROOM_STALL" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8.1, 2.58, -5.9)

Expand Down
109 changes: 109 additions & 0 deletions addons/cogito/DemoScenes/DemoPrefabs/vending_machine.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
[gd_scene load_steps=11 format=3 uid="uid://vlqfhilpj650"]

[ext_resource type="Script" path="res://addons/cogito/CogitoObjects/cogito_vendor.gd" id="1_lj27e"]
[ext_resource type="PackedScene" uid="uid://0fj068bj0csc" path="res://addons/cogito/PackedScenes/Pickups/pickup_health_potion.tscn" id="2_1u2dl"]
[ext_resource type="PackedScene" uid="uid://cs6raqlyejqul" path="res://addons/cogito/DemoScenes/DemoPrefabs/generic_button.tscn" id="2_wxk3g"]
[ext_resource type="AudioStream" uid="uid://6thelsn58odx" path="res://addons/cogito/Assets/Audio/vending_machine_sfx.ogg" id="3_7lknv"]
[ext_resource type="Texture2D" uid="uid://s3qcosabxkgd" path="res://addons/cogito/Assets/Graphics/CogitoHealthPotion_vending_machine_sprite.png" id="4_wgwa5"]

[sub_resource type="BoxShape3D" id="BoxShape3D_hgrek"]
size = Vector3(1.15, 0.3, 0.8)

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_6qw18"]
albedo_color = Color(0.3, 0.3, 0.3, 1)

[sub_resource type="QuadMesh" id="QuadMesh_2himx"]
size = Vector2(0.75, 0.9)

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_vtrh8"]
shading_mode = 0
albedo_color = Color(0.25, 0.5, 0.283333, 1)

[sub_resource type="QuadMesh" id="QuadMesh_ng26b"]
material = SubResource("StandardMaterial3D_vtrh8")
size = Vector2(0.25, 0.25)

[node name="VendingMachine" type="Node3D"]
script = ExtResource("1_lj27e")
object_to_spawn = ExtResource("2_1u2dl")
spawn_rotation = Vector3(90, 0, 0)
dispensing_sound = ExtResource("3_7lknv")

[node name="StaticBody3D" type="StaticBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)

[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.85, 0)
shape = SubResource("BoxShape3D_hgrek")

[node name="CSGCombiner3D" type="CSGCombiner3D" parent="StaticBody3D"]
operation = 2
use_collision = true

[node name="MeshInstance3D" type="CSGBox3D" parent="StaticBody3D/CSGCombiner3D"]
size = Vector3(1.15, 2, 0.8)
material = SubResource("StandardMaterial3D_6qw18")

[node name="CSGBox3D" type="CSGBox3D" parent="StaticBody3D/CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 0.990268, -0.139173, 0, 0.139173, 0.990268, -0.1, -0.3893, 0.345541)
operation = 2
size = Vector3(0.8, 0.4, 0.6)
material = SubResource("StandardMaterial3D_6qw18")

[node name="CSGBox3D3" type="CSGBox3D" parent="StaticBody3D/CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 0.965926, -0.258819, 0, 0.258819, 0.965926, -0.1, 0.453041, -0.00217443)
operation = 2
size = Vector3(0.8, 0.595776, 0.582227)
material = SubResource("StandardMaterial3D_6qw18")

[node name="CSGBox3D2" type="CSGBox3D" parent="StaticBody3D/CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -0.1, 0.0707678, 0.184345)
operation = 2
size = Vector3(0.8, 0.385535, 1.24217)
material = SubResource("StandardMaterial3D_6qw18")

[node name="MeshInstance3D" type="MeshInstance3D" parent="StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.1, 0.4, 0.405)
mesh = SubResource("QuadMesh_2himx")

[node name="MeshInstance3D2" type="MeshInstance3D" parent="StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.425, 0.5, 0.405)
mesh = SubResource("QuadMesh_ng26b")

[node name="StockLabel" type="Label3D" parent="StaticBody3D"]
transform = Transform3D(0.35, 0, 0, 0, 0.35, 0, 0, 0, 0.35, 0.42558, 0.570185, 0.41)
double_sided = false
modulate = Color(0, 0, 0, 1)
text = "In Stock"
outline_size = 0

[node name="StockCounter" type="Label3D" parent="StaticBody3D"]
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0.42558, 0.457513, 0.41)
double_sided = false
modulate = Color(0, 0, 0, 1)
text = "3"
font_size = 42
outline_size = 6

[node name="SpawnedItemIcon" type="Sprite3D" parent="StaticBody3D"]
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, -0.1, 0.4, 0.41)
cast_shadow = 0
double_sided = false
alpha_cut = 1
texture = ExtResource("4_wgwa5")

[node name="GenericButton" parent="." instance=ExtResource("2_wxk3g")]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0.425, 1.2, 0.45)
usable_interaction_text = "Buy Health Potion"
press_cooldown_time = 3.0
has_been_used_hint = "Out of stock"
unusable_interaction_text = "Sold Out"

[node name="CurrencyCheck" parent="GenericButton" index="6"]
currency_cost = 5
currency_text_joiner = " | "

[node name="Spawnpoint" type="Marker3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.1, 1.40788, 0.0261086)

[editable path="GenericButton"]