Where should I initialize a timer variable for my CBM?


I am trying to create a starting CBM that counts down and then, if not removed by an autodoc in time, kills the player. This will add the the game by allowing dungeon speedrun-based challenge-starts.

I have already programmed the logic and created the JSON. However, even after digging through github, I cannot figure out where I should initialize the countdown variable so it is initialized upon being installed or selected at the beginning of the game. Does anybody have any suggestions?

Here is my code:

Also, slightly off-topic, but I was wondering - does adding the BIONIC_FAULTY flag add the CBM to the malfunctioning bionics pool that may be installed when a player critical-fails to install a bionic? I am only asking because I don’t want players to be able to accidentally install this CBM.