Skip to content

Commit

Permalink
Harvestable is also Identifiable
Browse files Browse the repository at this point in the history
Creep.harvest can take any Harvestable
  • Loading branch information
exaV committed Apr 21, 2024
1 parent 55a89d9 commit ad554d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/jsMain/kotlin/screeps/api/Creep.kt
Expand Up @@ -17,9 +17,7 @@ abstract external class Creep : GenericCreep {
fun dismantle(target: IStructure): ScreepsReturnCode
fun generateSafeMode(target: StructureController): ScreepsReturnCode
fun getActiveBodyparts(type: ActiveBodyPartConstant): Int
fun harvest(target: Source): ScreepsReturnCode
fun harvest(target: Mineral): ScreepsReturnCode
fun harvest(target: Deposit): ScreepsReturnCode
fun harvest(target: Harvestable): ScreepsReturnCode
fun heal(target: GenericCreep): ScreepsReturnCode
fun pull(target: GenericCreep): ScreepsReturnCode
fun rangedAttack(target: Attackable): ScreepsReturnCode
Expand Down
2 changes: 1 addition & 1 deletion src/jsMain/kotlin/screeps/api/Traits.kt
Expand Up @@ -4,7 +4,7 @@ external interface Identifiable {
val id: String
}

external interface Harvestable
external interface Harvestable: Identifiable

external interface RenewableHarvestable : Harvestable {
val ticksToRegeneration: Int
Expand Down

0 comments on commit ad554d7

Please sign in to comment.