It's Cow Game! Version 2.04!
53
Skills/Appreciating/Appreciating.gd
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
extends Skill
|
||||
|
||||
class_name Appreciating
|
||||
|
||||
func _init():
|
||||
skillName = "Experiencing"
|
||||
skillIcon = load("res://Skills/Appreciating/AppreciatingIcon.png")
|
||||
|
||||
func experience_event(eventName:String, verb:String, xpEarned:int):
|
||||
var timesDone = SaveManager.get_value_from_section(verb, eventName, 0)
|
||||
|
||||
if timesDone == 0:
|
||||
LevelManager.add_XP("appreciating", xpEarned)
|
||||
|
||||
timesDone += 1
|
||||
SaveManager.save_to_section(verb, eventName, timesDone)
|
||||
|
||||
func experience_item(item:Item, verb:String):
|
||||
var itemName = item.get_name(false)
|
||||
|
||||
var timesDone = SaveManager.get_value_from_section(verb, itemName, 0)
|
||||
|
||||
if timesDone == 0:
|
||||
var earnedXP = 10
|
||||
|
||||
if verb == "caramelized":
|
||||
earnedXP += floor(item.get_value(false) * 0.2)
|
||||
elif verb == "dammed":
|
||||
earnedXP += floor(item.get_value(false) * 0.9)
|
||||
elif verb == "washed away":
|
||||
earnedXP += floor(item.get_value(false) * 1.1)
|
||||
earnedXP += 15
|
||||
else:
|
||||
earnedXP += floor(item.get_value(false) * 0.5)
|
||||
|
||||
LevelManager.add_XP("appreciating", earnedXP)
|
||||
|
||||
timesDone += 1
|
||||
SaveManager.save_to_section(verb, itemName, timesDone)
|
||||
|
||||
if verb == "ate" and itemName == "Wustard":
|
||||
if timesDone >= 100:
|
||||
AchievementManager.complete_achievement("Closer to Steve")
|
||||
elif verb == "washed away":
|
||||
var washedItemCount = 0
|
||||
var config = SaveManager.get_save_config()
|
||||
var washedItems = config.get_section_keys("washed away")
|
||||
|
||||
for washedItem in washedItems:
|
||||
washedItemCount += SaveManager.get_value_from_section("washed away", washedItem, 0)
|
||||
|
||||
if washedItemCount >= 30:
|
||||
AchievementManager.complete_achievement("From where we came")
|
||||
BIN
Skills/Appreciating/AppreciatingIcon.png
Normal file
|
After Width: | Height: | Size: 439 B |
34
Skills/Appreciating/AppreciatingIcon.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ciy5ajk2qg6kq"
|
||||
path="res://.godot/imported/AppreciatingIcon.png-936cf70511f2b08b256766df3ff8824b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Skills/Appreciating/AppreciatingIcon.png"
|
||||
dest_files=["res://.godot/imported/AppreciatingIcon.png-936cf70511f2b08b256766df3ff8824b.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
|
||||
27
Skills/Arson/Arson.gd
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
extends Skill
|
||||
|
||||
class_name Arson
|
||||
|
||||
func _init():
|
||||
skillName = "Arson"
|
||||
skillIcon = load("res://Skills/Arson/arsonIcon.png")
|
||||
|
||||
func get_ignition_chance(item:Item):
|
||||
return get_ignition_chance_by_stats(item.get_flammability(), item.get_weight())
|
||||
|
||||
func get_ignition_chance_by_stats(flammability, weight):
|
||||
var fireChance = flammability*0.5
|
||||
|
||||
var addedMassDifficulty = weight
|
||||
fireChance -= addedMassDifficulty
|
||||
if fireChance < -50:
|
||||
fireChance = -50
|
||||
|
||||
fireChance += currentLevel*1.5
|
||||
|
||||
var penalty = floor(((50-flammability) - currentLevel)/10)
|
||||
if penalty > 0:
|
||||
for i in range(penalty):
|
||||
fireChance = fireChance * 0.75
|
||||
|
||||
return fireChance
|
||||
78
Skills/Arson/Fire.gd
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
extends Node2D
|
||||
|
||||
var rng = RandomNumberGenerator.new()
|
||||
|
||||
var itemBurning
|
||||
var timeToBurn = 10
|
||||
|
||||
var endXP = 0
|
||||
var xpPerTick = 0
|
||||
|
||||
var tickDuration = 0.8
|
||||
var tickTimer = 0.8
|
||||
|
||||
func _ready():
|
||||
$FireSprite.play("default")
|
||||
|
||||
var audioStartDelay = rng.randf_range(0, 2)
|
||||
$AudioStreamPlayer2D.play(audioStartDelay)
|
||||
|
||||
func set_item_burning(item):
|
||||
itemBurning = item
|
||||
|
||||
if item.weight < 0.5:
|
||||
timeToBurn = 0.9
|
||||
elif item.weight < 2:
|
||||
timeToBurn = item.weight + 1
|
||||
else:
|
||||
timeToBurn = item.weight
|
||||
if timeToBurn < 3:
|
||||
timeToBurn = 3
|
||||
if timeToBurn > 30:
|
||||
timeToBurn = 30
|
||||
|
||||
endXP = 5
|
||||
endXP += ((100-item.flammability) * 0.05) + (item.value * 0.7)
|
||||
endXP += item.weight * 0.5
|
||||
endXP = floor(endXP)
|
||||
|
||||
if Item.modifications.Sugared in item.itemModifications:
|
||||
endXP -= (item.value * 0.5)
|
||||
endXP = floor(endXP)
|
||||
|
||||
xpPerTick = 1
|
||||
xpPerTick += int(endXP/40)
|
||||
|
||||
func _process(delta):
|
||||
timeToBurn -= delta
|
||||
if timeToBurn <= 0:
|
||||
burn_out()
|
||||
return
|
||||
|
||||
tickTimer -= delta
|
||||
if tickTimer <= 0:
|
||||
tickTimer = tickDuration
|
||||
LevelManager.add_XP("arson", xpPerTick)
|
||||
|
||||
func burn_out():
|
||||
var ashItem = null
|
||||
if Item.modifications.Sugared in itemBurning.itemModifications:
|
||||
ashItem = itemBurning.duplicate()
|
||||
ashItem.itemModifications.erase(Item.modifications.Sugared)
|
||||
ashItem.itemModifications.append(Item.modifications.Caramelized)
|
||||
LevelManager.get_skill("appreciating").experience_item(itemBurning, "caramelized")
|
||||
else:
|
||||
ashItem = AshGenerator.generate_ash(itemBurning)
|
||||
LevelManager.get_skill("appreciating").experience_item(ashItem, "burnedTo")
|
||||
|
||||
if ashItem.get_name(true) == "Popcorn":
|
||||
AchievementManager.complete_achievement("Pop Pop Pop")
|
||||
|
||||
var groundItem = load("res://Objects/GroundItems/GroundItem.tscn").instantiate()
|
||||
|
||||
groundItem.set_item(ashItem)
|
||||
get_parent().add_child(groundItem)
|
||||
groundItem.global_position = global_position
|
||||
|
||||
LevelManager.add_XP("arson", endXP)
|
||||
queue_free()
|
||||
37
Skills/Arson/Fire.tscn
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://byh444i8gvq8e"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://ba25fbsflxkft" path="res://Skills/Arson/FireAnim/Fire1.png" id="1_xh1v6"]
|
||||
[ext_resource type="Texture2D" uid="uid://dufwp4sp2kyuv" path="res://Skills/Arson/FireAnim/Fire2.png" id="2_5gpom"]
|
||||
[ext_resource type="Texture2D" uid="uid://b6a4awj22skbe" path="res://Skills/Arson/FireAnim/Fire3.png" id="3_7bbmj"]
|
||||
[ext_resource type="Script" path="res://Skills/Arson/Fire.gd" id="4_gpc8w"]
|
||||
[ext_resource type="AudioStream" uid="uid://dvhansvh7f4hx" path="res://Sounds/SFX/Fire/fire.mp3" id="5_0wdan"]
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_vomux"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("1_xh1v6")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("2_5gpom")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("3_7bbmj")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 8.0
|
||||
}]
|
||||
|
||||
[node name="Fire" type="Node2D"]
|
||||
script = ExtResource("4_gpc8w")
|
||||
|
||||
[node name="FireSprite" type="AnimatedSprite2D" parent="."]
|
||||
position = Vector2(0, -42)
|
||||
sprite_frames = SubResource("SpriteFrames_vomux")
|
||||
frame_progress = 0.895414
|
||||
|
||||
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
|
||||
stream = ExtResource("5_0wdan")
|
||||
max_distance = 600.0
|
||||
bus = &"SFX"
|
||||
BIN
Skills/Arson/FireAnim/Fire1.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
34
Skills/Arson/FireAnim/Fire1.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ba25fbsflxkft"
|
||||
path="res://.godot/imported/Fire1.png-cb9bcdebc39cb72c99b01066a09d737d.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Skills/Arson/FireAnim/Fire1.png"
|
||||
dest_files=["res://.godot/imported/Fire1.png-cb9bcdebc39cb72c99b01066a09d737d.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
Skills/Arson/FireAnim/Fire2.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
34
Skills/Arson/FireAnim/Fire2.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dufwp4sp2kyuv"
|
||||
path="res://.godot/imported/Fire2.png-9c7d8677f1191816f98a0d4807a783ab.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Skills/Arson/FireAnim/Fire2.png"
|
||||
dest_files=["res://.godot/imported/Fire2.png-9c7d8677f1191816f98a0d4807a783ab.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
Skills/Arson/FireAnim/Fire3.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
34
Skills/Arson/FireAnim/Fire3.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b6a4awj22skbe"
|
||||
path="res://.godot/imported/Fire3.png-564b02b6353aef1394417e2ab70883b8.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Skills/Arson/FireAnim/Fire3.png"
|
||||
dest_files=["res://.godot/imported/Fire3.png-564b02b6353aef1394417e2ab70883b8.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
|
||||
5
Skills/Arson/Smoke.gd
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
extends CPUParticles2D
|
||||
|
||||
func _process(delta):
|
||||
if !emitting:
|
||||
queue_free()
|
||||
BIN
Skills/Arson/Smoke.png
Normal file
|
After Width: | Height: | Size: 117 B |
34
Skills/Arson/Smoke.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cfc72l832cx2j"
|
||||
path="res://.godot/imported/Smoke.png-bec1bd4b03a441730b3e73fb513b5b63.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Skills/Arson/Smoke.png"
|
||||
dest_files=["res://.godot/imported/Smoke.png-bec1bd4b03a441730b3e73fb513b5b63.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
|
||||
25
Skills/Arson/Smoke.tscn
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://uaw0ov1kraos"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://cfc72l832cx2j" path="res://Skills/Arson/Smoke.png" id="1_jbs76"]
|
||||
[ext_resource type="Script" path="res://Skills/Arson/Smoke.gd" id="2_4ndct"]
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_6u5dr"]
|
||||
offsets = PackedFloat32Array(0, 0.759336, 1)
|
||||
colors = PackedColorArray(0, 0, 0, 1, 0.760784, 0.760784, 0.760784, 0, 1, 1, 1, 0)
|
||||
|
||||
[node name="Smoke" type="CPUParticles2D"]
|
||||
emitting = false
|
||||
amount = 6
|
||||
one_shot = true
|
||||
speed_scale = 0.6
|
||||
explosiveness = 0.6
|
||||
texture = ExtResource("1_jbs76")
|
||||
emission_shape = 3
|
||||
emission_rect_extents = Vector2(20, 1)
|
||||
direction = Vector2(0, -1)
|
||||
spread = 0.0
|
||||
gravity = Vector2(0, 0)
|
||||
initial_velocity_min = 27.4
|
||||
initial_velocity_max = 41.1
|
||||
color_ramp = SubResource("Gradient_6u5dr")
|
||||
script = ExtResource("2_4ndct")
|
||||
BIN
Skills/Arson/arsonIcon.png
Normal file
|
After Width: | Height: | Size: 639 B |
34
Skills/Arson/arsonIcon.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ot8vppthxuwx"
|
||||
path="res://.godot/imported/arsonIcon.png-5df1592202ed96d67a0edcfecdaf367d.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Skills/Arson/arsonIcon.png"
|
||||
dest_files=["res://.godot/imported/arsonIcon.png-5df1592202ed96d67a0edcfecdaf367d.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
|
||||
46
Skills/BasketWeaving/BasketWeaving.gd
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
extends Skill
|
||||
|
||||
class_name BasketWeaving
|
||||
|
||||
func _init():
|
||||
skillName = "Basket Weaving"
|
||||
skillIcon = load("res://Skills/BasketWeaving/BasketWeavingIcon.png")
|
||||
|
||||
static func get_basket_space(basket:Item):
|
||||
var basketSpaceAmounts = [1, 3, 5, 8, 10, 15, 20, 25, 32, 35, 40, 45, 60,
|
||||
75, 90, 120, 150, 200, 270, 350, 500]
|
||||
|
||||
var basketLevelStepSize = 100/basketSpaceAmounts.size()
|
||||
var basketLevel = basket.basketPower/basketLevelStepSize
|
||||
if basketLevel >= basketSpaceAmounts.size():
|
||||
basketLevel = basketSpaceAmounts.size() - 1
|
||||
|
||||
return basketSpaceAmounts[basketLevel]
|
||||
|
||||
func get_basketing_speed(item:Item):
|
||||
var basketingSpeed = 50
|
||||
basketingSpeed -= item.get_basketability_difficulty()*0.2
|
||||
|
||||
return basketingSpeed
|
||||
|
||||
func get_item_xp(item):
|
||||
var itemXP = 8
|
||||
itemXP += floori(item.value * 1.6)
|
||||
itemXP += floori(item.get_basketability_difficulty()*1.3)
|
||||
|
||||
if itemXP <= 0:
|
||||
itemXP = 1
|
||||
|
||||
return itemXP
|
||||
|
||||
func get_failed_item_xp(item):
|
||||
var itemXP = get_item_xp(item)
|
||||
itemXP = floor(itemXP * 0.3)
|
||||
|
||||
return itemXP
|
||||
|
||||
func get_fail_chance(item):
|
||||
var blehChance = 0
|
||||
blehChance = (item.get_basketability_difficulty()*0.9) - (currentLevel*0.9)
|
||||
|
||||
return blehChance
|
||||
BIN
Skills/BasketWeaving/BasketWeavingIcon.png
Normal file
|
After Width: | Height: | Size: 606 B |
34
Skills/BasketWeaving/BasketWeavingIcon.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://djpuiwwet5808"
|
||||
path="res://.godot/imported/BasketWeavingIcon.png-3dbd6a57094634e5f8e98c3035394118.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Skills/BasketWeaving/BasketWeavingIcon.png"
|
||||
dest_files=["res://.godot/imported/BasketWeavingIcon.png-3dbd6a57094634e5f8e98c3035394118.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
|
||||
16
Skills/Building/Building.gd
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
extends Skill
|
||||
|
||||
class_name Building
|
||||
|
||||
func _init():
|
||||
skillName = "Building"
|
||||
skillIcon = load("res://Skills/Building/BuildingIcon.png")
|
||||
|
||||
func get_building_speed(item:Item):
|
||||
var buildingSpeed = 70
|
||||
buildingSpeed -= item.get_weight() * 2
|
||||
|
||||
if buildingSpeed <= 20:
|
||||
buildingSpeed = 20
|
||||
|
||||
return buildingSpeed
|
||||
BIN
Skills/Building/BuildingIcon.png
Normal file
|
After Width: | Height: | Size: 343 B |
34
Skills/Building/BuildingIcon.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ee4bs4nsiw4a"
|
||||
path="res://.godot/imported/BuildingIcon.png-3afe4b54eba362bf05dce373a0418b76.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Skills/Building/BuildingIcon.png"
|
||||
dest_files=["res://.godot/imported/BuildingIcon.png-3afe4b54eba362bf05dce373a0418b76.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
|
||||
8
Skills/FastWalking/FastWalking.gd
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
extends Skill
|
||||
|
||||
class_name FastWalking
|
||||
|
||||
func _init():
|
||||
hidden = true
|
||||
skillName = "Fast Walking"
|
||||
skillIcon = load("res://Skills/FastWalking/FastWalkingIcon.png")
|
||||
BIN
Skills/FastWalking/FastWalkingIcon.png
Normal file
|
After Width: | Height: | Size: 404 B |
34
Skills/FastWalking/FastWalkingIcon.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://crwdi3qqkt074"
|
||||
path="res://.godot/imported/FastWalkingIcon.png-35be6485358f67fbc354d11ce0063b25.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Skills/FastWalking/FastWalkingIcon.png"
|
||||
dest_files=["res://.godot/imported/FastWalkingIcon.png-35be6485358f67fbc354d11ce0063b25.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
|
||||
7
Skills/Gaming/Gaming.gd
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
extends Skill
|
||||
|
||||
class_name Gaming
|
||||
|
||||
func _init():
|
||||
skillName = "Gaming"
|
||||
skillIcon = load("res://Skills/Gaming/gamingIcon.png")
|
||||
BIN
Skills/Gaming/gamingIcon.png
Normal file
|
After Width: | Height: | Size: 665 B |
34
Skills/Gaming/gamingIcon.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://gw7htufq5no8"
|
||||
path="res://.godot/imported/gamingIcon.png-54c50d4c7e12b6637bb1ed3ecc06ab76.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Skills/Gaming/gamingIcon.png"
|
||||
dest_files=["res://.godot/imported/gamingIcon.png-54c50d4c7e12b6637bb1ed3ecc06ab76.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
|
||||
7
Skills/Gardening/Gardening.gd
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
extends Skill
|
||||
|
||||
class_name Gardening
|
||||
|
||||
func _init():
|
||||
skillName = "Gardening"
|
||||
skillIcon = load("res://Skills/Gardening/gardeningIcon.png")
|
||||
30
Skills/Gardening/PlantManager.gd
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
extends Node
|
||||
|
||||
var plantSpotDetails = {}
|
||||
|
||||
func clear_plant_details():
|
||||
plantSpotDetails = {}
|
||||
|
||||
func get_all_plant_details():
|
||||
return plantSpotDetails
|
||||
|
||||
func add_plant_details(plantSpotName, details):
|
||||
plantSpotDetails[plantSpotName] = details
|
||||
|
||||
func store_plant_spot_details(plantSpotName, plantSpot):
|
||||
var details = {
|
||||
state = plantSpot.currentState,
|
||||
item = plantSpot.currentItem,
|
||||
queuedStates = plantSpot.queuedStates,
|
||||
plantLives = plantSpot.plantLives,
|
||||
timeBoosted = plantSpot.timeBoosted
|
||||
}
|
||||
|
||||
plantSpotDetails[plantSpotName] = details
|
||||
SaveManager.save_game()
|
||||
|
||||
func get_plant_spot_details(plantSpotName):
|
||||
if plantSpotName in plantSpotDetails.keys():
|
||||
return plantSpotDetails[plantSpotName]
|
||||
|
||||
return null
|
||||
BIN
Skills/Gardening/gardeningIcon.png
Normal file
|
After Width: | Height: | Size: 505 B |
34
Skills/Gardening/gardeningIcon.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bmdajtat8imuu"
|
||||
path="res://.godot/imported/gardeningIcon.png-7e1146790f9f4ba39360b3a287bb083c.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Skills/Gardening/gardeningIcon.png"
|
||||
dest_files=["res://.godot/imported/gardeningIcon.png-7e1146790f9f4ba39360b3a287bb083c.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
|
||||
39
Skills/JuiceDrinking/JuiceDrinking.gd
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
extends Skill
|
||||
|
||||
class_name JuiceDrinking
|
||||
|
||||
func _init():
|
||||
skillName = "Juice Drinking"
|
||||
skillIcon = load("res://Skills/JuiceDrinking/juiceDrinkingIcon.png")
|
||||
|
||||
func get_drink_speed(item):
|
||||
var drinkSpeed = 30
|
||||
drinkSpeed -= (100 - item.get_edibility())*0.2
|
||||
|
||||
if drinkSpeed <= 1:
|
||||
drinkSpeed = 1
|
||||
|
||||
drinkSpeed += currentLevel * 0.1
|
||||
if drinkSpeed >= 35:
|
||||
drinkSpeed = 35
|
||||
|
||||
return drinkSpeed
|
||||
|
||||
func get_item_xp(item):
|
||||
var itemXP = 5
|
||||
itemXP += floori(item.get_value() * 1.5)
|
||||
itemXP += floori((100 - item.get_edibility())*0.8)
|
||||
|
||||
if itemXP <= 0:
|
||||
itemXP = 1
|
||||
|
||||
return itemXP
|
||||
|
||||
func get_bleh_chance(item):
|
||||
var blehChance = 0
|
||||
blehChance = ((100 - item.get_edibility())*0.9) - (currentLevel*0.9)
|
||||
|
||||
if currentLevel > 40:
|
||||
blehChance -= (currentLevel - 40) * 0.5
|
||||
|
||||
return blehChance
|
||||
BIN
Skills/JuiceDrinking/juiceDrinkingIcon.png
Normal file
|
After Width: | Height: | Size: 255 B |
34
Skills/JuiceDrinking/juiceDrinkingIcon.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cpm2y1hysxxhp"
|
||||
path="res://.godot/imported/juiceDrinkingIcon.png-661aa417a3465fdd9e5ac78134ae06be.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Skills/JuiceDrinking/juiceDrinkingIcon.png"
|
||||
dest_files=["res://.godot/imported/juiceDrinkingIcon.png-661aa417a3465fdd9e5ac78134ae06be.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
|
||||
132
Skills/Level_Manager.gd
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
extends Node
|
||||
|
||||
@onready var xpPopupScene = preload("res://Skills/XpPopups/XpPopup.tscn")
|
||||
|
||||
var skills = {}
|
||||
var levelCurve = [40, 80, 100, 30, 30, 200, 120, 80, 300,
|
||||
220, 180, 130, 400, 410, 300, 500, 220, 2000, 90,
|
||||
90, 200, 550, 620, 150, 160, 720, 710, 700, 2220,
|
||||
450, 510, 550, 180, 900, 240, 160, 380, 100, 2500,
|
||||
560, 770, 620, 850, 320, 250, 280, 2000, 450, 1110,
|
||||
1010, 990, 880, 770, 660, 550, 440, 330, 220, 6660]
|
||||
|
||||
var xpPopups = []
|
||||
|
||||
func _init():
|
||||
initialize_skills()
|
||||
|
||||
func hide_skills():
|
||||
if skills["walking"].currentLevel < 20:
|
||||
skills["fastWalking"].hidden = true
|
||||
|
||||
func _process(delta):
|
||||
if skills["fastWalking"].hidden:
|
||||
if skills["walking"].currentLevel >= 20:
|
||||
unlock_skill("fastWalking")
|
||||
|
||||
func unlock_skill(skillName):
|
||||
var skill = skills[skillName]
|
||||
skill.hidden = false
|
||||
|
||||
if !SaveManager.get_save_value(skillName + "Unlocked", false):
|
||||
MessageManager.secret_skill_popup(skill)
|
||||
SaveManager.set_save_value(skillName + "Unlocked", true)
|
||||
|
||||
func add_XP(skillName, amount):
|
||||
var multiplier = SaveManager.get_save_value("xpMult", 1)
|
||||
amount = amount*multiplier
|
||||
amount = roundi(amount)
|
||||
|
||||
var skill = get_skill(skillName)
|
||||
skill.add_XP(amount)
|
||||
|
||||
spawn_XP_drop(skill, amount)
|
||||
|
||||
while skill.currentXP >= get_XP_to_next_level(skill.currentLevel):
|
||||
skill.currentXP -= get_XP_to_next_level(skill.currentLevel)
|
||||
skill.currentLevel += 1
|
||||
MessageManager.levelup_popup(skill)
|
||||
MessageManager.addMessage(skill.skillName + " level is now " + str(skill.currentLevel),
|
||||
null, "System", Color.BLUE, true, false)
|
||||
AchievementManager.skill_level_achievement_checks(skill)
|
||||
|
||||
AchievementManager.total_level_achievement_checks()
|
||||
SaveManager.save_game()
|
||||
|
||||
func spawn_XP_drop(skill:Skill, amount):
|
||||
var newXpPopup = xpPopupScene.instantiate()
|
||||
newXpPopup.set_amount(amount)
|
||||
newXpPopup.set_sprite(skill.get_icon())
|
||||
|
||||
newXpPopup.global_position = GameVariables.player.global_position + Vector2(-50, -100)
|
||||
add_child(newXpPopup)
|
||||
|
||||
clean_up_xp_drops()
|
||||
layout_xp_drops(newXpPopup.global_position)
|
||||
xpPopups.push_front(newXpPopup)
|
||||
|
||||
func clean_up_xp_drops():
|
||||
var xpPopupsSize = xpPopups.size()
|
||||
for i in range(xpPopupsSize):
|
||||
var currentIndex = xpPopupsSize - i - 1
|
||||
var currentXpDrop = xpPopups[currentIndex]
|
||||
if !is_instance_valid(currentXpDrop) or currentXpDrop == null:
|
||||
xpPopups.remove_at(currentIndex)
|
||||
|
||||
func layout_xp_drops(newXpDropPos):
|
||||
var lastPos = newXpDropPos
|
||||
for i in range(xpPopups.size()):
|
||||
var currentXpPopup = xpPopups[i]
|
||||
|
||||
var yDif = lastPos.y - currentXpPopup.global_position.y
|
||||
if yDif <= 20:
|
||||
currentXpPopup.global_position.y = lastPos.y - 20
|
||||
|
||||
lastPos = currentXpPopup.global_position
|
||||
|
||||
func get_XP_to_next_level(currentLevel:int):
|
||||
if currentLevel > levelCurve.size():
|
||||
return 99999900
|
||||
|
||||
return levelCurve[currentLevel - 1]
|
||||
|
||||
func get_total_level():
|
||||
var totalLevel = 0
|
||||
for skill in skills.values():
|
||||
totalLevel += skill.currentLevel
|
||||
|
||||
return totalLevel
|
||||
|
||||
func skill_check(skillName, levelNeeded):
|
||||
var overrideCheck = SaveManager.get_save_value("disableQuestLevelChecks", false)
|
||||
if overrideCheck:
|
||||
return true
|
||||
|
||||
if skills[skillName].currentLevel >= levelNeeded:
|
||||
return true
|
||||
return false
|
||||
|
||||
func get_skill(skillName):
|
||||
return skills[skillName]
|
||||
|
||||
func get_all_skills():
|
||||
return skills.values()
|
||||
|
||||
func add_all_xp(amount:int):
|
||||
var skillNames = skills.keys()
|
||||
for skill in skills:
|
||||
add_XP(skill, amount)
|
||||
|
||||
func initialize_skills():
|
||||
skills["arson"] = Arson.new()
|
||||
skills["walking"] = Walking.new()
|
||||
skills["juiceDrinking"] = JuiceDrinking.new()
|
||||
skills["scavenging"] = Scavenging.new()
|
||||
skills["basketWeaving"] = BasketWeaving.new()
|
||||
skills["appreciating"] = Appreciating.new()
|
||||
skills["gaming"] = Gaming.new()
|
||||
skills["trampolining"] = Trampolining.new()
|
||||
skills["gardening"] = Gardening.new()
|
||||
skills["swimming"] = Swimming.new()
|
||||
skills["building"] = Building.new()
|
||||
skills["fastWalking"] = FastWalking.new()
|
||||
22
Skills/Scavenging/Scavenging.gd
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
extends Skill
|
||||
|
||||
class_name Scavenging
|
||||
|
||||
func _init():
|
||||
skillName = "Scavenging"
|
||||
skillIcon = load("res://Skills/Scavenging/scavengingIcon2.png")
|
||||
|
||||
func get_scavenging_speed(difficulty):
|
||||
var scavengingSpeed = 1
|
||||
scavengingSpeed += (currentLevel - 1)
|
||||
|
||||
var penalty = floor((difficulty - currentLevel)/5)
|
||||
|
||||
if penalty > 0:
|
||||
for i in range(penalty):
|
||||
scavengingSpeed = scavengingSpeed * 0.75
|
||||
|
||||
if scavengingSpeed > difficulty * 2:
|
||||
scavengingSpeed = difficulty * 2
|
||||
|
||||
return scavengingSpeed
|
||||
BIN
Skills/Scavenging/scavengingIcon.png
Normal file
|
After Width: | Height: | Size: 644 B |
34
Skills/Scavenging/scavengingIcon.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dku66wbd2goc4"
|
||||
path="res://.godot/imported/scavengingIcon.png-e93a1e92122adf4cd31dce1735249633.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Skills/Scavenging/scavengingIcon.png"
|
||||
dest_files=["res://.godot/imported/scavengingIcon.png-e93a1e92122adf4cd31dce1735249633.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
Skills/Scavenging/scavengingIcon2.png
Normal file
|
After Width: | Height: | Size: 944 B |
34
Skills/Scavenging/scavengingIcon2.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://d30v7gk31mcms"
|
||||
path="res://.godot/imported/scavengingIcon2.png-078dfa12408655eea87957a4cf734f1c.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Skills/Scavenging/scavengingIcon2.png"
|
||||
dest_files=["res://.godot/imported/scavengingIcon2.png-078dfa12408655eea87957a4cf734f1c.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
Skills/SecretSkillIcon.png
Normal file
|
After Width: | Height: | Size: 318 B |
34
Skills/SecretSkillIcon.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cpknxkiy5wo4m"
|
||||
path="res://.godot/imported/SecretSkillIcon.png-eb7763026191c0221f4918b1252cb5dd.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Skills/SecretSkillIcon.png"
|
||||
dest_files=["res://.godot/imported/SecretSkillIcon.png-eb7763026191c0221f4918b1252cb5dd.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
|
||||
18
Skills/Skill.gd
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
extends RefCounted
|
||||
|
||||
class_name Skill
|
||||
|
||||
var skillName = "Skill"
|
||||
var currentXP = 0
|
||||
var currentLevel = 1
|
||||
|
||||
var skillIcon
|
||||
|
||||
var hiddenIcon = preload("res://Skills/SecretSkillIcon.png")
|
||||
var hidden = false
|
||||
|
||||
func get_icon():
|
||||
return skillIcon
|
||||
|
||||
func add_XP(amount):
|
||||
currentXP += amount
|
||||
7
Skills/Swimming/Swimming.gd
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
extends Skill
|
||||
|
||||
class_name Swimming
|
||||
|
||||
func _init():
|
||||
skillName = "Swimming"
|
||||
skillIcon = load("res://Skills/Swimming/SwimmingIcon.png")
|
||||
BIN
Skills/Swimming/SwimmingIcon.png
Normal file
|
After Width: | Height: | Size: 411 B |
34
Skills/Swimming/SwimmingIcon.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://crkqaphup2oms"
|
||||
path="res://.godot/imported/SwimmingIcon.png-91c79199441a7e73e4ff14d9ff0b25f8.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Skills/Swimming/SwimmingIcon.png"
|
||||
dest_files=["res://.godot/imported/SwimmingIcon.png-91c79199441a7e73e4ff14d9ff0b25f8.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
Skills/Trampolining/Trampoline.png
Normal file
|
After Width: | Height: | Size: 329 B |
34
Skills/Trampolining/Trampoline.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://86n37xm0jhuk"
|
||||
path="res://.godot/imported/Trampoline.png-fe6f04573b2926e624c58d86c20fbe1e.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Skills/Trampolining/Trampoline.png"
|
||||
dest_files=["res://.godot/imported/Trampoline.png-fe6f04573b2926e624c58d86c20fbe1e.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
|
||||
7
Skills/Trampolining/Trampolining.gd
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
extends Skill
|
||||
|
||||
class_name Trampolining
|
||||
|
||||
func _init():
|
||||
skillName = "Trampolining"
|
||||
skillIcon = load("res://Skills/Trampolining/Trampoline.png")
|
||||
7
Skills/Walking/Walking.gd
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
extends Skill
|
||||
|
||||
class_name Walking
|
||||
|
||||
func _init():
|
||||
skillName = "Walking"
|
||||
skillIcon = load("res://Skills/Walking/walkingIcon.png")
|
||||
BIN
Skills/Walking/walkingIcon.png
Normal file
|
After Width: | Height: | Size: 363 B |
34
Skills/Walking/walkingIcon.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cxy5a2tgi7p4r"
|
||||
path="res://.godot/imported/walkingIcon.png-eca2ca1f2d2bb02cfd1a1f06da08c675.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Skills/Walking/walkingIcon.png"
|
||||
dest_files=["res://.godot/imported/walkingIcon.png-eca2ca1f2d2bb02cfd1a1f06da08c675.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
|
||||
19
Skills/XpPopups/XpPopup.gd
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
extends Control
|
||||
|
||||
var lifeSpan = 1
|
||||
|
||||
func _process(delta):
|
||||
global_position += Vector2(0, -32)*delta
|
||||
|
||||
lifeSpan -= delta
|
||||
if lifeSpan <= 0:
|
||||
queue_free()
|
||||
|
||||
func set_amount(amount):
|
||||
var labelText = "+"
|
||||
labelText += XpDisplayUtils.xpFormater(amount)
|
||||
labelText += " XP"
|
||||
$MarginContainer/XPLabel.text = labelText
|
||||
|
||||
func set_sprite(sprite):
|
||||
$SkillIcon.texture = sprite
|
||||
29
Skills/XpPopups/XpPopup.tscn
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://crx7mmxnu1tre"]
|
||||
|
||||
[ext_resource type="Script" path="res://Skills/XpPopups/XpPopup.gd" id="1_ihtiy"]
|
||||
[ext_resource type="Texture2D" uid="uid://bmdajtat8imuu" path="res://Skills/Gardening/gardeningIcon.png" id="1_u0t71"]
|
||||
|
||||
[node name="XpPopup" type="HSplitContainer"]
|
||||
z_index = 50
|
||||
offset_left = -44.0
|
||||
offset_top = -11.0
|
||||
offset_right = 43.0
|
||||
offset_bottom = 15.0
|
||||
dragger_visibility = 2
|
||||
script = ExtResource("1_ihtiy")
|
||||
|
||||
[node name="SkillIcon" type="TextureRect" parent="."]
|
||||
layout_mode = 2
|
||||
texture = ExtResource("1_u0t71")
|
||||
expand_mode = 2
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 5
|
||||
|
||||
[node name="XPLabel" type="Label" parent="MarginContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.380392, 0.976471, 0.0431373, 1)
|
||||
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
|
||||
theme_override_constants/outline_size = 8
|
||||
text = "+0.2 XP"
|
||||