initial post_office commit
All checks were successful
linting & formatting / build (push) Successful in 21s
itch.io publish action / build (web, html) (push) Successful in 3m43s

This commit is contained in:
duncgibbs 2026-04-29 14:52:14 -05:00
parent bb36f42635
commit 6921a1ff63
9 changed files with 246 additions and 0 deletions

BIN
assets/package/boxes_SpriteSheet.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://s1kqdqdvvrxf"
path="res://.godot/imported/boxes_SpriteSheet.png-971c2ed38a50dc5fe065e5b69e2ea946.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/package/boxes_SpriteSheet.png"
dest_files=["res://.godot/imported/boxes_SpriteSheet.png-971c2ed38a50dc5fe065e5b69e2ea946.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

View File

@ -0,0 +1,31 @@
class_name PostOffice extends Building
@onready var preview_node: Node2D = %Preview
@onready var board_node: Node2D = %Board
func place() -> void:
preview_node.hide()
board_node.show()
func can_citizen_enter(_coord: Vector2i, _direction: Board.Direction) -> bool:
return true
func get_tile_coords() -> Array[Vector2i]:
return [starting_coord]
func get_direction_queue(_citizen: Citizen) -> Array[Board.Direction]:
return []
func activate(citizen: Citizen) -> void:
if citizen.get_status_count(Citizen.Status.PACKAGED) > 0:
citizen.remove_all_statuses(Citizen.Status.PACKAGED)
print("Citizen has delivered a package!")
print("\tDistance: ", citizen.package_distance)
citizen.package_distance = 0
else:
citizen.add_status(Citizen.Status.PACKAGED)

View File

@ -0,0 +1 @@
uid://bgde73oxvye5t

View File

@ -0,0 +1,119 @@
[gd_scene format=3 uid="uid://bpi8owv5lxyjy"]
[ext_resource type="Script" uid="uid://bgde73oxvye5t" path="res://prefabs/tiles/buildings/post_office.gd" id="1_0ascf"]
[ext_resource type="Texture2D" uid="uid://dijho2wx1l4sm" path="res://assets/bomb/bomb.png" id="3_vwkts"]
[sub_resource type="LabelSettings" id="LabelSettings_vwg8v"]
outline_size = 4
outline_color = Color(0, 0, 0, 1)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_vwg8v"]
size = Vector2(109, 109)
[node name="PostOffice" type="Node2D" unique_id=746270571]
process_mode = 3
script = ExtResource("1_0ascf")
[node name="Preview" type="Node2D" parent="." unique_id=515630033]
unique_name_in_owner = true
[node name="Outline" type="ColorRect" parent="Preview" unique_id=889061850]
custom_minimum_size = Vector2(110, 110)
offset_left = -82.5
offset_top = -28.0
offset_right = 27.5
offset_bottom = 82.0
mouse_filter = 2
color = Color(0, 0, 0, 1)
[node name="ColorRect" type="ColorRect" parent="Preview/Outline" unique_id=803405966]
custom_minimum_size = Vector2(108, 108)
layout_mode = 0
offset_left = 1.0
offset_top = 1.0
offset_right = 109.0
offset_bottom = 109.0
mouse_filter = 2
color = Color(0, 0.71932274, 0.79595864, 1)
[node name="Outline2" type="ColorRect" parent="Preview" unique_id=1396499698]
custom_minimum_size = Vector2(110, 110)
offset_left = -28.0
offset_top = -82.0
offset_right = 82.0
offset_bottom = 28.0
mouse_filter = 2
color = Color(0, 0, 0, 1)
[node name="ColorRect" type="ColorRect" parent="Preview/Outline2" unique_id=167610173]
custom_minimum_size = Vector2(108, 108)
layout_mode = 0
offset_left = 1.0
offset_top = 1.0
offset_right = 109.0
offset_bottom = 109.0
mouse_filter = 2
color = Color(0, 0.71932274, 0.79595864, 1)
[node name="Size" type="Control" parent="Preview" unique_id=1036213581]
unique_name_in_owner = true
layout_mode = 3
anchors_preset = 0
offset_left = -82.5
offset_top = -82.5
offset_right = 82.5
offset_bottom = 82.5
mouse_filter = 2
[node name="Label" type="Label" parent="Preview" unique_id=29286194]
custom_minimum_size = Vector2(165, 165)
offset_left = -82.5
offset_top = -82.5
offset_right = 82.5
offset_bottom = 82.5
text = "POST
OFFICE"
label_settings = SubResource("LabelSettings_vwg8v")
horizontal_alignment = 1
vertical_alignment = 1
[node name="Board" type="Node2D" parent="." unique_id=1675613235]
unique_name_in_owner = true
visible = false
[node name="Outline" type="ColorRect" parent="Board" unique_id=1599746913]
custom_minimum_size = Vector2(110, 110)
offset_left = -55.0
offset_top = -55.0
offset_right = 55.0
offset_bottom = 55.0
mouse_filter = 2
color = Color(0, 0.7176471, 0.79607844, 1)
[node name="Label2" type="Label" parent="Board" unique_id=1535058806]
custom_minimum_size = Vector2(110, 110)
offset_left = -55.0
offset_top = -55.0
offset_right = 55.0
offset_bottom = 55.0
text = "POST
OFFICE"
label_settings = SubResource("LabelSettings_vwg8v")
horizontal_alignment = 1
vertical_alignment = 1
[node name="Square1" type="Area2D" parent="Board" unique_id=333775731]
process_mode = 3
monitoring = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="Board/Square1" unique_id=1122204523]
process_mode = 3
shape = SubResource("RectangleShape2D_vwg8v")
[node name="BombSprite" type="Sprite2D" parent="Board" unique_id=2024150262]
unique_name_in_owner = true
visible = false
scale = Vector2(0.415, 0.415)
texture = ExtResource("3_vwkts")
[connection signal="area_entered" from="Board/Square1" to="." method="_on_building_area_entered"]

View File

@ -0,0 +1,15 @@
[gd_scene format=3 uid="uid://cn8biugbtcns5"]
[ext_resource type="Texture2D" uid="uid://cfo7jpjxnw5m8" path="res://assets/shotgun/shotgun_1.png" id="1_2kv2h"]
[sub_resource type="AtlasTexture" id="AtlasTexture_af8ve"]
atlas = ExtResource("1_2kv2h")
region = Rect2(1, 12, 28, 9)
[node name="ArmedIcon" type="TextureRect" unique_id=585475146]
texture_filter = 1
custom_minimum_size = Vector2(10, 10)
texture = SubResource("AtlasTexture_af8ve")
expand_mode = 5
stretch_mode = 5
flip_h = true

View File

@ -0,0 +1,13 @@
[gd_scene format=3 uid="uid://0644a3psplk8"]
[ext_resource type="Texture2D" uid="uid://nne5hv8t0sks" path="res://assets/coffee/AssetPack_V01_FREE.png" id="1_ikgws"]
[sub_resource type="AtlasTexture" id="AtlasTexture_af8ve"]
atlas = ExtResource("1_ikgws")
region = Rect2(32, 16, 16, 16)
[node name="CoffeeIcon" type="TextureRect" unique_id=585475146]
texture_filter = 1
custom_minimum_size = Vector2(10, 10)
texture = SubResource("AtlasTexture_af8ve")
expand_mode = 3

View File

@ -0,0 +1,11 @@
[gd_scene format=3 uid="uid://28x2e52skdt1"]
[ext_resource type="Texture2D" uid="uid://cm0k0h7fakj7m" path="res://assets/beer/beer.png" id="1_1d2oi"]
[node name="DrunkIcon" type="TextureRect" unique_id=967704941]
z_index = 1
texture_filter = 1
custom_minimum_size = Vector2(10, 10)
texture = ExtResource("1_1d2oi")
expand_mode = 1
stretch_mode = 4

View File

@ -0,0 +1,13 @@
[gd_scene format=3 uid="uid://drhv16h2tgoju"]
[ext_resource type="Texture2D" uid="uid://s1kqdqdvvrxf" path="res://assets/package/boxes_SpriteSheet.png" id="1_a86ef"]
[sub_resource type="AtlasTexture" id="AtlasTexture_af8ve"]
atlas = ExtResource("1_a86ef")
region = Rect2(1, 0, 16, 18)
[node name="PackageIcon" type="TextureRect" unique_id=585475146]
texture_filter = 1
custom_minimum_size = Vector2(10, 10)
texture = SubResource("AtlasTexture_af8ve")
expand_mode = 3