mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
Rectified heretic YY-MM-DD to standard YYYY-MM-DD
This commit is contained in:
@@ -17,7 +17,7 @@ import java.io.OutputStream
|
||||
* If memory at Program Counter is equal to 0xFF, it is interpreted as termination. (0xFF is NOT a
|
||||
* valid opcode for input program, however)
|
||||
*
|
||||
* Created by minjaesong on 17-04-29.
|
||||
* Created by minjaesong on 2017-04-29.
|
||||
*/
|
||||
|
||||
class BFVM(
|
||||
|
||||
@@ -5,7 +5,7 @@ import net.torvald.terrarum.gameworld.toUint
|
||||
/**
|
||||
* @param terminal: for sending redraw only
|
||||
*
|
||||
* Created by minjaesong on 16-08-10.
|
||||
* Created by minjaesong on 2016-08-10.
|
||||
*/
|
||||
/*class AAFrame(var width: Int, var height: Int, var terminal: SimpleTextTerminal) {
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import com.badlogic.gdx.graphics.Color
|
||||
*
|
||||
* reference: http://www.brucelindbloom.com/index.html?Equations.html
|
||||
*
|
||||
* Created by minjaesong on 16-09-01.
|
||||
* Created by minjaesong on 2016-09-01.
|
||||
*/
|
||||
|
||||
object CIELChabUtil {
|
||||
|
||||
@@ -21,7 +21,7 @@ import com.badlogic.gdx.graphics.Color
|
||||
* If you're using Mac, you can play around with this colour space with
|
||||
* ColorSync Utility's calculator.
|
||||
*
|
||||
* Created by minjaesong on 16-09-01.
|
||||
* Created by minjaesong on 2016-09-01.
|
||||
*/
|
||||
object CIELabUtil {
|
||||
fun Color.brighterLab(scale: Float): Color {
|
||||
|
||||
@@ -17,7 +17,7 @@ import net.torvald.colourutil.CIELuvUtil.toXYZ
|
||||
* If you're using Mac, you can play around with this colour space with
|
||||
* ColorSync Utility's calculator.
|
||||
*
|
||||
* Created by minjaesong on 16-09-06.
|
||||
* Created by minjaesong on 2016-09-06.
|
||||
*/
|
||||
object CIELuvUtil {
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import com.badlogic.gdx.graphics.Color
|
||||
|
||||
/**
|
||||
* 6-Step RGB with builtin utils.
|
||||
* Created by minjaesong on 16-02-11.
|
||||
* Created by minjaesong on 2016-02-11.
|
||||
*/
|
||||
class Col216 : LimitedColours {
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import com.badlogic.gdx.graphics.Color
|
||||
|
||||
/**
|
||||
* 12-bit (16-step) RGB with builtin utils.
|
||||
* Created by minjaesong on 16-01-23.
|
||||
* Created by minjaesong on 2016-01-23.
|
||||
*/
|
||||
class Col4096 : LimitedColours {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import net.torvald.terrarum.ModMgr
|
||||
|
||||
/**
|
||||
* RGB- and CIE-Modeled CCT calculator
|
||||
* Created by minjaesong on 16-07-26.
|
||||
* Created by minjaesong on 2016-07-26.
|
||||
*/
|
||||
object ColourTemp {
|
||||
private var clut = GdxColorMap(ModMgr.getGdxFile("basegame", "colourmap/black_body_col_1000_40000_K.tga"))
|
||||
|
||||
@@ -4,7 +4,7 @@ import com.jme3.math.FastMath
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-07-26.
|
||||
* Created by minjaesong on 2016-07-26.
|
||||
*/
|
||||
object ColourUtil {
|
||||
fun toColor(r: Int, g: Int, b: Int) = Color(r.shl(24) or g.shl(16) or b.shl(8) or 0xff)
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.badlogic.gdx.graphics.Color
|
||||
/**
|
||||
* OBSOLETE; use CIELchUtil for natural-looking colour
|
||||
*
|
||||
* Created by minjaesong on 16-01-16.
|
||||
* Created by minjaesong on 2016-01-16.
|
||||
*/
|
||||
object HSVUtil {
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package net.torvald.colourutil
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-02-11.
|
||||
* Created by minjaesong on 2016-02-11.
|
||||
*/
|
||||
interface LimitedColours {
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.util.*
|
||||
/**
|
||||
* Simple ArrayList wrapper that acts as history keeper. You can append any data but cannot delete.
|
||||
*
|
||||
* Created by minjaesong on 16-07-13.
|
||||
* Created by minjaesong on 2016-07-13.
|
||||
*/
|
||||
class HistoryArray<T>(val size: Int) {
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import net.torvald.terrarum.gameactors.sqrt
|
||||
import org.dyn4j.geometry.Vector2
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-01-15.
|
||||
* Created by minjaesong on 2016-01-15.
|
||||
*/
|
||||
data class Point2d(var x: Double, var y: Double) : Cloneable {
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package net.torvald.random
|
||||
import java.util.Random
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-02-03.
|
||||
* Created by minjaesong on 2016-02-03.
|
||||
*/
|
||||
class Fudge3
|
||||
/**
|
||||
|
||||
@@ -3,7 +3,7 @@ package net.torvald.random
|
||||
import java.util.Random
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-02-03.
|
||||
* Created by minjaesong on 2016-02-03.
|
||||
*/
|
||||
open class FudgeDice
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package net.torvald.random
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-10-28.
|
||||
* Created by minjaesong on 2016-10-28.
|
||||
*/
|
||||
interface NoiseGenerator1D {
|
||||
fun generate(seed: Long)
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.util.*
|
||||
* Generate value noise that is always "tileably looped" every x in loopSize.
|
||||
*
|
||||
* @param width: power of 2's are recommended.
|
||||
* Created by minjaesong on 16-10-28.
|
||||
* Created by minjaesong on 2016-10-28.
|
||||
*/
|
||||
class TileableValueNoise(
|
||||
val octaves: Int, val persistency: Float, val width: Int, val initSamples: Int = 4) {
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.google.gson.JsonObject
|
||||
/**
|
||||
* Keys must be all lowercase
|
||||
*
|
||||
* Created by minjaesong on 16-03-12.
|
||||
* Created by minjaesong on 2016-03-12.
|
||||
*/
|
||||
object DefaultConfig {
|
||||
fun fetch(): JsonObject {
|
||||
|
||||
@@ -10,7 +10,7 @@ typealias ItemValue = KVHashMap
|
||||
typealias GameConfig = KVHashMap
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 15-12-30.
|
||||
* Created by minjaesong on 2015-12-30.
|
||||
*/
|
||||
open class KVHashMap {
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ import java.nio.IntBuffer
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
* Slick2d Version Created by minjaesong on 15-12-30.
|
||||
* Slick2d Version Created by minjaesong on 2015-12-30.
|
||||
*
|
||||
* LibGDX Version Created by minjaesong on 2017-06-15.
|
||||
*/
|
||||
@@ -486,6 +486,10 @@ object Terrarum : Screen {
|
||||
shaderBayerSkyboxFill.dispose()
|
||||
shaderBlur.dispose()
|
||||
shaderBlendGlow.dispose()
|
||||
|
||||
|
||||
shapeRender.dispose()
|
||||
batch.dispose()
|
||||
}
|
||||
|
||||
override fun hide() {
|
||||
|
||||
@@ -7,7 +7,7 @@ import net.torvald.terrarum.ModMgr
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-07-08.
|
||||
* Created by minjaesong on 2016-07-08.
|
||||
*/
|
||||
object AudioResourceLibrary {
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package net.torvald.terrarum.blockproperties
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-02-21.
|
||||
* Created by minjaesong on 2016-02-21.
|
||||
*/
|
||||
object Block {
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.apache.commons.csv.CSVRecord
|
||||
import java.io.IOException
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-02-16.
|
||||
* Created by minjaesong on 2016-02-16.
|
||||
*/
|
||||
object BlockCodex {
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package net.torvald.terrarum.blockproperties
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-02-16.
|
||||
* Created by minjaesong on 2016-02-16.
|
||||
*/
|
||||
class BlockProp {
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import net.torvald.terrarum.worlddrawer.LightmapRenderer
|
||||
import net.torvald.terrarum.weather.WeatherMixer
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-06-16.
|
||||
* Created by minjaesong on 2016-06-16.
|
||||
*/
|
||||
object BlockPropUtil {
|
||||
var flickerFuncX: Second = 0f // saves current status (time) of func
|
||||
|
||||
@@ -10,7 +10,7 @@ import com.jme3.math.FastMath
|
||||
import java.util.Arrays
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-02-01.
|
||||
* Created by minjaesong on 2016-02-01.
|
||||
*/
|
||||
object BlockStats {
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package net.torvald.terrarum.concurrent
|
||||
import net.torvald.terrarum.Terrarum
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-05-25.
|
||||
* Created by minjaesong on 2016-05-25.
|
||||
*/
|
||||
object ThreadParallel {
|
||||
private val pool: Array<Thread?> = Array(Terrarum.THREADS, { null })
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.apache.commons.codec.digest.DigestUtils
|
||||
* do NOT put plaintext anywhere in the code (except for comments maybe)
|
||||
* must use SHA-256
|
||||
*
|
||||
* Created by minjaesong on 16-02-19.
|
||||
* Created by minjaesong on 2016-02-19.
|
||||
*/
|
||||
internal object Authenticator : ConsoleCommand {
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import java.nio.file.FileSystems
|
||||
import java.nio.file.Files
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-03-07.
|
||||
* Created by minjaesong on 2016-03-07.
|
||||
*/
|
||||
internal object Batch : ConsoleCommand {
|
||||
@Throws(Exception::class)
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.nio.file.FileSystems
|
||||
import java.nio.file.Files
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-02-10.
|
||||
* Created by minjaesong on 2016-02-10.
|
||||
*/
|
||||
internal object CatStdout : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
|
||||
@@ -7,7 +7,7 @@ import net.torvald.terrarum.langpack.Lang
|
||||
import java.util.Formatter
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-01-16.
|
||||
* Created by minjaesong on 2016-01-16.
|
||||
*/
|
||||
internal object CodexEdictis : ConsoleCommand {
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package net.torvald.terrarum.console
|
||||
import java.util.HashMap
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-01-15.
|
||||
* Created by minjaesong on 2016-01-15.
|
||||
*/
|
||||
object CommandDict {
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.util.Formatter
|
||||
import java.util.regex.Pattern
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-01-15.
|
||||
* Created by minjaesong on 2016-01-15.
|
||||
*/
|
||||
internal object CommandInterpreter {
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package net.torvald.terrarum.console
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-01-15.
|
||||
* Created by minjaesong on 2016-01-15.
|
||||
*/
|
||||
interface ConsoleCommand {
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.ui.ConsoleWindow
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-01-16.
|
||||
* Created by minjaesong on 2016-01-16.
|
||||
*/
|
||||
internal object Echo : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package net.torvald.terrarum.console
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-09-07.
|
||||
* Created by minjaesong on 2016-09-07.
|
||||
*/
|
||||
internal object EchoConsole : ConsoleCommand {
|
||||
/**
|
||||
|
||||
@@ -5,7 +5,7 @@ import net.torvald.terrarum.ccR
|
||||
import net.torvald.terrarum.ui.ConsoleWindow
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-04-25.
|
||||
* Created by minjaesong on 2016-04-25.
|
||||
*/
|
||||
internal object EchoError : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
|
||||
@@ -6,7 +6,7 @@ import net.torvald.terrarum.Terrarum
|
||||
import java.io.IOException
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-02-10.
|
||||
* Created by minjaesong on 2016-02-10.
|
||||
*/
|
||||
internal object ExportAV : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.io.*
|
||||
import java.util.HashMap
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-01-17.
|
||||
* Created by minjaesong on 2016-01-17.
|
||||
*/
|
||||
internal object ExportMap : ConsoleCommand {
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package net.torvald.terrarum.console
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-01-18.
|
||||
* Created by minjaesong on 2016-01-18.
|
||||
*/
|
||||
internal object ForceGC : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
|
||||
@@ -4,7 +4,7 @@ import net.torvald.terrarum.*
|
||||
import net.torvald.terrarum.Terrarum
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-01-19.
|
||||
* Created by minjaesong on 2016-01-19.
|
||||
*/
|
||||
internal object GetAV : ConsoleCommand {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import net.torvald.terrarum.gameactors.Player
|
||||
import net.torvald.terrarumsansbitmap.gdx.GameFontBase
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-02-17.
|
||||
* Created by minjaesong on 2016-02-17.
|
||||
*/
|
||||
internal object GetFactioning : ConsoleCommand {
|
||||
val ccW = GameFontBase.toColorCode(0xFFFF)
|
||||
|
||||
@@ -3,7 +3,7 @@ package net.torvald.terrarum.console
|
||||
import net.torvald.terrarum.langpack.Lang
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-01-22.
|
||||
* Created by minjaesong on 2016-01-22.
|
||||
*/
|
||||
internal object GetLocale : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
|
||||
@@ -3,7 +3,7 @@ package net.torvald.terrarum.console
|
||||
import net.torvald.terrarum.Terrarum
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-03-20.
|
||||
* Created by minjaesong on 2016-03-20.
|
||||
*/
|
||||
internal object GetTime : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.io.FileWriter
|
||||
import java.io.IOException
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-02-10.
|
||||
* Created by minjaesong on 2016-02-10.
|
||||
*/
|
||||
internal object GsonTest : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
|
||||
@@ -3,7 +3,7 @@ package net.torvald.terrarum.console
|
||||
import net.torvald.terrarum.langpack.Lang
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-03-22.
|
||||
* Created by minjaesong on 2016-03-22.
|
||||
*/
|
||||
internal object Help : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
|
||||
@@ -3,7 +3,7 @@ package net.torvald.terrarum.console
|
||||
import net.torvald.terrarum.langpack.Lang
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-07-11.
|
||||
* Created by minjaesong on 2016-07-11.
|
||||
*/
|
||||
internal object LangTest : ConsoleCommand {
|
||||
override fun printUsage() {
|
||||
|
||||
@@ -4,7 +4,7 @@ import com.badlogic.gdx.Gdx
|
||||
import com.badlogic.gdx.audio.Music
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-08-02.
|
||||
* Created by minjaesong on 2016-08-02.
|
||||
*/
|
||||
internal object MusicTest : ConsoleCommand {
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import net.torvald.terrarum.langpack.Lang
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-07-04.
|
||||
* Created by minjaesong on 2016-07-04.
|
||||
*/
|
||||
internal object PrintRandomTips : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package net.torvald.terrarum.console
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-01-15.
|
||||
* Created by minjaesong on 2016-01-15.
|
||||
*/
|
||||
internal object QuitApp : ConsoleCommand {
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import net.torvald.terrarum.*
|
||||
import net.torvald.terrarum.Terrarum
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-06-16.
|
||||
* Created by minjaesong on 2016-06-16.
|
||||
*/
|
||||
internal object Seed : ConsoleCommand {
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import net.torvald.terrarum.*
|
||||
import net.torvald.terrarum.Terrarum
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-01-15.
|
||||
* Created by minjaesong on 2016-01-15.
|
||||
*/
|
||||
internal object SetAV : ConsoleCommand {
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import net.torvald.terrarum.langpack.Lang
|
||||
import net.torvald.terrarum.Terrarum
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-01-23.
|
||||
* Created by minjaesong on 2016-01-23.
|
||||
*/
|
||||
internal object SetBulletin : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
|
||||
@@ -5,7 +5,7 @@ import net.torvald.terrarum.worlddrawer.LightmapRenderer
|
||||
import net.torvald.terrarum.Terrarum
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-02-17.
|
||||
* Created by minjaesong on 2016-02-17.
|
||||
*/
|
||||
internal object SetGlobalLightOverride : ConsoleCommand {
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import net.torvald.terrarum.Terrarum
|
||||
import java.io.IOException
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-01-25.
|
||||
* Created by minjaesong on 2016-01-25.
|
||||
*/
|
||||
internal object SetLocale : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
|
||||
@@ -4,7 +4,7 @@ import net.torvald.terrarum.gameworld.WorldTime
|
||||
import net.torvald.terrarum.Terrarum
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-03-20.
|
||||
* Created by minjaesong on 2016-03-20.
|
||||
*/
|
||||
internal object SetTime : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
|
||||
@@ -3,7 +3,7 @@ package net.torvald.terrarum.console
|
||||
import net.torvald.terrarum.Terrarum
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-03-20.
|
||||
* Created by minjaesong on 2016-03-20.
|
||||
*/
|
||||
internal object SetTimeDelta : ConsoleCommand {
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import net.torvald.terrarum.worlddrawer.WorldCamera
|
||||
import org.dyn4j.geometry.Vector2
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-03-05.
|
||||
* Created by minjaesong on 2016-03-05.
|
||||
*/
|
||||
internal object SpawnPhysTestBall : ConsoleCommand {
|
||||
@Throws(Exception::class)
|
||||
|
||||
@@ -5,7 +5,7 @@ import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.gameactors.ActorWithPhysics
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-01-24.
|
||||
* Created by minjaesong on 2016-01-24.
|
||||
*/
|
||||
internal object Teleport : ConsoleCommand {
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package net.torvald.terrarum.console
|
||||
import net.torvald.terrarum.Terrarum
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-01-19.
|
||||
* Created by minjaesong on 2016-01-19.
|
||||
*/
|
||||
internal object ToggleNoClip : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
|
||||
@@ -6,7 +6,7 @@ import net.torvald.terrarum.TerrarumAppLoader
|
||||
import net.torvald.terrarum.langpack.Lang
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-04-23.
|
||||
* Created by minjaesong on 2016-04-23.
|
||||
*/
|
||||
internal object Version : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
|
||||
@@ -3,7 +3,7 @@ package net.torvald.terrarum.console
|
||||
import net.torvald.terrarum.Terrarum
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-01-25.
|
||||
* Created by minjaesong on 2016-01-25.
|
||||
*/
|
||||
internal object Zoom : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user