Gremious / StS-DefaultModBase

(DON'T USE THIS AND BASEMOD IF YOU'RE NEW TO MODDING) This is a minimal, over-commented, "default clean slate" for jump-starting Slay the spire mods.
MIT License
112 stars 61 forks source link

Idea: Generate ID from class name #34

Closed bug-sniper closed 5 years ago

bug-sniper commented 5 years ago

It was suggested in the discord discussions that perhaps we should generate IDs using getClass().getSimpleName(). For example, public static final String ID = DefaultMod.makeID("DefaultCommonAttack"); would become public static final String ID = DefaultMod.makeID(getClass().getSimpleName());.

The benefits of doing this are:

I can't think of much of a drawback, unless someone wants a card to not have its classname as its ID like Claw or wants to change how classes are alphabetically sorted. Or possibly, someone may jump off the rails and give up on using DefaultBaseMod altogether, but that sounds unlikely for newcomers already looking for a starting point.

This idea synergises with a later idea I plan to post here involving reading and setting the description only in the abstract superclasses.