update deprecated code

This commit is contained in:
Jesse Plamondon-Willard 2017-10-11 15:55:59 -04:00
parent 76bd5b7f33
commit 3ab4044995
3 changed files with 16 additions and 17 deletions

View File

@ -24,7 +24,6 @@ namespace SimpleSoundManager
/// <param name="newSoundBank">The path to the sound bank in the mod's asset folder.</param>
public SoundManager(string newWaveBank, string newSoundBank)
{
Log.AsyncC(newSoundBank);
this.waveBank = new WaveBank(Game1.audioEngine, newWaveBank);
this.soundBank = new SoundBank(Game1.audioEngine, newSoundBank);
this.currentlyPlayingSounds = new List<Cue>();

View File

@ -495,7 +495,7 @@ namespace StardustCore.Serialization
}
else
{
Log.AsyncM("Error parsing unknown object type: " + s);
ModCore.ModMonitor.Log("Error parsing unknown object type: " + s, LogLevel.Error);
}
}
@ -528,11 +528,11 @@ namespace StardustCore.Serialization
bool f = loc.objects.TryGetValue(new Microsoft.Xna.Framework.Vector2( Convert.ToInt32(chest[1]),Convert.ToInt32(chest[2])),out chestObject);
if (f == true)
{
Log.AsyncC("YAY");
ModCore.ModMonitor.Log("YAY");
}
else
{
Log.AsyncR("BOO");
ModCore.ModMonitor.Log("BOO");
}
string[] ehh = File.ReadAllLines(path);
@ -557,7 +557,7 @@ namespace StardustCore.Serialization
}
catch (Exception e)
{
Log.AsyncR("WHYASIIF");
ModCore.ModMonitor.Log("WHYASIIF");
//USE XML STYLE DESERIALIZING
foreach (KeyValuePair<string, SerializerDataNode> pair in acceptedTypes)
{
@ -576,7 +576,7 @@ namespace StardustCore.Serialization
}
catch(Exception err)
{
Log.AsyncR(err);
ModCore.ModMonitor.Log(err.ToString(), LogLevel.Error);
}
// Log.AsyncY("ADDED ITEM TO INVENTORY");
return;
@ -613,7 +613,7 @@ namespace StardustCore.Serialization
//USE JSON STYLE DESERIALIZNG
if (acceptedTypes.ContainsKey(s))
{
Log.AsyncC("parse???");
ModCore.ModMonitor.Log("parse???");
foreach (KeyValuePair<string, SerializerDataNode> pair in acceptedTypes)
{
// Log.AsyncY(pair.Key);
@ -625,30 +625,30 @@ namespace StardustCore.Serialization
// Log.AsyncR("1");
cObj = (CoreObject)pair.Value.parse.Invoke(data);
(cObj as CoreObject).thisLocation = Game1.getLocationFromName((cObj as CoreObject).locationsName);
Log.AsyncY("closer");
ModCore.ModMonitor.Log("closer");
if ((cObj as CoreObject).thisLocation == null)
{
try
{
Log.AsyncG("HERE PRETTY MUCH!!!");
ModCore.ModMonitor.Log("HERE PRETTY MUCH!!!");
Utilities.addItemToOtherInventory((chestObject as StardewValley.Objects.Chest).items, cObj);
foreach(var v in (chestObject as StardewValley.Objects.Chest).items)
{
Log.AsyncC(v.Name);
ModCore.ModMonitor.Log(v.Name);
}
}
catch (Exception err)
{
Log.AsyncR(err);
ModCore.ModMonitor.Log(err.ToString(), LogLevel.Error);
}
// Log.AsyncY("ADDED ITEM TO INVENTORY");
return;
}
else
{
Log.AsyncG("WHY HERE????");
ModCore.ModMonitor.Log("WHY HERE????");
(cObj as CoreObject).thisLocation.objects.Add((cObj as CoreObject).tileLocation, (StardewValley.Object)cObj);
thingsToAddBackIn.Add(cObj);
//Util.placementAction(cObj, cObj.thisLocation,(int)cObj.tileLocation.X,(int) cObj.tileLocation.Y,null,false);
@ -663,7 +663,7 @@ namespace StardustCore.Serialization
}
else
{
Log.AsyncM("Error parsing unknown object type: " + s);
ModCore.ModMonitor.Log("Error parsing unknown object type: " + s, LogLevel.Error);
}
}

View File

@ -612,7 +612,7 @@ namespace StardustCore
else
{
// Game1.showRedMessage("STEP 2");
Log.Info(vector);
ModCore.ModMonitor.Log(vector.ToString());
Vector2 newVec = new Vector2(vector.X, vector.Y);
// cObj.boundingBox.Inflate(32, 32);
@ -623,7 +623,7 @@ namespace StardustCore
if (playSound == true) Game1.playSound("woodyStep");
else
{
Log.AsyncG("restoring item from file");
ModCore.ModMonitor.Log("restoring item from file");
}
//Log.AsyncM("Placed and object");
cObj.locationsName = location.name;
@ -720,8 +720,8 @@ namespace StardustCore
{
if (logInfo)
{
Log.AsyncG("size " + inventory.Count);
Log.AsyncG("max " + inventory.Capacity);
ModCore.ModMonitor.Log("size " + inventory.Count);
ModCore.ModMonitor.Log("max " + inventory.Capacity);
}
if (inventory.Count == inventory.Capacity) return true;