Class IsoThumpable

All Implemented Interfaces:
Serializable, IHasHealth, ILockableDoor, ILuaIsoObject, IsoRenderable, BarricadeAble, Thumpable

public class IsoThumpable extends IsoObject implements BarricadeAble, Thumpable, IHasHealth, ILockableDoor
See Also:
  • Field Details

    • locked

      public boolean locked
    • health

      public int health
    • pushedMaxStrength

      public int pushedMaxStrength
    • pushedStrength

      public int pushedStrength
    • north

      public boolean north
    • open

      public boolean open
    • openSprite

      public IsoSprite openSprite
    • canPassThrough

      public boolean canPassThrough
    • keyId

      public int keyId
    • lockedByPadlock

      public boolean lockedByPadlock
    • lockedByCode

      public int lockedByCode
    • oldNumPlanks

      public int oldNumPlanks
    • thumpSound

      public String thumpSound
    • tempo

      public static final Vector2 tempo
  • Constructor Details

    • IsoThumpable

      public IsoThumpable(IsoCell cell)
    • IsoThumpable

      public IsoThumpable(IsoCell cell, IsoGridSquare gridSquare, String closedSprite, String openSprite, boolean north, se.krka.kahlua.vm.KahluaTable table)
      Create an object than can be interacted by you, survivor or zombie (destroy, barricade, etc.) This one have a closed/openSprite so it can be a door for example
    • IsoThumpable

      public IsoThumpable(IsoCell cell, IsoGridSquare gridSquare, String sprite, boolean north, se.krka.kahlua.vm.KahluaTable table)
      Create an object than can be interacted by you, survivor or zombie (destroy, barricade, etc.) This one can be a wall, a fence, etc.
    • IsoThumpable

      public IsoThumpable(IsoCell cell, IsoGridSquare gridSquare, String sprite, boolean north)
  • Method Details

    • getModData

      public se.krka.kahlua.vm.KahluaTable getModData()
      Overrides:
      getModData in class IsoObject
    • setModData

      public void setModData(se.krka.kahlua.vm.KahluaTable modData)
      Overrides:
      setModData in class IsoObject
    • hasModData

      public boolean hasModData()
      Overrides:
      hasModData in class IsoObject
    • isCanPassThrough

      public boolean isCanPassThrough()
      Can you pass through the item, if false we gonna test the collide default to false (so it collide)
    • setCanPassThrough

      public void setCanPassThrough(boolean pCanPassThrough)
    • isBlockAllTheSquare

      public boolean isBlockAllTheSquare()
    • setBlockAllTheSquare

      public void setBlockAllTheSquare(boolean blockAllTheSquare)
    • setIsDismantable

      public void setIsDismantable(boolean dismantable)
    • isDismantable

      public boolean isDismantable()
    • getCrossSpeed

      public float getCrossSpeed()
    • setCrossSpeed

      public void setCrossSpeed(float pCrossSpeed)
    • setIsFloor

      public void setIsFloor(boolean pIsFloor)
    • isCorner

      public boolean isCorner()
    • isFloor

      public boolean isFloor()
      Overrides:
      isFloor in class IsoObject
    • setIsContainer

      public void setIsContainer(boolean pIsContainer)
    • setIsStairs

      public void setIsStairs(boolean pStairs)
    • isStairs

      public boolean isStairs()
    • isWindow

      public boolean isWindow()
      Overrides:
      isWindow in class IsoObject
    • isWindowN

      public boolean isWindowN()
    • isWindowW

      public boolean isWindowW()
    • getObjectName

      public String getObjectName()
      Overrides:
      getObjectName in class IsoObject
    • setCorner

      public void setCorner(boolean pCorner)
    • setCanBarricade

      public void setCanBarricade(boolean pCanBarricade)
      Can you barricade/unbarricade the item default true
    • getCanBarricade

      public boolean getCanBarricade()
      Can you barricade/unbarricade the item
    • setHealth

      public void setHealth(int health)
      Specified by:
      setHealth in interface IHasHealth
    • getHealth

      public int getHealth()
      Specified by:
      getHealth in interface IHasHealth
    • setMaxHealth

      public void setMaxHealth(int maxHealth)
    • getMaxHealth

      public int getMaxHealth()
      Specified by:
      getMaxHealth in interface IHasHealth
    • setThumpDmg

      public void setThumpDmg(Integer pThumpDmg)
      Numbers of zeds need to hurt the object default 8
    • getThumpDmg

      public int getThumpDmg()
    • setBreakSound

      public void setBreakSound(String pBreakSound)
      The sound that be played if this object is broken default "BreakDoor"
    • getBreakSound

      public String getBreakSound()
    • isDoor

      public boolean isDoor()
    • getNorth

      public boolean getNorth()
      Specified by:
      getNorth in interface BarricadeAble
    • getFacingPosition

      public Vector2 getFacingPosition(Vector2 pos)
      Overrides:
      getFacingPosition in class IsoObject
    • isDoorFrame

      public boolean isDoorFrame()
    • setIsDoor

      public void setIsDoor(boolean pIsDoor)
    • setIsDoorFrame

      public void setIsDoorFrame(boolean pIsDoorFrame)
    • setSprite

      public void setSprite(String sprite)
      Overrides:
      setSprite in class IsoObject
    • setSpriteFromName

      public void setSpriteFromName(String name)
      Overrides:
      setSpriteFromName in class IsoObject
    • setClosedSprite

      public void setClosedSprite(IsoSprite sprite)
    • setOpenSprite

      public void setOpenSprite(IsoSprite sprite)
    • load

      public void load(ByteBuffer input, int WorldVersion, boolean IS_DEBUG_SAVE) throws IOException
      Overrides:
      load in class IsoObject
      Throws:
      IOException
    • save

      public void save(ByteBuffer output, boolean IS_DEBUG_SAVE) throws IOException
      Overrides:
      save in class IsoObject
      Throws:
      IOException
    • isDestroyed

      public boolean isDestroyed()
      Specified by:
      isDestroyed in interface Thumpable
      Overrides:
      isDestroyed in class IsoObject
    • IsOpen

      public boolean IsOpen()
      Specified by:
      IsOpen in interface ILockableDoor
    • IsStrengthenedByPushedItems

      public boolean IsStrengthenedByPushedItems()
    • onMouseLeftClick

      public boolean onMouseLeftClick(int x, int y)
      Overrides:
      onMouseLeftClick in class IsoObject
    • TestPathfindCollide

      public boolean TestPathfindCollide(IsoMovingObject obj, IsoGridSquare from, IsoGridSquare to)
      Overrides:
      TestPathfindCollide in class IsoObject
    • TestCollide

      public boolean TestCollide(IsoMovingObject obj, IsoGridSquare from, IsoGridSquare to)
      Overrides:
      TestCollide in class IsoObject
    • TestVision

      public IsoObject.VisionResult TestVision(IsoGridSquare from, IsoGridSquare to)
      Overrides:
      TestVision in class IsoObject
    • Thump

      public void Thump(IsoMovingObject thumper)
      Specified by:
      Thump in interface Thumpable
      Overrides:
      Thump in class IsoObject
    • getThumpableFor

      public Thumpable getThumpableFor(IsoGameCharacter chr)
      Specified by:
      getThumpableFor in interface Thumpable
      Overrides:
      getThumpableFor in class IsoObject
    • getThumpCondition

      public float getThumpCondition()
      Specified by:
      getThumpCondition in interface Thumpable
      Overrides:
      getThumpCondition in class IsoObject
    • WeaponHit

      public void WeaponHit(IsoGameCharacter owner, HandWeapon weapon)
      Specified by:
      WeaponHit in interface Thumpable
      Overrides:
      WeaponHit in class IsoObject
    • getOtherSideOfDoor

      public IsoGridSquare getOtherSideOfDoor(IsoGameCharacter chr)
    • changeSprite

      public void changeSprite(IsoThumpable thumpable)
    • couldBeOpen

      public boolean couldBeOpen(IsoGameCharacter chr)
    • ToggleDoorActual

      public void ToggleDoorActual(IsoGameCharacter chr)
    • ToggleDoor

      public void ToggleDoor(IsoGameCharacter chr)
    • ToggleDoorSilent

      public void ToggleDoorSilent()
    • isObstructed

      public boolean isObstructed()
    • haveSheetRope

      public boolean haveSheetRope()
      Overrides:
      haveSheetRope in class IsoObject
    • countAddSheetRope

      public int countAddSheetRope()
      Overrides:
      countAddSheetRope in class IsoObject
    • canAddSheetRope

      public boolean canAddSheetRope()
      Overrides:
      canAddSheetRope in class IsoObject
    • addSheetRope

      public boolean addSheetRope(IsoPlayer player, String itemType)
      Overrides:
      addSheetRope in class IsoObject
    • removeSheetRope

      public boolean removeSheetRope(IsoPlayer player)
      Overrides:
      removeSheetRope in class IsoObject
    • createLightSource

      public void createLightSource(int radius, int offsetX, int offsetY, int offsetZ, int life, String lightSourceFuel, InventoryItem baseItem, IsoGameCharacter chr)
    • insertNewFuel

      public InventoryItem insertNewFuel(InventoryItem item, IsoGameCharacter chr)
    • removeCurrentFuel

      public InventoryItem removeCurrentFuel(IsoGameCharacter chr)
    • update

      public void update()
      Overrides:
      update in class IsoObject
    • Damage

      public void Damage(float amount)
      Overrides:
      Damage in class IsoObject
    • destroy

      public void destroy()
    • getBarricadeOnSameSquare

      public IsoBarricade getBarricadeOnSameSquare()
      Specified by:
      getBarricadeOnSameSquare in interface BarricadeAble
    • getBarricadeOnOppositeSquare

      public IsoBarricade getBarricadeOnOppositeSquare()
      Specified by:
      getBarricadeOnOppositeSquare in interface BarricadeAble
    • isBarricaded

      public boolean isBarricaded()
      Specified by:
      isBarricaded in interface BarricadeAble
    • isBarricadeAllowed

      public boolean isBarricadeAllowed()
      Specified by:
      isBarricadeAllowed in interface BarricadeAble
    • getBarricadeForCharacter

      public IsoBarricade getBarricadeForCharacter(IsoGameCharacter chr)
      Specified by:
      getBarricadeForCharacter in interface BarricadeAble
    • getBarricadeOppositeCharacter

      public IsoBarricade getBarricadeOppositeCharacter(IsoGameCharacter chr)
      Specified by:
      getBarricadeOppositeCharacter in interface BarricadeAble
    • setIsDoor

      public void setIsDoor(Boolean pIsDoor)
    • getTable

      public se.krka.kahlua.vm.KahluaTable getTable()
      Overrides:
      getTable in class IsoObject
      Returns:
      the table
    • setTable

      public void setTable(se.krka.kahlua.vm.KahluaTable table)
      Overrides:
      setTable in class IsoObject
      Parameters:
      table - the table to set
    • canBePlastered

      public boolean canBePlastered()
    • setCanBePlastered

      public void setCanBePlastered(boolean canBePlastered)
    • isPaintable

      public boolean isPaintable()
    • setPaintable

      public void setPaintable(boolean paintable)
    • isLocked

      public boolean isLocked()
    • setIsLocked

      public void setIsLocked(boolean lock)
    • isThumpable

      public boolean isThumpable()
    • setIsThumpable

      public void setIsThumpable(boolean thumpable)
    • setIsHoppable

      public void setIsHoppable(boolean isHoppable)
    • getOpenSprite

      public IsoSprite getOpenSprite()
    • isHoppable

      public boolean isHoppable()
      Overrides:
      isHoppable in class IsoObject
    • isTallHoppable

      public boolean isTallHoppable()
      Overrides:
      isTallHoppable in class IsoObject
    • setHoppable

      public void setHoppable(boolean isHoppable)
    • getLightSourceRadius

      public int getLightSourceRadius()
    • setLightSourceRadius

      public void setLightSourceRadius(int lightSourceRadius)
    • getLightSourceXOffset

      public int getLightSourceXOffset()
    • setLightSourceXOffset

      public void setLightSourceXOffset(int lightSourceXOffset)
    • getLightSourceYOffset

      public int getLightSourceYOffset()
    • setLightSourceYOffset

      public void setLightSourceYOffset(int lightSourceYOffset)
    • getLightSourceLife

      public int getLightSourceLife()
    • setLightSourceLife

      public void setLightSourceLife(int lightSourceLife)
    • isLightSourceOn

      public boolean isLightSourceOn()
    • setLightSourceOn

      public void setLightSourceOn(boolean lightSourceOn)
    • getLightSource

      public IsoLightSource getLightSource()
      Overrides:
      getLightSource in class IsoObject
    • setLightSource

      public void setLightSource(IsoLightSource lightSource)
      Overrides:
      setLightSource in class IsoObject
    • toggleLightSource

      public void toggleLightSource(boolean toggle)
    • getLightSourceFuel

      public String getLightSourceFuel()
    • setLightSourceFuel

      public void setLightSourceFuel(String lightSourceFuel)
    • getLifeLeft

      public float getLifeLeft()
    • setLifeLeft

      public void setLifeLeft(float lifeLeft)
    • getLifeDelta

      public float getLifeDelta()
    • setLifeDelta

      public void setLifeDelta(float lifeDelta)
    • haveFuel

      public boolean haveFuel()
    • setHaveFuel

      public void setHaveFuel(boolean haveFuel)
    • syncIsoObjectSend

      public void syncIsoObjectSend(ByteBufferWriter b)
      Overrides:
      syncIsoObjectSend in class IsoObject
    • syncIsoObjectReceive

      public void syncIsoObjectReceive(ByteBuffer bb)
      Overrides:
      syncIsoObjectReceive in class IsoObject
    • addToWorld

      public void addToWorld()
      Overrides:
      addToWorld in class IsoObject
    • removeFromWorld

      public void removeFromWorld()
      Overrides:
      removeFromWorld in class IsoObject
    • saveChange

      public void saveChange(String change, se.krka.kahlua.vm.KahluaTable tbl, ByteBuffer bb)
      Overrides:
      saveChange in class IsoObject
    • loadChange

      public void loadChange(String change, ByteBuffer bb)
      Overrides:
      loadChange in class IsoObject
    • HasCurtains

      public IsoCurtain HasCurtains()
      Specified by:
      HasCurtains in interface ILockableDoor
    • canAddCurtain

      public boolean canAddCurtain()
      Specified by:
      canAddCurtain in interface ILockableDoor
    • getInsideSquare

      public IsoGridSquare getInsideSquare()
    • getOppositeSquare

      public IsoGridSquare getOppositeSquare()
      Specified by:
      getOppositeSquare in interface BarricadeAble
    • isAdjacentToSquare

      public boolean isAdjacentToSquare(IsoGridSquare square2)
    • getAddSheetSquare

      public IsoGridSquare getAddSheetSquare(IsoGameCharacter chr)
    • addSheet

      public void addSheet(IsoGameCharacter chr)
    • getIndoorSquare

      public IsoGridSquare getIndoorSquare()
    • getKeyId

      public int getKeyId()
      Specified by:
      getKeyId in interface ILockableDoor
      Overrides:
      getKeyId in class IsoObject
    • setKeyId

      public void setKeyId(int keyId, boolean doNetwork)
    • setKeyId

      public void setKeyId(int keyId)
      Specified by:
      setKeyId in interface ILockableDoor
      Overrides:
      setKeyId in class IsoObject
    • isLockedByKey

      public boolean isLockedByKey()
      Specified by:
      isLockedByKey in interface ILockableDoor
    • setLockedByKey

      public void setLockedByKey(boolean lockedByKey)
      Specified by:
      setLockedByKey in interface ILockableDoor
    • isLockedByPadlock

      public boolean isLockedByPadlock()
    • syncIsoThumpable

      public void syncIsoThumpable()
    • setLockedByPadlock

      public void setLockedByPadlock(boolean lockedByPadlock)
    • canBeLockByPadlock

      public boolean canBeLockByPadlock()
    • setCanBeLockByPadlock

      public void setCanBeLockByPadlock(boolean canBeLockByPadlock)
    • getLockedByCode

      public int getLockedByCode()
    • setLockedByCode

      public void setLockedByCode(int lockedByCode)
    • isLockedToCharacter

      public boolean isLockedToCharacter(IsoGameCharacter chr)
    • canClimbOver

      public boolean canClimbOver(IsoGameCharacter chr)
      Specified by:
      canClimbOver in interface ILockableDoor
    • canClimbThrough

      public boolean canClimbThrough(IsoGameCharacter chr)
    • getThumpSound

      public String getThumpSound()
    • setThumpSound

      public void setThumpSound(String thumpSound)
    • getRenderEffectMaster

      public IsoObject getRenderEffectMaster()
      Overrides:
      getRenderEffectMaster in class IsoObject
    • getSpriteEdge

      public IsoDirections getSpriteEdge(boolean ignoreOpen)
    • getSoundPrefix

      public String getSoundPrefix()
    • GetBreakFurnitureSound

      public static String GetBreakFurnitureSound(IsoSprite sprite)
    • GetBreakFurnitureSound

      public static String GetBreakFurnitureSound(String spriteName)
    • checkKeyHighlight

      public void checkKeyHighlight(int playerIndex)
    • render

      public void render(float x, float y, float z, ColorInfo col, boolean bDoAttached, boolean bWallLightingPass, Shader shader)
      Specified by:
      render in interface IsoRenderable
      Overrides:
      render in class IsoObject
    • renderWallTile

      public void renderWallTile(IsoDirections dir, float x, float y, float z, ColorInfo col, boolean bDoAttached, boolean bWallLightingPass, Shader shader, Consumer<TextureDraw> texdModifier)
      Overrides:
      renderWallTile in class IsoObject
    • getSpriteModel

      public SpriteModel getSpriteModel()
      Overrides:
      getSpriteModel in class IsoObject
    • animalHit

      public void animalHit(IsoAnimal animal)
    • getClosedSpriteTextureName

      public String getClosedSpriteTextureName()
    • afterRotated

      public void afterRotated()
      Overrides:
      afterRotated in class IsoObject