public static StatusItem MakeKillsStatusItem() { var s = new StatusItem("LaserKills", "BUILDING", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, allow_multiples: false, OverlayModes.None.ID); s.resolveStringCallback = delegate(string str, object data) { MeteorDefenseLaser obj = (MeteorDefenseLaser)data; if (obj != null) { str = string.Format(str, obj.kills); } return(str); }; return(s); }
public static StatusItem MakeChargeStatusItem() { var s = new StatusItem("LaserStoredCharge", "BUILDING", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, allow_multiples: false, OverlayModes.None.ID); s.resolveStringCallback = delegate(string str, object data) { MeteorDefenseLaser obj = (MeteorDefenseLaser)data; if (obj != null) { str = string.Format(str, GameUtil.GetFormattedRoundedJoules(obj.electricity_available), GameUtil.GetFormattedRoundedJoules(obj.electricity_capacity)); } return(str); }; return(s); }