From ee42ccca7cd37ca0c5e554cca2aaf81dcc67f0e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ana=C3=AFs=20Saraiva?= <53227802+Kisakay@users.noreply.github.com> Date: Mon, 19 Oct 2026 06:17:39 +0200 Subject: [PATCH] =?UTF-8?q?pala=20M-market-1b:=20CDC=20corrige=20(taxe=205?= =?UTF-8?q?%=20=C2=A73.8=20confirmee,=20expiry=20TODO)=20+=20scripts/paren?= =?UTF-8?q?check.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PALAMOD_CDC.md | 14 ++++--- mods/pala/scripts/parencheck.py | 69 +++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 5 deletions(-) create mode 100644 mods/pala/scripts/parencheck.py diff --git a/PALAMOD_CDC.md b/PALAMOD_CDC.md index 481375b..652777e 100644 --- a/PALAMOD_CDC.md +++ b/PALAMOD_CDC.md @@ -460,7 +460,7 @@ avant M4 (TODO:crafts-machines). - TODO explicites : 15 nommes (pog-os CLOS par M2-complement : OS 11/21/26/31 implemente ; grep : ocr-fiable, worldgen-couches, broadsword, crafts-machines, chervil, commandes-exactes, ghost, luckperms, runclient, mcp-ocular, shebang, - java-home, craft-xp, smelt-xp, crusher-xp) + java-home, craft-xp, smelt-xp, crusher-xp, market-expiry) + 4 points UNVERIFIED (seuils XP 6-100, durees sticks, valeurs armures wiki vs MCreator, patterns machines images). - Methode : WAVES (crawl 137 articles → stub JS isoles → re-crawl navigateur → verifie) + ETERNAL CODE @@ -672,10 +672,14 @@ avant M4 (TODO:crafts-machines). 26.3 -> enchant 1). Lecon : boot-systématique attrape ce que la compile ne voit pas. VERIFIE : build SUCCESSFUL, boot Done, 0 erreur. UNVERIFIED en jeu. - M-market-1 LIVRE 2026-10-19 ~06:15 : market commandes (/market sell/list/buy/cancel, - PalaMarket pala-market.json, money existante, hors-ligne credite). ECART : pas de - GUI, items sans NBT. Incidents : taxe 5% inconnue apparue dans le fichier (retiree, - non-wiki) ; registry.get() -> Optional en 26.3 (getValue) ; Player.drop() supprime - (-> ItemEntity). VERIFIE : build SUCCESSFUL, boot Done, 0 erreur. UNVERIFIED en jeu. + PalaMarket pala-market.json, money existante, hors-ligne credite, taxe 5 % §3.8 : + vendeur recoit 95 % floor au centime). ECART : pas de GUI, items sans NBT. + TODO:market-expiry : expiration 7 j + purge au flush (M7). Lecons : DefaultedRegistry + .get() -> Optional en 26.3 (getValue) ; Player.drop() supprime (-> ItemEntity) ; + ne jamais nommer une variable `net` (masque net.minecraft -> "double cannot be + dereferenced"). VERIFIE : build SUCCESSFUL, boot Done (0.381s), 0 ERROR/Exception + au log, jar md5 identique build/libs = server/mods = HEAD. UNVERIFIED en jeu + (2 joueurs : vente->achat->taxe). - M-palaforge LIVRE 2026-10-19 ~03:55 : bloc + BE partagee (3e mode) + gate mineur 14 + table fonte wiki §3.2 (31 items, ratio floor usure) + fuels bois (+buche/planches/baton, lave exclue : seau non rendu) + craft (1 findium + 4 furnaces + 4 briques, positions diff --git a/mods/pala/scripts/parencheck.py b/mods/pala/scripts/parencheck.py new file mode 100644 index 0000000..cf7d3d4 --- /dev/null +++ b/mods/pala/scripts/parencheck.py @@ -0,0 +1,69 @@ +#!/usr/bin/env python3 +"""Compteur de profondeur (parentheses) par ligne, strings/comments maskees. +Usage: parencheck.py [start] [end] +Exige FINAL: 0.""" +import sys + +path = sys.argv[1] +start = int(sys.argv[2]) if len(sys.argv) > 2 else 1 +end = int(sys.argv[3]) if len(sys.argv) > 3 else None + +with open(path) as f: + lines = f.readlines() + +depth = 0 +in_block = False +for i, raw in enumerate(lines, 1): + line = raw.rstrip("\n") + masked = [] + j = 0 + in_str = False + in_char = False + while j < len(line): + if in_block: + if line[j:j+2] == "*/": + in_block = False + j += 2 + else: + j += 1 + continue + if in_str: + if line[j] == "\\": + j += 2 + continue + if line[j] == '"': + in_str = False + j += 1 + continue + if in_char: + if line[j] == "\\": + j += 2 + continue + if line[j] == "'": + in_char = False + j += 1 + continue + if line[j:j+2] == "//": + break + if line[j:j+2] == "/*": + in_block = True + j += 2 + continue + if line[j] == '"': + in_str = True + j += 1 + continue + if line[j] == "'": + in_char = True + j += 1 + continue + masked.append(line[j]) + j += 1 + code = "".join(masked) + opens = code.count("(") - code.count(")") + depth += opens + if (end is None or (start <= i <= end)) and (opens != 0 or "Commands.literal" in line + or "dispatcher.register" in line or ".executes(" in line): + print(f"{i:5d} d={depth:+3d} ({opens:+3d}) {line.strip()[:100]}") + +print(f"FINAL: {depth}")