G2Pavon / goldsrcmap

A Python library for creating, editing and writing GoldSrc .map files
https://github.com/G2Pavon/goldsrcmap/wiki
GNU General Public License v3.0
4 stars 0 forks source link

Make initialization parameters mandatory for Entity class #9

Open G2Pavon opened 5 months ago

G2Pavon commented 5 months ago

Currently, the Entity class is initialized with Entity.__init__(self), which lacks specificity and might lead to incomplete entity initialization. Change the initialization to Entity.__init__(self, classname, origin_or_brushes, properties=None) classname is fundamental for entities, and making it a requirement in the initialization helps ensure that entities are properly identified. For point entities, origin is fundamental, while for brush entities brushes are. These parameters should be explicitly required during initialization to avoid incomplete entity states

G2Pavon commented 5 months ago

now they are optional but not required: 59fc5cbe94ed1b36612debcbbb2975a22e3dbe42