Skip to content

Commit 8710f6d

Browse files
committed
- added modding support for defining object spawn sounds
1 parent 650089b commit 8710f6d

File tree

4 files changed

+33
-0
lines changed

4 files changed

+33
-0
lines changed

Assets/Editor/Asset.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ public string Name
7777

7878
public SittingType SittingType { get; set; } = SittingType.NormalRide;
7979

80+
public SpawnSound SpawnSound { get; set; } = SpawnSound.None;
81+
8082
#region deco
8183

8284
/// <summary>

Assets/Editor/SpawnSound.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
namespace ParkitectAssetEditor
2+
{
3+
public enum SpawnSound
4+
{
5+
None = 0,
6+
Bench = 1,
7+
Door = 2,
8+
Fence = 3,
9+
GenericSmall = 4,
10+
GenericMedium = 5,
11+
GenericLarge = 6,
12+
GenericMetal = 16,
13+
GenericWood = 17,
14+
Lamp = 7,
15+
PlantSmall = 18,
16+
PlantMedium = 19,
17+
PlantLarge = 20,
18+
RockSmall = 8,
19+
RockLarge = 9,
20+
Shape = 10,
21+
TrashBin = 11,
22+
TreeSmall = 12,
23+
TreeLarge = 13,
24+
Wall = 14,
25+
Window = 15,
26+
}
27+
}

Assets/Editor/SpawnSound.cs.meta

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Editor/UI/AssetEditorWindow.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ private void DrawAssetDetailSection()
329329
_selectedAsset.Name = EditorGUILayout.TextField("Name", _selectedAsset.Name);
330330
_selectedAsset.Type = (AssetType)EditorGUILayout.EnumPopup("Type", _selectedAsset.Type);
331331
_selectedAsset.Price = EditorGUILayout.FloatField("Price:", _selectedAsset.Price);
332+
_selectedAsset.SpawnSound = (SpawnSound)EditorGUILayout.EnumPopup("Spawn Sound:", _selectedAsset.SpawnSound);
332333

333334
GUILayout.Label("Color settings", EditorStyles.boldLabel);
334335
_selectedAsset.HasCustomColors = EditorGUILayout.Toggle("Has custom colors: ", _selectedAsset.HasCustomColors);

0 commit comments

Comments
 (0)