Merge branch 'master' of ssh://git.sjkillen.ca:2222/sjkillen/everything_has_a_price_jam
This commit is contained in:
commit
27e2f25a49
42 changed files with 468 additions and 13 deletions
5
allegiance/allegiance.gd
Normal file
5
allegiance/allegiance.gd
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
extends Resource
|
||||||
|
class_name Allegiance
|
||||||
|
|
||||||
|
@export var kingdom_name: String
|
||||||
|
@export var color: Color
|
||||||
1
allegiance/allegiance.gd.uid
Normal file
1
allegiance/allegiance.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://dvu6aynwi8a0f
|
||||||
9
allegiance/bad.tres
Normal file
9
allegiance/bad.tres
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
[gd_resource type="Resource" script_class="Allegiance" format=3 uid="uid://dfbgxc6nlcjct"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://dvu6aynwi8a0f" path="res://allegiance/allegiance.gd" id="1_7dttr"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_7dttr")
|
||||||
|
kingdom_name = "Baddica"
|
||||||
|
color = Color(1, 0, 0, 1)
|
||||||
|
metadata/_custom_type_script = "uid://dvu6aynwi8a0f"
|
||||||
9
allegiance/good.tres
Normal file
9
allegiance/good.tres
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
[gd_resource type="Resource" script_class="Allegiance" format=3 uid="uid://b7lxfjhx4qhts"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://dvu6aynwi8a0f" path="res://allegiance/allegiance.gd" id="1_crqh1"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_crqh1")
|
||||||
|
kingdom_name = "Goodom"
|
||||||
|
color = Color(0, 0, 1, 1)
|
||||||
|
metadata/_custom_type_script = "uid://dvu6aynwi8a0f"
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
Give {for_timeline_calls.requested_amount} {for_timeline_calls.requested_currency} to {for_timeline_calls.requestee_class}? (You have {for_timeline_calls.economy_amount})
|
||||||
- Accept Terms
|
- Accept Terms
|
||||||
set {COUNTEROFFER_REPONSE} = 0
|
set {COUNTEROFFER_REPONSE} = 0
|
||||||
- Reject Terms
|
- Reject Terms
|
||||||
|
|
|
||||||
|
|
@ -5,3 +5,4 @@ class_name Currency
|
||||||
@export var production: Array[Production]
|
@export var production: Array[Production]
|
||||||
@export_multiline var description = "no description of currency"
|
@export_multiline var description = "no description of currency"
|
||||||
@export var thumbnail: Texture2D
|
@export var thumbnail: Texture2D
|
||||||
|
@export var color: Color = Color.PINK
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,11 @@
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://dddyxbkq0ienn" path="res://currency/production.gd" id="1_apagg"]
|
[ext_resource type="Script" uid="uid://dddyxbkq0ienn" path="res://currency/production.gd" id="1_apagg"]
|
||||||
[ext_resource type="Script" uid="uid://cthcf4w1il4h8" path="res://currency/inanimate_currency.gd" id="2_h7qij"]
|
[ext_resource type="Script" uid="uid://cthcf4w1il4h8" path="res://currency/inanimate_currency.gd" id="2_h7qij"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bplvus0ytk2f8" path="res://thumbnails/beer.png" id="3_h7qij"]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("2_h7qij")
|
script = ExtResource("2_h7qij")
|
||||||
name = "Beer"
|
name = "Beer"
|
||||||
description = "A favourite of divorced dads everywhere."
|
description = "A favourite of divorced dads everywhere."
|
||||||
|
thumbnail = ExtResource("3_h7qij")
|
||||||
metadata/_custom_type_script = "uid://b3tqa2kc2bu0p"
|
metadata/_custom_type_script = "uid://b3tqa2kc2bu0p"
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,11 @@
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cthcf4w1il4h8" path="res://currency/inanimate_currency.gd" id="1_6u8vm"]
|
[ext_resource type="Script" uid="uid://cthcf4w1il4h8" path="res://currency/inanimate_currency.gd" id="1_6u8vm"]
|
||||||
[ext_resource type="Script" uid="uid://dddyxbkq0ienn" path="res://currency/production.gd" id="1_vpm3o"]
|
[ext_resource type="Script" uid="uid://dddyxbkq0ienn" path="res://currency/production.gd" id="1_vpm3o"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://7calk4akv2wk" path="res://thumbnails/blood.jpg" id="3_78x5f"]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_6u8vm")
|
script = ExtResource("1_6u8vm")
|
||||||
name = "Blood"
|
name = "Blood"
|
||||||
description = "Great if you wanna paint the kingdom red."
|
description = "Great if you wanna paint the kingdom red."
|
||||||
|
thumbnail = ExtResource("3_78x5f")
|
||||||
metadata/_custom_type_script = "uid://b3tqa2kc2bu0p"
|
metadata/_custom_type_script = "uid://b3tqa2kc2bu0p"
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,11 @@
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://dddyxbkq0ienn" path="res://currency/production.gd" id="1_btpsu"]
|
[ext_resource type="Script" uid="uid://dddyxbkq0ienn" path="res://currency/production.gd" id="1_btpsu"]
|
||||||
[ext_resource type="Script" uid="uid://cthcf4w1il4h8" path="res://currency/inanimate_currency.gd" id="2_nt5od"]
|
[ext_resource type="Script" uid="uid://cthcf4w1il4h8" path="res://currency/inanimate_currency.gd" id="2_nt5od"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bpc8gm2ikb6ld" path="res://thumbnails/bread.jpg" id="3_nt5od"]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("2_nt5od")
|
script = ExtResource("2_nt5od")
|
||||||
name = "Bread"
|
name = "Bread"
|
||||||
description = "I prefer eating raw flower personally."
|
description = "I prefer eating raw flower personally."
|
||||||
|
thumbnail = ExtResource("3_nt5od")
|
||||||
metadata/_custom_type_script = "uid://b3tqa2kc2bu0p"
|
metadata/_custom_type_script = "uid://b3tqa2kc2bu0p"
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,11 @@
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://dddyxbkq0ienn" path="res://currency/production.gd" id="1_6u3lm"]
|
[ext_resource type="Script" uid="uid://dddyxbkq0ienn" path="res://currency/production.gd" id="1_6u3lm"]
|
||||||
[ext_resource type="Script" uid="uid://cthcf4w1il4h8" path="res://currency/inanimate_currency.gd" id="2_aao11"]
|
[ext_resource type="Script" uid="uid://cthcf4w1il4h8" path="res://currency/inanimate_currency.gd" id="2_aao11"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://8st5esb8blio" path="res://thumbnails/corpse.jpg" id="3_aao11"]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("2_aao11")
|
script = ExtResource("2_aao11")
|
||||||
name = "Corpse"
|
name = "Corpse"
|
||||||
description = "It's a dead body! Of what creature? We don't know!"
|
description = "It's a dead body! Of what creature? We don't know!"
|
||||||
|
thumbnail = ExtResource("3_aao11")
|
||||||
metadata/_custom_type_script = "uid://b3tqa2kc2bu0p"
|
metadata/_custom_type_script = "uid://b3tqa2kc2bu0p"
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,11 @@
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://dddyxbkq0ienn" path="res://currency/production.gd" id="1_g2gb5"]
|
[ext_resource type="Script" uid="uid://dddyxbkq0ienn" path="res://currency/production.gd" id="1_g2gb5"]
|
||||||
[ext_resource type="Script" uid="uid://cthcf4w1il4h8" path="res://currency/inanimate_currency.gd" id="1_ilt41"]
|
[ext_resource type="Script" uid="uid://cthcf4w1il4h8" path="res://currency/inanimate_currency.gd" id="1_ilt41"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dctklkyp4ugdt" path="res://thumbnails/wood.jpg" id="3_mwc6k"]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_ilt41")
|
script = ExtResource("1_ilt41")
|
||||||
name = "Wood"
|
name = "Wood"
|
||||||
description = "Gives you lumber support. You know your back could probably use it."
|
description = "Gives you lumber support. You know your back could probably use it."
|
||||||
|
thumbnail = ExtResource("3_mwc6k")
|
||||||
metadata/_custom_type_script = "uid://b3tqa2kc2bu0p"
|
metadata/_custom_type_script = "uid://b3tqa2kc2bu0p"
|
||||||
|
|
|
||||||
13
currency/members/MemberSprite.gdshader
Normal file
13
currency/members/MemberSprite.gdshader
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
shader_type canvas_item;
|
||||||
|
|
||||||
|
instance uniform vec3 fill_color : source_color;
|
||||||
|
instance uniform vec3 border_color : source_color;
|
||||||
|
instance uniform float border_width = 0.16;
|
||||||
|
|
||||||
|
void fragment() {
|
||||||
|
if (min(UV.x, UV.y) < border_width || max(UV.x, UV.y) > 1.0 - border_width) {
|
||||||
|
COLOR.rgb = border_color;
|
||||||
|
} else {
|
||||||
|
COLOR.rgb = fill_color;
|
||||||
|
}
|
||||||
|
}
|
||||||
1
currency/members/MemberSprite.gdshader.uid
Normal file
1
currency/members/MemberSprite.gdshader.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://d4lvn6yn7uk2i
|
||||||
26
currency/members/MemberSprite.tscn
Normal file
26
currency/members/MemberSprite.tscn
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
[gd_scene format=3 uid="uid://coebykrbnhlif"]
|
||||||
|
|
||||||
|
[ext_resource type="Shader" uid="uid://d4lvn6yn7uk2i" path="res://currency/members/MemberSprite.gdshader" id="1_tm326"]
|
||||||
|
[ext_resource type="Script" uid="uid://dfqairkyaac1r" path="res://currency/members/member_sprite.gd" id="2_5ifiv"]
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_tm326"]
|
||||||
|
shader = ExtResource("1_tm326")
|
||||||
|
|
||||||
|
[sub_resource type="CanvasTexture" id="CanvasTexture_wgite"]
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_4sc8i"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
|
||||||
|
[node name="MemberSprite" type="TextureRect" unique_id=283117283]
|
||||||
|
material = SubResource("ShaderMaterial_tm326")
|
||||||
|
texture = SubResource("CanvasTexture_wgite")
|
||||||
|
script = ExtResource("2_5ifiv")
|
||||||
|
|
||||||
|
[node name="Area2D" type="Area2D" parent="." unique_id=1371993311]
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D" unique_id=894062478]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
shape = SubResource("RectangleShape2D_4sc8i")
|
||||||
|
|
||||||
|
[connection signal="mouse_entered" from="Area2D" to="." method="_on_area_2d_mouse_entered"]
|
||||||
|
[connection signal="mouse_exited" from="Area2D" to="." method="_on_area_2d_mouse_exited"]
|
||||||
26
currency/members/member_sprite.gd
Normal file
26
currency/members/member_sprite.gd
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
extends TextureRect
|
||||||
|
class_name CurrencyMemberSprite
|
||||||
|
|
||||||
|
@export var currency: Currency
|
||||||
|
@export var allegiance: Allegiance
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
sync()
|
||||||
|
|
||||||
|
func sync():
|
||||||
|
set_instance_shader_parameter("border_color", allegiance.color)
|
||||||
|
set_instance_shader_parameter("fill_color", currency.color)
|
||||||
|
%CollisionShape2D.shape.size = custom_minimum_size
|
||||||
|
|
||||||
|
|
||||||
|
func _on_area_2d_mouse_entered() -> void:
|
||||||
|
UserContext.focus_member(self)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_area_2d_mouse_exited() -> void:
|
||||||
|
UserContext.unfocus_member(self)
|
||||||
|
|
||||||
|
func _unhandled_input(event: InputEvent) -> void:
|
||||||
|
if event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT:
|
||||||
|
pass
|
||||||
|
|
||||||
1
currency/members/member_sprite.gd.uid
Normal file
1
currency/members/member_sprite.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://dfqairkyaac1r
|
||||||
|
|
@ -4,10 +4,12 @@
|
||||||
[ext_resource type="Script" uid="uid://dddyxbkq0ienn" path="res://currency/production.gd" id="1_ohece"]
|
[ext_resource type="Script" uid="uid://dddyxbkq0ienn" path="res://currency/production.gd" id="1_ohece"]
|
||||||
[ext_resource type="Resource" uid="uid://boshkhnywnk27" path="res://currency/production/human_production_shared_1.tres" id="2_u3n2t"]
|
[ext_resource type="Resource" uid="uid://boshkhnywnk27" path="res://currency/production/human_production_shared_1.tres" id="2_u3n2t"]
|
||||||
[ext_resource type="Resource" uid="uid://mgb7y1r3eapq" path="res://currency/production/human_production_shared_2.tres" id="3_yv5d2"]
|
[ext_resource type="Resource" uid="uid://mgb7y1r3eapq" path="res://currency/production/human_production_shared_2.tres" id="3_yv5d2"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bbcjo350ne8pv" path="res://thumbnails/doctor.jpg" id="5_e68kt"]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_8u0th")
|
script = ExtResource("1_8u0th")
|
||||||
name = "Doctor"
|
name = "Doctor"
|
||||||
production = Array[ExtResource("1_ohece")]([ExtResource("2_u3n2t"), ExtResource("3_yv5d2")])
|
production = Array[ExtResource("1_ohece")]([ExtResource("2_u3n2t"), ExtResource("3_yv5d2")])
|
||||||
description = "They're definitely not crow people. Don't question the masks. it's fine."
|
description = "They're definitely not crow people. Don't question the masks. it's fine."
|
||||||
|
thumbnail = ExtResource("5_e68kt")
|
||||||
metadata/_custom_type_script = "uid://hcvynq5fjypj"
|
metadata/_custom_type_script = "uid://hcvynq5fjypj"
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ func get_all_currencies_in(dir: StringName):
|
||||||
var resources := []
|
var resources := []
|
||||||
for res in reses:
|
for res in reses:
|
||||||
if res.ends_with(".tres"):
|
if res.ends_with(".tres"):
|
||||||
resources.append(load(res))
|
resources.append(load(dir + "/" + res))
|
||||||
return resources
|
return resources
|
||||||
|
|
||||||
func get_all_sentient_currencies() -> Array:
|
func get_all_sentient_currencies() -> Array:
|
||||||
|
|
|
||||||
|
|
@ -12,3 +12,7 @@ func on_remove_letter(_l: Letter):
|
||||||
|
|
||||||
func _on_pressed() -> void:
|
func _on_pressed() -> void:
|
||||||
letter.start()
|
letter.start()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_reply_button_pressed() -> void:
|
||||||
|
letter.reply()
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,8 @@
|
||||||
[ext_resource type="Script" uid="uid://nb536nqdwd8g" path="res://gui/inbox_message_subject.gd" id="1_npjct"]
|
[ext_resource type="Script" uid="uid://nb536nqdwd8g" path="res://gui/inbox_message_subject.gd" id="1_npjct"]
|
||||||
|
|
||||||
[node name="InboxMessageSubject" type="Button" unique_id=1590519653]
|
[node name="InboxMessageSubject" type="Button" unique_id=1590519653]
|
||||||
custom_minimum_size = Vector2(0, 40)
|
custom_minimum_size = Vector2(700, 40)
|
||||||
|
custom_maximum_size = Vector2(700, -1)
|
||||||
script = ExtResource("1_npjct")
|
script = ExtResource("1_npjct")
|
||||||
|
|
||||||
[node name="MarginContainer" type="MarginContainer" parent="." unique_id=1923870606]
|
[node name="MarginContainer" type="MarginContainer" parent="." unique_id=1923870606]
|
||||||
|
|
@ -21,12 +22,27 @@ theme_override_constants/margin_bottom = 20
|
||||||
[node name="Source" type="Label" parent="MarginContainer" unique_id=1252337854]
|
[node name="Source" type="Label" parent="MarginContainer" unique_id=1252337854]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 0
|
||||||
text = "<Source>"
|
text = "<Source>"
|
||||||
|
|
||||||
[node name="Subject" type="Label" parent="MarginContainer" unique_id=707399847]
|
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer" unique_id=1418860833]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 8
|
||||||
|
|
||||||
|
[node name="Subject" type="Label" parent="MarginContainer/HBoxContainer" unique_id=707399847]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 8
|
size_flags_horizontal = 8
|
||||||
text = "<Subject>"
|
text = "<Subject>"
|
||||||
|
|
||||||
|
[node name="ReadButton" type="Button" parent="MarginContainer/HBoxContainer" unique_id=309821311]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Read"
|
||||||
|
|
||||||
|
[node name="ReplyButton" type="Button" parent="MarginContainer/HBoxContainer" unique_id=803741826]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Reply"
|
||||||
|
|
||||||
[connection signal="pressed" from="." to="." method="_on_pressed"]
|
[connection signal="pressed" from="." to="." method="_on_pressed"]
|
||||||
|
[connection signal="pressed" from="MarginContainer/HBoxContainer/ReadButton" to="." method="_on_pressed"]
|
||||||
|
[connection signal="pressed" from="MarginContainer/HBoxContainer/ReplyButton" to="." method="_on_reply_button_pressed"]
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,10 @@ func _ready() -> void:
|
||||||
|
|
||||||
func append(producer: Currency, production: Production):
|
func append(producer: Currency, production: Production):
|
||||||
var display := preload("res://gui/production_log.tscn").instantiate()
|
var display := preload("res://gui/production_log.tscn").instantiate()
|
||||||
|
display.set_color(Color.YELLOW)
|
||||||
|
for child in get_children():
|
||||||
|
if child is ProductionLog and child.is_old:
|
||||||
|
child.set_color(Color.WHITE)
|
||||||
display.producer = producer
|
display.producer = producer
|
||||||
display.production = production
|
display.production = production
|
||||||
add_child(display)
|
add_child(display)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
extends Control
|
extends Control
|
||||||
|
class_name ProductionLog
|
||||||
|
|
||||||
@export var producer: Currency = null
|
@export var producer: Currency = null
|
||||||
@export var production: Production
|
@export var production: Production
|
||||||
|
var is_old: bool = false
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
if producer != null:
|
if producer != null:
|
||||||
|
|
@ -22,4 +24,15 @@ func _ready() -> void:
|
||||||
|
|
||||||
%production.text = production.currency.name
|
%production.text = production.currency.name
|
||||||
%production2.text = production.currency.name
|
%production2.text = production.currency.name
|
||||||
|
make_old.call_deferred()
|
||||||
|
|
||||||
|
func make_old():
|
||||||
|
is_old = true
|
||||||
|
|
||||||
|
func set_color(color: Color):
|
||||||
|
var children = get_children()
|
||||||
|
while children.size():
|
||||||
|
var child = children.pop_back()
|
||||||
|
if child is Label:
|
||||||
|
child.add_theme_color_override("font_color", color)
|
||||||
|
children.append_array(child.get_children())
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,10 @@ extends Node
|
||||||
|
|
||||||
var OFFERS = [preload("res://letters/ask_solo.tres"), preload("res://letters/counteroffer.tres"), preload("res://letters/life_expense.tres"), preload("res://letters/union_rep_ask.tres")]
|
var OFFERS = [preload("res://letters/ask_solo.tres"), preload("res://letters/counteroffer.tres"), preload("res://letters/life_expense.tres"), preload("res://letters/union_rep_ask.tres")]
|
||||||
|
|
||||||
func generate_offer():
|
func try_generate_offer() -> bool:
|
||||||
var offer: Counteroffer = OFFERS.pick_random()
|
var offer: Counteroffer = OFFERS.pick_random()
|
||||||
var currency: Production = Economy.currencies.pick_random()
|
var currency: Production = Economy.currencies.pick_random()
|
||||||
var amount = max(randi_range(1, 10), currency.amount)
|
var amount = min(randi_range(1, 10), currency.amount)
|
||||||
var request = Production.new()
|
var request = Production.new()
|
||||||
request.currency = currency.currency
|
request.currency = currency.currency
|
||||||
request.amount = amount
|
request.amount = amount
|
||||||
|
|
@ -15,9 +15,11 @@ func generate_offer():
|
||||||
offer.subject_field = "Need " + currency.currency.name
|
offer.subject_field = "Need " + currency.currency.name
|
||||||
|
|
||||||
var source: Currency = Economy.get_all_sentient_currencies().pick_random()
|
var source: Currency = Economy.get_all_sentient_currencies().pick_random()
|
||||||
#if source == null:
|
|
||||||
|
if source == preload("res://currency/sentient/royalty.tres") or currency.currency == preload("res://currency/sentient/royalty.tres") :
|
||||||
|
return false
|
||||||
|
|
||||||
offer.source = source
|
offer.source = source
|
||||||
|
|
||||||
GameState.add_letter.emit(offer)
|
GameState.add_letter.emit(offer)
|
||||||
|
return true
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,24 @@ class_name Counteroffer
|
||||||
|
|
||||||
@export var request: Production
|
@export var request: Production
|
||||||
|
|
||||||
func start():
|
|
||||||
|
func sync():
|
||||||
Dialogic.VAR.for_timeline_calls.requested_currency = request.currency.name
|
Dialogic.VAR.for_timeline_calls.requested_currency = request.currency.name
|
||||||
Dialogic.VAR.for_timeline_calls.requested_amount = request.amount
|
Dialogic.VAR.for_timeline_calls.requested_amount = request.amount
|
||||||
Dialogic.VAR.for_timeline_calls.requestee_class = source.name
|
Dialogic.VAR.for_timeline_calls.requestee_class = source.name
|
||||||
Dialogic.VAR.for_timeline_calls.requestee_name = "a " + source.name
|
Dialogic.VAR.for_timeline_calls.requestee_name = "a " + source.name
|
||||||
|
var supply := Economy.get_currency_amount(request.currency)
|
||||||
|
Dialogic.VAR.for_timeline_calls.economy_amount = supply
|
||||||
|
|
||||||
|
|
||||||
|
func start():
|
||||||
|
sync()
|
||||||
Dialogic.start(timeline)
|
Dialogic.start(timeline)
|
||||||
await Dialogic.timeline_ended
|
await Dialogic.timeline_ended
|
||||||
|
reply()
|
||||||
|
|
||||||
|
func reply():
|
||||||
|
sync()
|
||||||
var response: int
|
var response: int
|
||||||
while true:
|
while true:
|
||||||
Dialogic.start(preload("res://counteroffer_response.dtl"))
|
Dialogic.start(preload("res://counteroffer_response.dtl"))
|
||||||
|
|
@ -19,8 +29,6 @@ func start():
|
||||||
if response == 0:
|
if response == 0:
|
||||||
# Accept
|
# Accept
|
||||||
if not Economy.can_consume(request):
|
if not Economy.can_consume(request):
|
||||||
var supply := Economy.get_currency_amount(request.currency)
|
|
||||||
Dialogic.VAR.for_timeline_calls.economy_amount = supply
|
|
||||||
Dialogic.start(preload("res://cannot_consume.dtl"))
|
Dialogic.start(preload("res://cannot_consume.dtl"))
|
||||||
await Dialogic.timeline_ended
|
await Dialogic.timeline_ended
|
||||||
continue
|
continue
|
||||||
|
|
|
||||||
|
|
@ -7,3 +7,6 @@ class_name Letter
|
||||||
|
|
||||||
func start():
|
func start():
|
||||||
Dialogic.start(timeline)
|
Dialogic.start(timeline)
|
||||||
|
|
||||||
|
func reply():
|
||||||
|
push_error("reply Not implemented!")
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ Economy="*uid://dnpioqaes87yb"
|
||||||
Random="*uid://cu3n7igqstbxi"
|
Random="*uid://cu3n7igqstbxi"
|
||||||
UserContext="*uid://0a08ucta58lp"
|
UserContext="*uid://0a08ucta58lp"
|
||||||
GameState="*uid://bohql2ihaumsa"
|
GameState="*uid://bohql2ihaumsa"
|
||||||
LetterGeneration="*uid://d156m2y8b38qs"
|
|
||||||
|
|
||||||
[dialogic]
|
[dialogic]
|
||||||
|
|
||||||
|
|
@ -125,3 +124,4 @@ dialogic_default_action={
|
||||||
[rendering]
|
[rendering]
|
||||||
|
|
||||||
rendering_device/driver.windows="d3d12"
|
rendering_device/driver.windows="d3d12"
|
||||||
|
renderer/rendering_method="gl_compatibility"
|
||||||
|
|
|
||||||
|
|
@ -13,4 +13,4 @@ func _on_run_simulate_pressed() -> void:
|
||||||
|
|
||||||
func _on_open_inbox_pressed() -> void:
|
func _on_open_inbox_pressed() -> void:
|
||||||
UserContext.open_inbox.emit()
|
UserContext.open_inbox.emit()
|
||||||
LetterGeneration.generate_offer()
|
LetterGeneration.try_generate_offer()
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,9 @@
|
||||||
[ext_resource type="PackedScene" uid="uid://dx3y20p75chkj" path="res://gui/production_ledger_scroll.tscn" id="3_n4oyp"]
|
[ext_resource type="PackedScene" uid="uid://dx3y20p75chkj" path="res://gui/production_ledger_scroll.tscn" id="3_n4oyp"]
|
||||||
[ext_resource type="PackedScene" uid="uid://75htlmk51oo" path="res://gui/currency_inspector_panel.tscn" id="4_7ya5o"]
|
[ext_resource type="PackedScene" uid="uid://75htlmk51oo" path="res://gui/currency_inspector_panel.tscn" id="4_7ya5o"]
|
||||||
[ext_resource type="PackedScene" uid="uid://vanflt5jr7tx" path="res://gui/inbox_panel.tscn" id="5_n4oyp"]
|
[ext_resource type="PackedScene" uid="uid://vanflt5jr7tx" path="res://gui/inbox_panel.tscn" id="5_n4oyp"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://coebykrbnhlif" path="res://currency/members/MemberSprite.tscn" id="6_vua3v"]
|
||||||
|
[ext_resource type="Resource" uid="uid://ihsvxienxbeu" path="res://currency/sentient/knight.tres" id="7_s0mui"]
|
||||||
|
[ext_resource type="Resource" uid="uid://dfbgxc6nlcjct" path="res://allegiance/bad.tres" id="8_i7808"]
|
||||||
|
|
||||||
[node name="TestEconomy" type="Control" unique_id=629898212]
|
[node name="TestEconomy" type="Control" unique_id=629898212]
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
|
|
@ -69,6 +72,19 @@ layout_mode = 1
|
||||||
[node name="InboxPanel" parent="." unique_id=534578339 instance=ExtResource("5_n4oyp")]
|
[node name="InboxPanel" parent="." unique_id=534578339 instance=ExtResource("5_n4oyp")]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
|
|
||||||
|
[node name="MemberSprite" parent="." unique_id=283117283 instance=ExtResource("6_vua3v")]
|
||||||
|
instance_shader_parameters/border_color = Color(1, 0, 0, 1)
|
||||||
|
instance_shader_parameters/border_width = 0.16
|
||||||
|
instance_shader_parameters/fill_color = Color(0, 1, 0, 1)
|
||||||
|
custom_minimum_size = Vector2(100, 100)
|
||||||
|
layout_mode = 0
|
||||||
|
offset_left = 426.0
|
||||||
|
offset_top = 306.0
|
||||||
|
offset_right = 426.0
|
||||||
|
offset_bottom = 406.0
|
||||||
|
currency = ExtResource("7_s0mui")
|
||||||
|
allegiance = ExtResource("8_i7808")
|
||||||
|
|
||||||
[connection signal="pressed" from="Control/VBoxContainer/GetCow" to="." method="_on_get_cow_pressed"]
|
[connection signal="pressed" from="Control/VBoxContainer/GetCow" to="." method="_on_get_cow_pressed"]
|
||||||
[connection signal="pressed" from="Control/VBoxContainer/RunSimulate" to="." method="_on_run_simulate_pressed"]
|
[connection signal="pressed" from="Control/VBoxContainer/RunSimulate" to="." method="_on_run_simulate_pressed"]
|
||||||
[connection signal="pressed" from="Control/VBoxContainer/OpenInbox" to="." method="_on_open_inbox_pressed"]
|
[connection signal="pressed" from="Control/VBoxContainer/OpenInbox" to="." method="_on_open_inbox_pressed"]
|
||||||
|
|
|
||||||
7
thumbnails/attributions/attributions.txt
Normal file
7
thumbnails/attributions/attributions.txt
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
wood.jpg - cropped from: "20160211154306!Nussbaum Holz.jpg" by Das Ohr, https://commons.wikimedia.org/wiki/File:20160211154306!Nussbaum_Holz.jpg, licensed under https://creativecommons.org/licenses/by/3.0/
|
||||||
|
|
||||||
|
beer.png - from: "Straight beer glass.png" by Etamme, https://commons.wikimedia.org/wiki/File:Straight_beer_glass.png, licensed under https://creativecommons.org/licenses/by/3.0/
|
||||||
|
|
||||||
|
bread.jpg - cropped from: "Bread on blue plate from an angle.jpg" by Kansattica, https://commons.wikimedia.org/wiki/File:Bread_on_blue_plate_from_an_angle.jpg, licensed under https://creativecommons.org/licenses/by/4.0/
|
||||||
|
|
||||||
|
doctor.jpg - cropped from: "Effect inferno 2022 movie frame 01.jpg" by Sergey A. Demidov, https://commons.wikimedia.org/wiki/File:Effect_inferno_2022_movie_frame_01.jpg, licensed under https://creativecommons.org/licenses/by/4.0/
|
||||||
BIN
thumbnails/beer.png
(Stored with Git LFS)
Normal file
BIN
thumbnails/beer.png
(Stored with Git LFS)
Normal file
Binary file not shown.
40
thumbnails/beer.png.import
Normal file
40
thumbnails/beer.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bplvus0ytk2f8"
|
||||||
|
path="res://.godot/imported/beer.png-6c423fbb7c86d4d3f78a08ea9855dc1e.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://thumbnails/beer.png"
|
||||||
|
dest_files=["res://.godot/imported/beer.png-6c423fbb7c86d4d3f78a08ea9855dc1e.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
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/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
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
thumbnails/blood.jpg
(Stored with Git LFS)
Normal file
BIN
thumbnails/blood.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
40
thumbnails/blood.jpg.import
Normal file
40
thumbnails/blood.jpg.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://7calk4akv2wk"
|
||||||
|
path="res://.godot/imported/blood.jpg-6d6bed569711a60757be2ff49236d203.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://thumbnails/blood.jpg"
|
||||||
|
dest_files=["res://.godot/imported/blood.jpg-6d6bed569711a60757be2ff49236d203.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
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/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
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
thumbnails/bread.jpg
(Stored with Git LFS)
Normal file
BIN
thumbnails/bread.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
40
thumbnails/bread.jpg.import
Normal file
40
thumbnails/bread.jpg.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bpc8gm2ikb6ld"
|
||||||
|
path="res://.godot/imported/bread.jpg-f47ea884e4d2c1f24a69dc75afd7fe98.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://thumbnails/bread.jpg"
|
||||||
|
dest_files=["res://.godot/imported/bread.jpg-f47ea884e4d2c1f24a69dc75afd7fe98.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
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/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
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
thumbnails/corpse.jpg
(Stored with Git LFS)
Normal file
BIN
thumbnails/corpse.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
40
thumbnails/corpse.jpg.import
Normal file
40
thumbnails/corpse.jpg.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://8st5esb8blio"
|
||||||
|
path="res://.godot/imported/corpse.jpg-022fa40684770e53fc7c9a8e0bfd84be.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://thumbnails/corpse.jpg"
|
||||||
|
dest_files=["res://.godot/imported/corpse.jpg-022fa40684770e53fc7c9a8e0bfd84be.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
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/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
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
thumbnails/doctor.jpg
(Stored with Git LFS)
Normal file
BIN
thumbnails/doctor.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
40
thumbnails/doctor.jpg.import
Normal file
40
thumbnails/doctor.jpg.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bbcjo350ne8pv"
|
||||||
|
path="res://.godot/imported/doctor.jpg-674d8bda1c8cfefd555ca3ffbb6e3382.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://thumbnails/doctor.jpg"
|
||||||
|
dest_files=["res://.godot/imported/doctor.jpg-674d8bda1c8cfefd555ca3ffbb6e3382.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
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/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
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
thumbnails/wood.jpg
(Stored with Git LFS)
Normal file
BIN
thumbnails/wood.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
40
thumbnails/wood.jpg.import
Normal file
40
thumbnails/wood.jpg.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dctklkyp4ugdt"
|
||||||
|
path="res://.godot/imported/wood.jpg-c388c0edb58cc79b038499d85fe86a46.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://thumbnails/wood.jpg"
|
||||||
|
dest_files=["res://.godot/imported/wood.jpg-c388c0edb58cc79b038499d85fe86a46.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
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/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
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,3 +5,22 @@ signal currency_inspect(c: Currency)
|
||||||
|
|
||||||
@warning_ignore("unused_signal")
|
@warning_ignore("unused_signal")
|
||||||
signal open_inbox
|
signal open_inbox
|
||||||
|
|
||||||
|
var focused_members: Array[CurrencyMemberSprite] = []
|
||||||
|
signal focused_member_change(current: CurrencyMemberSprite)
|
||||||
|
|
||||||
|
#func focused_member() -> Cur
|
||||||
|
|
||||||
|
func focus_member(member: CurrencyMemberSprite):
|
||||||
|
focused_members.append(member)
|
||||||
|
focused_member_change.emit(member)
|
||||||
|
|
||||||
|
func unfocus_member(member: CurrencyMemberSprite):
|
||||||
|
var i := focused_members.find(member)
|
||||||
|
if i == -1:
|
||||||
|
return
|
||||||
|
focused_members.remove_at(i)
|
||||||
|
if focused_members.size():
|
||||||
|
focused_member_change.emit(focused_members[focused_members.size()-1])
|
||||||
|
else:
|
||||||
|
focused_member_change.emit(null)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue