Repository reorganisation

Unified kotlin and java into just src/main
Unified the rs09 and core packages
Took all content out of the core package, and placed it into the new content package
Reorganised all source code relating to content to be easier to find and explore
This commit is contained in:
Ceikry
2023-01-26 13:59:28 +00:00
committed by Ryan
parent e4b799c44a
commit a100affda2
3156 changed files with 24205 additions and 30585 deletions
+32
View File
@@ -0,0 +1,32 @@
package core.api
import core.game.node.entity.Entity
import core.game.world.map.Location
import core.game.world.map.zone.MapZone
import core.game.world.map.zone.RegionZone
import core.game.world.map.zone.ZoneBorders
import core.game.world.map.zone.ZoneRestriction
/**
* Interface that allows a class to define a map area.
* Optionally-overridable methods include [getRestrictions], [areaEnter], [areaLeave] and [entityStep]
*/
interface MapArea : ContentInterface {
var zone: MapZone
get(){
return zoneMaps[this.javaClass.simpleName + "MapArea"]!!
}
set(value) {
zoneMaps[this.javaClass.simpleName + "MapArea"] = value
}
fun defineAreaBorders() : Array<ZoneBorders>
fun getRestrictions() : Array<ZoneRestriction> {return arrayOf()}
fun areaEnter(entity: Entity) {}
fun areaLeave(entity: Entity, logout: Boolean) {}
fun entityStep(entity: Entity, location: Location, lastLocation: Location) {}
companion object {
val zoneMaps = HashMap<String, MapZone>()
}
}