less logging and more formatting
This commit is contained in:
parent
0faae768f5
commit
323ed0974d
4 changed files with 589 additions and 593 deletions
|
@ -84,7 +84,7 @@ local function alertGuards(aggressor, cell)
|
||||||
log(response)
|
log(response)
|
||||||
elseif config.combatDialogue == common.dialogueMode.voice then
|
elseif config.combatDialogue == common.dialogueMode.voice then
|
||||||
local response = common.playGuardVoice(npc.mobile, "join_combat")
|
local response = common.playGuardVoice(npc.mobile, "join_combat")
|
||||||
log("Playing sound file: %s", response)
|
log("Playing sound file %s because join_combat", response)
|
||||||
end
|
end
|
||||||
|
|
||||||
npc.mobile:startCombat(aggressor)
|
npc.mobile:startCombat(aggressor)
|
||||||
|
|
|
@ -65,7 +65,6 @@ this.playGuardVoice = function(mobile, type)
|
||||||
local sex = ref.baseObject.female and "f" or "m"
|
local sex = ref.baseObject.female and "f" or "m"
|
||||||
local race = ref.baseObject.race.id:lower()
|
local race = ref.baseObject.race.id:lower()
|
||||||
local directory, soundPath, sound
|
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
|
-- 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
|
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
|
-- sound will be nil if the race/sex/type combo is an empty table
|
||||||
if sound then soundPath = directory .. sound.file end
|
if sound then soundPath = directory .. sound.file end
|
||||||
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 distanceFromPlayer = math.clamp(mobile.position:distance(tes3.mobilePlayer.position), 0, distanceCap) or 0
|
||||||
local volume = 1 - (distanceFromPlayer / distanceCap)
|
local volume = 1 - (distanceFromPlayer / distanceCap)
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -63,7 +63,7 @@ local function startDialogue(chance)
|
||||||
log(response)
|
log(response)
|
||||||
elseif config.sneakDialogue == common.dialogueMode.voice then
|
elseif config.sneakDialogue == common.dialogueMode.voice then
|
||||||
local response = common.playGuardVoice(follower, "sneaking")
|
local response = common.playGuardVoice(follower, "sneaking")
|
||||||
log("Playing sound file: %s", response)
|
log("Playing sound file %s because sneaking", response)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -106,7 +106,7 @@ local function stopFollowing(onTimer)
|
||||||
log(response)
|
log(response)
|
||||||
elseif config.sneakDialogue == common.dialogueMode.voice then
|
elseif config.sneakDialogue == common.dialogueMode.voice then
|
||||||
local response = common.playGuardVoice(follower, "stop_following")
|
local response = common.playGuardVoice(follower, "stop_following")
|
||||||
log("Playing sound file: %s", response)
|
log("Playing sound file %s because stop_following", response)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ local function abortFollow()
|
||||||
log(response)
|
log(response)
|
||||||
elseif config.sneakDialogue == common.dialogueMode.voice then
|
elseif config.sneakDialogue == common.dialogueMode.voice then
|
||||||
local response = common.playGuardVoice(follower, "stop_sneaking")
|
local response = common.playGuardVoice(follower, "stop_sneaking")
|
||||||
log("Playing sound file: %s", response)
|
log("Playing sound file %s because stop_sneaking", response)
|
||||||
end
|
end
|
||||||
stopFollowing(false)
|
stopFollowing(false)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue