SkillAgentSearch skills...

Cheatcode.lua

Add konami code style cheatcodes to your game. Intended for LÖVE

Install / Use

/learn @farzher/Cheatcode.lua
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Cheatcode

Add konami code style cheatcodes to your game. Intended for LÖVE

Usage

Cheatcode = require('cheatcode')

local codes = {}
codes['{up}{up}{down}{down}{left}{right}{left}{right}ba{return}'] = function() lives = lives + 99 end
codes.bighead = function() bighead = not bighead end
Cheatcode(codes)

function love.keypressed(key)
  Cheatcode.handle(key)
end

Performance

Since this runs on every keypress, performance is important.

Don't worry, it runs in constant time O(1)! Feel free to add all the cheatcodes you want.

Related Skills

View on GitHub
GitHub Stars7
CategoryDevelopment
Updated1y ago
Forks0

Languages

Lua

Security Score

55/100

Audited on Nov 1, 2024

No findings