risk-of-thunder / RoR2BepInExPack

RoR2BepInExPack
MIT License
1 stars 10 forks source link

Global Elite Ramp Solution #3

Closed Nebby1999 closed 2 years ago

Nebby1999 commented 2 years ago

The global elite ramp solution is a class that allows for easy addition and managing of the Elite Ramps system that risk of rain 2 has, which is notoriously difficult to expand/extend past the vanilla elites.

The global elite ramp soltuion consists of a single class called EliteRampManager, which ILHooks onto the CharacterModel.UpdateMaterials method for setting the ramp manually to the material's property block.

The elite ramp manager has a single public method for adding a new ramp, which is EliteRampManager.AddRamp(EliteDef, Texture2D). once RoR2Application.OnLoad is invoked, the elite ramp manager creates a dictionary from the addeed eliteDef & ramp tuples.

harbingerofme commented 2 years ago

The hooks should be coded more defensively. I do not think this extension is of critical importance enough that it may take the entire user experience down when it fails.

Nebby1999 commented 2 years ago

The hooks should be coded more defensively. I do not think this extension is of critical importance enough that it may take the entire user experience down when it fails.

What do you mean by more defensively? add more matches?