Closed darthLeviN closed 1 year ago
A better way to handle unique instrument identification is to use the file name of the InstrumentData resource rather than an additional variable (so the piano identifier would become "piano.tres"). File names are guaranteed to be unique because all files are in the same folder and operating systems don't allow files with duplicate names. This subsequently means you can simplify some of this code.
I turned the insturment_name into a property that returns the file name of the resource so that if we want to change the logic in the future we only change that.
Performance instrument selection logic and ui has been reworked. now we can use the
InstrumentData
resource type to describe an instrument and it's properties.In
PlayerVariables
singleton thegameplay_instrument_data
andgameplay_instrument_name
properties can be used to set and retrieve the currentInstrumentData
and intrument identifier.Player.cfg will now record the preferred performance instrument in the
[gameplay]
section with the variableselected_instrument_name
. E.g.selected_instrument_name="guitar"
.A small bugfix was also added to the user score viewer.