Skip to content

Commit

Permalink
CIWS icons
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxDorob committed Nov 30, 2024
1 parent ea64d73 commit b7af0ea
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public override void ExposeData()
base.ExposeData();
Scribe_Collections.Look(ref ignoredDefs, nameof(ignoredDefs));
}

static Texture2D icon;
public override IEnumerable<Gizmo> GetGizmos()
{
foreach (var gizmo in base.GetGizmos())
Expand All @@ -50,6 +50,7 @@ public override IEnumerable<Gizmo> GetGizmos()
yield return new Command_Action()
{
action = () => Find.WindowStack.Add(new Dialog_ManageCIWSTargets(GunCompEq.AllVerbs.OfType<VerbCIWS>().SelectMany(x => x.Props.AllTargets).Distinct().ToList(), ignoredDefs)),
icon = Building_CIWS_CE.icon ??= ContentFinder<Texture2D>.Get("UI/Commands/LaunchReport"),
defaultLabel = "Dialog_ManageCIWS".Translate(),
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class VerbProperties_CIWSProjectile : VerbProperties_CIWS
public VerbProperties_CIWSProjectile()
{
this.verbClass = typeof(VerbCIWSProjectile);
this.holdFireIcon = "UI/Buttons/CE_CIWS_Projectile";
}
public override bool Interceptable(ThingDef targetDef) => targetDef.projectile.speed < maximumSpeed && targetDef.projectile.flyOverhead && base.Interceptable(targetDef);
public float maximumSpeed = 80;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class VerbProperties_CIWSSkyfaller : VerbProperties_CIWS
public VerbProperties_CIWSSkyfaller()
{
this.verbClass = typeof(VerbCIWSSkyfaller);
this.holdFireIcon = "UI/Buttons/CE_CIWS_Skyfaller";
}
protected override IEnumerable<ThingDef> InitAllTargets() => DefDatabase<ThingDef>.AllDefsListForReading.Where(x => (typeof(Skyfaller).IsAssignableFrom(x.thingClass) && typeof(IActiveDropPod).IsAssignableFrom(x.thingClass)));
}
Expand Down
Binary file added Textures/UI/Buttons/CE_CIWS_Projectile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Textures/UI/Buttons/CE_CIWS_Skyfaller.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b7af0ea

Please sign in to comment.