Skip to content

Commit 4ae367c

Browse files
Merge pull request #1077 from eccentricdevotion
Add wardrobe and cloister rooms
2 parents 3ff43d9 + 3966b43 commit 4ae367c

File tree

25 files changed

+250
-142
lines changed

25 files changed

+250
-142
lines changed

.github/workflows/gradle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
branches: [ "master" ]
1010

1111
env:
12-
VERSION: '6.3.9'
12+
VERSION: '6.3.10'
1313
RELEASE_TAG: '1.21.11'
1414

1515
jobs:

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ plugins {
1212

1313
group = "me.eccentric_nz"
1414
val buildNumber = "-b${System.getenv("BUILD_NUMBER") ?: (System.getenv("SHORT_SHA") ?: ".local")}"
15-
version = "6.3.9${buildNumber}"
15+
version = "6.3.10${buildNumber}"
1616

1717
repositories {
1818
mavenCentral()

src/main/java/me/eccentric_nz/TARDIS/ARS/TARDISARS.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public enum TARDISARS implements ARS {
3838
BEDROOM("GLOWSTONE", "Bedroom", 1, RoomVariant.BEDROOM.getKey()),
3939
BIRDCAGE("YELLOW_GLAZED_TERRACOTTA", "Bird Cage", 1, RoomVariant.BIRDCAGE.getKey()),
4040
CHEMISTRY("BLAST_FURNACE", "Chemistry Lab", 1, RoomVariant.CHEMISTRY.getKey()),
41+
CLOISTER("PALE_MOSS_BLOCK", "Cloister", 1, RoomVariant.CLOISTER.getKey()),
4142
EMPTY("GLASS", "Empty", 1, RoomVariant.EMPTY.getKey()),
4243
EYE("SHROOMLIGHT", "Eye of Harmony", 1, RoomVariant.EYE.getKey()),
4344
FARM("DIRT", "Mob Farm", 1, RoomVariant.FARM.getKey()),
@@ -76,6 +77,7 @@ public enum TARDISARS implements ARS {
7677
TRENZALORE("BRICKS", "Trenzalore", 1, RoomVariant.TRENZALORE.getKey()),
7778
VAULT("DISPENSER", "Storage Vault", 1, RoomVariant.VAULT.getKey()),
7879
VILLAGE("OAK_LOG", "Village", 1, RoomVariant.VILLAGE.getKey()),
80+
WARDROBE("BIRCH_LOG", "Wardrobe", 1, RoomVariant.WARDROBE.getKey()),
7981
WOOD("OAK_PLANKS", "Wood Secondary Console", 1, RoomVariant.WOOD.getKey()),
8082
WORKSHOP("RED_NETHER_BRICKS", "Workshop", 1, RoomVariant.WORKSHOP.getKey()),
8183
ZERO("GRASS_BLOCK", "Zero Room", 0, null, false),

src/main/java/me/eccentric_nz/TARDIS/blueprints/BlueprintRoom.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public enum BlueprintRoom {
4040
BEDROOM("tardis.room.bedroom"),
4141
BIRDCAGE("tardis.room.birdcage", BlueprintFeature.FARM),
4242
CHEMISTRY("tardis.room.chemistry"),
43+
CLOISTER("tardis.room.cloister"),
4344
EMPTY("tardis.room.empty"),
4445
EYE("tardis.room.eye"),
4546
FARM("tardis.room.farm", BlueprintFeature.FARM),
@@ -76,6 +77,7 @@ public enum BlueprintRoom {
7677
TRENZALORE("tardis.room.trenzalore"),
7778
VAULT("tardis.room.vault", BlueprintFeature.VAULT),
7879
VILLAGE("tardis.room.village", BlueprintFeature.FARM),
80+
WARDROBE("tardis.room.wardrobe"),
7981
WOOD("tardis.room.wood"),
8082
WORKSHOP("tardis.room.workshop"),
8183
ZERO("tardis.room.zero");

src/main/java/me/eccentric_nz/TARDIS/commands/TARDISRoomCommands.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String
7070
return false;
7171
}
7272
rooms.forEach((r) -> {
73-
if (plugin.getRoomsConfig().getBoolean("rooms." + name + ".enabled")) {
73+
if (plugin.getRoomsConfig().getBoolean("rooms." + r + ".enabled")) {
7474
HashMap<String, Integer> blockIDs = plugin.getBuildKeeper().getRoomBlockCounts().get(r);
7575
String file = plugin.getDataFolder() + File.separator + r + "_block_list.txt";
7676
int cost = 0;
@@ -85,7 +85,18 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String
8585
cost += value;
8686
}
8787
}
88-
bw.write("Actual room cost: " + Math.round(cost / 2.0F));
88+
int artron_cost = Math.round(cost / 2.0F);
89+
float tmp_cost = artron_cost / 10.0f;
90+
int config_cost = (((int) tmp_cost) / 25) * 25;
91+
// int offset = plugin.getRoomsConfig().getInt("rooms." + r + ".offset");
92+
// String material = plugin.getRoomsConfig().getString("rooms." + r + ".seed");
93+
// plugin.debug("| " + r + " | " + config_cost + " | " + offset + " | " + material + " |");
94+
// plugin.debug("| " + TARDISStringUtils.capitalise(r) + " | " + artron_cost + " | " + config_cost + " |");
95+
// plugin.debug("integerOptions.put(\"rooms." + r + ".cost\", " + config_cost + ");");
96+
// plugin.debug("integerOptions.put(\"rooms." + r + ".offset\", " + offset + ");");
97+
bw.write("Actual room cost: " + artron_cost);
98+
bw.newLine();
99+
bw.write("Config room cost: " + config_cost);
89100
bw.newLine();
90101
}
91102
} catch (IOException e) {

src/main/java/me/eccentric_nz/TARDIS/custommodels/keys/RoomVariant.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public enum RoomVariant {
3232
BEDROOM(new NamespacedKey(TARDIS.plugin, "button_bedroom")),
3333
BIRDCAGE(new NamespacedKey(TARDIS.plugin, "button_birdcage")),
3434
CHEMISTRY(new NamespacedKey(TARDIS.plugin, "button_chemistry")),
35+
CLOISTER(new NamespacedKey(TARDIS.plugin, "button_cloister")),
3536
EMPTY(new NamespacedKey(TARDIS.plugin, "button_empty")),
3637
EYE(new NamespacedKey(TARDIS.plugin, "button_eye")),
3738
FARM(new NamespacedKey(TARDIS.plugin, "button_farm")),
@@ -72,6 +73,7 @@ public enum RoomVariant {
7273
TRENZALORE(new NamespacedKey(TARDIS.plugin, "button_trenzalore")),
7374
VAULT(new NamespacedKey(TARDIS.plugin, "button_vault")),
7475
VILLAGE(new NamespacedKey(TARDIS.plugin, "button_village")),
76+
WARDROBE(new NamespacedKey(TARDIS.plugin, "button_wardrobe")),
7577
WOOD(new NamespacedKey(TARDIS.plugin, "button_wood")),
7678
WORKSHOP(new NamespacedKey(TARDIS.plugin, "button_workshop")),
7779
ZERO(new NamespacedKey(TARDIS.plugin, "button_zero_room"));

src/main/java/me/eccentric_nz/TARDIS/enumeration/Room.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public enum Room {
3232
BEDROOM,
3333
BIRDCAGE,
3434
CHEMISTRY,
35+
CLOISTER,
3536
EMPTY,
3637
EYE,
3738
FARM,
@@ -70,6 +71,7 @@ public enum Room {
7071
TRENZALORE,
7172
VAULT,
7273
VILLAGE,
74+
WARDROBE,
7375
WOOD,
7476
WORKSHOP,
7577
ZERO

0 commit comments

Comments
 (0)