Draw belts, underground belts and splitters with their direction
Belts are drawn like the in-game map: a strip in the colour of their tier (taken from the icon of the transport belt of the same tier), with an arrow per lane in the direction items go. Splitters are drawn at their rotated 2x1 footprint with a bar across the back. The mod now sends whether an underground belt is an entrance or an exit. Entrances are capped on the side where items go underground, exits on the side where they come out, and the hover tooltip says which it is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
9d1f9b7623
commit
e1e59fe66c
7 changed files with 159 additions and 2 deletions
|
|
@ -34,6 +34,8 @@ sealed interface FactorioEntityData {
|
|||
val direction: UByte? = null,
|
||||
/** @see FactorioEntityUpdateElement.Standard.recipe */
|
||||
val recipe: String? = null,
|
||||
/** @see FactorioEntityUpdateElement.Standard.beltToGroundType */
|
||||
val beltToGroundType: String? = null,
|
||||
) : FactorioEntityData
|
||||
|
||||
|
||||
|
|
@ -281,6 +283,8 @@ sealed interface FactorioEntityUpdateElement {
|
|||
val direction: UByte? = null,
|
||||
/** The name of the recipe that a crafting machine is set to (or last used, for furnaces) */
|
||||
val recipe: String? = null,
|
||||
/** Whether an underground belt is an entrance (`input`) or an exit (`output`) */
|
||||
val beltToGroundType: String? = null,
|
||||
) : FactorioEntityUpdateElement
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,4 +18,6 @@ data class MapBuilding(
|
|||
val direction: UByte? = null,
|
||||
/** The name of the recipe of a crafting machine */
|
||||
val recipe: String? = null,
|
||||
/** Whether an underground belt is an entrance (`input`) or an exit (`output`) */
|
||||
val beltToGroundType: String? = null,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -177,6 +177,7 @@ data class MapChunkEntityUpdate(
|
|||
lastUser = entity.lastUser,
|
||||
direction = entity.direction,
|
||||
recipe = entity.recipe,
|
||||
beltToGroundType = entity.beltToGroundType,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue