mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
furred npc test might delete later
This commit is contained in:
23
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
23
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@@ -0,0 +1,23 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="ArrayEquality" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="ConstantConditionIf" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CsvValidation" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ExplicitThis" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="KotlinDoubleNegation" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="NullChecksToSafeCall" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="RedundantCompanionReference" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="RedundantExplicitType" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="RedundantGetter" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="RedundantSetter" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="RedundantUnitExpression" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="RedundantUnitReturnType" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="RemoveCurlyBracesFromTemplate" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="RemoveEmptyPrimaryConstructor" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="RemoveEmptySecondaryConstructorBody" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="RemoveRedundantBackticks" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="RemoveRedundantQualifierName" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="RemoveSingleExpressionStringTemplate" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
</profile>
|
||||
</component>
|
||||
BIN
assets/mods/basegame/blocks/223.tga
LFS
Normal file
BIN
assets/mods/basegame/blocks/223.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/blocks/wire.tga
LFS
Normal file
BIN
assets/mods/basegame/blocks/wire.tga
LFS
Normal file
Binary file not shown.
@@ -1,5 +1,6 @@
|
||||
"id";"classname"
|
||||
"8448";"net.torvald.terrarum.modulebasegame.items.PickaxeCopper"
|
||||
"8449";"net.torvald.terrarum.modulebasegame.items.PickaxeIron"
|
||||
"8450";"net.torvald.terrarum.modulebasegame.items.PickaxeSteel"
|
||||
"8466";"net.torvald.terrarum.modulebasegame.items.WirePieceSignalWire"
|
||||
"8448";"net.torvald.terrarum.modulebasegame.gameitems.PickaxeCopper"
|
||||
"8449";"net.torvald.terrarum.modulebasegame.gameitems.PickaxeIron"
|
||||
"8450";"net.torvald.terrarum.modulebasegame.gameitems.PickaxeSteel"
|
||||
"8466";"net.torvald.terrarum.modulebasegame.gameitems.WirePieceSignalWire"
|
||||
"8467";"net.torvald.terrarum.modulebasegame.gameitems.TikiTorchTester"
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import net.torvald.terrarum.itemproperties.GameItem
|
||||
import net.torvald.terrarum.gameitem.GameItem
|
||||
import net.torvald.terrarum.itemproperties.Material
|
||||
import org.jetbrains.annotations.NotNull
|
||||
import org.jetbrains.annotations.Nullable
|
||||
|
||||
@@ -9,7 +9,7 @@ import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.gameactors.AVKey
|
||||
import net.torvald.terrarum.gameactors.ActorWBMovable
|
||||
import net.torvald.terrarum.itemproperties.Calculate
|
||||
import net.torvald.terrarum.itemproperties.GameItem
|
||||
import net.torvald.terrarum.gameitem.GameItem
|
||||
import net.torvald.terrarum.itemproperties.Material
|
||||
import net.torvald.terrarum.blockproperties.Block
|
||||
// following two are NOT UNUSED!
|
||||
|
||||
40
assets/mods/basegame/sprites/furry_sprite.properties
Normal file
40
assets/mods/basegame/sprites/furry_sprite.properties
Normal file
@@ -0,0 +1,40 @@
|
||||
# complete file name is: SPRITESHEET + bodypart name + EXTENSION
|
||||
SPRITESHEET=mods/basegame/sprites/test_furry/furbud_
|
||||
EXTENSION=.tga
|
||||
# defines frame size and origin point. Origin point is given as: (originx, size.y - 1)
|
||||
# ORIGINY is deduced from the sprite size as shown in above; you only need to set ORIGINX
|
||||
CONFIG=SIZE 48,56;ORIGINX 29
|
||||
|
||||
# note to self: don't implement skeleton hierarchy: there's too many exceptions
|
||||
# besides, you have "ALL" key.
|
||||
|
||||
! a skeleton also defines what body parts (images) be used.
|
||||
! you can also write multiline text using reverse solidus; this is a feature of .properties
|
||||
! skeleton joints are ordered: foremost-drawn object comes first, which means lowermost object IN THIS LIST
|
||||
! are painted first, and any object that comes before it will paint over it. In other words, this list is
|
||||
! first reversed then being iterated.
|
||||
! Joints' original point is defined in the document sprite_joints.psd. It also has visual representations.
|
||||
# TODO right now accessory points are explicitly defined. Should they be injected in run-time?
|
||||
SKELETON_STAND=HEADGEAR 0,32;HAIR_FORE 0,32;\
|
||||
ARM_REST_RIGHT -7,23;HAND_REST_RIGHT -6,11;HELD_ITEM -6,11;\
|
||||
HAIR 0,32;HEAD 0,32;\
|
||||
UPPER_TORSO 0,23;LOWER_TORSO 0,15;\
|
||||
FOOT_RIGHT -2,2;LEG_REST_RIGHT -2,7;\
|
||||
FOOT_LEFT 2,2;LEG_REST_LEFT 2,7;\
|
||||
ARM_REST_LEFT 5,24;HAND_REST_LEFT 6,12;\
|
||||
TAIL_0 0,13;TAIL_1 0,13
|
||||
|
||||
# skeleton_stand is used for testing purpose
|
||||
ANIM_RUN=DELAY 0.15;ROW 2;SKELETON SKELETON_STAND
|
||||
ANIM_RUN_1=TAIL_0 0,-999;LEG_REST_RIGHT 1,1;FOOT_RIGHT 1,1;LEG_REST_LEFT -1,0;FOOT_LEFT -1,0
|
||||
ANIM_RUN_2=TAIL_1 0,-999;ALL 0,1;LEG_REST_RIGHT 0,-1;FOOT_RIGHT 0,-1;LEG_REST_LEFT 0,1;FOOT_LEFT 0,1
|
||||
ANIM_RUN_3=TAIL_1 0,-999;LEG_REST_RIGHT -1,0;FOOT_RIGHT -1,0;LEG_REST_LEFT 1,1;FOOT_LEFT 1,1
|
||||
ANIM_RUN_4=TAIL_0 0,-999;ALL 0,1;LEG_REST_RIGHT 0,1;FOOT_RIGHT 0,1;LEG_REST_LEFT 0,-1;FOOT_LEFT 0,-1
|
||||
|
||||
|
||||
ANIM_IDLE=DELAY 2;ROW 1;SKELETON SKELETON_STAND
|
||||
ANIM_IDLE_1=TAIL_1 0,-999
|
||||
ANIM_IDLE_2=TAIL_1 0,-999;\
|
||||
UPPER_TORSO 0,-1;HEAD 0,-1;HAIR 0,-1;HELD_ITEM 0,-1;\
|
||||
ARM_REST_LEFT 0,-1;ARM_REST_RIGHT 0,-1;HAND_REST_LEFT 0,-1;HAND_REST_RIGHT 0,-1;\
|
||||
HAIR_FORE 0,-1;HEADGEAR 0,-1
|
||||
40
assets/mods/basegame/sprites/furry_sprite_glow.properties
Normal file
40
assets/mods/basegame/sprites/furry_sprite_glow.properties
Normal file
@@ -0,0 +1,40 @@
|
||||
# complete file name is: SPRITESHEET + bodypart name + EXTENSION
|
||||
SPRITESHEET=mods/basegame/sprites/test_furry/furbudglow_
|
||||
EXTENSION=.tga
|
||||
# defines frame size and origin point. Origin point is given as: (originx, size.y - 1)
|
||||
# ORIGINY is deduced from the sprite size as shown in above; you only need to set ORIGINX
|
||||
CONFIG=SIZE 48,56;ORIGINX 29
|
||||
|
||||
# note to self: don't implement skeleton hierarchy: there's too many exceptions
|
||||
# besides, you have "ALL" key.
|
||||
|
||||
! a skeleton also defines what body parts (images) be used.
|
||||
! you can also write multiline text using reverse solidus; this is a feature of .properties
|
||||
! skeleton joints are ordered: foremost-drawn object comes first, which means lowermost object IN THIS LIST
|
||||
! are painted first, and any object that comes before it will paint over it. In other words, this list is
|
||||
! first reversed then being iterated.
|
||||
! Joints' original point is defined in the document sprite_joints.psd. It also has visual representations.
|
||||
# TODO right now accessory points are explicitly defined. Should they be injected in run-time?
|
||||
SKELETON_STAND=HEADGEAR 0,32;HAIR_FORE 0,32;\
|
||||
ARM_REST_RIGHT -7,23;HAND_REST_RIGHT -6,11;HELD_ITEM -6,11;\
|
||||
HAIR 0,32;HEAD 0,32;\
|
||||
UPPER_TORSO 0,23;LOWER_TORSO 0,15;\
|
||||
FOOT_RIGHT -2,2;LEG_REST_RIGHT -2,7;\
|
||||
FOOT_LEFT 2,2;LEG_REST_LEFT 2,7;\
|
||||
ARM_REST_LEFT 5,24;HAND_REST_LEFT 6,12;\
|
||||
TAIL_0 0,13;TAIL_1 0,13
|
||||
|
||||
# skeleton_stand is used for testing purpose
|
||||
ANIM_RUN=DELAY 0.15;ROW 2;SKELETON SKELETON_STAND
|
||||
ANIM_RUN_1=TAIL_0 0,-999;LEG_REST_RIGHT 1,1;FOOT_RIGHT 1,1;LEG_REST_LEFT -1,0;FOOT_LEFT -1,0
|
||||
ANIM_RUN_2=TAIL_1 0,-999;ALL 0,1;LEG_REST_RIGHT 0,-1;FOOT_RIGHT 0,-1;LEG_REST_LEFT 0,1;FOOT_LEFT 0,1
|
||||
ANIM_RUN_3=TAIL_1 0,-999;LEG_REST_RIGHT -1,0;FOOT_RIGHT -1,0;LEG_REST_LEFT 1,1;FOOT_LEFT 1,1
|
||||
ANIM_RUN_4=TAIL_0 0,-999;ALL 0,1;LEG_REST_RIGHT 0,1;FOOT_RIGHT 0,1;LEG_REST_LEFT 0,-1;FOOT_LEFT 0,-1
|
||||
|
||||
|
||||
ANIM_IDLE=DELAY 2;ROW 1;SKELETON SKELETON_STAND
|
||||
ANIM_IDLE_1=TAIL_1 0,-999
|
||||
ANIM_IDLE_2=TAIL_1 0,-999;\
|
||||
UPPER_TORSO 0,-1;HEAD 0,-1;HAIR 0,-1;HELD_ITEM 0,-1;\
|
||||
ARM_REST_LEFT 0,-1;ARM_REST_RIGHT 0,-1;HAND_REST_LEFT 0,-1;HAND_REST_RIGHT 0,-1;\
|
||||
HAIR_FORE 0,-1;HEADGEAR 0,-1
|
||||
BIN
assets/mods/basegame/sprites/test_furry/furbud_arm_rest_left.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_furry/furbud_arm_rest_left.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_furry/furbud_arm_rest_right.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_furry/furbud_arm_rest_right.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_furry/furbud_foot_left.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_furry/furbud_foot_left.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_furry/furbud_foot_right.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_furry/furbud_foot_right.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_furry/furbud_hand_rest_left.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_furry/furbud_hand_rest_left.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_furry/furbud_hand_rest_right.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_furry/furbud_hand_rest_right.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_furry/furbud_head.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_furry/furbud_head.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_furry/furbud_leg_rest_left.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_furry/furbud_leg_rest_left.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_furry/furbud_leg_rest_right.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_furry/furbud_leg_rest_right.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_furry/furbud_lower_torso.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_furry/furbud_lower_torso.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_furry/furbud_tail_0.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_furry/furbud_tail_0.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_furry/furbud_tail_1.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_furry/furbud_tail_1.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_furry/furbud_tail_2.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_furry/furbud_tail_2.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_furry/furbud_upper_torso.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_furry/furbud_upper_torso.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_furry/furbudglow_head.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_furry/furbudglow_head.tga
LFS
Normal file
Binary file not shown.
@@ -2,6 +2,7 @@
|
||||
SPRITESHEET=mods/basegame/sprites/sprite_assembler_test_assets/test_
|
||||
EXTENSION=.tga
|
||||
# defines frame size and origin point. Origin point is given as: (originx, size.y - 1)
|
||||
# ORIGINY is deduced from the sprite size as shown in above; you only need to set ORIGINX
|
||||
CONFIG=SIZE 48,56;ORIGINX 29
|
||||
|
||||
# note to self: don't implement skeleton hierarchy: there's too many exceptions
|
||||
@@ -13,14 +14,15 @@ CONFIG=SIZE 48,56;ORIGINX 29
|
||||
! are painted first, and any object that comes before it will paint over it. In other words, this list is
|
||||
! first reversed then being iterated.
|
||||
! Joints' original point is defined in the document sprite_joints.psd. It also has visual representations.
|
||||
# TODO right now accessory points are explicitly defined. Should they be injected in run-time?
|
||||
# TODO right now accessory points are explicitly defined. Should they be injected in run-time? In that case, certain names (e.g. headgear, held_item) will act as an anchor.
|
||||
SKELETON_STAND=HEADGEAR 0,32;HAIR_FORE 0,32;\
|
||||
ARM_REST_RIGHT -7,23;HAND_REST_RIGHT -6,11;HELD_ITEM -6,11;\
|
||||
HAIR 0,32;HEAD 0,32;\
|
||||
UPPER_TORSO 0,23;LOWER_TORSO 0,15;\
|
||||
FOOT_RIGHT -2,2;LEG_REST_RIGHT -2,7;\
|
||||
FOOT_LEFT 2,2;LEG_REST_LEFT 2,7;\
|
||||
ARM_REST_LEFT 5,24;HAND_REST_LEFT 6,12
|
||||
ARM_REST_LEFT 5,24;HAND_REST_LEFT 6,12;\
|
||||
TAIL0 0,13
|
||||
|
||||
# skeleton_stand is used for testing purpose
|
||||
ANIM_RUN=DELAY 0.15;ROW 2;SKELETON SKELETON_STAND
|
||||
|
||||
@@ -11,12 +11,17 @@ import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||
*/
|
||||
interface HasAssembledSprite {
|
||||
|
||||
/** ADL path for main sprite. Necessary. */
|
||||
var animDescPath: String
|
||||
/** ADL path for glow sprite. Optional. */
|
||||
var animDescPathGlow: String?
|
||||
|
||||
// FIXME sometimes the animmation is invisible (row and nFrames mismatch -- row is changed to 1 but it's drawing 3rd frame?)
|
||||
|
||||
fun reassembleSprite(sprite: SpriteAnimation) {
|
||||
fun reassembleSprite(sprite: SpriteAnimation, spriteGlow: SpriteAnimation? = null) {
|
||||
_rebuild(ADProperties(Gdx.files.internal(animDescPath).read()), sprite)
|
||||
if (spriteGlow != null)
|
||||
_rebuild(ADProperties(Gdx.files.internal(animDescPathGlow).read()), spriteGlow)
|
||||
}
|
||||
|
||||
/*fun rebuild(animDescPath: String, spriteAnimation: SpriteAnimation) {
|
||||
|
||||
@@ -4,9 +4,9 @@ import com.badlogic.gdx.Gdx
|
||||
import com.badlogic.gdx.files.FileHandle
|
||||
import net.torvald.terrarum.AppLoader.*
|
||||
import net.torvald.terrarum.blockproperties.BlockCodex
|
||||
import net.torvald.terrarum.itemproperties.GameItem
|
||||
import net.torvald.terrarum.gameitem.GameItem
|
||||
import net.torvald.terrarum.itemproperties.ItemCodex
|
||||
import net.torvald.terrarum.itemproperties.ItemID
|
||||
import net.torvald.terrarum.gameitem.ItemID
|
||||
import net.torvald.terrarum.itemproperties.MaterialCodex
|
||||
import net.torvald.terrarum.langpack.Lang
|
||||
import net.torvald.terrarum.utils.CSVFetcher
|
||||
|
||||
@@ -145,7 +145,7 @@ class TitleScreen(val batch: SpriteBatch) : Screen {
|
||||
}
|
||||
|
||||
|
||||
cameraPlayer = object : HumanoidNPC(cameraAI, born = 0, usePhysics = false, forceAssignRefID = Terrarum.PLAYER_REF_ID) {
|
||||
cameraPlayer = object : HumanoidNPC(cameraAI, born = 0, usePhysics = false) {
|
||||
init {
|
||||
setHitboxDimension(2, 2, 0, 0)
|
||||
hitbox.setPosition(
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.badlogic.gdx.graphics.Camera
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion
|
||||
import net.torvald.terrarum.itemproperties.GameItem
|
||||
import net.torvald.terrarum.gameitem.GameItem
|
||||
import net.torvald.terrarum.itemproperties.ItemCodex
|
||||
import net.torvald.terrarum.modulebasegame.Ingame
|
||||
import net.torvald.terrarum.modulebasegame.ui.UIInventoryFull
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.badlogic.gdx.graphics.Camera
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion
|
||||
import net.torvald.terrarum.itemproperties.GameItem
|
||||
import net.torvald.terrarum.gameitem.GameItem
|
||||
import net.torvald.terrarum.itemproperties.ItemCodex
|
||||
import net.torvald.terrarum.modulebasegame.Ingame
|
||||
import net.torvald.terrarum.modulebasegame.ui.UIInventoryFull
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package net.torvald.terrarum.itemproperties
|
||||
package net.torvald.terrarum.gameitem
|
||||
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion
|
||||
import net.torvald.random.HQRNG
|
||||
import net.torvald.terrarum.ItemValue
|
||||
import net.torvald.terrarum.itemproperties.ItemCodex
|
||||
import net.torvald.terrarum.itemproperties.ItemCodex.ITEM_DYNAMIC
|
||||
import net.torvald.terrarum.itemproperties.Material
|
||||
import net.torvald.terrarum.langpack.Lang
|
||||
import net.torvald.terrarum.modulebasegame.gameactors.ActorInventory
|
||||
import net.torvald.terrarum.modulebasegame.gameactors.Pocketed
|
||||
@@ -12,15 +14,18 @@ import net.torvald.terrarum.modulebasegame.gameactors.Pocketed
|
||||
typealias ItemID = Int
|
||||
|
||||
/**
|
||||
* Instances of the GameItem (e.g. net.torvald.terrarum.modulebasegame.gameitems.PickaxeCopper) are preferably referenced
|
||||
* from the ```<module>/items/itemid.csv``` file only, and not from the actual game code.
|
||||
*
|
||||
* Created by minjaesong on 2016-01-16.
|
||||
*/
|
||||
abstract class GameItem : Comparable<GameItem>, Cloneable {
|
||||
abstract class GameItem(val originalID: ItemID) : Comparable<GameItem>, Cloneable {
|
||||
|
||||
abstract var dynamicID: ItemID
|
||||
open var dynamicID: ItemID = originalID
|
||||
/**
|
||||
* if the ID is a Actor range, it's an actor contained in a pocket.
|
||||
*/
|
||||
abstract val originalID: ItemID // WUT?! using init does not work!!
|
||||
//abstract val originalID: ItemID // WUT?! using init does not work!!
|
||||
|
||||
|
||||
/**
|
||||
@@ -268,6 +273,7 @@ abstract class GameItem : Comparable<GameItem>, Cloneable {
|
||||
@JvmStatic val BLOCK = "block"
|
||||
@JvmStatic val WALL = "wall"
|
||||
@JvmStatic val WIRE = "wire"
|
||||
@JvmStatic val FIXTURE = "fixture"
|
||||
@JvmStatic val MISC = "misc"
|
||||
}
|
||||
|
||||
@@ -281,7 +287,7 @@ abstract class GameItem : Comparable<GameItem>, Cloneable {
|
||||
|
||||
|
||||
fun generateUniqueDynamicID(inventory: ActorInventory): GameItem {
|
||||
dynamicID = GameItem.generateUniqueDynamicID(inventory)
|
||||
dynamicID = Companion.generateUniqueDynamicID(inventory)
|
||||
ItemCodex.registerNewDynamicItem(dynamicID, this)
|
||||
return this
|
||||
}
|
||||
@@ -5,6 +5,8 @@ import net.torvald.terrarum.AppLoader
|
||||
import net.torvald.terrarum.AppLoader.printdbg
|
||||
import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.blockproperties.Fluid
|
||||
import net.torvald.terrarum.gameitem.GameItem
|
||||
import net.torvald.terrarum.gameitem.ItemID
|
||||
import net.torvald.terrarum.gameworld.GameWorld
|
||||
import net.torvald.terrarum.modulebasegame.Ingame
|
||||
import net.torvald.terrarum.modulebasegame.gameactors.CanBeAnItem
|
||||
@@ -174,9 +176,7 @@ object ItemCodex {
|
||||
|
||||
|
||||
// test water bucket
|
||||
itemCodex[9000] = object : GameItem() {
|
||||
override var dynamicID: ItemID = 9000
|
||||
override val originalID: ItemID = 9000
|
||||
itemCodex[9000] = object : GameItem(9000) {
|
||||
|
||||
override val isUnique: Boolean = true
|
||||
override val originalName: String = "Infinite Water Bucket"
|
||||
@@ -203,9 +203,7 @@ object ItemCodex {
|
||||
|
||||
|
||||
// test lava bucket
|
||||
itemCodex[9001] = object : GameItem() {
|
||||
override var dynamicID: ItemID = 9001
|
||||
override val originalID: ItemID = 9001
|
||||
itemCodex[9001] = object : GameItem(9001) {
|
||||
|
||||
override val isUnique: Boolean = true
|
||||
override val originalName: String = "Infinite Lava Bucket"
|
||||
|
||||
@@ -10,7 +10,7 @@ import net.torvald.terrarum.blockproperties.Block
|
||||
import net.torvald.terrarum.blockproperties.BlockCodex
|
||||
import net.torvald.terrarum.blockproperties.BlockPropUtil
|
||||
import net.torvald.terrarum.gameactors.*
|
||||
import net.torvald.terrarum.itemproperties.ItemID
|
||||
import net.torvald.terrarum.gameitem.ItemID
|
||||
import net.torvald.terrarum.modulebasegame.gameactors.ActorHumanoid
|
||||
import net.torvald.terrarum.modulebasegame.gameworld.GameWorldExtension
|
||||
import net.torvald.terrarum.modulebasegame.gameworld.WorldTime
|
||||
|
||||
@@ -6,11 +6,11 @@ import net.torvald.terrarum.AppLoader.printdbg
|
||||
import net.torvald.terrarum.ModMgr
|
||||
import net.torvald.terrarum.ModuleEntryPoint
|
||||
import net.torvald.terrarum.blockproperties.BlockCodex
|
||||
import net.torvald.terrarum.itemproperties.GameItem
|
||||
import net.torvald.terrarum.gameitem.GameItem
|
||||
import net.torvald.terrarum.itemproperties.ItemCodex
|
||||
import net.torvald.terrarum.itemproperties.MaterialCodex
|
||||
import net.torvald.terrarum.modulebasegame.gameitems.BlockBase
|
||||
import net.torvald.terrarum.modulebasegame.imagefont.WatchFont
|
||||
import net.torvald.terrarum.modulebasegame.items.BlockBase
|
||||
import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||
|
||||
/**
|
||||
@@ -56,9 +56,7 @@ class EntryPoint : ModuleEntryPoint() {
|
||||
val blockProp = BlockCodex.getOrNull(i % ItemCodex.ITEM_WALLS.first)
|
||||
|
||||
if (blockProp != null) {
|
||||
ItemCodex.itemCodex[i] = object : GameItem() {
|
||||
override val originalID = i
|
||||
override var dynamicID = i
|
||||
ItemCodex.itemCodex[i] = object : GameItem(i) {
|
||||
override val isUnique: Boolean = false
|
||||
override var baseMass: Double = blockProp.density / 1000.0
|
||||
override var baseToolSize: Double? = null
|
||||
|
||||
@@ -15,7 +15,7 @@ import net.torvald.terrarum.gameactors.Actor
|
||||
import net.torvald.terrarum.gameactors.ActorWithBody
|
||||
import net.torvald.terrarum.gamecontroller.IngameController
|
||||
import net.torvald.terrarum.gamecontroller.KeyToggler
|
||||
import net.torvald.terrarum.itemproperties.GameItem
|
||||
import net.torvald.terrarum.gameitem.GameItem
|
||||
import net.torvald.terrarum.itemproperties.ItemCodex
|
||||
import net.torvald.terrarum.modulebasegame.console.AVTracker
|
||||
import net.torvald.terrarum.modulebasegame.console.ActorsList
|
||||
|
||||
@@ -7,8 +7,8 @@ import net.torvald.spriteanimation.HasAssembledSprite
|
||||
import net.torvald.terrarum.*
|
||||
import net.torvald.terrarum.gameactors.*
|
||||
import net.torvald.terrarum.gameactors.faction.Faction
|
||||
import net.torvald.terrarum.gameitem.GameItem
|
||||
import net.torvald.terrarum.gameworld.GameWorld
|
||||
import net.torvald.terrarum.itemproperties.GameItem
|
||||
import net.torvald.terrarum.itemproperties.ItemCodex
|
||||
import net.torvald.terrarum.itemproperties.Material
|
||||
import net.torvald.terrarum.modulebasegame.Ingame
|
||||
@@ -154,9 +154,7 @@ open class ActorHumanoid(
|
||||
get() = if (Terrarum.ingame == null) false else this == Terrarum.ingame!!.actorNowPlaying
|
||||
|
||||
|
||||
@Transient private val nullItem = object : GameItem() {
|
||||
override var dynamicID: Int = 0
|
||||
override val originalID = dynamicID
|
||||
@Transient private val nullItem = object : GameItem(0) {
|
||||
override val isUnique: Boolean = false
|
||||
override var baseMass: Double = 0.0
|
||||
override var baseToolSize: Double? = null
|
||||
|
||||
@@ -5,11 +5,11 @@ import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.blockproperties.BlockCodex
|
||||
import net.torvald.terrarum.gameactors.AVKey
|
||||
import net.torvald.terrarum.gameactors.Actor
|
||||
import net.torvald.terrarum.itemproperties.GameItem
|
||||
import net.torvald.terrarum.gameitem.GameItem
|
||||
import net.torvald.terrarum.itemproperties.ItemCodex
|
||||
import net.torvald.terrarum.itemproperties.ItemCodex.ITEM_DYNAMIC
|
||||
import net.torvald.terrarum.itemproperties.ItemCodex.ITEM_WALLS
|
||||
import net.torvald.terrarum.itemproperties.ItemID
|
||||
import net.torvald.terrarum.gameitem.ItemID
|
||||
import net.torvald.terrarum.lock
|
||||
import net.torvald.terrarum.modulebasegame.Ingame
|
||||
import net.torvald.terrarum.modulebasegame.ui.UIQuickslotBar
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package net.torvald.terrarum.modulebasegame.gameactors
|
||||
|
||||
import net.torvald.terrarum.itemproperties.GameItem
|
||||
import net.torvald.terrarum.gameitem.GameItem
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2016-01-31.
|
||||
|
||||
@@ -3,7 +3,7 @@ package net.torvald.terrarum.modulebasegame.gameactors
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import net.torvald.terrarum.blockproperties.BlockCodex
|
||||
import net.torvald.terrarum.gameactors.ActorWBMovable
|
||||
import net.torvald.terrarum.itemproperties.GameItem
|
||||
import net.torvald.terrarum.gameitem.GameItem
|
||||
import net.torvald.terrarum.itemproperties.ItemCodex
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,10 +27,11 @@ open class FixtureBase(val blockBox: BlockBox, val blockBoxProps: BlockBoxProps
|
||||
/**
|
||||
* Adds this instance of the fixture to the world
|
||||
*
|
||||
* @param posX top-left position of the fixture, tile-wise
|
||||
* @param posY top-left position of the fixture, tile-wise
|
||||
* @param posX tile-wise top-left position of the fixture
|
||||
* @param posY tile-wise top-left position of the fixture
|
||||
* @return true if successfully spawned, false if was not (e.g. occupied space)
|
||||
*/
|
||||
open fun spawn(posX: Int, posY: Int) {
|
||||
open fun spawn(posX: Int, posY: Int): Boolean {
|
||||
// place filler blocks
|
||||
// place the filler blocks where:
|
||||
// origin posX: centre-left if mouseX is on the right-half of the game window,
|
||||
@@ -52,6 +53,9 @@ open class FixtureBase(val blockBox: BlockBox, val blockBoxProps: BlockBoxProps
|
||||
this.isVisible = true
|
||||
this.hitbox.setFromWidthHeight(posX * TSIZE, posY * TSIZE, blockBox.width * TSIZE, blockBox.height * TSIZE)
|
||||
|
||||
|
||||
|
||||
return true // TODO for the tests' sake, just get fucking spawned
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,7 @@ import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.gameactors.AIControlled
|
||||
import net.torvald.terrarum.gameactors.AVKey
|
||||
import net.torvald.terrarum.gameactors.ai.ActorAI
|
||||
import net.torvald.terrarum.itemproperties.GameItem
|
||||
import net.torvald.terrarum.gameitem.GameItem
|
||||
import net.torvald.terrarum.itemproperties.Material
|
||||
import net.torvald.terrarum.modulebasegame.gameworld.time_t
|
||||
|
||||
@@ -16,8 +16,8 @@ import net.torvald.terrarum.modulebasegame.gameworld.time_t
|
||||
open class HumanoidNPC(
|
||||
override val ai: ActorAI, // it's there for written-in-Kotlin, "hard-wired" AIs
|
||||
born: time_t,
|
||||
usePhysics: Boolean = true,
|
||||
forceAssignRefID: Int? = null
|
||||
usePhysics: Boolean = true
|
||||
//forceAssignRefID: Int? = null
|
||||
) : ActorHumanoid(born, usePhysics = usePhysics), AIControlled, CanBeAnItem {
|
||||
|
||||
companion object {
|
||||
@@ -29,9 +29,7 @@ open class HumanoidNPC(
|
||||
}
|
||||
|
||||
// we're having GameItem data so that this class could be somewhat universal
|
||||
override var itemData: GameItem = object : GameItem() {
|
||||
override var dynamicID = referenceID ?: forceAssignRefID!!
|
||||
override val originalID = dynamicID
|
||||
override var itemData: GameItem = object : GameItem(referenceID) {//GameItem(referenceID ?: forceAssignRefID!!) {
|
||||
override val isUnique = true
|
||||
override var baseMass: Double
|
||||
get() = actorValue.getAsDouble(AVKey.BASEMASS)!!
|
||||
|
||||
@@ -11,7 +11,11 @@ import net.torvald.terrarum.modulebasegame.gameworld.time_t
|
||||
* Created by minjaesong on 2015-12-31.
|
||||
*/
|
||||
|
||||
class IngamePlayer(override var animDescPath: String, born: time_t) : ActorHumanoid(born), HasAssembledSprite {
|
||||
class IngamePlayer(
|
||||
override var animDescPath: String,
|
||||
override var animDescPathGlow: String? = null,
|
||||
born: time_t
|
||||
) : ActorHumanoid(born), HasAssembledSprite {
|
||||
|
||||
/**
|
||||
* Creates new Player instance with empty elements (sprites, actorvalue, etc.).
|
||||
|
||||
@@ -13,7 +13,7 @@ object PlayerBuilder {
|
||||
operator fun invoke(): Actor {
|
||||
val world = (Terrarum.ingame!! as Ingame).gameworld
|
||||
|
||||
val p: Actor = IngamePlayer("lol", world.time.TIME_T)
|
||||
val p: Actor = IngamePlayer("lol", "lol_glow", world.time.TIME_T)
|
||||
InjectCreatureRaw(p.actorValue, "basegame", "CreatureHuman.json")
|
||||
|
||||
// attach sprite
|
||||
|
||||
@@ -14,7 +14,7 @@ import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||
object PlayerBuilderSigrid {
|
||||
|
||||
operator fun invoke(): IngamePlayer {
|
||||
val p = IngamePlayer("lol", - 9223372036854775807L) // XD
|
||||
val p = IngamePlayer("lol", "lol_glow", - 9223372036854775807L) // XD
|
||||
|
||||
p.referenceID = 0x51621D // the only constant of this procedural universe
|
||||
|
||||
@@ -82,10 +82,13 @@ object PlayerBuilderSigrid {
|
||||
}
|
||||
}
|
||||
|
||||
// item ids are defined in <module>/items/itemid.csv
|
||||
|
||||
inventory.add(8448) // copper pick
|
||||
inventory.add(8449) // iron pick
|
||||
inventory.add(8450) // steel pick
|
||||
inventory.add(8466, 9995) // wire piece
|
||||
inventory.add(8467, 9995) // test tiki torch
|
||||
inventory.add(9000) // TEST water bucket
|
||||
inventory.add(9001) // TEST lava bucket
|
||||
}
|
||||
|
||||
@@ -4,14 +4,17 @@ import net.torvald.spriteanimation.SpriteAnimation
|
||||
import net.torvald.terrarum.ModMgr
|
||||
import net.torvald.terrarum.gameactors.AVKey
|
||||
import net.torvald.terrarum.worlddrawer.CreateTileAtlas
|
||||
import net.torvald.terrarum.worlddrawer.FeaturesDrawer
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2017-02-10.
|
||||
*/
|
||||
object PlayerBuilderTestSubject1 {
|
||||
operator fun invoke(): IngamePlayer {
|
||||
val p: IngamePlayer = IngamePlayer(ModMgr.getPath("basegame", "sprites/test_sprite.properties"), -589141658L) // random value thrown
|
||||
val p: IngamePlayer = IngamePlayer(
|
||||
ModMgr.getPath("basegame", "sprites/furry_sprite.properties"),
|
||||
ModMgr.getPath("basegame", "sprites/furry_sprite_glow.properties"),
|
||||
-589141658L // random value thrown
|
||||
)
|
||||
InjectCreatureRaw(p.actorValue, "basegame", "CreatureHuman.json")
|
||||
|
||||
|
||||
@@ -26,7 +29,8 @@ object PlayerBuilderTestSubject1 {
|
||||
p.sprite!!.setRowsAndFrames(2, 4)*/
|
||||
|
||||
p.sprite = SpriteAnimation(p)
|
||||
p.reassembleSprite(p.sprite!!)
|
||||
p.spriteGlow = SpriteAnimation(p)
|
||||
p.reassembleSprite(p.sprite!!, p.spriteGlow)
|
||||
p.setHitboxDimension(15, p.actorValue.getAsInt(AVKey.BASEHEIGHT) ?: ActorHumanoid.BASE_HEIGHT, 21, 0)
|
||||
|
||||
p.setPosition(3.0 * CreateTileAtlas.TILE_SIZE, 3.0 * CreateTileAtlas.TILE_SIZE)
|
||||
@@ -34,10 +38,10 @@ object PlayerBuilderTestSubject1 {
|
||||
|
||||
PlayerBuilderSigrid.fillTestInventory(p.inventory)
|
||||
|
||||
p.actorValue[AVKey.LUMR] = 0.84
|
||||
p.actorValue[AVKey.LUMG] = 0.93
|
||||
p.actorValue[AVKey.LUMB] = 1.37
|
||||
p.actorValue[AVKey.LUMA] = 1.93
|
||||
//p.actorValue[AVKey.LUMR] = 0.84
|
||||
//p.actorValue[AVKey.LUMG] = 0.93
|
||||
//p.actorValue[AVKey.LUMB] = 1.37
|
||||
//p.actorValue[AVKey.LUMA] = 1.93
|
||||
|
||||
return p
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package net.torvald.terrarum.modulebasegame.gameactors
|
||||
|
||||
import net.torvald.terrarum.AppLoader
|
||||
import net.torvald.terrarum.itemproperties.GameItem
|
||||
import net.torvald.terrarum.gameitem.GameItem
|
||||
import net.torvald.terrarum.itemproperties.ItemCodex
|
||||
import net.torvald.terrarum.itemproperties.ItemID
|
||||
import net.torvald.terrarum.gameitem.ItemID
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2016-01-15.
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package net.torvald.terrarum.modulebasegame.items
|
||||
package net.torvald.terrarum.modulebasegame.gameitems
|
||||
|
||||
import net.torvald.terrarum.Point2d
|
||||
import net.torvald.terrarum.Point2i
|
||||
import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.gameactors.ActorWBMovable
|
||||
import net.torvald.terrarum.gameworld.GameWorld
|
||||
import net.torvald.terrarum.itemproperties.GameItem
|
||||
import net.torvald.terrarum.gameitem.GameItem
|
||||
import net.torvald.terrarum.itemproperties.ItemCodex
|
||||
import net.torvald.terrarum.modulebasegame.Ingame
|
||||
import net.torvald.terrarum.modulebasegame.IngameRenderer
|
||||
@@ -1,4 +1,4 @@
|
||||
package net.torvald.terrarum.modulebasegame.items
|
||||
package net.torvald.terrarum.modulebasegame.gameitems
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion
|
||||
import net.torvald.terrarum.AppLoader
|
||||
@@ -7,13 +7,13 @@ import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.blockproperties.Block
|
||||
import net.torvald.terrarum.gameactors.AVKey
|
||||
import net.torvald.terrarum.gameactors.ActorWBMovable
|
||||
import net.torvald.terrarum.gameitem.GameItem
|
||||
import net.torvald.terrarum.gameitem.ItemID
|
||||
import net.torvald.terrarum.itemproperties.Calculate
|
||||
import net.torvald.terrarum.itemproperties.GameItem
|
||||
import net.torvald.terrarum.itemproperties.ItemID
|
||||
import net.torvald.terrarum.itemproperties.MaterialCodex
|
||||
import net.torvald.terrarum.modulebasegame.Ingame
|
||||
import net.torvald.terrarum.modulebasegame.items.PickaxeCore.BASE_MASS_AND_SIZE
|
||||
import net.torvald.terrarum.modulebasegame.items.PickaxeCore.TOOL_DURABILITY_BASE
|
||||
import net.torvald.terrarum.modulebasegame.gameitems.PickaxeCore.BASE_MASS_AND_SIZE
|
||||
import net.torvald.terrarum.modulebasegame.gameitems.PickaxeCore.TOOL_DURABILITY_BASE
|
||||
import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
@@ -74,9 +74,8 @@ object PickaxeCore {
|
||||
/**
|
||||
* Created by minjaesong on 2017-07-17.
|
||||
*/
|
||||
class PickaxeCopper(override val originalID: ItemID) : GameItem() {
|
||||
class PickaxeCopper(originalID: ItemID) : GameItem(originalID) {
|
||||
|
||||
override var dynamicID: ItemID = originalID
|
||||
override val originalName = "PACKAGED_PICK"
|
||||
override var baseToolSize: Double? = BASE_MASS_AND_SIZE
|
||||
override var stackable = true
|
||||
@@ -102,9 +101,8 @@ class PickaxeCopper(override val originalID: ItemID) : GameItem() {
|
||||
/**
|
||||
* Created by minjaesong on 2019-03-10.
|
||||
*/
|
||||
class PickaxeIron(override val originalID: ItemID) : GameItem() {
|
||||
class PickaxeIron(originalID: ItemID) : GameItem(originalID) {
|
||||
|
||||
override var dynamicID: ItemID = originalID
|
||||
override val originalName = "PACKAGED_PICK"
|
||||
override var baseToolSize: Double? = BASE_MASS_AND_SIZE
|
||||
override var stackable = true
|
||||
@@ -130,9 +128,8 @@ class PickaxeIron(override val originalID: ItemID) : GameItem() {
|
||||
/**
|
||||
* Created by minjaesong on 2019-03-10.
|
||||
*/
|
||||
class PickaxeSteel(override val originalID: ItemID) : GameItem() {
|
||||
class PickaxeSteel(originalID: ItemID) : GameItem(originalID) {
|
||||
|
||||
override var dynamicID: ItemID = originalID
|
||||
override val originalName = "PACKAGED_PICK"
|
||||
override var baseToolSize: Double? = BASE_MASS_AND_SIZE
|
||||
override var stackable = true
|
||||
@@ -0,0 +1,34 @@
|
||||
package net.torvald.terrarum.modulebasegame.gameitems
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion
|
||||
import net.torvald.terrarum.AppLoader
|
||||
import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.gameitem.GameItem
|
||||
import net.torvald.terrarum.gameitem.ItemID
|
||||
import net.torvald.terrarum.itemproperties.Material
|
||||
import net.torvald.terrarum.modulebasegame.gameactors.FixtureTikiTorch
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2019-05-16.
|
||||
*/
|
||||
class TikiTorchTester(originalID: ItemID) : GameItem(originalID) {
|
||||
|
||||
override var dynamicID: ItemID = originalID
|
||||
override val originalName = "Tiki Torch"
|
||||
override var baseMass = 1.0
|
||||
override var stackable = true
|
||||
override var inventoryCategory = Category.FIXTURE
|
||||
override val isUnique = false
|
||||
override val isDynamic = false
|
||||
override val material = Material()
|
||||
override val itemImage: TextureRegion?
|
||||
get() = AppLoader.resourcePool.getAsTextureRegion("itemplaceholder_48")
|
||||
override var baseToolSize: Double? = baseMass
|
||||
|
||||
override fun startPrimaryUse(delta: Float): Boolean {
|
||||
val torch = FixtureTikiTorch()
|
||||
|
||||
return torch.spawn(Terrarum.mouseTileX, Terrarum.mouseTileY - torch.blockBox.height + 1)
|
||||
// return true when placed, false when cannot be placed
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
package net.torvald.terrarum.modulebasegame.items
|
||||
package net.torvald.terrarum.modulebasegame.gameitems
|
||||
|
||||
import net.torvald.random.Fudge3
|
||||
import net.torvald.random.HQRNG
|
||||
import net.torvald.terrarum.itemproperties.GameItem
|
||||
import net.torvald.terrarum.gameitem.GameItem
|
||||
import net.torvald.terrarum.gameitem.ItemID
|
||||
import net.torvald.terrarum.modulebasegame.gameactors.ActorHumanoid
|
||||
import kotlin.math.pow
|
||||
|
||||
@@ -24,6 +25,6 @@ object WeaponMeleeCore {
|
||||
|
||||
}
|
||||
|
||||
abstract class WeaponMeleeBase : GameItem() {
|
||||
abstract class WeaponMeleeBase(originalID: ItemID) : GameItem(originalID) {
|
||||
abstract val velocityMod: Double
|
||||
}
|
||||
@@ -1,17 +1,16 @@
|
||||
package net.torvald.terrarum.modulebasegame.items
|
||||
package net.torvald.terrarum.modulebasegame.gameitems
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion
|
||||
import net.torvald.terrarum.AppLoader
|
||||
import net.torvald.terrarum.blockproperties.Wire
|
||||
import net.torvald.terrarum.itemproperties.GameItem
|
||||
import net.torvald.terrarum.itemproperties.ItemID
|
||||
import net.torvald.terrarum.gameitem.GameItem
|
||||
import net.torvald.terrarum.gameitem.ItemID
|
||||
import net.torvald.terrarum.itemproperties.Material
|
||||
import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2019-03-10.
|
||||
*/
|
||||
class WirePieceSignalWire(override val originalID: ItemID) : GameItem() {
|
||||
class WirePieceSignalWire(originalID: ItemID) : GameItem(originalID) {
|
||||
|
||||
override var dynamicID: ItemID = originalID
|
||||
override val originalName = "ITEM_WIRE"
|
||||
@@ -23,7 +22,7 @@ class WirePieceSignalWire(override val originalID: ItemID) : GameItem() {
|
||||
override val isDynamic = false
|
||||
override val material = Material()
|
||||
override val itemImage: TextureRegion?
|
||||
get() = (AppLoader.resourcePool["basegame.items16"] as TextureRegionPack).get(1,9)
|
||||
get() = AppLoader.resourcePool.getAsTextureRegionPack("basegame.items16").get(1,9)
|
||||
|
||||
init {
|
||||
super.equipPosition = GameItem.EquipPosition.HAND_GRIP
|
||||
@@ -1,6 +1,6 @@
|
||||
package net.torvald.terrarum.modulebasegame.ui
|
||||
|
||||
import net.torvald.terrarum.itemproperties.GameItem
|
||||
import net.torvald.terrarum.gameitem.GameItem
|
||||
import net.torvald.terrarum.itemproperties.ItemCodex
|
||||
import net.torvald.terrarum.modulebasegame.gameactors.ActorHumanoid
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import com.badlogic.gdx.Gdx
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion
|
||||
import net.torvald.terrarum.itemproperties.GameItem
|
||||
import net.torvald.terrarum.gameitem.GameItem
|
||||
import net.torvald.terrarum.itemproperties.ItemCodex
|
||||
import net.torvald.terrarum.toInt
|
||||
import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.badlogic.gdx.graphics.Color
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion
|
||||
import net.torvald.terrarum.GdxColorMap
|
||||
import net.torvald.terrarum.itemproperties.GameItem
|
||||
import net.torvald.terrarum.gameitem.GameItem
|
||||
import net.torvald.terrarum.ui.UIItem
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.badlogic.gdx.graphics.Color
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import net.torvald.terrarum.*
|
||||
import net.torvald.terrarum.gameworld.fmod
|
||||
import net.torvald.terrarum.itemproperties.GameItem
|
||||
import net.torvald.terrarum.gameitem.GameItem
|
||||
import net.torvald.terrarum.itemproperties.ItemCodex
|
||||
import net.torvald.terrarum.modulebasegame.Ingame
|
||||
import net.torvald.terrarum.modulebasegame.gameactors.ActorInventory
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.badlogic.gdx.graphics.Color
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import net.torvald.terrarum.*
|
||||
import net.torvald.terrarum.gameactors.ActorWBMovable
|
||||
import net.torvald.terrarum.itemproperties.GameItem
|
||||
import net.torvald.terrarum.gameitem.GameItem
|
||||
import net.torvald.terrarum.itemproperties.ItemCodex
|
||||
import net.torvald.terrarum.modulebasegame.gameactors.ActorInventory
|
||||
import net.torvald.terrarum.modulebasegame.ui.ItemSlotImageFactory.CELLCOLOUR_BLACK
|
||||
|
||||
@@ -5,7 +5,7 @@ import net.torvald.terrarum.AppLoader
|
||||
import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.gameactors.AVKey
|
||||
import net.torvald.terrarum.gameactors.Actor
|
||||
import net.torvald.terrarum.itemproperties.GameItem
|
||||
import net.torvald.terrarum.gameitem.GameItem
|
||||
import net.torvald.terrarum.itemproperties.ItemCodex
|
||||
import net.torvald.terrarum.modulecomputers.virtualcomputer.tvd.*
|
||||
import net.torvald.terrarum.roundInt
|
||||
|
||||
BIN
work_files/graphics/fonts/tibetan_variable.psd
LFS
Normal file
BIN
work_files/graphics/fonts/tibetan_variable.psd
LFS
Normal file
Binary file not shown.
BIN
work_files/graphics/sprites/fanu_jointed.psd
LFS
Normal file
BIN
work_files/graphics/sprites/fanu_jointed.psd
LFS
Normal file
Binary file not shown.
BIN
work_files/graphics/sprites/fanu_jointed.tga
LFS
Normal file
BIN
work_files/graphics/sprites/fanu_jointed.tga
LFS
Normal file
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user