Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix no template #472

Merged
merged 2 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Assets/Scenes/Main.unity
Original file line number Diff line number Diff line change
Expand Up @@ -9252,9 +9252,9 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 'Build date: 2024-02-23
m_text: 'Build date: 2024-02-27

Commit #592a236b'
Commit #ad14706'
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2100000, guid: 79459efec17a4d00a321bdcc27bbc385, type: 2}
Expand Down Expand Up @@ -9558,7 +9558,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: -58.700195, y: -206.89996}
m_AnchoredPosition: {x: -58.700134, y: -206.89996}
m_SizeDelta: {x: -116, y: 257}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &821904126
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/OgreeClasses/Room.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void SetAreas(SMargin _resDim, SMargin _techDim)
reservedZone.localPosition = new(technicalZone.localPosition.x, reservedZone.localPosition.y, technicalZone.localPosition.z);

// If tileOffset in template, apply it
if (!string.IsNullOrEmpty(attributes["template"]) && GameManager.instance.roomTemplates.ContainsKey(attributes["template"]))
if (attributes.HasKeyAndValue("template") && GameManager.instance.roomTemplates.ContainsKey(attributes["template"]))
{
SRoomFromJson template = GameManager.instance.roomTemplates[attributes["template"]];
if (template.tileOffset != null && template.tileOffset.Count != 0)
Expand Down
4 changes: 2 additions & 2 deletions Assets/Scripts/OgreeGenerators/BuildingGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public Building CreateBuilding(SApiObject _bd, Transform _parent)
}

SBuildingFromJson template = new();
if (!string.IsNullOrEmpty(_bd.attributes["template"]))
if (_bd.attributes.HasKeyAndValue("template"))
{
if (GameManager.instance.buildingTemplates.ContainsKey(_bd.attributes["template"]))
template = GameManager.instance.buildingTemplates[_bd.attributes["template"]];
Expand Down Expand Up @@ -108,7 +108,7 @@ public Room CreateRoom(SApiObject _ro, Transform _parent)
}

SRoomFromJson template = new();
if (!string.IsNullOrEmpty(_ro.attributes["template"]))
if (_ro.attributes.HasKeyAndValue("template"))
{
if (GameManager.instance.roomTemplates.ContainsKey(_ro.attributes["template"]))
template = GameManager.instance.roomTemplates[_ro.attributes["template"]];
Expand Down
6 changes: 3 additions & 3 deletions ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ PlayerSettings:
vulkanEnableLateAcquireNextImage: 0
vulkanEnableCommandBufferRecycling: 1
loadStoreDebugModeEnabled: 0
bundleVersion: 3.3.0
bundleVersion: 3.3.1
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0
Expand All @@ -160,7 +160,7 @@ PlayerSettings:
applicationIdentifier:
Standalone: com.Orness.OGrEE3D
buildNumber:
Standalone: 3.3.0
Standalone: 3.3.1
VisionOS: 0
iPhone: 0
tvOS: 0
Expand Down Expand Up @@ -726,10 +726,10 @@ PlayerSettings:
PointOfService: False
RecordedCallsFolder: False
Contacts: False
Proximity: False
InternetClient: False
CodeGeneration: False
BackgroundMediaPlayback: False
Proximity: False
metroTargetDeviceFamilies:
Desktop: False
Holographic: False
Expand Down