Skip to content

Commit

Permalink
Clean up some log calls
Browse files Browse the repository at this point in the history
  • Loading branch information
ManlyMarco committed Jun 3, 2023
1 parent 898cd81 commit 83d839f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions MainGameVR/Camera/BackgroundDisplayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public void OnCameraMove()

public void TakeCanvas(Canvas canvas)
{
VRLog.Info($"Taking canvas: {canvas.name}");
if (_bgCanvas != null) VRLog.Warn("taking a second canvas?");
VRLog.Info("Taking canvas: {0}", canvas.name);
if (_bgCanvas != null) VRLog.Warn($"Taking a second canvas? {_bgCanvas}");
canvas.renderMode = RenderMode.WorldSpace;
canvas.worldCamera = null;
canvas.gameObject.layer = 0;
Expand Down
3 changes: 1 addition & 2 deletions MainGameVR/Controls/ButtonsSubtool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,9 @@ private void StartScroll(int amount)
/// <summary>
/// Rotate the camera. If we are in Roaming, rotate the protagonist as well.
/// </summary>
/// <param name="degrees"></param>
private void Rotate(float degrees)
{
VRLog.Debug($"Rotating {degrees}");
VRLog.Debug("Rotating {0} degrees", degrees);
var actInterpreter = _Interpreter.SceneInterpreter as ActionSceneInterpreter;
if (actInterpreter != null) actInterpreter.MoveCameraToPlayer(true);
var camera = VR.Camera.transform;
Expand Down
2 changes: 1 addition & 1 deletion MainGameVR/Fixes/GameFixes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructi
// Only last instance needs to be patched or HScene.ResultTalk will break.
return new CodeMatcher(insts).End()
.MatchBack(false, new CodeMatch(OpCodes.Call, AccessTools.PropertyGetter(typeof(UnityEngine.Camera), nameof(UnityEngine.Camera.main))))
.ThrowIfInvalid("Camera.main not found in "+ __originalMethod.GetNiceName())
.ThrowIfInvalid("Camera.main not found in " + __originalMethod.GetNiceName())
.Set(OpCodes.Ldnull, null)
.Instructions();
}
Expand Down

0 comments on commit 83d839f

Please sign in to comment.