Package mindustry.world.blocks.power
Class PowerNode
java.lang.Object
mindustry.ctype.Content
mindustry.ctype.MappableContent
mindustry.ctype.UnlockableContent
mindustry.world.Block
mindustry.world.blocks.power.PowerBlock
mindustry.world.blocks.power.PowerNode
- All Implemented Interfaces:
Comparable<Content>
,Senseable
- Direct Known Subclasses:
LongPowerNode
,PowerSource
-
Nested Class Summary
Nested classes/interfaces inherited from class mindustry.ctype.Content
Content.ModContentInfo
-
Field Summary
Modifier and TypeFieldDescriptionboolean
boolean
protected static final ObjectSet<PowerGraph>
float
float
int
protected static float
The maximum range of all power nodes on the mapprotected static BuildPlan
protected static int
Fields inherited from class mindustry.world.Block
absorbLasers, acceptsItems, acceptsPayload, albedo, allowConfigInventory, allowDiagonal, allowResupply, alwaysReplace, alwaysUpdateInUnits, ambientSound, ambientSoundVolume, armor, attacks, attributes, autoResetEnabled, barMap, baseExplosiveness, breakable, breakEffect, breakPitchChange, breakSound, buildCost, buildCostMultiplier, buildType, buildVisibility, cacheLayer, canOverdrive, category, clearOnDoubleTap, clipSize, commandable, conductivePower, configurable, configurations, connectedPower, consPower, consumeBuilder, consumers, consumesPower, consumesTap, conveyorPlacement, copyConfig, createRubble, crushDamageMultiplier, customShadow, customShadowRegion, deconstructThreshold, destroyBullet, destroyBulletSameTeam, destroyEffect, destroySound, destructible, displayFlow, drawArrow, drawCracks, drawDisabled, drawLiquidLight, drawTeamOverlay, dumpTime, editorIcon, editorVariantRegions, emitLight, enableDrawStatus, envDisabled, envEnabled, envRequired, fillsTile, flags, floating, fogRadius, forceDark, generatedIcons, group, hasColor, hasConsumers, hasItems, hasLiquids, hasPower, hasShadow, health, inEditor, instantDeconstruct, instantTransfer, insulated, invertFlip, isDuct, itemCapacity, itemDrop, itemFilter, lastConfig, lightColor, lightLiquid, lightRadius, liquidCapacity, liquidFilter, liquidPressure, lockRotation, logicConfigurable, loopSound, loopSoundVolume, mapColor, nonOptionalConsumers, noSideBlend, noUpdateDisabled, offset, optionalConsumers, outlineColor, outlinedIcon, outlineIcon, outlineRadius, outputFacing, outputsLiquid, outputsPayload, outputsPower, placeableLiquid, placeableOn, placeablePlayer, placeEffect, placeOverlapRange, placePitchChange, placeSound, playerUnmineable, priority, privileged, quickRotate, rebuildable, region, regionRotated1, regionRotated2, replaceable, requirements, requiresWater, researchCost, researchCostMultiplier, researchCostMultipliers, rotate, rotateDraw, saveConfig, saveData, scaledHealth, schematicPriority, selectionColumns, selectionRows, selectScroll, separateItemCapacity, size, sizeOffset, solid, solidifes, squareSprite, subclass, suppressable, swapDiagonalPlacement, sync, targetable, teamPassable, teamRegion, teamRegions, tempBuilds, tempTiles, timerDump, timers, underBullets, unitCapModifier, unloadable, update, updateConsumers, updateInUnits, useColor, variantRegions, variants, variantShadowRegions
Fields inherited from class mindustry.ctype.UnlockableContent
alwaysUnlocked, description, details, fullIcon, generateIcons, hideDetails, iconId, inlineDescription, localizedName, selectionSize, stats, techNode, techNodes, uiIcon, unlocked
Fields inherited from class mindustry.ctype.MappableContent
name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
changePlacementPath
(Seq<Point2> points, int rotation) Mutates the given list of points used during line placement.void
drawLaser
(float x1, float y1, float x2, float y2, int size1, int size2) void
drawPlace
(int x, int y, int rotation, boolean valid) Drawn when you are placing a block.void
drawPlanConfigTop
(BuildPlan plan, Eachable<BuildPlan> list) static void
getNodeLinks
(Tile tile, Block block, Team team, Cons<mindustry.gen.Building> others) Iterates through linked nodes of a block at a tile.protected void
getPotentialLinks
(Tile tile, Team team, Cons<mindustry.gen.Building> others) void
init()
Called after all blocks are created.static boolean
insulated
(int x, int y, int x2, int y2) static boolean
insulated
(mindustry.gen.Building tile, mindustry.gen.Building other) static boolean
boolean
linkValid
(mindustry.gen.Building tile, mindustry.gen.Building link) boolean
linkValid
(mindustry.gen.Building tile, mindustry.gen.Building link, boolean checkMaxNodes) protected boolean
protected boolean
protected boolean
overlaps
(mindustry.gen.Building src, mindustry.gen.Building other, float range) boolean
protected boolean
void
setBars()
void
setStats()
Initializes stats on demand.protected void
setupColor
(float satisfaction) Methods inherited from class mindustry.world.Block
addBar, addLiquidBar, addLiquidBar, asFloor, beforePlaceBegan, bounds, canBeBuilt, canBreak, canPlaceOn, canReplace, changePlacementPath, checkForceDark, config, configClear, configSenseable, consume, consumeCoolant, consumeCoolant, consumeItem, consumeItem, consumeItems, consumeLiquid, consumeLiquids, consumePower, consumePowerBuffered, consumePowerCond, consumePowerDynamic, consumesItem, consumesLiquid, createIcons, drawBase, drawDefaultPlanRegion, drawEnvironmentLight, drawOverlay, drawPlaceText, drawPlan, drawPlan, drawPlanConfig, drawPlanConfigCenter, drawPlanConfigCenter, drawPlanRegion, drawPotentialLinks, drawShadow, editorIcon, editorVariantRegions, environmentBuildable, findConsumer, flipRotation, getContentType, getDependencies, getDisplayIcon, getDisplayName, getEdges, getGeneratedIcons, getInsideEdges, getPlanRegion, getRegionsToOutline, getReplacement, handlePlacementLine, hasBuilding, hasConsumer, icons, initBuilding, isAccessible, isAir, isFloor, isHidden, isMultiblock, isOverlay, isPlaceable, isStatic, isVisible, isVisibleOn, iterateTaken, listBars, load, logicVisible, makeIconRegions, minimapColor, nearbySide, newBuilding, nextConfig, onNewPlan, outputsItems, percentSolid, placeBegan, placeBegan, planRotation, pointConfig, removeBar, removeConsumer, requirements, requirements, requirements, researchRequirements, resetGeneratedIcons, rotatedOutput, sense, sense, senseObject, setupRequirements, setupRequirements, sumAttribute, supportsEnv, synthetic, updateClipRadius, variantRegions
Methods inherited from class mindustry.ctype.UnlockableContent
checkStats, clearUnlock, displayDescription, displayExtra, emoji, getLogicId, hasEmoji, loadIcon, locked, makeOutline, makeOutline, makeOutline, onUnlock, quietUnlock, showUnlock, unlock, unlocked, unlockedNow, unlockedNowHost
Methods inherited from class mindustry.ctype.MappableContent
toString
Methods inherited from class mindustry.ctype.Content
compareTo, hasErrored, isModded, isVanilla
-
Field Details
-
otherReq
-
returnInt
protected static int returnInt -
graphs
-
maxRange
protected static float maxRangeThe maximum range of all power nodes on the map -
laser
-
laserEnd
-
laserRange
public float laserRange -
maxNodes
public int maxNodes -
autolink
public boolean autolink -
drawRange
public boolean drawRange -
laserScale
public float laserScale -
laserColor1
-
laserColor2
-
-
Constructor Details
-
PowerNode
-
-
Method Details
-
setBars
public void setBars() -
makePowerBalance
-
makeBatteryBalance
-
setStats
public void setStats()Description copied from class:UnlockableContent
Initializes stats on demand. Should only be called once. Only called before something is displayed. -
init
public void init()Description copied from class:Block
Called after all blocks are created. -
drawPlace
public void drawPlace(int x, int y, int rotation, boolean valid) Description copied from class:Block
Drawn when you are placing a block. -
changePlacementPath
Description copied from class:Block
Mutates the given list of points used during line placement.- Overrides:
changePlacementPath
in classBlock
-
setupColor
protected void setupColor(float satisfaction) -
drawLaser
public void drawLaser(float x1, float y1, float x2, float y2, int size1, int size2) -
overlaps
-
overlaps
-
overlaps
protected boolean overlaps(mindustry.gen.Building src, mindustry.gen.Building other, float range) -
overlaps
-
overlaps
-
getPotentialLinks
-
getNodeLinks
public static void getNodeLinks(Tile tile, Block block, Team team, Cons<mindustry.gen.Building> others) Iterates through linked nodes of a block at a tile. All returned buildings are power nodes. -
drawPlanConfigTop
- Overrides:
drawPlanConfigTop
in classBlock
-
linkValid
public boolean linkValid(mindustry.gen.Building tile, mindustry.gen.Building link) -
linkValid
public boolean linkValid(mindustry.gen.Building tile, mindustry.gen.Building link, boolean checkMaxNodes) -
insulated
-
insulated
public static boolean insulated(mindustry.gen.Building tile, mindustry.gen.Building other) -
insulated
public static boolean insulated(int x, int y, int x2, int y2)
-