ABCxFF / diepcustom

An open source diep.io custom private-server template
https://diepcustom.herokuapp.com/
GNU Affero General Public License v3.0
67 stars 60 forks source link

Allow for initialization of projectile/NecromancerSquare without AbstractShape reference #88

Closed ABCxFF closed 1 year ago

ABCxFF commented 1 year ago
export default class NecromancerSquare extends Drone {
    public constructor(barrel: Barrel, tank: BarrelBase, tankDefinition: TankDefinition | null, shootAngle: number, shape: AbstractShape) {

this is preventing people from using necro drones as a bullet type - since they require a shape parameter.

Nul-led commented 1 year ago

Can't we just expose a seperate method setShape and use the default square in the ctor?

ABCxFF commented 1 year ago

That'd be fine too - could also use like a static method NecromancerSquare.fromShape() - either or : shrug:

Nul-led commented 1 year ago

yea fromShape is easier access, let's do that