aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Gräf <romangraef@gmail.com>2020-04-20 22:47:50 +0200
committerRoman Gräf <romangraef@gmail.com>2020-04-20 22:47:50 +0200
commitc3c0618197295086f052ade7c22e828386a60d5f (patch)
tree64fb564c66072f6709e74b32d871e344cb5c5c80
parentab4f6919f7294e4616ff5d96fac0bac331f3e340 (diff)
downloadLDJam46-c3c0618197295086f052ade7c22e828386a60d5f.tar.gz
LDJam46-c3c0618197295086f052ade7c22e828386a60d5f.tar.bz2
LDJam46-c3c0618197295086f052ade7c22e828386a60d5f.zip
displays
-rw-r--r--MainScene.tscn24
-rw-r--r--assets/Angry lawyer 2.png.import34
-rw-r--r--assets/OBJECTION.png.import34
-rw-r--r--buildings/buildings.tscn37
-rw-r--r--buildings/dev.gd4
-rw-r--r--lawsuit/lawsuit.tscn3
-rw-r--r--main_scene/Label.gd2
-rw-r--r--main_scene/bean_display.gd4
-rw-r--r--main_scene/bitcoin_display.gd3
-rw-r--r--main_scene/coffee_display.gd4
-rw-r--r--main_scene/management.tscn95
-rw-r--r--riot/riot.gd1
-rw-r--r--save_state.gd1
-rw-r--r--tutorial/riot.gd6
14 files changed, 221 insertions, 31 deletions
diff --git a/MainScene.tscn b/MainScene.tscn
index 5782fa5..564ead9 100644
--- a/MainScene.tscn
+++ b/MainScene.tscn
@@ -1,8 +1,28 @@
-[gd_scene load_steps=2 format=2]
+[gd_scene load_steps=4 format=2]
[ext_resource path="res://main_scene/management.tscn" type="PackedScene" id=1]
+[ext_resource path="res://main_scene/Label.gd" type="Script" id=2]
+
+[sub_resource type="StyleBoxFlat" id=1]
+bg_color = Color( 0, 0.270588, 1, 1 )
[node name="Node2D" type="Node2D"]
[node name="management" parent="." instance=ExtResource( 1 )]
-position = Vector2( 1.43198, 0 )
+position = Vector2( -0.516018, 0 )
+
+[node name="Node2D" type="Node2D" parent="."]
+z_index = 2
+
+[node name="Label" type="Label" parent="Node2D"]
+pause_mode = 2
+margin_right = 1010.0
+margin_bottom = 14.0
+custom_styles/normal = SubResource( 1 )
+custom_colors/font_color = Color( 0, 0, 0, 1 )
+text = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+autowrap = true
+script = ExtResource( 2 )
+__meta__ = {
+"_edit_use_anchors_": false
+}
diff --git a/assets/Angry lawyer 2.png.import b/assets/Angry lawyer 2.png.import
new file mode 100644
index 0000000..227b454
--- /dev/null
+++ b/assets/Angry lawyer 2.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/Angry lawyer 2.png-8be4f9b4f6d62e247fe5ce258198876b.stex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://assets/Angry lawyer 2.png"
+dest_files=[ "res://.import/Angry lawyer 2.png-8be4f9b4f6d62e247fe5ce258198876b.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/OBJECTION.png.import b/assets/OBJECTION.png.import
new file mode 100644
index 0000000..04b0c45
--- /dev/null
+++ b/assets/OBJECTION.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/OBJECTION.png-3932c3345e52d055d15b0d1e2da92961.stex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://assets/OBJECTION.png"
+dest_files=[ "res://.import/OBJECTION.png-3932c3345e52d055d15b0d1e2da92961.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/buildings/buildings.tscn b/buildings/buildings.tscn
index 990183c..7510e88 100644
--- a/buildings/buildings.tscn
+++ b/buildings/buildings.tscn
@@ -1,4 +1,4 @@
-[gd_scene load_steps=10 format=2]
+[gd_scene load_steps=13 format=2]
[ext_resource path="res://buildings/intern.gd" type="Script" id=1]
[ext_resource path="res://assets/intern.png" type="Texture" id=2]
@@ -7,6 +7,8 @@
[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]
+[ext_resource path="res://lib/building_interface.gd" type="Script" id=8]
+[ext_resource path="res://assets/AddAnwalt.png" type="Texture" id=9]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 86.5173, 127.028 )
@@ -14,6 +16,9 @@ extents = Vector2( 86.5173, 127.028 )
[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 84.7312, 127.29 )
+[sub_resource type="RectangleShape2D" id=3]
+extents = Vector2( 84.1407, 116.674 )
+
[node name="buildings" type="Node2D"]
[node name="dev" type="Sprite" parent="."]
@@ -89,3 +94,33 @@ __meta__ = {
position = Vector2( 175.565, 41.7443 )
texture = ExtResource( 6 )
script = ExtResource( 7 )
+
+[node name="lawyer" type="Sprite" parent="."]
+position = Vector2( 64.4487, 182.985 )
+scale = Vector2( 0.4, 0.4 )
+texture = ExtResource( 9 )
+script = ExtResource( 8 )
+tick_rate = -1.0
+base_cost = 1000.0
+building_identifier = "lawyer"
+
+[node name="Area2D" type="Area2D" parent="lawyer"]
+script = ExtResource( 4 )
+
+[node name="CollisionShape2D" type="CollisionShape2D" parent="lawyer/Area2D"]
+position = Vector2( -23.6842, -2.63153 )
+shape = SubResource( 3 )
+
+[node name="Label" type="Label" parent="lawyer"]
+margin_right = 40.0
+margin_bottom = 14.0
+__meta__ = {
+"_edit_use_anchors_": false
+}
+
+[node name="Cost" type="Label" parent="lawyer"]
+margin_right = 40.0
+margin_bottom = 14.0
+__meta__ = {
+"_edit_use_anchors_": false
+}
diff --git a/buildings/dev.gd b/buildings/dev.gd
index f7baf87..96f0615 100644
--- a/buildings/dev.gd
+++ b/buildings/dev.gd
@@ -2,10 +2,12 @@ extends BuildingInterface
var riot := preload("res://riot/riot.tscn")
+var law_suit := preload("res://lawsuit/lawsuit.tscn")
func _tick() -> void:
if get_amount() == 0:
return
+
if SaveState.riot_cooldown == 0:
SaveState.coffee -= get_amount() * int(pow(2, SaveState.upgrades['wageslavery']))
if SaveState.coffee < 0:
@@ -19,6 +21,7 @@ func _tick() -> void:
else:
SaveState.riot_cooldown -= 1
+
func invoke_riot() -> void:
SaveState.riot_cooldown = -1
var mgt = find_parent('management')
@@ -26,3 +29,4 @@ func invoke_riot() -> void:
mgt.pause_mode = PAUSE_MODE_STOP
mgt.get_parent().add_child(riot.instance())
+
diff --git a/lawsuit/lawsuit.tscn b/lawsuit/lawsuit.tscn
new file mode 100644
index 0000000..b171e8d
--- /dev/null
+++ b/lawsuit/lawsuit.tscn
@@ -0,0 +1,3 @@
+[gd_scene format=2]
+
+[node name="Node2D" type="Node2D"]
diff --git a/main_scene/Label.gd b/main_scene/Label.gd
index 0c1c4a0..5901872 100644
--- a/main_scene/Label.gd
+++ b/main_scene/Label.gd
@@ -1,5 +1,7 @@
extends Label
+
func _process(delta):
text = JSON.print(SaveState.pack_data())
+
diff --git a/main_scene/bean_display.gd b/main_scene/bean_display.gd
new file mode 100644
index 0000000..e1d2f6c
--- /dev/null
+++ b/main_scene/bean_display.gd
@@ -0,0 +1,4 @@
+extends Label
+
+func _process(delta):
+ text = str(SaveState.coffee_beans)
diff --git a/main_scene/bitcoin_display.gd b/main_scene/bitcoin_display.gd
new file mode 100644
index 0000000..f3d3a85
--- /dev/null
+++ b/main_scene/bitcoin_display.gd
@@ -0,0 +1,3 @@
+extends Label
+func _process(delta):
+ text = str(SaveState.bitcoin)
diff --git a/main_scene/coffee_display.gd b/main_scene/coffee_display.gd
new file mode 100644
index 0000000..7fbbee0
--- /dev/null
+++ b/main_scene/coffee_display.gd
@@ -0,0 +1,4 @@
+extends Label
+
+func _process(delta):
+ text = str(SaveState.coffee)
diff --git a/main_scene/management.tscn b/main_scene/management.tscn
index fef4fca..8486c5f 100644
--- a/main_scene/management.tscn
+++ b/main_scene/management.tscn
@@ -1,8 +1,8 @@
-[gd_scene load_steps=19 format=2]
+[gd_scene load_steps=24 format=2]
[ext_resource path="res://assets/background.png" type="Texture" id=1]
[ext_resource path="res://main_scene/coffee_machine.gd" type="Script" id=2]
-[ext_resource path="res://main_scene/Label.gd" type="Script" id=3]
+[ext_resource path="res://main_scene/bitcoin_display.gd" type="Script" id=3]
[ext_resource path="res://buildings/buildings.tscn" type="PackedScene" id=4]
[ext_resource path="res://main_scene/bean.gd" type="Script" id=5]
[ext_resource path="res://assets/BuyBeans.png" type="Texture" id=6]
@@ -16,6 +16,11 @@
[ext_resource path="res://tutorial/riot_aftermath.gd" type="Script" id=14]
[ext_resource path="res://tutorial/upgrades.gd" type="Script" id=15]
[ext_resource path="res://main_scene/konami_check.gd" type="Script" id=16]
+[ext_resource path="res://assets/BTCicon.png" type="Texture" id=17]
+[ext_resource path="res://assets/BeanIcon.png" type="Texture" id=18]
+[ext_resource path="res://main_scene/bean_display.gd" type="Script" id=19]
+[ext_resource path="res://main_scene/coffee_display.gd" type="Script" id=20]
+[ext_resource path="res://assets/coffeeIcon.png" type="Texture" id=21]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 360, 360 )
@@ -24,55 +29,46 @@ extents = Vector2( 360, 360 )
extents = Vector2( 228.401, 203.958 )
[node name="Node2D" type="Node2D"]
+z_index = -1
script = ExtResource( 16 )
-[node name="CanvasLayer" type="CanvasLayer" parent="."]
-
-[node name="background" type="Sprite" parent="CanvasLayer"]
+[node name="background" type="Sprite" parent="."]
position = Vector2( 512.018, 299.606 )
z_index = -1
texture = ExtResource( 1 )
-[node name="Label" type="Label" parent="CanvasLayer"]
-margin_right = 237.0
-margin_bottom = 97.0
-script = ExtResource( 3 )
-__meta__ = {
-"_edit_use_anchors_": false
-}
-
-[node name="buildings" parent="CanvasLayer" instance=ExtResource( 4 )]
+[node name="buildings" parent="." instance=ExtResource( 4 )]
position = Vector2( 695.516, 65.6175 )
-[node name="coffee_maschine" type="Sprite" parent="CanvasLayer"]
+[node name="coffee_maschine" type="Sprite" parent="."]
position = Vector2( 519.712, 314.253 )
scale = Vector2( 0.2, 0.2 )
texture = ExtResource( 8 )
-[node name="Area2D" type="Area2D" parent="CanvasLayer/coffee_maschine"]
+[node name="Area2D" type="Area2D" parent="coffee_maschine"]
script = ExtResource( 2 )
-[node name="CollisionShape2D" type="CollisionShape2D" parent="CanvasLayer/coffee_maschine/Area2D"]
+[node name="CollisionShape2D" type="CollisionShape2D" parent="coffee_maschine/Area2D"]
position = Vector2( -40.0001, -0.00012207 )
shape = SubResource( 1 )
-[node name="upgrades" parent="CanvasLayer" instance=ExtResource( 9 )]
+[node name="upgrades" parent="." instance=ExtResource( 9 )]
position = Vector2( 20.5055, 36.9098 )
-[node name="BeanIcon" type="Sprite" parent="CanvasLayer"]
-position = Vector2( 421.662, 194.889 )
+[node name="BeanIcon" type="Sprite" parent="."]
+position = Vector2( 518.533, 465.459 )
texture = ExtResource( 6 )
script = ExtResource( 5 )
-[node name="Area2D" type="Area2D" parent="CanvasLayer/BeanIcon"]
+[node name="Area2D" type="Area2D" parent="BeanIcon"]
script = ExtResource( 7 )
-[node name="CollisionShape2D" type="CollisionShape2D" parent="CanvasLayer/BeanIcon/Area2D"]
+[node name="CollisionShape2D" type="CollisionShape2D" parent="BeanIcon/Area2D"]
position = Vector2( -0.0478821, -0.59053 )
scale = Vector2( 0.174159, 0.186657 )
shape = SubResource( 2 )
-[node name="intro" parent="CanvasLayer" instance=ExtResource( 10 )]
+[node name="intro" parent="." instance=ExtResource( 10 )]
visible = false
margin_left = 347.916
margin_top = 183.211
@@ -87,7 +83,7 @@ Start by clicking the coffee machine to brew some coffee.
script = ExtResource( 11 )
identifier = "introduction"
-[node name="coffee_beans" parent="CanvasLayer" instance=ExtResource( 10 )]
+[node name="coffee_beans" parent="." instance=ExtResource( 10 )]
visible = false
margin_left = 355.319
margin_top = 99.9334
@@ -100,7 +96,7 @@ You can buy 1000 for just 100 bitcoin"
script = ExtResource( 12 )
identifier = "coffee_beans"
-[node name="devs" parent="CanvasLayer" instance=ExtResource( 10 )]
+[node name="devs" parent="." instance=ExtResource( 10 )]
visible = false
margin_left = 584.068
margin_top = 105.736
@@ -114,7 +110,7 @@ they will revolt."
script = ExtResource( 13 )
identifier = "devs"
-[node name="riot_aftermath" parent="CanvasLayer" instance=ExtResource( 10 )]
+[node name="riot_aftermath" parent="." instance=ExtResource( 10 )]
visible = false
margin_left = 379.131
margin_top = 203.762
@@ -129,7 +125,7 @@ conditions"
script = ExtResource( 14 )
identifier = "riot_aftermath"
-[node name="upgrades2" parent="CanvasLayer" instance=ExtResource( 10 )]
+[node name="upgrades2" parent="." instance=ExtResource( 10 )]
visible = false
margin_left = 450.949
margin_top = 200.422
@@ -141,3 +137,48 @@ that some upgrades may have varying results
regarding your popularity."
script = ExtResource( 15 )
identifier = "upgrades"
+
+[node name="bean_display" type="Sprite" parent="."]
+position = Vector2( 434.88, 119.351 )
+texture = ExtResource( 18 )
+
+[node name="Label" type="Label" parent="bean_display"]
+margin_left = 14.44
+margin_top = -7.22
+margin_right = 54.44
+margin_bottom = 6.78
+custom_colors/font_color = Color( 0, 0, 0, 1 )
+script = ExtResource( 19 )
+__meta__ = {
+"_edit_use_anchors_": false
+}
+
+[node name="bitcoin_display" type="Sprite" parent="."]
+position = Vector2( 435.005, 178.695 )
+texture = ExtResource( 17 )
+
+[node name="Label" type="Label" parent="bitcoin_display"]
+margin_left = 14.44
+margin_top = -7.22
+margin_right = 54.44
+margin_bottom = 6.78
+custom_colors/font_color = Color( 0, 0, 0, 1 )
+script = ExtResource( 3 )
+__meta__ = {
+"_edit_use_anchors_": false
+}
+
+[node name="coffee_display" type="Sprite" parent="."]
+position = Vector2( 435.005, 148.01 )
+texture = ExtResource( 21 )
+
+[node name="Label" type="Label" parent="coffee_display"]
+margin_left = 10.83
+margin_top = -5.41499
+margin_right = 50.83
+margin_bottom = 8.58501
+custom_colors/font_color = Color( 0, 0, 0, 1 )
+script = ExtResource( 20 )
+__meta__ = {
+"_edit_use_anchors_": false
+}
diff --git a/riot/riot.gd b/riot/riot.gd
index 331b290..30f18ba 100644
--- a/riot/riot.gd
+++ b/riot/riot.gd
@@ -21,6 +21,7 @@ func _process(delta):
var devs = []
func _ready() -> void:
+ print("Ready")
for i in range(SaveState.upgrades['wageslavery'] + 1):
var instance: AngryDev = dev_blueprint.instance()
var vec = random_position()
diff --git a/save_state.gd b/save_state.gd
index 54c7b8a..ede8608 100644
--- a/save_state.gd
+++ b/save_state.gd
@@ -50,6 +50,7 @@ var riot_cooldown = 0
var buildings = {
"intern": 0,
"dev": 0,
+ "lawyer": 0,
}
var upgrades = {
"wageslavery": 0,
diff --git a/tutorial/riot.gd b/tutorial/riot.gd
index b000280..931410f 100644
--- a/tutorial/riot.gd
+++ b/tutorial/riot.gd
@@ -1,3 +1,7 @@
extends TutorialPopup
+var i = 0
func _trigger():
- return true
+ return i > 1
+func _process(delta):
+ ._process(delta)
+ i+=delta