It's Cow Game! Version 2.04!
This commit is contained in:
commit
a9e1ed9ddd
3148 changed files with 95332 additions and 0 deletions
|
|
@ -0,0 +1,19 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://dhbwu1uyq68yj"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bgn7eljpn7s2w" path="res://Objects/SkillSpecific/BasketStorage/BasketPost/Post.png" id="1_mrb03"]
|
||||
[ext_resource type="PackedScene" uid="uid://burnkdrtcqvqb" path="res://Objects/SkillSpecific/BasketStorage/BasketStorageSpot.tscn" id="2_36sfm"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_2yyy3"]
|
||||
radius = 12.0416
|
||||
|
||||
[node name="BasketPost" type="StaticBody2D"]
|
||||
|
||||
[node name="Post" type="Sprite2D" parent="."]
|
||||
position = Vector2(0, -44)
|
||||
texture = ExtResource("1_mrb03")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_2yyy3")
|
||||
|
||||
[node name="BasketStorageSpot" parent="." instance=ExtResource("2_36sfm")]
|
||||
position = Vector2(0, -81)
|
||||
BIN
Objects/SkillSpecific/BasketStorage/BasketPost/Post.png
Normal file
BIN
Objects/SkillSpecific/BasketStorage/BasketPost/Post.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 217 B |
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bgn7eljpn7s2w"
|
||||
path="res://.godot/imported/Post.png-35709957f6f535700333516b60f7a516.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Objects/SkillSpecific/BasketStorage/BasketPost/Post.png"
|
||||
dest_files=["res://.godot/imported/Post.png-35709957f6f535700333516b60f7a516.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
|
||||
99
Objects/SkillSpecific/BasketStorage/BasketStorageSpot.gd
Normal file
99
Objects/SkillSpecific/BasketStorage/BasketStorageSpot.gd
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
extends Node2D
|
||||
|
||||
@export var basketInvName:String
|
||||
var basketHoldingInvName
|
||||
|
||||
var basketItem:Item
|
||||
|
||||
func _ready():
|
||||
basketHoldingInvName = basketInvName + "Basket"
|
||||
var basketHoldingInv = InventoryManager.get_inventory(basketInvName + "Basket")
|
||||
if basketHoldingInv.items.size() > 0:
|
||||
basketItem = basketHoldingInv.items[0]
|
||||
|
||||
update_basket_display()
|
||||
|
||||
func show_basket_changing_window():
|
||||
%BasketPlacingWindow.popup_centered()
|
||||
%BasketPlacingWindow.opened()
|
||||
|
||||
func show_basket_storage_window():
|
||||
%BasketStorageWindow.popup_centered()
|
||||
%BasketStorageWindow.opened()
|
||||
|
||||
func get_current_basket():
|
||||
return basketItem
|
||||
|
||||
func change_current_basket(basket:Item):
|
||||
if basketItem != null:
|
||||
InventoryManager.add_item_to_inventory(basketItem)
|
||||
InventoryManager.remove_item_from_inventory(basketItem, 1, basketHoldingInvName)
|
||||
|
||||
if basket != null:
|
||||
InventoryManager.remove_item_from_inventory(basket)
|
||||
set_current_basket(basket)
|
||||
|
||||
func set_current_basket(basket:Item):
|
||||
if basket != null:
|
||||
InventoryManager.add_item_to_inventory(basket, 1, basketHoldingInvName)
|
||||
basketItem = basket
|
||||
AchievementManager.hang_up_achievement_checks(basketItem)
|
||||
|
||||
func update_basket_display():
|
||||
if basketItem == null:
|
||||
$AnimatedSprite2D.visible = true
|
||||
%BasketSprite.visible = false
|
||||
else:
|
||||
$AnimatedSprite2D.visible = false
|
||||
%BasketSprite.visible = true
|
||||
|
||||
%BasketSprite.texture = basketItem.get_sprite()
|
||||
|
||||
func get_current_basket_space():
|
||||
if basketItem == null:
|
||||
return 0
|
||||
|
||||
return BasketWeaving.get_basket_space(basketItem)
|
||||
|
||||
func get_used_space(basketOverride:Item = null):
|
||||
var basketInv:Inventory = InventoryManager.get_inventory(basketInvName)
|
||||
if SaveManager.get_save_value("ambiQuestComplete", false):
|
||||
return infinite_space_item_count(basketInv, basketOverride)
|
||||
else:
|
||||
return basketInv.get_item_count()
|
||||
|
||||
func infinite_space_item_count(inventory:Inventory, basketOverride:Item = null):
|
||||
var count = 0
|
||||
for i in range(inventory.items.size()):
|
||||
var currentItem = inventory.items[i]
|
||||
if !infinite_check(currentItem, basketOverride):
|
||||
count += inventory.quantities[i]
|
||||
return count
|
||||
|
||||
func infinite_check(item:Item, basketOverride:Item = null):
|
||||
var basketToCheckAgainst = basketItem
|
||||
if basketOverride != null:
|
||||
basketToCheckAgainst = basketOverride
|
||||
|
||||
if basketToCheckAgainst == null:
|
||||
return false
|
||||
|
||||
var basketName = BasketGenerator.generate_basket(item, true)
|
||||
if basketName == basketToCheckAgainst.get_name(false):
|
||||
return true
|
||||
return false
|
||||
|
||||
func get_basket_space_left():
|
||||
return get_current_basket_space() - get_used_space()
|
||||
|
||||
func get_current_basket_name():
|
||||
if basketItem == null:
|
||||
return "No Basket Placed"
|
||||
|
||||
return basketItem.get_name()
|
||||
|
||||
func get_current_basket_sprite():
|
||||
if basketItem == null:
|
||||
return null
|
||||
|
||||
return basketItem.get_sprite()
|
||||
73
Objects/SkillSpecific/BasketStorage/BasketStorageSpot.tscn
Normal file
73
Objects/SkillSpecific/BasketStorage/BasketStorageSpot.tscn
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
[gd_scene load_steps=11 format=3 uid="uid://burnkdrtcqvqb"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cujx1a8vwxsj8" path="res://Objects/world_object.tscn" id="1_026eg"]
|
||||
[ext_resource type="Texture2D" uid="uid://bbmlkil40xcbc" path="res://MiscArt/WhiteCircle.png" id="2_1g324"]
|
||||
[ext_resource type="PackedScene" uid="uid://bqibe7ha6r5ls" path="res://Interactions/Interactable/interactable.tscn" id="2_val7i"]
|
||||
[ext_resource type="Script" path="res://Objects/SkillSpecific/BasketStorage/BasketStorageSpot.gd" id="2_y30aj"]
|
||||
[ext_resource type="Texture2D" uid="uid://dlxnk74anrjt7" path="res://Items/Basket/BaseItem/BasketBasket.png" id="4_e7xql"]
|
||||
[ext_resource type="PackedScene" uid="uid://cgp2l1mosnko" path="res://UI/BasketStorage/BasketStorageWindow.tscn" id="6_7wg5b"]
|
||||
[ext_resource type="PackedScene" uid="uid://k2okvt6ol7r3" path="res://UI/BasketStorage/BasketPlacingWindow.tscn" id="6_soxlh"]
|
||||
[ext_resource type="PackedScene" uid="uid://cgfdtagfd85h0" path="res://Interactions/BasketStorage/BasketStorage.tscn" id="7_qvgh0"]
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_lhrm8"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("2_1g324")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_u2rxy"]
|
||||
radius = 38.2099
|
||||
|
||||
[node name="BasketStorageSpot" instance=ExtResource("1_026eg")]
|
||||
script = ExtResource("2_y30aj")
|
||||
|
||||
[node name="AnimatedSprite2D" parent="." index="0"]
|
||||
self_modulate = Color(0.341176, 1, 1, 0.564706)
|
||||
position = Vector2(0, 23)
|
||||
sprite_frames = SubResource("SpriteFrames_lhrm8")
|
||||
|
||||
[node name="CollisionPolygon2D" parent="StaticBody2D" index="0"]
|
||||
polygon = PackedVector2Array(4, 30, 7, 36, -2, 33)
|
||||
disabled = true
|
||||
|
||||
[node name="Interactable" parent="." index="2" instance=ExtResource("2_val7i")]
|
||||
|
||||
[node name="Panel" parent="Interactable" index="1"]
|
||||
offset_left = -29.0
|
||||
offset_top = -7.0
|
||||
offset_right = 30.0
|
||||
offset_bottom = 53.0
|
||||
|
||||
[node name="Nail" type="Sprite2D" parent="." index="3"]
|
||||
self_modulate = Color(0.713726, 0.713726, 0.713726, 1)
|
||||
scale = Vector2(0.1, 0.1)
|
||||
texture = ExtResource("2_1g324")
|
||||
|
||||
[node name="BasketSprite" type="Sprite2D" parent="." index="4"]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(1, 15)
|
||||
scale = Vector2(1.3, 1.3)
|
||||
texture = ExtResource("4_e7xql")
|
||||
|
||||
[node name="BasketStorageWindow" parent="." index="5" instance=ExtResource("6_7wg5b")]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
|
||||
[node name="BasketPlacingWindow" parent="." index="6" instance=ExtResource("6_soxlh")]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
|
||||
[node name="BasketStorage" parent="." index="7" instance=ExtResource("7_qvgh0")]
|
||||
|
||||
[node name="CollisionShape2D" parent="BasketStorage/InteractionArea" index="0"]
|
||||
position = Vector2(0, 23)
|
||||
shape = SubResource("CircleShape2D_u2rxy")
|
||||
|
||||
[editable path="Interactable"]
|
||||
[editable path="Interactable/ActionMenu"]
|
||||
[editable path="BasketStorage"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue