Destroy bullet team (#8792)
* Option for destroy bullet to be on the block's team * Random direction * h
This commit is contained in:
@@ -1324,7 +1324,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
|||||||
//I really do not like that the bullet will not destroy derelict
|
//I really do not like that the bullet will not destroy derelict
|
||||||
//but I can't do anything about it without using a random team
|
//but I can't do anything about it without using a random team
|
||||||
//which may or may not cause issues with servers and js
|
//which may or may not cause issues with servers and js
|
||||||
block.destroyBullet.create(this, Team.derelict, x, y, 0);
|
block.destroyBullet.create(this, block.destroyBulletSameTeam ? team : Team.derelict, x, y, Mathf.randomSeed(id(), 360f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -170,6 +170,8 @@ public class Block extends UnlockableContent implements Senseable{
|
|||||||
public float baseExplosiveness = 0f;
|
public float baseExplosiveness = 0f;
|
||||||
/** bullet that this block spawns when destroyed */
|
/** bullet that this block spawns when destroyed */
|
||||||
public @Nullable BulletType destroyBullet = null;
|
public @Nullable BulletType destroyBullet = null;
|
||||||
|
/** if true, destroyBullet is spawned on the block's team instead of Derelict team */
|
||||||
|
public boolean destroyBulletSameTeam = false;
|
||||||
/** liquid used for lighting */
|
/** liquid used for lighting */
|
||||||
public @Nullable Liquid lightLiquid;
|
public @Nullable Liquid lightLiquid;
|
||||||
/** whether cracks are drawn when this block is damaged */
|
/** whether cracks are drawn when this block is damaged */
|
||||||
|
|||||||
Reference in New Issue
Block a user