(Alpha 10 dev 2387 x64) Building templates - ghost images of mean bed does not honor rotation data

Summary:
In creating some building templates I discovered that the rotation data for mean beds is not honored in the ghost image of the template. Some screenshots and code below.

Steps to reproduce:

  1. Create a new building with a bed in it and save it as a template.
  2. Open the template file in a text editor and change the rotation of the bed (90, -90, 180). Save the file.
  3. Select the modified template in a game to see the ghost image.

Expected Results:
Bed to be rotated by 90, -90, or 180 in ghost image of the building editor.

Actual Results:
Ghost image always has a rotation of 0.

Rotation 0:

"2387000": {
	"mob": {
		"position": {
			"y": 1, 
			"x": 7, 
			"z": 7
		}, 
		"orientation": {
			"y": 0, 
			"x": 0, 
			"z": 0, 
			"w": 1
		}
	}, 
	"stonehearth:construction_progress": {
		"building_entity": 2382278, 
		"fabricator_component_name": "stonehearth:fixture_fabricator"
	}, 
	"stonehearth:fixture_fabricator": {
		"rotation": 0, 
		"fixture_uri": "stonehearth:furniture:not_much_of_a_bed", 
		"normal": {
			"y": 1, 
			"x": 0, 
			"z": 0
		}
	}, 
	"uri": "/stonehearth/entities/furniture/not_much_of_a_bed/not_much_of_a_bed_ghost.json"
}

Rotation 90:

"2387000": {
	"mob": {
		"position": {
			"y": 1, 
			"x": 7, 
			"z": 7
		}, 
		"orientation": {
			"y": 0, 
			"x": 0, 
			"z": 0, 
			"w": 1
		}
	}, 
	"stonehearth:construction_progress": {
		"building_entity": 2382278, 
		"fabricator_component_name": "stonehearth:fixture_fabricator"
	}, 
	"stonehearth:fixture_fabricator": {
		"rotation": 90, 
		"fixture_uri": "stonehearth:furniture:not_much_of_a_bed", 
		"normal": {
			"y": 1, 
			"x": 0, 
			"z": 0
		}
	}, 
	"uri": "/stonehearth/entities/furniture/not_much_of_a_bed/not_much_of_a_bed_ghost.json"
}

Rotation -90:

"2387000": {
	"mob": {
		"position": {
			"y": 1, 
			"x": 7, 
			"z": 7
		}, 
		"orientation": {
			"y": 0, 
			"x": 0, 
			"z": 0, 
			"w": 1
		}
	}, 
	"stonehearth:construction_progress": {
		"building_entity": 2382278, 
		"fabricator_component_name": "stonehearth:fixture_fabricator"
	}, 
	"stonehearth:fixture_fabricator": {
		"rotation": -90, 
		"fixture_uri": "stonehearth:furniture:not_much_of_a_bed", 
		"normal": {
			"y": 1, 
			"x": 0, 
			"z": 0
		}
	}, 
	"uri": "/stonehearth/entities/furniture/not_much_of_a_bed/not_much_of_a_bed_ghost.json"
}

Rotation 180:

"2387000": {
	"mob": {
		"position": {
			"y": 1, 
			"x": 7, 
			"z": 7
		}, 
		"orientation": {
			"y": 0, 
			"x": 0, 
			"z": 0, 
			"w": 1
		}
	}, 
	"stonehearth:construction_progress": {
		"building_entity": 2382278, 
		"fabricator_component_name": "stonehearth:fixture_fabricator"
	}, 
	"stonehearth:fixture_fabricator": {
		"rotation": 180, 
		"fixture_uri": "stonehearth:furniture:not_much_of_a_bed", 
		"normal": {
			"y": 1, 
			"x": 0, 
			"z": 0
		}
	}, 
	"uri": "/stonehearth/entities/furniture/not_much_of_a_bed/not_much_of_a_bed_ghost.json"
}

Please note that this does not affect the final placing. Upon placing the bed in the world it is rotated correctly.

1 Like