public Weenie GetWeenie(string token, uint weenieClassId) { Weenie result = null; Weenies.TryGetValue(weenieClassId, out result); return(result); }
public override void ClearDirtyFlags() { base.ClearDirtyFlags(); AssociatedContent.ForEach(c => c.ClearDirtyFlags()); ExternalResources.ForEach(r => r.ClearDirtyFlags()); Weenies.ForEach(w => w.ClearDirtyFlags()); AssociatedLandblocks.ForEach(l => l.ClearDirtyFlags()); }
public bool DeleteWeenie(string token, uint weenieClassId) { try { Weenie weenie = null; if (Weenies.TryRemove(weenieClassId, out weenie)) { string path = Path.Combine(ContentPath, "weenies", $"{weenieClassId}.json"); File.Delete(path); } return(true); } catch { return(false); } }