Skip to content

getCheats

Get the cheats that have been added, in the order they were added.

The index of a cheat here is the index that enableCheat and disableCheat accept. It’s not related to the index RetroArch uses internally, which only counts the enabled ones.

const nostalgist = await Nostalgist.nes({
rom: 'contra.nes',
cheats: ['SXIOPO', { code: '0033:09', description: 'Infinite Lives P2', enabled: true }],
})
nostalgist.getCheats()
// [
// { code: 'SXIOPO', enabled: false },
// { code: '0033:09', description: 'Infinite Lives P2', enabled: true },
// ]

An Array of cheats, each with a code, an enabled, and a description if one was given.