Some more work on hexes, chit distributions, added the cheatsheet for reference

This commit is contained in:
Dane Johnson 2022-08-24 11:48:22 -05:00
parent 112b8fd88b
commit 049f374c5b
9 changed files with 81 additions and 1 deletions

BIN
Doc/cheatsheet.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 KiB

35
Doc/cheatsheet.jpg.import Normal file
View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/cheatsheet.jpg-5aca443ec63d30c6a25cb0069c5edba1.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Doc/cheatsheet.jpg"
dest_files=[ "res://.import/cheatsheet.jpg-5aca443ec63d30c6a25cb0069c5edba1.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
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

7
Prefabs/Settlement.tscn Normal file
View File

@ -0,0 +1,7 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://Assets/settlement.png" type="Texture" id=1]
[node name="Settlement" type="Sprite"]
scale = Vector2( 0.0534854, 0.0534854 )
texture = ExtResource( 1 )

View File

@ -13,3 +13,4 @@ distribution = {
"mountains": 3, "mountains": 3,
"pasture": 4 "pasture": 4
} }
chits = [ 5, 2, 6, 3, 8, 10, 9, 12, 11, 4, 8, 10, 9, 4, 5, 6, 3, 11 ]

View File

@ -13,3 +13,4 @@ distribution = {
"mountains": 5, "mountains": 5,
"pasture": 6 "pasture": 6
} }
chits = [ 2, 5, 4, 6, 3, 9, 8, 11, 11, 10, 6, 3, 8, 4, 8, 10, 11, 12, 10, 5, 4, 9, 5, 9, 12, 3, 2, 6 ]

22
Scenes/HUD.tscn Normal file
View File

@ -0,0 +1,22 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://Assets/white-1.png" type="Texture" id=1]
[ext_resource path="res://Assets/black-1.png" type="Texture" id=2]
[node name="HUD" type="CanvasLayer"]
[node name="Control" type="Control" parent="."]
anchor_left = 1.0
anchor_right = 1.0
margin_left = -307.0
margin_bottom = 65.0
[node name="Dice1" type="Sprite" parent="Control"]
position = Vector2( 179.876, 32.8762 )
scale = Vector2( 0.0621776, 0.0621776 )
texture = ExtResource( 1 )
[node name="Dice2" type="Sprite" parent="Control"]
position = Vector2( 241.876, 32.8762 )
scale = Vector2( 0.0621776, 0.0621776 )
texture = ExtResource( 2 )

View File

@ -1,7 +1,8 @@
[gd_scene load_steps=3 format=2] [gd_scene load_steps=4 format=2]
[ext_resource path="res://Scripts/GameCamera.gd" type="Script" id=1] [ext_resource path="res://Scripts/GameCamera.gd" type="Script" id=1]
[ext_resource path="res://Prefabs/StdBoard.tscn" type="PackedScene" id=2] [ext_resource path="res://Prefabs/StdBoard.tscn" type="PackedScene" id=2]
[ext_resource path="res://Scenes/HUD.tscn" type="PackedScene" id=3]
[node name="Main" type="Node2D"] [node name="Main" type="Node2D"]
@ -11,3 +12,5 @@
current = true current = true
zoom = Vector2( 2, 2 ) zoom = Vector2( 2, 2 )
script = ExtResource( 1 ) script = ExtResource( 1 )
[node name="HUD" parent="Camera2D" instance=ExtResource( 3 )]

View File

@ -16,6 +16,7 @@ export(Dictionary) var distribution = {
"pasture": 0, "pasture": 0,
"desert": 1, "desert": 1,
} }
export(Array, int) var chits = []
func _ready(): func _ready():
var tiles = [] var tiles = []

View File

@ -19,3 +19,13 @@ func _input(event):
if event is InputEventMouseMotion: if event is InputEventMouseMotion:
if pan: if pan:
translate(-event.relative * zoom) translate(-event.relative * zoom)
func get_corner(corner):
return $Corners.get_node(str(corner))
func place_corner(corner, item):
get_corner(corner).add_child(item)
func clear_corner(corner):
for child in get_corner(corner).get_children():
child.queue_free()