Skip to content

Commit 2b30167

Browse files
authored
1 parent c57f093 commit 2b30167

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/jsMain/kotlin/screeps/api/Game.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ external object Game {
112112
fun isRoomAvailable(roomName: String): Boolean
113113
fun getRoomTerrain(roomName: String): Room.Terrain
114114
fun getRoomStatus(roomName: String): RoomStatusResult
115+
val visual: MapVisual
115116

116117
interface RouteResult {
117118
val exit: ExitConstant
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package screeps.api
2+
3+
import screeps.api.RoomVisual.*
4+
5+
external interface MapVisual {
6+
fun line(start: RoomPosition, end: RoomPosition, style: LineStyle = definedExternally): MapVisual
7+
fun circle(pos: RoomPosition, style: CircleStyle = definedExternally): MapVisual
8+
fun rect(topLeftPosition: RoomPosition, width: Double, height: Double, style: ShapeStyle = definedExternally): MapVisual
9+
fun poly(points: Array<RoomPosition>, style: ShapeStyle = definedExternally): MapVisual
10+
fun text(text: String, position: RoomPosition, style: TextStyle = definedExternally): MapVisual
11+
fun clear(): MapVisual
12+
fun getSize(): Double
13+
}

0 commit comments

Comments
 (0)