mirror of
https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server.git
synced 2025-11-14 17:46:03 +00:00
code refactoring , mod update fix
This commit is contained in:
parent
7d5eb76ea7
commit
5e1ab245a9
93 changed files with 193555 additions and 26399 deletions
8
dist/ba_root/mods/setting.py
vendored
8
dist/ba_root/mods/setting.py
vendored
|
|
@ -5,15 +5,15 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
import json
|
||||
from functools import lru_cache
|
||||
|
||||
import json
|
||||
import _babase
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
pass
|
||||
|
||||
|
||||
SETTINGS_PATH = _babase.env().get("python_directory_user", "") + "/setting.json"
|
||||
|
||||
|
||||
|
|
@ -29,11 +29,13 @@ def get_settings_data() -> dict:
|
|||
with open(SETTINGS_PATH, mode="r", encoding="utf-8") as data:
|
||||
return json.load(data)
|
||||
|
||||
|
||||
def refresh_cache() -> None:
|
||||
get_settings_data.cache_clear()
|
||||
# lets cache it again
|
||||
get_settings_data()
|
||||
|
||||
|
||||
def commit(data: dict) -> None:
|
||||
"""Commits the data in setting file.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue