Option to make a unit not appear on the title screen. (#5728)

This commit is contained in:
Matthew Peng 2021-08-09 15:04:21 -07:00 committed by GitHub
parent 9c1063c7cc
commit 6246a1d39c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -29,7 +29,7 @@ public class MenuRenderer implements Disposable{
private float time = 0f;
private float flyerRot = 45f;
private int flyers = Mathf.chance(0.2) ? Mathf.random(35) : Mathf.random(15);
private UnitType flyerType = content.units().select(u -> u.hitSize <= 20f && u.flying && u.region.found()).random();
private UnitType flyerType = content.units().select(u -> u.hitSize <= 20f && u.flying && u.onTitleScreen && u.region.found()).random();
public MenuRenderer(){
Time.mark();

View File

@ -42,6 +42,8 @@ public class UnitType extends UnlockableContent{
/** If true, the unit is always at elevation 1. */
public boolean flying;
/** If `flying` and this is true, the unit can appear on the title screen */
public boolean onTitleScreen = true;
/** Creates a new instance of this unit class. */
public Prov<? extends Unit> constructor;
/** The default AI controller to assign on creation. */