aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/BeanIcon.png.import34
-rw-r--r--assets/laser_blast.png.import6
-rw-r--r--buildings/buildings.tscn9
-rw-r--r--buildings/dev.gd3
-rw-r--r--buildings/glasses.gd7
-rw-r--r--lib/upgrade_interface.gd9
-rw-r--r--project.godot10
-rw-r--r--save_state.gd2
-rw-r--r--upgrades/upgrades.tscn36
-rw-r--r--upgrades/wageslavery.gd7
10 files changed, 104 insertions, 19 deletions
diff --git a/assets/BeanIcon.png.import b/assets/BeanIcon.png.import
new file mode 100644
index 0000000..324ef0f
--- /dev/null
+++ b/assets/BeanIcon.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/BeanIcon.png-6addd67b7b9cea3b0ae2e8a36db585e8.stex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://assets/BeanIcon.png"
+dest_files=[ "res://.import/BeanIcon.png-6addd67b7b9cea3b0ae2e8a36db585e8.stex" ]
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/bptc_ldr=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+process/invert_color=false
+stream=false
+size_limit=0
+detect_3d=true
+svg/scale=1.0
diff --git a/assets/laser_blast.png.import b/assets/laser_blast.png.import
index f9e6604..2899f95 100644
--- a/assets/laser_blast.png.import
+++ b/assets/laser_blast.png.import
@@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
-path="res://.import/laser_blast.PNG-98f5df94b5d70eb459cbeaba7d67a38b.stex"
+path="res://.import/laser_blast.png-faf99ac52547b5232e1f87a2c7649cc8.stex"
metadata={
"vram_texture": false
}
[deps]
-source_file="res://assets/laser_blast.PNG"
-dest_files=[ "res://.import/laser_blast.PNG-98f5df94b5d70eb459cbeaba7d67a38b.stex" ]
+source_file="res://assets/laser_blast.png"
+dest_files=[ "res://.import/laser_blast.png-faf99ac52547b5232e1f87a2c7649cc8.stex" ]
[params]
diff --git a/buildings/buildings.tscn b/buildings/buildings.tscn
index f2c80ef..574dedb 100644
--- a/buildings/buildings.tscn
+++ b/buildings/buildings.tscn
@@ -1,10 +1,12 @@
-[gd_scene load_steps=8 format=2]
+[gd_scene load_steps=10 format=2]
[ext_resource path="res://buildings/intern.gd" type="Script" id=1]
[ext_resource path="res://assets/intern.png" type="Texture" id=2]
[ext_resource path="res://assets/hire.png" type="Texture" id=3]
[ext_resource path="res://lib/base_buyable.gd" type="Script" id=4]
[ext_resource path="res://buildings/dev.gd" type="Script" id=5]
+[ext_resource path="res://assets/glasses.png" type="Texture" id=6]
+[ext_resource path="res://buildings/glasses.gd" type="Script" id=7]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 86.5173, 127.028 )
@@ -63,3 +65,8 @@ margin_bottom = 106.0
__meta__ = {
"_edit_use_anchors_": false
}
+
+[node name="glasses" type="Sprite" parent="."]
+position = Vector2( 175.565, 41.7443 )
+texture = ExtResource( 6 )
+script = ExtResource( 7 )
diff --git a/buildings/dev.gd b/buildings/dev.gd
index fababd7..abc1d77 100644
--- a/buildings/dev.gd
+++ b/buildings/dev.gd
@@ -10,7 +10,8 @@ func _tick() -> void:
invoke_riot()
SaveState.coffee = 0
else:
- SaveState.gain_bitcoin(get_amount())
+ SaveState.gain_bitcoin(int(pow(get_amount(),
+ 1 + SaveState.upgrades['sunglasses'] / 10.0)))
else:
SaveState.riot_cooldown -= 1
diff --git a/buildings/glasses.gd b/buildings/glasses.gd
new file mode 100644
index 0000000..89b68cb
--- /dev/null
+++ b/buildings/glasses.gd
@@ -0,0 +1,7 @@
+extends Sprite
+
+func _process(delta):
+ if SaveState.has_upgrade("sunglasses"):
+ show()
+ else:
+ hide()
diff --git a/lib/upgrade_interface.gd b/lib/upgrade_interface.gd
new file mode 100644
index 0000000..b7f05ee
--- /dev/null
+++ b/lib/upgrade_interface.gd
@@ -0,0 +1,9 @@
+extends BuildingInterface
+class_name UpgradeInterface
+
+func set_amount(amount: int) -> void:
+ SaveState.upgrades[building_identifier] = amount
+
+func get_amount() -> int:
+ return SaveState.upgrades[building_identifier]
+
diff --git a/project.godot b/project.godot
index 2a5bac6..ba959f0 100644
--- a/project.godot
+++ b/project.godot
@@ -38,6 +38,11 @@ _global_script_classes=[ {
"class": "Ticked",
"language": "GDScript",
"path": "res://lib/ticked.gd"
+}, {
+"base": "BuildingInterface",
+"class": "UpgradeInterface",
+"language": "GDScript",
+"path": "res://lib/upgrade_interface.gd"
} ]
_global_script_class_icons={
"AngryDev": "",
@@ -45,14 +50,15 @@ _global_script_class_icons={
"BuildingInterface": "",
"ClickableArea": "",
"Manager": "",
-"Ticked": ""
+"Ticked": "",
+"UpgradeInterface": ""
}
[application]
config/name="LDJam46"
run/main_scene="res://MainScene.tscn"
-config/icon="res://icon.png"
+config/icon="res://assets/coffeeIcon.png"
[autoload]
diff --git a/save_state.gd b/save_state.gd
index c5af6c2..2ce8b0d 100644
--- a/save_state.gd
+++ b/save_state.gd
@@ -6,7 +6,7 @@ var buildings = {
}
var upgrades = {
"wageslavery": 0,
- "sunglasses": 1,
+ "sunglasses": 0,
}
func has_upgrade(name):
diff --git a/upgrades/upgrades.tscn b/upgrades/upgrades.tscn
index ea45d2f..503cbb6 100644
--- a/upgrades/upgrades.tscn
+++ b/upgrades/upgrades.tscn
@@ -1,12 +1,16 @@
-[gd_scene load_steps=5 format=2]
+[gd_scene load_steps=7 format=2]
[ext_resource path="res://assets/wageslavery.png" type="Texture" id=1]
-[ext_resource path="res://upgrades/wageslavery.gd" type="Script" id=2]
+[ext_resource path="res://lib/upgrade_interface.gd" type="Script" id=2]
[ext_resource path="res://lib/base_buyable.gd" type="Script" id=3]
+[ext_resource path="res://assets/glasses.png" type="Texture" id=4]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 32, 32 )
+[sub_resource type="RectangleShape2D" id=2]
+extents = Vector2( 14.3177, 10 )
+
[node name="Node2D" type="Node2D"]
[node name="wageslavery" type="Sprite" parent="."]
@@ -14,8 +18,8 @@ position = Vector2( 62.9383, 60.4207 )
texture = ExtResource( 1 )
script = ExtResource( 2 )
tick_rate = -1.0
-base_cost = 200.0
-cost_multiplier = 100.0
+base_cost = 150.0
+cost_multiplier = 2.0
building_identifier = "wageslavery"
[node name="Area2D" type="Area2D" parent="wageslavery"]
@@ -32,3 +36,27 @@ margin_bottom = 29.9221
__meta__ = {
"_edit_use_anchors_": false
}
+
+[node name="sunglasses" type="Sprite" parent="."]
+position = Vector2( 151.755, 62.1597 )
+scale = Vector2( 2.07172, 1.99134 )
+texture = ExtResource( 4 )
+script = ExtResource( 2 )
+tick_rate = -1.0
+base_cost = 200.0
+cost_multiplier = 100.0
+building_identifier = "sunglasses"
+
+[node name="Area2D" type="Area2D" parent="sunglasses"]
+script = ExtResource( 3 )
+
+[node name="CollisionShape2D" type="CollisionShape2D" parent="sunglasses/Area2D"]
+position = Vector2( 0.82769, 0.430544 )
+shape = SubResource( 2 )
+
+[node name="Label" type="Label" parent="sunglasses"]
+margin_right = 40.0
+margin_bottom = 14.0
+__meta__ = {
+"_edit_use_anchors_": false
+}
diff --git a/upgrades/wageslavery.gd b/upgrades/wageslavery.gd
deleted file mode 100644
index 181df4b..0000000
--- a/upgrades/wageslavery.gd
+++ /dev/null
@@ -1,7 +0,0 @@
-extends BuildingInterface
-
-func set_amount(amount: int) -> void:
- SaveState.upgrades['wageslavery'] = amount
-
-func get_amount() -> int:
- return SaveState.upgrades['wageslavery']