mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 03:24:06 +09:00
update the ghost sparingly
This commit is contained in:
@@ -67,20 +67,23 @@ open class FixtureItemBase(originalID: ItemID, val fixtureClassName: String) : G
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
(INGAME as TerrarumIngame).blockMarkingActor.let {
|
// update the ghost sparingly
|
||||||
val item = ghostItem.get()
|
if (INGAME.WORLD_UPDATE_TIMER % 2 == 0) {
|
||||||
|
(INGAME as TerrarumIngame).blockMarkingActor.let {
|
||||||
|
val item = ghostItem.get()
|
||||||
|
|
||||||
it.setGhost(item)
|
it.setGhost(item)
|
||||||
it.update(delta)
|
it.update(delta)
|
||||||
it.setGhostColourBlock()
|
it.setGhostColourBlock()
|
||||||
mouseInInteractableRange(actor) { _, _, mx, my ->
|
mouseInInteractableRange(actor) { _, _, mx, my ->
|
||||||
if (item.canSpawnHere(mx, my)) {
|
if (item.canSpawnHere(mx, my)) {
|
||||||
it.setGhostColourAllow()
|
it.setGhostColourAllow()
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
it.setGhostColourDeny()
|
||||||
|
}
|
||||||
|
0L
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
it.setGhostColourDeny()
|
|
||||||
}
|
|
||||||
0L
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user