Esempio n. 1
0
        private void PlayDoorSound()
        {
            DoorSoundSetting doorSoundSetting = ModConfig.Instance.DoorSoundSetting;

            if (doorSoundSetting == DoorSoundSetting.ALWAYS_ON ||
                doorSoundSetting == DoorSoundSetting.ONLY_ON_FARM && StardewValley.Game1.player.currentLocation.IsFarm)
            {
                if (!building.animalDoorOpen.Value)
                {
                    StardewValley.Game1.player.currentLocation.playSound("doorCreak");
                }
                else
                {
                    StardewValley.Game1.player.currentLocation.playSound("doorCreakReverse");
                }
            }
        }
 public static string Name(this DoorSoundSetting doorSoundSetting)
 {
     return(DOOR_SOUND_SETTING_TO_NAME[doorSoundSetting]);
 }