get by name (#6396)

This commit is contained in:
Matthew (or Maya) Peng
2021-12-02 12:43:31 -08:00
committed by GitHub
parent 8cb830ba41
commit 5ea4688e88

View File

@@ -264,6 +264,10 @@ public class ContentLoader{
return getByID(ContentType.item, id);
}
public Item item(String name){
return getByName(ContentType.item, name);
}
public Seq<Liquid> liquids(){
return getBy(ContentType.liquid);
}
@@ -272,6 +276,10 @@ public class ContentLoader{
return getByID(ContentType.liquid, id);
}
public Liquid liquid(String name){
return getByName(ContentType.liquid, name);
}
public Seq<BulletType> bullets(){
return getBy(ContentType.bullet);
}
@@ -284,10 +292,18 @@ public class ContentLoader{
return getBy(ContentType.status);
}
public StatusEffect statusEffect(String name){
return getByName(ContentType.status, name);
}
public Seq<SectorPreset> sectors(){
return getBy(ContentType.sector);
}
public SectorPreset sector(String name){
return getByName(ContentType.sector, name);
}
public Seq<UnitType> units(){
return getBy(ContentType.unit);
}
@@ -296,7 +312,15 @@ public class ContentLoader{
return getByID(ContentType.unit, id);
}
public UnitType unit(String name){
return getByName(ContentType.unit, name);
}
public Seq<Planet> planets(){
return getBy(ContentType.planet);
}
}
public Planet planet(String name){
return getByName(ContentType.planet, name);
}
}