Save The Tree implementation and acceptance work in progress
Preserve production code, regression fixtures, audio assets and provenance, test infrastructure, and the original-completion plan and progress ledger. Final game and Windows acceptance remain pending; excluded local artifacts and native experiments are not part of this snapshot.
This commit is contained in:
@@ -4,6 +4,8 @@ extends RefCounted
|
||||
## Small, code-native room furnishings. Coordinates use the same pixel size as
|
||||
## Kenney's 16 px sprites. This renderer never changes simulation state.
|
||||
const Layout := preload("res://scripts/ui/room_presentation.gd")
|
||||
const StandardRooms := preload("res://scripts/ui/standard_room_art.gd")
|
||||
const InfirmaryRooms := preload("res://scripts/ui/infirmary_room_art.gd")
|
||||
const INK := Color("34413b")
|
||||
const WOOD := Color("8e6348")
|
||||
const WOOD_LIGHT := Color("c39665")
|
||||
@@ -16,7 +18,7 @@ static func tile(canvas: CanvasItem, texture: Texture2D, index: int, target: Rec
|
||||
canvas.draw_texture_rect_region(texture, target, Rect2((index % 12) * 16, (index / 12) * 16, 16, 16), tint)
|
||||
|
||||
|
||||
static func room(canvas: CanvasItem, rect: Rect2, id: StringName, pixel: float, dungeon: Texture2D, town: Texture2D, back: bool, decoration_seed := 0, presentation: Dictionary = {}) -> void:
|
||||
static func room(canvas: CanvasItem, rect: Rect2, id: StringName, pixel: float, dungeon: Texture2D, town: Texture2D, back: bool, decoration_seed := 0, presentation: Dictionary = {}, visual_level: int = 1) -> void:
|
||||
var p := pixel
|
||||
if id in [&"guest_stairs", &"service_stairs"]:
|
||||
stairs(canvas, rect, p, id == &"service_stairs")
|
||||
@@ -65,12 +67,21 @@ static func room(canvas: CanvasItem, rect: Rect2, id: StringName, pixel: float,
|
||||
var lamp_x := mid if w > 32*p else rect.end.x-4*p
|
||||
canvas.draw_rect(Rect2(lamp_x-p, top+3*p, 2*p, 3*p), WOOD)
|
||||
canvas.draw_rect(Rect2(lamp_x-2*p, top+5*p, 4*p, 2*p), Color("edc97c"))
|
||||
if id == &"standard_room":
|
||||
StandardRooms.wall_trim(canvas, rect, p, back, visual_level)
|
||||
match id:
|
||||
&"reception":
|
||||
counter(canvas, Vector2(mid-9*p, floor_y-6*p), 18*p, p)
|
||||
canvas.draw_rect(Rect2(mid-6*p, floor_y-8*p, 4*p, 2*p), CREAM)
|
||||
canvas.draw_rect(Rect2(mid+4*p, floor_y-8*p, 2*p, 2*p), Color("d6ad52"))
|
||||
&"standard_room", &"premium_room", &"staff_dormitory", &"adult_private_room", &"infirmary":
|
||||
&"standard_room":
|
||||
for at: Vector2 in Layout.slots(rect, p, id):
|
||||
var bed_at: Vector2 = at + Vector2(-7, -9)*p
|
||||
bed(canvas, bed_at, p, Color("709b94") if not dark else Color("a37b91"), 13)
|
||||
StandardRooms.bed_trim(canvas, bed_at, p, back, visual_level)
|
||||
&"infirmary":
|
||||
InfirmaryRooms.draw_room(canvas,rect,p,back,visual_level,dungeon)
|
||||
&"premium_room", &"staff_dormitory", &"adult_private_room":
|
||||
for at: Vector2 in Layout.slots(rect, p, id):
|
||||
bed(canvas, at + Vector2(-7, -9)*p, p, Color("709b94") if not dark else Color("a37b91"), 13)
|
||||
&"cafeteria", &"tavern":
|
||||
|
||||
Reference in New Issue
Block a user