1
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:
oSumAtrIX 2022-03-18 20:57:14 +01:00
parent 675c409a59
commit fc41a84aa1
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
3 changed files with 14 additions and 2 deletions

View File

@ -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 {
}
}
}

View File

@ -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()
}
}

View File

@ -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)