From 48e058d663c5dc63335b39e4abf4d4a899ed566e Mon Sep 17 00:00:00 2001 From: smol <75618732+SMOLKEYS@users.noreply.github.com> Date: Wed, 8 Jun 2022 20:41:16 +0800 Subject: [PATCH] Make CrawlUnit jsonable (#6915) --- core/src/mindustry/mod/ContentParser.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/mod/ContentParser.java b/core/src/mindustry/mod/ContentParser.java index af7b2c8d0d..6883b9cedd 100644 --- a/core/src/mindustry/mod/ContentParser.java +++ b/core/src/mindustry/mod/ContentParser.java @@ -567,7 +567,8 @@ public class ContentParser{ case "tank" -> TankUnit::create; case "hover" -> ElevationMoveUnit::create; case "tether" -> BuildingTetherPayloadUnit::create; - default -> throw new RuntimeException("Invalid unit type: '" + value + "'. Must be 'flying/mech/legs/naval/payload/missile/tether'."); + case "crawl" -> CrawlUnit::create; + default -> throw new RuntimeException("Invalid unit type: '" + value + "'. Must be 'flying/mech/legs/naval/payload/missile/tether/crawl'."); }; } @@ -1012,4 +1013,4 @@ public class ContentParser{ void parsed(Class type, JsonValue jsonData, Object result); } -} \ No newline at end of file +}