mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-02 02:38:30 +02:00
19 lines
429 B
Python
19 lines
429 B
Python
from source.mkw.Patch.PatchOperation.BmgTxtEditor import AbstractLayer
|
|
from source.wt import bmg
|
|
|
|
|
|
Patch: any
|
|
|
|
|
|
class PatchLayer(AbstractLayer):
|
|
"""
|
|
Represent a layer that patch a bmg
|
|
"""
|
|
|
|
mode = "patch"
|
|
|
|
def __init__(self, patchs: list[str]):
|
|
self.patchs = patchs
|
|
|
|
def patch_bmg(self, patch: "Patch", decoded_content: str) -> str:
|
|
return bmg.cat_data(decoded_content, patchs=self.patchs)
|