From 124d68a8fe97e048d4a6ea7897b265e872ad0638 Mon Sep 17 00:00:00 2001 From: tyzillion Date: Mon, 24 Apr 2023 23:22:25 -0400 Subject: [PATCH 1/2] Updated license --- .../render/models/blockbench/pokemon/gen2/LanturnModel.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/src/main/kotlin/com/cobblemon/mod/common/client/render/models/blockbench/pokemon/gen2/LanturnModel.kt b/common/src/main/kotlin/com/cobblemon/mod/common/client/render/models/blockbench/pokemon/gen2/LanturnModel.kt index cce02ce206..7b7a0ee2d7 100644 --- a/common/src/main/kotlin/com/cobblemon/mod/common/client/render/models/blockbench/pokemon/gen2/LanturnModel.kt +++ b/common/src/main/kotlin/com/cobblemon/mod/common/client/render/models/blockbench/pokemon/gen2/LanturnModel.kt @@ -1,3 +1,11 @@ +/* + * Copyright (C) 2023 Cobblemon Contributors + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen2 import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame From 000d210b33075828e847e1573df4404e48c1e83d Mon Sep 17 00:00:00 2001 From: Nick Date: Mon, 24 Apr 2023 21:14:55 -0700 Subject: [PATCH 2/2] Adjust comment checker for even more fun formats that break the unit test :D --- .../models/blockbench/animation/ValidateAnimations.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/common/src/test/kotlin/com/cobblemon/mod/common/client/render/models/blockbench/animation/ValidateAnimations.kt b/common/src/test/kotlin/com/cobblemon/mod/common/client/render/models/blockbench/animation/ValidateAnimations.kt index 314e8f90f8..be7a659522 100644 --- a/common/src/test/kotlin/com/cobblemon/mod/common/client/render/models/blockbench/animation/ValidateAnimations.kt +++ b/common/src/test/kotlin/com/cobblemon/mod/common/client/render/models/blockbench/animation/ValidateAnimations.kt @@ -81,13 +81,15 @@ internal class ValidateAnimations { val ignore = AtomicBoolean(false) source = reader.lines() .filter { + var result: Boolean = ignore.get() if(it.trim().startsWith("/*")) { ignore.set(true) + result = true } else if(it.trim().contains("*/")) { - ignore.set(false) + result = ignore.getAndSet(false) } - !ignore.get() + !result } .reduce { a, b -> a.plus('\n').plus(b) } .get() @@ -120,7 +122,7 @@ internal class ValidateAnimations { } } - assertEquals(0, options.size) + assertEquals(0, options.size, "Invalid animations found for pokemon: ${entry.key} $options") } } }