public void DoneMessage(object o) { TickOffSystem.EntryType type = (o as TickOffSystem.Entry)._type; if (type != TickOffSystem.EntryType.CollectItem) { if (type != TickOffSystem.EntryType.InspectAnimal) { if (type == TickOffSystem.EntryType.InspectPlant) { this.LogMessage(UiTranslationDatabase.TranslateKey(this._inspectedPlantMessageKey, "NEW PLANT DISCOVERED", true)); } } else { this.LogMessage(UiTranslationDatabase.TranslateKey(this._inspectedAnimalMessageKey, "NEW ANIMAL DISCOVERED", true)); } } else { this.LogMessage(UiTranslationDatabase.TranslateKey(this._collectedItemMessageKey, "NEW PLANT DISCOVERED", true)); } if (this._tickOffTab) { this._tickOffTab.Highlight(null); } LocalPlayer.Sfx.PlayTaskCompleted(); }
public void Init() { TickOffSystem.EntryType type = this._type; if (type != TickOffSystem.EntryType.CollectItem) { if (type == TickOffSystem.EntryType.InspectAnimal) { EventRegistry.Player.Subscribe(TfEvent.InspectedAnimal, new EventRegistry.SubscriberCallback(this.OnInspectedAnimal)); } } else { EventRegistry.Player.Subscribe(TfEvent.AddedItem, new EventRegistry.SubscriberCallback(this.OnCollectedItem)); EventRegistry.Player.Subscribe(TfEvent.UsedItem, new EventRegistry.SubscriberCallback(this.OnCollectedItem)); } }