Add functionalities to a module not in source code

Hello.

Is possible to add functionalities to a module (projects module in this case) without manipulating source code?

For example, I’ve added three more statuses to projects adding them on source code (projet/card.php and projet/class/projet.class.php) but everytime I upgrade Dolibarr version I’ve to add again this changes manually. Would like to add them in another file (or wherever) for not overwritting it on upgrades.

Is this possible?

Thanks.