Package zombie.iso.objects
Class IsoLightSwitch
java.lang.Object
zombie.iso.IsoObject
zombie.iso.objects.IsoLightSwitch
- All Implemented Interfaces:
java.io.Serializable
public class IsoLightSwitch extends IsoObject
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class zombie.iso.IsoObject
IsoObject.VisionResult
-
Field Summary
Fields Modifier and Type Field Description boolean
bStreetLight
protected int
bulbBurnMinutes
protected int
lastMin
protected long
lastMinuteStamp
boolean
lightRoom
java.util.ArrayList
lights
protected int
nextBreakUpdate
int
RoomID
Fields inherited from class zombie.iso.IsoObject
alpha, alphaStep, AttachedAnimSprite, AttachedAnimSpriteActual, bmod, bNeverDoneAlpha, container, Damage, dir, emitter, externalWaterSource, gmod, highlighted, keyId, lastRendered, lastRenderedRendered, MAX_WALL_SPLATS, name, NoPicking, offsetX, offsetY, OutlineOnMouseover, overlaySprite, overlaySpriteColor, rerouteCollide, rerouteMask, rmod, sheetRope, sheetRopeHealth, sprite, spriteName, square, stCol, sx, sy, table, targetAlpha, tintb, tintg, tintr, usesExternalWaterSource, wallBloodSplats
-
Constructor Summary
Constructors Constructor Description IsoLightSwitch(IsoCell cell)
IsoLightSwitch(IsoCell cell, IsoGridSquare sq, IsoSprite gid, int RoomID)
-
Method Summary
Modifier and Type Method Description void
addBattery(IsoGameCharacter chr, InventoryItem battery)
void
addLightBulb(IsoGameCharacter chr, InventoryItem bulb)
void
addLightSourceFromSprite()
void
addToWorld()
boolean
canSwitchLight()
static void
chunkLoaded(IsoChunk chunk)
java.lang.String
getBulbItem()
boolean
getCanBeModified()
void
getCustomSettingsFromItem(InventoryItem item)
float
getDelta()
boolean
getHasBattery()
java.lang.String
getObjectName()
float
getPower()
float
getPrimaryB()
float
getPrimaryG()
float
getPrimaryR()
boolean
getUseBattery()
boolean
hasLightBulb()
boolean
isActivated()
void
load(java.nio.ByteBuffer input, int WorldVersion)
boolean
onMouseLeftClick(int x, int y)
void
receiveSyncCustomizedSettings(java.nio.ByteBuffer bb, UdpConnection connection)
DrainableComboItem
removeBattery(IsoGameCharacter chr)
void
removeFromWorld()
InventoryItem
removeLightBulb(IsoGameCharacter chr)
void
save(java.nio.ByteBuffer output)
boolean
setActive(boolean active)
boolean
setActive(boolean active, boolean setActiveBoolOnly)
boolean
setActive(boolean active, boolean setActiveBoolOnly, boolean ignoreSwitchCheck)
void
setBulbItemRaw(java.lang.String item)
void
setCustomSettingsToItem(InventoryItem item)
void
setDelta(float delta)
void
setHasBatteryRaw(boolean b)
void
setPower(float power)
void
setPrimaryB(float b)
void
setPrimaryG(float g)
void
setPrimaryR(float r)
void
setUseBattery(boolean b)
void
switchLight(boolean Activated)
void
syncCustomizedSettings(UdpConnection source)
void
syncIsoObject(boolean bRemote, byte val, UdpConnection source)
void
syncIsoObject(boolean bRemote, byte val, UdpConnection source, java.nio.ByteBuffer bb)
void
syncIsoObjectSend(ByteBufferWriter b)
boolean
toggle()
void
update()
Methods inherited from class zombie.iso.IsoObject
addChild, addSecondaryContainer, AttachAnim, AttachExistingAnim, AttachExistingAnim, AttackObject, checkHaveElectricity, createChecksum, createContainersFromSpriteProperties, debugPrintout, DirtySlice, DoChecksumCheck, DoChecksumCheck, doFindExternalWaterSource, DoSpecialTooltip, DoTooltip, factoryClassFromFileInput, factoryFromFileInput, factoryFromFileInput, FindExternalWaterSource, getAlpha, getAlphaStep, getAttachedAnimSprite, getCell, getChildSprites, getContainer, getContainerByEitherType, getContainerByIndex, getContainerByType, getContainerCount, getContainerIndex, getCustomColor, getDamage, getDir, getFacingPosition, getFacingPositionAlt, getHighlightColor, getIsSurfaceNormalOffset, getItemContainer, getKeyId, getLastRendered, getLastRenderedRendered, getMaskClickedY, getMD5Checksum, getModData, getName, getNew, getObjectIndex, getOffsetX, getOffsetY, getOverlaySprite, getOverlaySpriteColor, getProperties, getRenderYOffset, getRerouteCollide, getRerouteMask, getRerouteMaskObject, getScriptName, getSpecialObjectIndex, getSprite, getSpriteName, getSquare, getStaticMovingObjectIndex, getSurfaceNormalOffset, getSurfaceOffset, getTable, getTargetAlpha, getTextureName, getTile, getType, getUsesExternalWaterSource, getWaterAmount, getWorldObjectIndex, getX, getY, getZ, hasExternalWaterSource, hasModData, HasTooltip, hasWater, haveSpecialTooltip, isBlink, isCharacter, isMaskClicked, isMaskClicked, isNoPicking, isOutlineOnMouseover, isTableSurface, isTableTopObject, isZombie, loadChange, loadFromRemoteBuffer, loadFromRemoteBuffer, onMouseRightClick, onMouseRightReleased, removeAllContainers, RemoveAttachedAnim, RemoveAttachedAnims, removeFromSquare, render, render, renderlast, renderObjectPicker, replaceItem, reset, reuseGridSquare, saveChange, sendObjectChange, sendObjectChange, sendObjectChange, Serialize, setAlpha, setAlphaStep, setAttachedAnimSprite, setBlink, setChildSprites, setContainer, setCustomColor, setCustomColor, setDamage, setDefaultCondition, setDir, setDir, setHighlightColor, setHighlighted, setKeyId, setLastRendered, setLastRenderedRendered, setName, SetName, setNoPicking, setOffsetX, setOffsetY, setOutlineOnMouseover, setOverlaySprite, setOverlaySprite, setOverlaySprite, setOverlaySpriteColor, setRenderYOffset, setRerouteCollide, setRerouteMask, setSpecialTooltip, setSprite, setSprite, setSpriteFromName, setSquare, setTable, setTargetAlpha, setType, setUsesExternalWaterSource, setWaterAmount, TestCollide, TestPathfindCollide, TestVision, transmitCompleteItemToClients, transmitCompleteItemToServer, transmitCustomColor, transmitModData, transmitUpdatedSpriteToClients, transmitUpdatedSpriteToClients, transmitUpdatedSpriteToServer, useItemOn, useWater, writeToRemoteBuffer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
lights
public java.util.ArrayList lights -
lightRoom
public boolean lightRoom -
RoomID
public int RoomID -
bStreetLight
public boolean bStreetLight -
lastMinuteStamp
protected long lastMinuteStamp -
bulbBurnMinutes
protected int bulbBurnMinutes -
lastMin
protected int lastMin -
nextBreakUpdate
protected int nextBreakUpdate
-
-
Constructor Details
-
IsoLightSwitch
-
IsoLightSwitch
-
-
Method Details
-
getObjectName
public java.lang.String getObjectName()- Overrides:
getObjectName
in classIsoObject
-
addLightSourceFromSprite
public void addLightSourceFromSprite() -
getCanBeModified
public boolean getCanBeModified() -
getPower
public float getPower() -
setPower
public void setPower(float power) -
setDelta
public void setDelta(float delta) -
getDelta
public float getDelta() -
setUseBattery
public void setUseBattery(boolean b) -
getUseBattery
public boolean getUseBattery() -
getHasBattery
public boolean getHasBattery() -
setHasBatteryRaw
public void setHasBatteryRaw(boolean b) -
addBattery
-
removeBattery
-
hasLightBulb
public boolean hasLightBulb() -
getBulbItem
public java.lang.String getBulbItem() -
setBulbItemRaw
public void setBulbItemRaw(java.lang.String item) -
addLightBulb
-
removeLightBulb
-
getPrimaryR
public float getPrimaryR() -
getPrimaryG
public float getPrimaryG() -
getPrimaryB
public float getPrimaryB() -
setPrimaryR
public void setPrimaryR(float r) -
setPrimaryG
public void setPrimaryG(float g) -
setPrimaryB
public void setPrimaryB(float b) -
load
public void load(java.nio.ByteBuffer input, int WorldVersion) throws java.io.IOException -
save
public void save(java.nio.ByteBuffer output) throws java.io.IOException -
onMouseLeftClick
public boolean onMouseLeftClick(int x, int y)- Overrides:
onMouseLeftClick
in classIsoObject
-
canSwitchLight
public boolean canSwitchLight() -
setActive
public boolean setActive(boolean active) -
setActive
public boolean setActive(boolean active, boolean setActiveBoolOnly) -
setActive
public boolean setActive(boolean active, boolean setActiveBoolOnly, boolean ignoreSwitchCheck) -
toggle
public boolean toggle() -
switchLight
public void switchLight(boolean Activated) -
getCustomSettingsFromItem
-
setCustomSettingsToItem
-
syncCustomizedSettings
-
receiveSyncCustomizedSettings
-
syncIsoObjectSend
- Overrides:
syncIsoObjectSend
in classIsoObject
-
syncIsoObject
- Overrides:
syncIsoObject
in classIsoObject
-
syncIsoObject
-
update
public void update() -
isActivated
public boolean isActivated() -
addToWorld
public void addToWorld()- Overrides:
addToWorld
in classIsoObject
-
removeFromWorld
public void removeFromWorld()- Overrides:
removeFromWorld
in classIsoObject
-
chunkLoaded
-