public ViewModelItemTooltipSolarPanelControl(IItem item) { this.protoItemSolarPanel = (IProtoItemSolarPanel)item.ProtoItem; this.Refresh(); this.itemPrivateState = item.GetPrivateState <ItemWithDurabilityPrivateState>(); this.itemPrivateState.ClientSubscribe(_ => _.DurabilityCurrent, _ => this.Refresh(), this); this.Refresh(); }
public static ItemTooltipSolarPanelControl Create(IProtoItemSolarPanel protoItemSolarPanel) { return(new() { protoItemSolarPanel = protoItemSolarPanel }); }
public ViewModelItemTooltipSolarPanelControl(IProtoItemSolarPanel protoItemSolarPanel) { this.protoItemSolarPanel = protoItemSolarPanel; this.Refresh(); }