Skip to content

Commit

Permalink
chore: reformat examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Curve committed Apr 24, 2023
1 parent b28fd49 commit 77aa927
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 22 deletions.
9 changes: 4 additions & 5 deletions examples/coromon/money.mod.lua
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
return {
name = 'Infinite Money',
name = 'Infinite Money',
description = 'Gives you unlimited money',

target = 'classes.modules.playerCurrency',
hook = function (table)
target = 'classes.modules.playerCurrency',
hook = function(table)
local original = table.onLoadSaveslotData

table.onLoadSaveslotData = function(self, data)
data.gold = 2^52
data.gold = 2 ^ 52
return original(self, data)
end
end
Expand Down
13 changes: 6 additions & 7 deletions examples/coromon/pimp_my_coromon.mod.lua
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
return {
name = 'Pimp My Coromon!',
name = 'Pimp My Coromon!',
description = 'Buffs all your coromon to max level!',

target = 'classes.modules.playerMonsters',
hook = function (table)
target = 'classes.modules.playerMonsters',
hook = function(table)
local original = table.onLoadSaveslotData

table.onLoadSaveslotData = function(self, data)
local rtn = original(self, data)

local squad = self:getSquad()

for i = 1, #squad do
squad[i]:tryIncreaseLevel(100)
print("Pimped", squad[i]:getDisplayName())
end

return rtn
end
end
Expand Down
19 changes: 9 additions & 10 deletions examples/debug/dump_modules.mod.lua
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
return {
name = 'Dump Tables',
description = 'Gather Information on Game Modules (Debugging)',

script = function ()
local inspect = req("inspect")
local original = require

require = function(module)
name = 'Dump Tables',
description = 'Gather Information on Game Modules (Debugging)',
script = function()
local inspect = req("inspect")
local original = require

require = function(module)
local ret = original(module)
print(module, inspect(ret))
return ret
end
end
end
end
}

0 comments on commit 77aa927

Please sign in to comment.