mirror of
https://github.com/revanced/revanced-patcher
synced 2024-11-20 16:19:21 +01:00
Add more templates
This commit is contained in:
parent
675c409a59
commit
fc41a84aa1
@ -1,6 +1,7 @@
|
||||
package net.revanced.patcher
|
||||
|
||||
import net.revanced.patcher.patch.Patch
|
||||
import net.revanced.patcher.patch.PatchResult
|
||||
import net.revanced.patcher.signature.Signature
|
||||
import net.revanced.patcher.store.PatchStore
|
||||
import net.revanced.patcher.store.SignatureStore
|
||||
@ -15,4 +16,10 @@ class Patcher(
|
||||
SignatureStore.addSignatures(*signatures)
|
||||
PatchStore.addPatches(*patches)
|
||||
}
|
||||
|
||||
fun patch() {
|
||||
PatchStore.patches.forEach {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1,3 +1,8 @@
|
||||
package net.revanced.patcher.patch
|
||||
|
||||
class Patch(val fn: Function<PatchResult>)
|
||||
|
||||
class Patch(val fn: () -> PatchResult) {
|
||||
fun execute(): PatchResult {
|
||||
return fn()
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ package net.revanced.patcher.store
|
||||
import net.revanced.patcher.patch.Patch
|
||||
|
||||
object PatchStore {
|
||||
private val patches: MutableList<Patch> = mutableListOf()
|
||||
val patches: MutableList<Patch> = mutableListOf()
|
||||
|
||||
fun addPatches(vararg patches: Patch) {
|
||||
this.patches.addAll(patches)
|
||||
|
Loading…
Reference in New Issue
Block a user