less logging and more formatting

This commit is contained in:
Lilian Jónsdóttir 2021-09-04 21:59:40 -07:00
parent 0faae768f5
commit 323ed0974d
4 changed files with 589 additions and 593 deletions

View file

@ -84,7 +84,7 @@ local function alertGuards(aggressor, cell)
log(response)
elseif config.combatDialogue == common.dialogueMode.voice then
local response = common.playGuardVoice(npc.mobile, "join_combat")
log("Playing sound file: %s", response)
log("Playing sound file %s because join_combat", response)
end
npc.mobile:startCombat(aggressor)

View file

@ -65,7 +65,6 @@ this.playGuardVoice = function(mobile, type)
local sex = ref.baseObject.female and "f" or "m"
local race = ref.baseObject.race.id:lower()
local directory, soundPath, sound
this.log("before: ref:%s sex:%s race:%s soundPath:%s type:%s", ref.id, sex, race, soundPath, type)
-- make sure the race/sex/type combo exists in the voice data
if this.dialogues.voice[race] and this.dialogues.voice[race][sex] and this.dialogues.voice[race][sex][type] then
@ -74,7 +73,6 @@ this.playGuardVoice = function(mobile, type)
-- sound will be nil if the race/sex/type combo is an empty table
if sound then soundPath = directory .. sound.file end
end
this.log("after: ref:%s sex:%s race:%s soundPath:%s type:%s", ref.id, sex, race, soundPath, type)
local distanceFromPlayer = math.clamp(mobile.position:distance(tes3.mobilePlayer.position), 0, distanceCap) or 0
local volume = 1 - (distanceFromPlayer / distanceCap)

File diff suppressed because it is too large Load diff

View file

@ -63,7 +63,7 @@ local function startDialogue(chance)
log(response)
elseif config.sneakDialogue == common.dialogueMode.voice then
local response = common.playGuardVoice(follower, "sneaking")
log("Playing sound file: %s", response)
log("Playing sound file %s because sneaking", response)
end
end
end
@ -106,7 +106,7 @@ local function stopFollowing(onTimer)
log(response)
elseif config.sneakDialogue == common.dialogueMode.voice then
local response = common.playGuardVoice(follower, "stop_following")
log("Playing sound file: %s", response)
log("Playing sound file %s because stop_following", response)
end
end
@ -154,7 +154,7 @@ local function abortFollow()
log(response)
elseif config.sneakDialogue == common.dialogueMode.voice then
local response = common.playGuardVoice(follower, "stop_sneaking")
log("Playing sound file: %s", response)
log("Playing sound file %s because stop_sneaking", response)
end
stopFollowing(false)
end