fix unitest error:

layer::wildlife::tests::test_name_uniqueness' panicked at 'world.wildlife.spawn.calendar.halloween.halloween:
This commit is contained in:
flo666 2022-10-23 22:56:34 +02:00 committed by IsseW
parent 9b1efe1bee
commit ada9bd8f36
8 changed files with 111 additions and 9 deletions

View File

@ -1,6 +1,6 @@
SpawnEntry (
name: "Halloween NPCs",
note: "Search for them in forests.",
name: "Halloween Jungle Area",
note: "Halloween NPCs",
rules: [
Pack(
groups: [

View File

@ -0,0 +1,17 @@
SpawnEntry (
name: "Halloween Taiga Core",
note: "Halloween NPCs",
rules: [
Pack(
groups: [
(1, (1, 1, "common.entity.calendar.halloween.aggressive.halloween_harvester")),
(2, (1, 1, "common.entity.calendar.halloween.aggressive.halloween_dullahan")),
(3, (4, 8, "common.entity.wild.aggressive.bat")),
(3, (3, 6, "common.entity.calendar.halloween.aggressive.trickster")),
],
spawn_mode: Land,
calendar_events: Some([Halloween]),
day_period: [Night, Morning, Noon, Evening],
),
],
)

View File

@ -0,0 +1,17 @@
SpawnEntry (
name: "Halloween Temperate Rainforest",
note: "Halloween NPCs",
rules: [
Pack(
groups: [
(1, (1, 1, "common.entity.calendar.halloween.aggressive.halloween_harvester")),
(2, (1, 1, "common.entity.calendar.halloween.aggressive.halloween_dullahan")),
(3, (4, 8, "common.entity.wild.aggressive.bat")),
(3, (3, 6, "common.entity.calendar.halloween.aggressive.trickster")),
],
spawn_mode: Land,
calendar_events: Some([Halloween]),
day_period: [Night, Morning, Noon, Evening],
),
],
)

View File

@ -0,0 +1,17 @@
SpawnEntry (
name: "Halloween Tropical Rainforest",
note: "Halloween NPCs",
rules: [
Pack(
groups: [
(1, (1, 1, "common.entity.calendar.halloween.aggressive.halloween_harvester")),
(2, (1, 1, "common.entity.calendar.halloween.aggressive.halloween_dullahan")),
(3, (4, 8, "common.entity.wild.aggressive.bat")),
(3, (3, 6, "common.entity.calendar.halloween.aggressive.trickster")),
],
spawn_mode: Land,
calendar_events: Some([Halloween]),
day_period: [Night, Morning, Noon, Evening],
),
],
)

View File

@ -0,0 +1,17 @@
SpawnEntry (
name: "Halloween Tundra Core",
note: "Halloween NPCs",
rules: [
Pack(
groups: [
(1, (1, 1, "common.entity.calendar.halloween.aggressive.halloween_harvester")),
(2, (1, 1, "common.entity.calendar.halloween.aggressive.halloween_dullahan")),
(3, (4, 8, "common.entity.wild.aggressive.bat")),
(3, (3, 6, "common.entity.calendar.halloween.aggressive.trickster")),
],
spawn_mode: Land,
calendar_events: Some([Halloween]),
day_period: [Night, Morning, Noon, Evening],
),
],
)

View File

@ -0,0 +1,17 @@
SpawnEntry (
name: "Halloween Tundra Forest",
note: "Halloween NPCs",
rules: [
Pack(
groups: [
(1, (1, 1, "common.entity.calendar.halloween.aggressive.halloween_harvester")),
(2, (1, 1, "common.entity.calendar.halloween.aggressive.halloween_dullahan")),
(3, (4, 8, "common.entity.wild.aggressive.bat")),
(3, (3, 6, "common.entity.calendar.halloween.aggressive.trickster")),
],
spawn_mode: Land,
calendar_events: Some([Halloween]),
day_period: [Night, Morning, Noon, Evening],
),
],
)

View File

@ -0,0 +1,17 @@
SpawnEntry (
name: "Halloween Tundra Snow",
note: "Halloween NPCs",
rules: [
Pack(
groups: [
(1, (1, 1, "common.entity.calendar.halloween.aggressive.halloween_harvester")),
(2, (1, 1, "common.entity.calendar.halloween.aggressive.halloween_dullahan")),
(3, (4, 8, "common.entity.wild.aggressive.bat")),
(3, (3, 6, "common.entity.calendar.halloween.aggressive.trickster")),
],
spawn_mode: Land,
calendar_events: Some([Halloween]),
day_period: [Night, Morning, Noon, Evening],
),
],
)

View File

@ -168,7 +168,7 @@ pub fn spawn_manifest() -> Vec<(&'static str, DensityFn)> {
|c, _col| close(c.temp, CONFIG.snow_temp, 0.15) * BASE_DENSITY * 0.5,
),
(
"world.wildlife.spawn.calendar.halloween.halloween",
"world.wildlife.spawn.calendar.halloween.tundra.core",
|c, _col| close(c.temp, CONFIG.snow_temp, 0.15) * BASE_DENSITY * 0.5,
),
// Snowy animals
@ -186,7 +186,7 @@ pub fn spawn_manifest() -> Vec<(&'static str, DensityFn)> {
},
),
(
"world.wildlife.spawn.calendar.halloween.halloween",
"world.wildlife.spawn.calendar.halloween.tundra.snow",
|c, col| {
close(c.temp, CONFIG.snow_temp, 0.3)
* BASE_DENSITY
@ -204,7 +204,7 @@ pub fn spawn_manifest() -> Vec<(&'static str, DensityFn)> {
|c, col| close(c.temp, CONFIG.snow_temp, 0.3) * col.tree_density * BASE_DENSITY * 1.4,
),
(
"world.wildlife.spawn.calendar.halloween.halloween",
"world.wildlife.spawn.calendar.halloween.tundra.forest",
|c, col| close(c.temp, CONFIG.snow_temp, 0.3) * col.tree_density * BASE_DENSITY * 1.4,
),
// **Taiga**
@ -220,7 +220,7 @@ pub fn spawn_manifest() -> Vec<(&'static str, DensityFn)> {
},
),
(
"world.wildlife.spawn.calendar.halloween.halloween",
"world.wildlife.spawn.calendar.halloween.taiga.core",
|c, col| {
close(c.temp, CONFIG.snow_temp + 0.2, 0.2) * col.tree_density * BASE_DENSITY * 0.4
},
@ -268,7 +268,7 @@ pub fn spawn_manifest() -> Vec<(&'static str, DensityFn)> {
}),
// Temperate Rainforest animals event
(
"world.wildlife.spawn.calendar.halloween.halloween",
"world.wildlife.spawn.calendar.halloween.temperate.rainforest",
|c, _col| {
close(c.temp, CONFIG.temperate_temp + 0.1, 0.6)
* close(c.humidity, CONFIG.forest_hum, 0.6)
@ -297,7 +297,7 @@ pub fn spawn_manifest() -> Vec<(&'static str, DensityFn)> {
}),
// Jungle animals event
(
"world.wildlife.spawn.calendar.halloween.halloween",
"world.wildlife.spawn.calendar.halloween.jungle.area",
|c, _col| {
close(c.temp, CONFIG.tropical_temp + 0.2, 0.3)
* close(c.humidity, CONFIG.jungle_hum, 0.2)
@ -353,7 +353,7 @@ pub fn spawn_manifest() -> Vec<(&'static str, DensityFn)> {
}),
// Tropical Rainforest animals event
(
"world.wildlife.spawn.calendar.halloween.halloween",
"world.wildlife.spawn.calendar.halloween.tropical.rainforest",
|c, _col| {
close(c.temp, CONFIG.tropical_temp + 0.1, 0.4)
* close(c.humidity, CONFIG.desert_hum, 0.4)