Implement dungeon breathable and gravity
This commit is contained in:
parent
885bccb2d2
commit
45e95f7f71
@ -474,9 +474,9 @@ class ServerWorld private constructor(
|
|||||||
|
|
||||||
if (updated) {
|
if (updated) {
|
||||||
if (breathable != null) {
|
if (breathable != null) {
|
||||||
LOGGER.info("Dungeon ID $id breathable set to: $breathable")
|
LOGGER.info("Dungeon ID $id 'breathable' set to: $breathable")
|
||||||
} else {
|
} else {
|
||||||
LOGGER.info("Dungeon ID $id no longer has special breathable flag")
|
LOGGER.info("Dungeon ID $id no longer has special 'breathable' flag")
|
||||||
}
|
}
|
||||||
|
|
||||||
broadcast(UpdateDungeonBreathablePacket(id, breathable))
|
broadcast(UpdateDungeonBreathablePacket(id, breathable))
|
||||||
@ -716,7 +716,7 @@ class ServerWorld private constructor(
|
|||||||
var currentDungeonID = 0
|
var currentDungeonID = 0
|
||||||
|
|
||||||
// primary dungeons must be generated sequentially since they can get very large
|
// primary dungeons must be generated sequentially since they can get very large
|
||||||
// and to avoid dungeons colliding with each other, we must generate them first, one by one
|
// and to avoid dungeons colliding with each other, we must generate them one after another
|
||||||
for (dungeon in template.gatherDungeons()) {
|
for (dungeon in template.gatherDungeons()) {
|
||||||
var spawnDungeonRetries = Globals.worldServer.spawnDungeonRetries
|
var spawnDungeonRetries = Globals.worldServer.spawnDungeonRetries
|
||||||
|
|
||||||
@ -751,14 +751,8 @@ class ServerWorld private constructor(
|
|||||||
protectedDungeonIDsInternal.add(currentDungeonID)
|
protectedDungeonIDsInternal.add(currentDungeonID)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dungeon.dungeon.value.metadata.gravity != null) {
|
dungeon.dungeon.value.metadata.gravity?.map({ setDungeonGravity(currentDungeonID, it) }, { setDungeonGravity(currentDungeonID, it) })
|
||||||
// TODO: set gravity here
|
setDungeonBreathable(currentDungeonID, dungeon.dungeon.value.metadata.breathable)
|
||||||
}
|
|
||||||
|
|
||||||
if (dungeon.dungeon.value.metadata.breathable != null) {
|
|
||||||
// TODO: set "breathable" here
|
|
||||||
}
|
|
||||||
|
|
||||||
currentDungeonID++
|
currentDungeonID++
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user