Skip to content

Commit

Permalink
Fix rp sha1 and level name in server.properties
Browse files Browse the repository at this point in the history
This fixes the resource_pack_sha1 not being replaced properly by the
build script and the level-name not using the correct format in
server.properties
  • Loading branch information
NeunEinser committed Jun 5, 2022
1 parent 95260ca commit 7a2e24c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions neunscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def main():
for file_path in requested_rp_sha:
with open(file_path, "r+", encoding="utf-8") as file:
file_content = file.read()
file_content = file_content.replace("{NEUN_SCRIPT:resource_pack_sha1}", sha1.hexdigest())
file_content = file_content.replace("{NEUN_SCRIPT:resource_pack_sha1}", sha1.hexdigest().upper())
file.seek(0)
file.write(file_content)
file.truncate()
Expand Down Expand Up @@ -144,7 +144,7 @@ def iterate_files(config):

def replace_variables(content: str, file_path: str, config, requested_rp_sha: list):
indexDiff = 0
for match in re.finditer(r"\{NEUN_SCRIPT:([a-zA-Z_-]+)\}", content):
for match in re.finditer(r"\{NEUN_SCRIPT:([a-zA-Z0-9_-]+)\}", content):
variable = match.group(1)
replace=None
vars = config.get("vars")
Expand Down
2 changes: 1 addition & 1 deletion server.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Please make sure to set all these settings correctly
level-seed=91
enable-command-block=true
level-name=Bingo {NEUN_SCRIPT:version}
level-name=Bingo-{NEUN_SCRIPT:version}
resource-pack=https://github.com/NeunEinser/bingo/releases/download/{NEUN_SCRIPT:version}/Bingo-{NEUN_SCRIPT:version}-resourcepack.zip
resource-pack-sha1={NEUN_SCRIPT:resource_pack_sha1}
# If you want direct PVP you can leave this at true, I recommend playing without
Expand Down

0 comments on commit 7a2e24c

Please sign in to comment.