mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-24 05:21:15 -08:00
Hide internal units from logic
This commit is contained in:
parent
c0e4c9c5b5
commit
55dfffa4bc
2 changed files with 4 additions and 2 deletions
|
|
@ -132,7 +132,9 @@ public class GlobalVars{
|
|||
}
|
||||
|
||||
for(UnitType type : Vars.content.units()){
|
||||
put("@" + type.name, type);
|
||||
if(!type.internal){
|
||||
put("@" + type.name, type);
|
||||
}
|
||||
}
|
||||
|
||||
for(Weather weather : Vars.content.weathers()){
|
||||
|
|
|
|||
|
|
@ -1380,7 +1380,7 @@ public class LExecutor{
|
|||
|
||||
Team t = team.team();
|
||||
|
||||
if(type.obj() instanceof UnitType type && !type.hidden && t != null && Units.canCreate(t, type)){
|
||||
if(type.obj() instanceof UnitType type && !type.internal && !type.hidden && t != null && Units.canCreate(t, type)){
|
||||
//random offset to prevent stacking
|
||||
var unit = type.spawn(t, World.unconv(x.numf()) + Mathf.range(0.01f), World.unconv(y.numf()) + Mathf.range(0.01f));
|
||||
spawner.spawnEffect(unit, rotation.numf());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue