Destroy bullet team (#8792)

* Option for destroy bullet to be on the block's team

* Random direction

* h
This commit is contained in:
MEEPofFaith
2023-07-23 13:27:11 -07:00
committed by GitHub
parent 16949f1e69
commit b4e03b46f6
2 changed files with 3 additions and 1 deletions

View File

@@ -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
//but I can't do anything about it without using a random team
//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));
}
}

View File

@@ -170,6 +170,8 @@ public class Block extends UnlockableContent implements Senseable{
public float baseExplosiveness = 0f;
/** bullet that this block spawns when destroyed */
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 */
public @Nullable Liquid lightLiquid;
/** whether cracks are drawn when this block is damaged */