It's Cow Game! Version 2.04!

This commit is contained in:
PajamaBee 2024-09-19 23:06:51 -05:00
commit a9e1ed9ddd
3148 changed files with 95332 additions and 0 deletions

View file

@ -0,0 +1,16 @@
~ start
if DialogueBoxManager.currentSpeaker.wet_wustard_check():
Herbert: You have Wet Wustard >:)
Herbert: I'm gonna take it >:)
do DialogueBoxManager.currentSpeaker.take_wet_wustard()
do DialogueBoxManager.currentSpeaker.give_knowledge()
Herbert: Hee hee hee >:)
=> END
Herbert: Hi I'm just a normal whale.
Herbert: I'm just hanging out here, nothing to worry about.
Herbert: Please bring me Wet Wustard :)
Herbert: I am normal about Wet Wustard :)
=> END

View file

@ -0,0 +1,15 @@
[remap]
importer="dialogue_manager_compiler_11"
type="Resource"
uid="uid://ckqmceliursrw"
path="res://.godot/imported/Whale.dialogue-6f14f75a1a1816743c7d23e1522e8188.tres"
[deps]
source_file="res://NPCs/Beach/Whale/Whale.dialogue"
dest_files=["res://.godot/imported/Whale.dialogue-6f14f75a1a1816743c7d23e1522e8188.tres"]
[params]
defaults=true

56
NPCs/Beach/Whale/Whale.gd Normal file
View file

@ -0,0 +1,56 @@
extends NPC
var wetWustardItem
func _ready():
dialogueResource = load("res://NPCs/Beach/Whale/Whale.dialogue")
wetWustardItem = preload("res://Items/Foods/Condiments/Wustard.gd").new()
wetWustardItem.set_modification(Item.modifications.Wet)
MessageManager.messageSent.connect(message_spoken)
func message_spoken(message:String):
message = message.to_lower().strip_edges()
if message.contains("i got the stuff") or message.contains("i've got the stuff") or message.contains("i have got the stuff") or message.contains("i have the stuff"):
if distance_check():
if wet_wustard_count() == 0:
MessageManager.addMessage("You do not", self, "Herbert", Color.YELLOW)
elif wet_wustard_count() < 5:
MessageManager.addMessage("Not enough", self, "Herbert", Color.YELLOW)
else:
MessageManager.addMessage("I'll be taking that >:)", self, "Herbert", Color.YELLOW)
take_wet_wustard()
give_silica_gel()
func give_silica_gel():
var silicaGelPacketItem = preload("res://Items/Artificial/Products/SilicaGelPacket.gd").new()
InventoryManager.add_item_to_inventory(silicaGelPacketItem)
MessageManager.item_popup(silicaGelPacketItem.duplicate())
func distance_check():
var maxTradeDistance = 600
var distance = global_position.distance_to(GameVariables.player.global_position)
if distance < maxTradeDistance:
return true
else:
return false
func wet_wustard_count():
var amountHad = InventoryManager.get_item_count(wetWustardItem)
return amountHad
func wet_wustard_check():
if InventoryManager.check_if_in_inventory(wetWustardItem):
return true
else:
return false
func take_wet_wustard():
var wetWustardCount = wet_wustard_count()
InventoryManager.remove_item_from_inventory(wetWustardItem, wetWustardCount)
LevelManager.get_skill("appreciating").experience_event("Herbert", "gave wustard to", 140)
if wetWustardCount >= 50:
AchievementManager.complete_achievement("Wustard Whale")
func give_knowledge():
LevelManager.add_XP("swimming", 187)

View file

@ -0,0 +1,48 @@
[gd_scene load_steps=9 format=3 uid="uid://brmjavcajdu03"]
[ext_resource type="PackedScene" uid="uid://doqfsp7yxools" path="res://NPCs/NPC.tscn" id="1_3f7lk"]
[ext_resource type="Script" path="res://NPCs/Beach/Whale/Whale.gd" id="2_cs65o"]
[ext_resource type="Texture2D" uid="uid://bdddtyk2coax8" path="res://NPCs/Beach/Whale/Whale1.png" id="2_dbxph"]
[ext_resource type="Texture2D" uid="uid://do4kg2auu2dwm" path="res://NPCs/Beach/Whale/Whale2.png" id="3_r42pj"]
[ext_resource type="Script" path="res://Utils/PlayOnReady.gd" id="5_yfdiw"]
[sub_resource type="SpriteFrames" id="SpriteFrames_pa14j"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("2_dbxph")
}, {
"duration": 1.0,
"texture": ExtResource("3_r42pj")
}],
"loop": true,
"name": &"default",
"speed": 1.2
}]
[sub_resource type="CircleShape2D" id="CircleShape2D_6t2cr"]
radius = 136.059
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_u025d"]
radius = 22.0
height = 326.0
[node name="Whale" instance=ExtResource("1_3f7lk")]
script = ExtResource("2_cs65o")
[node name="Sprite" parent="." index="0"]
position = Vector2(56, -68)
sprite_frames = SubResource("SpriteFrames_pa14j")
frame_progress = 0.804645
script = ExtResource("5_yfdiw")
[node name="CollisionShape2D" parent="Talkable/InteractionArea" index="0"]
position = Vector2(6, -11)
shape = SubResource("CircleShape2D_6t2cr")
[node name="CollisionShape2D" parent="." index="3"]
position = Vector2(46, 17)
rotation = 1.5708
shape = SubResource("CapsuleShape2D_u025d")
[editable path="Talkable"]

BIN
NPCs/Beach/Whale/Whale1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bdddtyk2coax8"
path="res://.godot/imported/Whale1.png-5c81db3f58300f302cbda101482eb85e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://NPCs/Beach/Whale/Whale1.png"
dest_files=["res://.godot/imported/Whale1.png-5c81db3f58300f302cbda101482eb85e.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

BIN
NPCs/Beach/Whale/Whale2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://do4kg2auu2dwm"
path="res://.godot/imported/Whale2.png-5f2e700f569fe95907484e02f0f12feb.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://NPCs/Beach/Whale/Whale2.png"
dest_files=["res://.godot/imported/Whale2.png-5f2e700f569fe95907484e02f0f12feb.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