mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-13 20:14:05 +09:00
Rectified heretic YY-MM-DD to standard YYYY-MM-DD
This commit is contained in:
@@ -5,7 +5,7 @@ import net.torvald.terrarum.gameactors.ai.ActorAI
|
||||
/**
|
||||
* Note: AI-controlled actor must be 'Controllable'
|
||||
*
|
||||
* Created by minjaesong on 16-01-31.
|
||||
* Created by minjaesong on 2016-01-31.
|
||||
*/
|
||||
interface AIControlled {
|
||||
val ai: ActorAI
|
||||
|
||||
@@ -3,7 +3,7 @@ package net.torvald.terrarum.gameactors
|
||||
/**
|
||||
* See [res/raw/Creature_raw_doc.md] for information about raw.
|
||||
*
|
||||
* Created by minjaesong on 16-04-02.
|
||||
* Created by minjaesong on 2016-04-02.
|
||||
*/
|
||||
object AVKey {
|
||||
const val BUFF = "buff"
|
||||
|
||||
@@ -10,7 +10,7 @@ typealias ActorID = Int
|
||||
/**
|
||||
* @param renderOrder invisible/technical must use "Actor.RenderOrder.MIDDLE"
|
||||
*
|
||||
* Created by minjaesong on 15-12-31.
|
||||
* Created by minjaesong on 2015-12-31.
|
||||
*/
|
||||
abstract class Actor(val renderOrder: RenderOrder) : Comparable<Actor>, Runnable {
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.*
|
||||
* Humanoid actor class to provide same controlling function (such as work, jump)
|
||||
* Also applies unreal air friction for movement control
|
||||
*
|
||||
* Created by minjaesong on 16-10-24.
|
||||
* Created by minjaesong on 2016-10-24.
|
||||
*/
|
||||
open class ActorHumanoid(
|
||||
world: GameWorld,
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.util.concurrent.locks.Lock
|
||||
import java.util.concurrent.locks.ReentrantLock
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-03-15.
|
||||
* Created by minjaesong on 2016-03-15.
|
||||
*/
|
||||
|
||||
class ActorInventory(val actor: Pocketed, var maxCapacity: Int, var capacityMode: Int) {
|
||||
|
||||
@@ -28,7 +28,7 @@ typealias Second = Float
|
||||
* @param immobileBody use realistic air friction (1/1000 of "unrealistic" canonical setup)
|
||||
* @param usePhysics use usePhysics simulation
|
||||
*
|
||||
* Created by minjaesong on 16-01-13.
|
||||
* Created by minjaesong on 2016-01-13.
|
||||
*/
|
||||
open class ActorWithPhysics(val world: GameWorld, renderOrder: RenderOrder, val immobileBody: Boolean = false, var usePhysics: Boolean = true) :
|
||||
ActorWithBody(renderOrder) {
|
||||
|
||||
@@ -3,7 +3,7 @@ package net.torvald.terrarum.gameactors
|
||||
import net.torvald.terrarum.itemproperties.GameItem
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-01-31.
|
||||
* Created by minjaesong on 2016-01-31.
|
||||
*/
|
||||
interface CanBeAnItem {
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ package net.torvald.terrarum.gameactors
|
||||
/**
|
||||
* Actors that has movement controlled by Keyboard or AI
|
||||
*
|
||||
* Created by minjaesong on 15-12-31.
|
||||
* Created by minjaesong on 2015-12-31.
|
||||
*/
|
||||
interface Controllable {
|
||||
fun keyDown(keycode: Int): Boolean
|
||||
|
||||
@@ -4,7 +4,7 @@ import net.torvald.terrarum.gameworld.GameWorld
|
||||
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-02-05.
|
||||
* Created by minjaesong on 2016-02-05.
|
||||
*/
|
||||
|
||||
object CreatureBuilder {
|
||||
|
||||
@@ -7,7 +7,7 @@ import net.torvald.terrarum.blockproperties.BlockCodex
|
||||
import net.torvald.terrarum.gameworld.GameWorld
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-03-15.
|
||||
* Created by minjaesong on 2016-03-15.
|
||||
*/
|
||||
open class DroppedItem(world: GameWorld, private val item: GameItem) : ActorWithPhysics(world, Actor.RenderOrder.MIDTOP) {
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import net.torvald.terrarum.gameactors.faction.Faction
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-02-15.
|
||||
* Created by minjaesong on 2016-02-15.
|
||||
*/
|
||||
interface Factionable {
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package net.torvald.terrarum.gameactors
|
||||
import net.torvald.terrarum.gameworld.GameWorld
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-06-17.
|
||||
* Created by minjaesong on 2016-06-17.
|
||||
*/
|
||||
open class FixtureBase(world: GameWorld, physics: Boolean = true) :
|
||||
ActorWithPhysics(world, Actor.RenderOrder.BEHIND, immobileBody = true, usePhysics = physics) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-06-17.
|
||||
* Created by minjaesong on 2016-06-17.
|
||||
*/
|
||||
internal class FixtureTikiTorch(world: GameWorld) : FixtureBase(world), Luminous {
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ typealias AnyPlayer = HistoricalFigure
|
||||
*
|
||||
* NOTE: all canonical NPCs are must be HistoricalFigure!! (double excl mark, bitch)
|
||||
*
|
||||
* Created by minjaesong on 16-10-10.
|
||||
* Created by minjaesong on 2016-10-10.
|
||||
*/
|
||||
open class HistoricalFigure(
|
||||
world: GameWorld,
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.dyn4j.geometry.Vector2
|
||||
*
|
||||
* Can also use Hitbox.fromTwoPoints(x1, y1, x2, y2
|
||||
*
|
||||
* Created by minjaesong on 16-01-15.
|
||||
* Created by minjaesong on 2016-01-15.
|
||||
*/
|
||||
class Hitbox(x1: Double, y1: Double, width: Double, height: Double) {
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import net.torvald.terrarum.itemproperties.Material
|
||||
/**
|
||||
* @param ai AI class. Use LuaAIWrapper for Lua script
|
||||
*
|
||||
* Created by minjaesong on 16-01-31.
|
||||
* Created by minjaesong on 2016-01-31.
|
||||
*/
|
||||
open class HumanoidNPC(
|
||||
world: GameWorld,
|
||||
|
||||
@@ -8,7 +8,7 @@ import net.torvald.terrarum.ModMgr
|
||||
import java.security.SecureRandom
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-03-25.
|
||||
* Created by minjaesong on 2016-03-25.
|
||||
*/
|
||||
object InjectCreatureRaw {
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package net.torvald.terrarum.gameactors
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-02-20.
|
||||
* Created by minjaesong on 2016-02-20.
|
||||
*/
|
||||
interface LandHolder {
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package net.torvald.terrarum.gameactors
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-02-19.
|
||||
* Created by minjaesong on 2016-02-19.
|
||||
*/
|
||||
interface Luminous {
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.util.*
|
||||
/**
|
||||
* Provides MDL interpretation, pre-compilation and stores state of the interpreter
|
||||
*
|
||||
* Created by minjaesong on 16-07-30.
|
||||
* Created by minjaesong on 2016-07-30.
|
||||
*/
|
||||
class MDLInterpreterState {
|
||||
val stack = MagicArrayStack(20)
|
||||
|
||||
@@ -7,7 +7,7 @@ import net.torvald.terrarum.gameworld.GameWorld
|
||||
import net.torvald.terrarum.worldgenerator.RoguelikeRandomiser
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-03-05.
|
||||
* Created by minjaesong on 2016-03-05.
|
||||
*/
|
||||
class PhysTestBall(world: GameWorld) : ActorWithPhysics(world, Actor.RenderOrder.MIDDLE, immobileBody = true) {
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import net.torvald.terrarum.worlddrawer.LightmapRenderer
|
||||
* A wrapper to support instant player changing (or possessing other NPCs maybe)
|
||||
*
|
||||
* @param actor : here you 'attach' the actor you wish to control
|
||||
* Created by minjaesong on 16-10-23.
|
||||
* Created by minjaesong on 2016-10-23.
|
||||
*/
|
||||
class PlayableActorDelegate(val actor: ActorHumanoid) {
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import net.torvald.terrarum.gameworld.GameWorld
|
||||
/**
|
||||
* Game player (YOU!)
|
||||
*
|
||||
* Created by minjaesong on 15-12-31.
|
||||
* Created by minjaesong on 2015-12-31.
|
||||
*/
|
||||
|
||||
class Player(world: GameWorld, born: GameDate) : ActorHumanoid(world, born) {
|
||||
|
||||
@@ -3,7 +3,7 @@ package net.torvald.terrarum.gameactors
|
||||
import net.torvald.terrarum.Terrarum
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-02-03.
|
||||
* Created by minjaesong on 2016-02-03.
|
||||
*/
|
||||
object PlayerBuilder {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import net.torvald.terrarum.worlddrawer.FeaturesDrawer
|
||||
import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-03-25.
|
||||
* Created by minjaesong on 2016-03-25.
|
||||
*/
|
||||
object PlayerBuilderCynthia {
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import net.torvald.terrarum.blockproperties.Block
|
||||
import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-02-03.
|
||||
* Created by minjaesong on 2016-02-03.
|
||||
*/
|
||||
|
||||
object PlayerBuilderSigrid {
|
||||
|
||||
@@ -6,7 +6,7 @@ import net.torvald.terrarum.itemproperties.GameItem
|
||||
import net.torvald.terrarum.itemproperties.ItemCodex
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-01-15.
|
||||
* Created by minjaesong on 2016-01-15.
|
||||
*/
|
||||
interface Pocketed {
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package net.torvald.terrarum.gameactors
|
||||
/**
|
||||
* Projectile marker. Used to kill them when they're far away from the player, instead of making them sleep.
|
||||
*
|
||||
* Created by minjaesong on 16-09-05.
|
||||
* Created by minjaesong on 2016-09-05.
|
||||
*/
|
||||
interface Projectile {
|
||||
}
|
||||
@@ -4,7 +4,7 @@ import net.torvald.terrarum.gameworld.GameWorld
|
||||
import org.dyn4j.geometry.Vector2
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-08-29.
|
||||
* Created by minjaesong on 2016-08-29.
|
||||
*/
|
||||
class ProjectileHoming(
|
||||
world: GameWorld,
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.util.*
|
||||
/**
|
||||
* Simplest projectile.
|
||||
*
|
||||
* Created by minjaesong on 16-08-29.
|
||||
* Created by minjaesong on 2016-08-29.
|
||||
*/
|
||||
|
||||
// TODO simplified, lightweight physics (does not call PhysicsSolver)
|
||||
|
||||
@@ -4,7 +4,7 @@ import com.badlogic.gdx.Gdx
|
||||
import net.torvald.terrarum.Terrarum
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-05-25.
|
||||
* Created by minjaesong on 2016-05-25.
|
||||
*/
|
||||
class ThreadActorUpdate(val startIndex: Int, val endIndex: Int) : Runnable {
|
||||
override fun run() {
|
||||
|
||||
@@ -4,7 +4,7 @@ import com.badlogic.gdx.graphics.Color
|
||||
import net.torvald.terrarum.gameworld.GameWorld
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-04-26.
|
||||
* Created by minjaesong on 2016-04-26.
|
||||
*/
|
||||
class WeaponSwung(world: GameWorld, val itemID: Int) : ActorWithPhysics(world, Actor.RenderOrder.MIDTOP), Luminous {
|
||||
// just let the solver use AABB; it's cheap but works just enough
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.luaj.vm2.lib.OneArgFunction
|
||||
import org.luaj.vm2.lib.ZeroArgFunction
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-10-24.
|
||||
* Created by minjaesong on 2016-10-24.
|
||||
*/
|
||||
internal class AILuaAPI(g: Globals, actor: ActorWithPhysics) {
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package net.torvald.terrarum.gameactors.ai
|
||||
import net.torvald.terrarum.gameactors.HumanoidNPC
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-03-02.
|
||||
* Created by minjaesong on 2016-03-02.
|
||||
*/
|
||||
interface ActorAI {
|
||||
fun update(actor: HumanoidNPC, delta: Float)
|
||||
|
||||
@@ -4,7 +4,7 @@ import net.torvald.random.HQRNG
|
||||
import java.util.HashSet
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-02-15.
|
||||
* Created by minjaesong on 2016-02-15.
|
||||
*/
|
||||
|
||||
typealias FactionID = Int
|
||||
|
||||
@@ -3,7 +3,7 @@ package net.torvald.terrarum.gameactors.faction
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-05-09.
|
||||
* Created by minjaesong on 2016-05-09.
|
||||
*/
|
||||
object FactionCodex {
|
||||
val factionContainer = ArrayList<Faction>()
|
||||
|
||||
@@ -6,7 +6,7 @@ import net.torvald.terrarum.ModMgr
|
||||
import java.io.IOException
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-02-15.
|
||||
* Created by minjaesong on 2016-02-15.
|
||||
*/
|
||||
object FactionFactory {
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import net.torvald.terrarum.gameactors.ActorWithPhysics
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-04-22.
|
||||
* Created by minjaesong on 2016-04-22.
|
||||
*/
|
||||
object CollisionSolver {
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ package net.torvald.terrarum.gameactors.physicssolver
|
||||
|
||||
/**
|
||||
* multithreaded version of CollisionSolver#solveCollision
|
||||
* Created by minjaesong on 16-04-26.
|
||||
* Created by minjaesong on 2016-04-26.
|
||||
*/
|
||||
internal class SolveByUnit : Runnable {
|
||||
override fun run() {
|
||||
|
||||
@@ -3,7 +3,7 @@ package net.torvald.terrarum.gameactors.physicssolver
|
||||
import net.torvald.terrarum.gameactors.ActorWithPhysics
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-05-01.
|
||||
* Created by minjaesong on 2016-05-01.
|
||||
*/
|
||||
object VelocitySolver {
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ package net.torvald.terrarum.gameactors.scheduler
|
||||
|
||||
/**
|
||||
* Ultima-like NPC scheduler
|
||||
* Created by minjaesong on 16-03-26.
|
||||
* Created by minjaesong on 2016-03-26.
|
||||
*/
|
||||
interface NPCSchedule {
|
||||
}
|
||||
Reference in New Issue
Block a user