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.
143 lines
2.7 KiB
GDScript
143 lines
2.7 KiB
GDScript
class_name StandardRoomArt
|
|
extends RefCounted
|
|
|
|
## Provisional visual-only Lv1..3 study. Preserve the existing two bed anchors,
|
|
## footprint and operation overlays. These are cosmetic pixels, not new game
|
|
## costs, capacity, quality or upgrade rules. Level1 draws no added rectangles.
|
|
## Existing 16px furniture palette is retained. Inspected Kenney references and
|
|
## exact CC0 records are pinned; no narrow two-bed replacement was selected.
|
|
const BED_TRIMS := {
|
|
"2": [
|
|
{
|
|
"at": [
|
|
0,
|
|
0
|
|
],
|
|
"size": [
|
|
13,
|
|
1
|
|
],
|
|
"front": "c39665",
|
|
"back": "8fa5a2"
|
|
},
|
|
{
|
|
"at": [
|
|
0,
|
|
1
|
|
],
|
|
"size": [
|
|
2,
|
|
8
|
|
],
|
|
"front": "a87852",
|
|
"back": "698783"
|
|
},
|
|
{
|
|
"at": [
|
|
5,
|
|
4
|
|
],
|
|
"size": [
|
|
7,
|
|
1
|
|
],
|
|
"front": "e5dac0",
|
|
"back": "b8ccc2"
|
|
}
|
|
],
|
|
"3": [
|
|
{
|
|
"at": [
|
|
0,
|
|
0
|
|
],
|
|
"size": [
|
|
13,
|
|
1
|
|
],
|
|
"front": "c39665",
|
|
"back": "8fa5a2"
|
|
},
|
|
{
|
|
"at": [
|
|
1,
|
|
1
|
|
],
|
|
"size": [
|
|
11,
|
|
1
|
|
],
|
|
"front": "eee5c9",
|
|
"back": "c3d1c5"
|
|
},
|
|
{
|
|
"at": [
|
|
0,
|
|
1
|
|
],
|
|
"size": [
|
|
2,
|
|
8
|
|
],
|
|
"front": "a87852",
|
|
"back": "698783"
|
|
},
|
|
{
|
|
"at": [
|
|
5,
|
|
6
|
|
],
|
|
"size": [
|
|
7,
|
|
1
|
|
],
|
|
"front": "eee5c9",
|
|
"back": "c3d1c5"
|
|
},
|
|
{
|
|
"at": [
|
|
7,
|
|
3
|
|
],
|
|
"size": [
|
|
3,
|
|
3
|
|
],
|
|
"front": "d6ad52",
|
|
"back": "93b6ae"
|
|
},
|
|
{
|
|
"at": [
|
|
8,
|
|
4
|
|
],
|
|
"size": [
|
|
1,
|
|
1
|
|
],
|
|
"front": "fff0d6",
|
|
"back": "e6edda"
|
|
}
|
|
]
|
|
}
|
|
|
|
|
|
static func bed_trim(canvas: CanvasItem, at: Vector2, p: float, back: bool, level: int) -> void:
|
|
var commands: Array = BED_TRIMS.get(str(clampi(level, 1, 3)), [])
|
|
for command: Dictionary in commands:
|
|
var offset: Array = command["at"]
|
|
var dimensions: Array = command["size"]
|
|
var tone: Color = Color(String(command["back"] if back else command["front"]))
|
|
canvas.draw_rect(Rect2(at + Vector2(float(offset[0]), float(offset[1]))*p,
|
|
Vector2(float(dimensions[0]), float(dimensions[1]))*p), tone)
|
|
|
|
|
|
static func wall_trim(canvas: CanvasItem, rect: Rect2, p: float, back: bool, level: int) -> void:
|
|
if level < 2:
|
|
return
|
|
var tone: Color = Color("8fa5a2") if back else Color("c39665")
|
|
canvas.draw_rect(Rect2(rect.position + Vector2(1, 2)*p, Vector2(rect.size.x - 2*p, p)), tone)
|
|
if level >= 3:
|
|
for offset: int in [-2, 0, 2]:
|
|
canvas.draw_rect(Rect2(Vector2(rect.get_center().x + offset*p, rect.position.y + 3*p), Vector2(p, p)), tone)
|