Merge branch 'master' of ssh://git.sjkillen.ca:2222/sjkillen/everything_has_a_price_jam
This commit is contained in:
commit
9a7ba5ad60
24 changed files with 134 additions and 34 deletions
BIN
audio/787351__gertraut_hecher__medieval-dance-saltarello.wav
Normal file
BIN
audio/787351__gertraut_hecher__medieval-dance-saltarello.wav
Normal file
Binary file not shown.
|
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://b01aiy2tr1jnn"
|
||||
path="res://.godot/imported/787351__gertraut_hecher__medieval-dance-saltarello.wav-dafa1b0c9aa497b803110dbc04598fa0.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://audio/787351__gertraut_hecher__medieval-dance-saltarello.wav"
|
||||
dest_files=["res://.godot/imported/787351__gertraut_hecher__medieval-dance-saltarello.wav-dafa1b0c9aa497b803110dbc04598fa0.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
|
|
@ -6,8 +6,6 @@
|
|||
[ext_resource type="Resource" uid="uid://u6lls6n0xw3n" path="res://commands/move_command.tres" id="2_7lva1"]
|
||||
[ext_resource type="Resource" uid="uid://boshkhnywnk27" path="res://currency/production/human_production_shared_1.tres" id="2_jkjll"]
|
||||
[ext_resource type="Resource" uid="uid://mgb7y1r3eapq" path="res://currency/production/human_production_shared_2.tres" id="3_kfqfp"]
|
||||
[ext_resource type="Resource" uid="uid://b5qok0rcalr" path="res://currency/sentient/cow.tres" id="5_uddvy"]
|
||||
[ext_resource type="Resource" uid="uid://rdrcyvuvrp2m" path="res://currency/sentient/pig.tres" id="6_epa0v"]
|
||||
[ext_resource type="Resource" uid="uid://ervsee7ku1i2" path="res://currency/inanimate/bread.tres" id="7_uh6l7"]
|
||||
[ext_resource type="Resource" uid="uid://b8b6yr444ecdk" path="res://currency/inanimate/water.tres" id="8_7lva1"]
|
||||
[ext_resource type="Resource" uid="uid://dsohovjbf3s2p" path="res://currency/sentient/chicken.tres" id="9_i5hpk"]
|
||||
|
|
@ -25,18 +23,6 @@ currency = ExtResource("10_n23mm")
|
|||
amount = -1
|
||||
metadata/_custom_type_script = "uid://dddyxbkq0ienn"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_p1wox"]
|
||||
script = ExtResource("1_35xhy")
|
||||
currency = ExtResource("5_uddvy")
|
||||
amount = 50
|
||||
metadata/_custom_type_script = "uid://dddyxbkq0ienn"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_bu4yr"]
|
||||
script = ExtResource("1_35xhy")
|
||||
currency = ExtResource("6_epa0v")
|
||||
amount = 50
|
||||
metadata/_custom_type_script = "uid://dddyxbkq0ienn"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_dynkd"]
|
||||
script = ExtResource("1_35xhy")
|
||||
currency = ExtResource("7_uh6l7")
|
||||
|
|
@ -67,5 +53,5 @@ name = "Farmer"
|
|||
production = Array[ExtResource("1_35xhy")]([ExtResource("2_jkjll"), ExtResource("3_kfqfp"), SubResource("Resource_i7808"), SubResource("Resource_bsgev")])
|
||||
description = "When something is farm, but more."
|
||||
color = Color(0.43529412, 0.84705883, 1, 1)
|
||||
wants = Array[ExtResource("1_35xhy")]([SubResource("Resource_p1wox"), SubResource("Resource_bu4yr"), SubResource("Resource_dynkd"), SubResource("Resource_t37mv"), SubResource("Resource_ou8s7"), SubResource("Resource_4ts75")])
|
||||
wants = Array[ExtResource("1_35xhy")]([SubResource("Resource_dynkd"), SubResource("Resource_t37mv"), SubResource("Resource_ou8s7"), SubResource("Resource_4ts75")])
|
||||
metadata/_custom_type_script = "uid://hcvynq5fjypj"
|
||||
|
|
|
|||
12
economy.gd
12
economy.gd
|
|
@ -3,6 +3,8 @@ extends Node
|
|||
signal productions_update(p: Array[Production])
|
||||
@warning_ignore("unused_signal")
|
||||
signal production_log(producer: Currency, p: Production)
|
||||
@warning_ignore("unused_signal")
|
||||
signal log(s: String)
|
||||
@export var currencies: Array[Production]
|
||||
@export var members: Array
|
||||
|
||||
|
|
@ -78,11 +80,18 @@ func simulate():
|
|||
update_currencies()
|
||||
for e in events:
|
||||
if e.requirements_satisfied() and e.will_happen():
|
||||
if e.game_over_timeline != null:
|
||||
get_tree().change_scene_to_file("res://game_over.tscn")
|
||||
Dialogic.start(e.game_over_timeline)
|
||||
return
|
||||
if e.log_message != "" and not e.skip_log:
|
||||
Economy.log.emit(e.log_message)
|
||||
var outcome := e.outcome()
|
||||
for o in outcome:
|
||||
if o == null:
|
||||
continue
|
||||
produce(o)
|
||||
if e.log_message == "" and not e.skip_log:
|
||||
production_log.emit(null, o)
|
||||
if e.timeline != null:
|
||||
GameState.add_letter.emit(e.into_letter())
|
||||
|
|
@ -109,6 +118,9 @@ func _ready() -> void:
|
|||
update_currencies()
|
||||
|
||||
func _on_timer_timeout() -> void:
|
||||
if get_tree().current_scene.scene_file_path != "res://game.tscn":
|
||||
%SimulateTickTimer.start()
|
||||
return
|
||||
if Dialogic.current_timeline != null:
|
||||
%SimulateTickTimer.start()
|
||||
return
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
[ext_resource type="Resource" uid="uid://ihsvxienxbeu" path="res://currency/sentient/knight.tres" id="8_qb8iw"]
|
||||
[ext_resource type="Resource" uid="uid://l8osuuxl7exe" path="res://currency/sentient/archer.tres" id="9_4ywr4"]
|
||||
[ext_resource type="Resource" uid="uid://b1tgtujqs5lnr" path="res://currency/sentient/doctor.tres" id="11_17ik3"]
|
||||
[ext_resource type="AudioStream" uid="uid://b01aiy2tr1jnn" path="res://audio/787351__gertraut_hecher__medieval-dance-saltarello.wav" id="12_2k4vk"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_g3220"]
|
||||
script = ExtResource("2_tljx8")
|
||||
|
|
@ -72,6 +73,11 @@ currencies = Array[ExtResource("2_tljx8")]([SubResource("Resource_g3220"), SubRe
|
|||
|
||||
[node name="SimulateTickTimer" type="Timer" parent="." unique_id=1726107261]
|
||||
unique_name_in_owner = true
|
||||
wait_time = 2.0
|
||||
wait_time = 3.0
|
||||
|
||||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="." unique_id=537297929]
|
||||
stream = ExtResource("12_2k4vk")
|
||||
volume_db = -15.0
|
||||
autoplay = true
|
||||
|
||||
[connection signal="timeout" from="SimulateTickTimer" to="." method="_on_timer_timeout"]
|
||||
|
|
|
|||
1
event.gd
1
event.gd
|
|
@ -16,6 +16,7 @@ enum EventNature {
|
|||
@export var nature: EventNature = EventNature.Random
|
||||
@export var email_source: Currency = preload("res://currency/sentient/town_crier.tres")
|
||||
@export var email_subject: String = "Something is amok!"
|
||||
@export var log_message: String = ""
|
||||
|
||||
func requirements_satisfied() -> bool:
|
||||
for requirement in requirements:
|
||||
|
|
|
|||
6
game_over.gd
Normal file
6
game_over.gd
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
extends Control
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
await Dialogic.timeline_ended
|
||||
get_tree().quit()
|
||||
1
game_over.gd.uid
Normal file
1
game_over.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://newnma6kkptj
|
||||
21
game_over.tscn
Normal file
21
game_over.tscn
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
[gd_scene format=3 uid="uid://cqfexy3yy3tbr"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://newnma6kkptj" path="res://game_over.gd" id="1_y26ei"]
|
||||
|
||||
[node name="GameOver" type="Control" unique_id=880250183]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_y26ei")
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="." unique_id=619694373]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0, 0, 0, 1)
|
||||
|
|
@ -5,6 +5,19 @@ extends VBoxContainer
|
|||
|
||||
func _ready() -> void:
|
||||
Economy.production_log.connect(append)
|
||||
Economy.log.connect(log)
|
||||
|
||||
func log(s: String):
|
||||
var display := preload("res://gui/production_log.tscn").instantiate()
|
||||
display.set_color(new_message_color)
|
||||
for child in get_children():
|
||||
if child is ProductionLog and child.is_old:
|
||||
child.set_color(old_message_color)
|
||||
display.generic = true
|
||||
display.generic_text = s
|
||||
add_child(display)
|
||||
move_child(display, 0)
|
||||
|
||||
|
||||
func append(producer: Currency, production: Production):
|
||||
var display := preload("res://gui/production_log.tscn").instantiate()
|
||||
|
|
|
|||
|
|
@ -3,14 +3,25 @@ class_name ProductionLog
|
|||
|
||||
@export var producer: Currency = null
|
||||
@export var production: Production
|
||||
@export var generic: bool = false
|
||||
@export var generic_text: String = "<No message>"
|
||||
|
||||
var is_old: bool = false
|
||||
|
||||
func _ready() -> void:
|
||||
if generic:
|
||||
%GenericMessage.visible = true
|
||||
%GenericMessage.text = generic_text
|
||||
%Production.visible = false
|
||||
%Production2.visible = false
|
||||
else:
|
||||
if producer != null:
|
||||
%producer.text = producer.name
|
||||
%GenericMessage.visible = false
|
||||
%Production.visible = true
|
||||
%Production2.visible = false
|
||||
else:
|
||||
%GenericMessage.visible = false
|
||||
%Production.visible = false
|
||||
%Production2.visible = true
|
||||
%amount.text = str(abs(production.amount))
|
||||
|
|
@ -21,7 +32,7 @@ func _ready() -> void:
|
|||
else:
|
||||
%type.text = "consumed "
|
||||
%producer2.text = "You lost "
|
||||
|
||||
if production != null:
|
||||
%production.text = production.currency.name
|
||||
%production2.text = production.currency.name
|
||||
make_old.call_deferred()
|
||||
|
|
|
|||
|
|
@ -5,6 +5,10 @@
|
|||
[node name="ProductionLog" type="MarginContainer" unique_id=253822540]
|
||||
script = ExtResource("1_ei3g1")
|
||||
|
||||
[node name="GenericMessage" type="Label" parent="." unique_id=712313778]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Production" type="HBoxContainer" parent="." unique_id=1073672077]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[gd_resource type="Resource" script_class="Event" format=3 uid="uid://ddjairvlvswck"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dddyxbkq0ienn" path="res://currency/production.gd" id="1_puqnt"]
|
||||
[ext_resource type="Resource" uid="uid://chsv8oeajty8j" path="res://currency/sentient/town_crier.tres" id="1_unbcn"]
|
||||
[ext_resource type="Resource" uid="uid://b5qok0rcalr" path="res://currency/sentient/cow.tres" id="2_tqpw4"]
|
||||
[ext_resource type="Resource" uid="uid://dsohovjbf3s2p" path="res://currency/sentient/chicken.tres" id="3_unbcn"]
|
||||
[ext_resource type="Resource" uid="uid://rdrcyvuvrp2m" path="res://currency/sentient/pig.tres" id="4_k6ytv"]
|
||||
|
|
@ -30,4 +31,5 @@ script = ExtResource("5_ks6hr")
|
|||
modified_resource = SubResource("Resource_wblg4")
|
||||
extra_mods = Array[ExtResource("1_puqnt")]([SubResource("Resource_stddx"), SubResource("Resource_3520l")])
|
||||
timeline = ExtResource("6_tqpw4")
|
||||
email_subject = "Pigs Fly?"
|
||||
metadata/_custom_type_script = "uid://diwdxofo6exg3"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[gd_resource type="Resource" script_class="Event" format=3 uid="uid://s2n6eankt20p"]
|
||||
|
||||
[ext_resource type="Resource" uid="uid://dv834343s36af" path="res://currency/sentient/drunk.tres" id="1_dvejf"]
|
||||
[ext_resource type="Resource" uid="uid://chsv8oeajty8j" path="res://currency/sentient/town_crier.tres" id="1_ilimp"]
|
||||
[ext_resource type="Script" uid="uid://diwdxofo6exg3" path="res://event.gd" id="1_qbpgq"]
|
||||
[ext_resource type="Script" uid="uid://dddyxbkq0ienn" path="res://currency/production.gd" id="2_iq8td"]
|
||||
[ext_resource type="Resource" uid="uid://bfc53d345i1h5" path="res://test/bar_crawl.dtl" id="4_iq8td"]
|
||||
|
|
@ -15,4 +16,5 @@ metadata/_custom_type_script = "uid://dddyxbkq0ienn"
|
|||
script = ExtResource("1_qbpgq")
|
||||
modified_resource = SubResource("Resource_elpai")
|
||||
timeline = ExtResource("4_iq8td")
|
||||
email_subject = "What is this, an alien invasion movie?"
|
||||
metadata/_custom_type_script = "uid://diwdxofo6exg3"
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
[ext_resource type="Script" uid="uid://diwdxofo6exg3" path="res://event.gd" id="1_dxq8u"]
|
||||
[ext_resource type="Resource" uid="uid://by3dayfdpobpt" path="res://currency/inanimate/blood.tres" id="1_jlulm"]
|
||||
[ext_resource type="Resource" uid="uid://chsv8oeajty8j" path="res://currency/sentient/town_crier.tres" id="1_tqf2y"]
|
||||
[ext_resource type="Script" uid="uid://dddyxbkq0ienn" path="res://currency/production.gd" id="2_arfor"]
|
||||
[ext_resource type="Resource" uid="uid://ikwdxjpxukej" path="res://test/blood_rain.dtl" id="4_arfor"]
|
||||
|
||||
|
|
@ -15,4 +16,5 @@ metadata/_custom_type_script = "uid://dddyxbkq0ienn"
|
|||
script = ExtResource("1_dxq8u")
|
||||
modified_resource = SubResource("Resource_sfr2o")
|
||||
timeline = ExtResource("4_arfor")
|
||||
email_subject = "The Sky Seems Redder Than Usual..."
|
||||
metadata/_custom_type_script = "uid://diwdxofo6exg3"
|
||||
|
|
|
|||
|
|
@ -32,5 +32,5 @@ modified_resource = SubResource("Resource_kiplq")
|
|||
extra_mods = Array[ExtResource("2_dchj7")]([SubResource("Resource_jv6j0")])
|
||||
timeline = ExtResource("7_ccnp0")
|
||||
requirements = Array[ExtResource("2_dchj7")]([SubResource("Resource_ccnp0")])
|
||||
probability = 0.05
|
||||
email_subject = "Cave In!"
|
||||
metadata/_custom_type_script = "uid://diwdxofo6exg3"
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
[ext_resource type="Resource" uid="uid://clx8tbrad4m7c" path="res://currency/sentient/dinosaur.tres" id="1_0jmdm"]
|
||||
[ext_resource type="Script" uid="uid://diwdxofo6exg3" path="res://event.gd" id="1_sui6i"]
|
||||
[ext_resource type="Resource" uid="uid://chsv8oeajty8j" path="res://currency/sentient/town_crier.tres" id="1_sy7r4"]
|
||||
[ext_resource type="Script" uid="uid://dddyxbkq0ienn" path="res://currency/production.gd" id="2_1x1ll"]
|
||||
[ext_resource type="Resource" uid="uid://25iq6i8ltb6v" path="res://test/dino.dtl" id="4_1x1ll"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
[gd_resource type="Resource" script_class="Event" format=3 uid="uid://dlruqgod1peaf"]
|
||||
|
||||
[ext_resource type="Resource" uid="uid://chsv8oeajty8j" path="res://currency/sentient/town_crier.tres" id="1_55mjt"]
|
||||
[ext_resource type="Script" uid="uid://diwdxofo6exg3" path="res://event.gd" id="1_d1mhu"]
|
||||
[ext_resource type="Resource" uid="uid://dfj4jwdmff6bu" path="res://currency/sentient/spy.tres" id="1_klvkh"]
|
||||
[ext_resource type="Script" uid="uid://dddyxbkq0ienn" path="res://currency/production.gd" id="2_53otq"]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[gd_resource type="Resource" script_class="Event" format=3 uid="uid://vtlqhmhi0yeq"]
|
||||
|
||||
[ext_resource type="Resource" uid="uid://b8b6yr444ecdk" path="res://currency/inanimate/water.tres" id="1_d7ltk"]
|
||||
[ext_resource type="Resource" uid="uid://chsv8oeajty8j" path="res://currency/sentient/town_crier.tres" id="1_unbv5"]
|
||||
[ext_resource type="Script" uid="uid://diwdxofo6exg3" path="res://event.gd" id="1_ut0k2"]
|
||||
[ext_resource type="Script" uid="uid://dddyxbkq0ienn" path="res://currency/production.gd" id="2_rh8yf"]
|
||||
[ext_resource type="Resource" uid="uid://damk3l2oj6gkd" path="res://test/drought.dtl" id="4_rh8yf"]
|
||||
|
|
|
|||
|
|
@ -38,4 +38,5 @@ modified_resource = SubResource("Resource_7vjbg")
|
|||
extra_mods = Array[ExtResource("1_piiqm")]([SubResource("Resource_korph")])
|
||||
timeline = ExtResource("8_khbdk")
|
||||
requirements = Array[ExtResource("1_piiqm")]([SubResource("Resource_u1m57"), SubResource("Resource_uhb4h")])
|
||||
probability = 0.1
|
||||
metadata/_custom_type_script = "uid://diwdxofo6exg3"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[gd_resource type="Resource" script_class="Event" format=3 uid="uid://mjwk02bgdiqj"]
|
||||
|
||||
[ext_resource type="Resource" uid="uid://bnlnq4ucsgfxe" path="res://currency/inanimate/gold.tres" id="1_8xx2a"]
|
||||
[ext_resource type="Resource" uid="uid://chsv8oeajty8j" path="res://currency/sentient/town_crier.tres" id="1_dx2yq"]
|
||||
[ext_resource type="Script" uid="uid://dddyxbkq0ienn" path="res://currency/production.gd" id="2_5iq3f"]
|
||||
[ext_resource type="Script" uid="uid://diwdxofo6exg3" path="res://event.gd" id="3_84pag"]
|
||||
[ext_resource type="Resource" uid="uid://dpaj2dk3qm7ow" path="res://currency/sentient/miner.tres" id="3_68771"]
|
||||
|
|
|
|||
|
|
@ -8,4 +8,5 @@
|
|||
[resource]
|
||||
script = ExtResource("2_c2rsl")
|
||||
timeline = ExtResource("3_c2rsl")
|
||||
probability = 0.05
|
||||
metadata/_custom_type_script = "uid://diwdxofo6exg3"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
[gd_resource type="Resource" script_class="Event" format=3 uid="uid://bsug257xiks84"]
|
||||
|
||||
[ext_resource type="Resource" uid="uid://chsv8oeajty8j" path="res://currency/sentient/town_crier.tres" id="1_7nshr"]
|
||||
[ext_resource type="Script" uid="uid://diwdxofo6exg3" path="res://event.gd" id="1_kjsek"]
|
||||
[ext_resource type="Resource" uid="uid://6xylw7p78fvf" path="res://currency/sentient/wizard.tres" id="1_wgvj8"]
|
||||
[ext_resource type="Script" uid="uid://dddyxbkq0ienn" path="res://currency/production.gd" id="2_8hlcg"]
|
||||
|
|
|
|||
|
|
@ -9,3 +9,5 @@ doctor.jpg - cropped from: "Effect inferno 2022 movie frame 01.jpg" by Sergey A.
|
|||
dino.jpg - cropped from: "Dino cosumes at Knockengorroch 2023.jpeg" by Sara Thomas, https://commons.wikimedia.org/wiki/File:Dino_cosumes_at_Knockengorroch_2023.jpeg, licensed under https://creativecommons.org/licenses/by/4.0/
|
||||
|
||||
Godot UI Theme - https://softwave.itch.io/godot-retro-theme-space-worm/
|
||||
|
||||
Background music - Medieval Dance - Saltarello by gertraut_hecher -- https://freesound.org/s/787351/ -- License: Attribution NonCommercial 4.0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue