Implement vinesweeper

This commit is contained in:
Avi Weinstock
2021-10-07 00:25:15 +00:00
committed by Ceikry
parent c3086f9b27
commit 28f198cb72
8 changed files with 888 additions and 3 deletions
+12 -1
View File
@@ -651,6 +651,17 @@ object ContentAPI {
return RegionManager.getLocalNpcs(entity).filter { it.id in ids }.toList()
}
/**
* Gets a list of nearby NPCs that match the given IDs.
* @param entity the entity to check around
* @param ids the IDs of the NPCs to look for
* @param distance The maximum distance to the entity.
*/
@JvmStatic
fun findLocalNPCs(entity: Entity, ids: IntArray, distance: Int): List<NPC>{
return RegionManager.getLocalNpcs(entity, distance).filter { it.id in ids }.toList()
}
/**
* Gets the value of an attribute key from the Entity's attributes store
* @param entity the entity to get the attribute from
@@ -1243,4 +1254,4 @@ object ContentAPI {
is Graphics -> Graphics.send(gfx, location)
}
}
}
}