P1.4 : version 0.5.0-p1, une seule source (gradle.properties)
- gradle.properties : mod_version=0.5.0-p1.
- neoforge.mods.toml : version="${mod_version}", rempli par processResources.
- Manifeste du jar : Implementation-Title / -Version / -Vendor.
- Version affichee au chargement, au demarrage (journal) et dans /garde status.
- Tests : VersionP1Test (toml traite == gradle.properties, pas de version en
dur dans la source).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Cette révision appartient à :
1 Parent
d21eaa2e50
révision
3507f785a5
7 fichiers modifiés
+90
-4
Aucun fichier ne correspond à votre recherche
@@ -145,6 +145,7 @@ public final class Garde {
|
||||
journal = jeu.resolve("logs").resolve("gastinelgarde.log");
|
||||
try {
|
||||
Files.createDirectories(journal.getParent());
|
||||
ecrireJournal("demarrage GastinelGarde " + GastinelGarde.version()); // 0.5 (P1.4) : version au journal
|
||||
traces = new TraceFichier(jeu.resolve("gastinelgarde-traces"), GardeSpec.tracesJours(), GardeSpec.tracesTailleOctets());
|
||||
tracesEnCours = GardeSpec.tracesActives();
|
||||
// Historique de suspicion : même dossier de jeu que les traces et les journaux (voir HistoriqueSuspicion).
|
||||
|
||||
@@ -73,7 +73,7 @@ public final class GardeCommands {
|
||||
|
||||
private static int status(CommandContext<CommandSourceStack> ctx) {
|
||||
GardeConfig c = Garde.config();
|
||||
StringBuilder sb = new StringBuilder("GastinelGarde :");
|
||||
StringBuilder sb = new StringBuilder("GastinelGarde " + GastinelGarde.version() + " :");
|
||||
for (Controle k : Controle.values()) sb.append("\n ").append(k.id()).append(" = ").append(c.mode(k));
|
||||
sb.append("\n sanction max = ").append(c.sanctionMax)
|
||||
.append(" | traces = ").append(Garde.tracesEnCours() ? "on" : "off")
|
||||
|
||||
@@ -15,7 +15,15 @@ public class GastinelGarde {
|
||||
public static final String MOD_ID = "gastinelgarde";
|
||||
public static final Logger LOGGER = LoggerFactory.getLogger(GastinelGarde.class);
|
||||
|
||||
/** 0.5 (P1.4) : version du mod (neoforge.mods.toml, rempli depuis gradle.properties au build). */
|
||||
private static String version = "?";
|
||||
|
||||
public static String version() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public GastinelGarde(IEventBus modEventBus, ModContainer modContainer) {
|
||||
version = modContainer.getModInfo().getVersion().toString();
|
||||
// Config rechargeable : config/gastinelgarde-server.toml (décision D8), plus /garde reload.
|
||||
modContainer.registerConfig(ModConfig.Type.COMMON, GardeSpec.SPEC, "gastinelgarde-server.toml");
|
||||
modEventBus.addListener(ModConfigEvent.Loading.class, GardeSpec::onConfig);
|
||||
@@ -25,6 +33,6 @@ public class GastinelGarde {
|
||||
NeoForge.EVENT_BUS.register(GardeCommands.class);
|
||||
NeoForge.EVENT_BUS.register(GardeAntiCrash.class); // anti-crash entités (16/10), toujours actif
|
||||
|
||||
LOGGER.info("[GastinelGarde] Anti-triche chargé (tous les contrôles démarrent en observe).");
|
||||
LOGGER.info("[GastinelGarde] Anti-triche {} chargé (tous les contrôles démarrent en observe).", version);
|
||||
}
|
||||
}
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur