JS

Материал из PetruCHIO - Mindustry server
Перейти к навигации Перейти к поиску

Если вы хотите изменить харакетеристики Блока или Меха и чего угодно то смотрим всё здесь
Пример: js Mechs.tau.weapon.reload = 0.1 //Ну это лучше самому увидеть чем услышать

Пример использования

Описание Команда
Получить данные об игроках js Groups.player.all()
Надпись в мире js player = Groups.player.getByID(id); Call.label("Сообщение",60, player.getX(), player.getY());
Диалоговое окно с кнопкой [ОК] js Call.sendMessage("Сообщение");
Надпись на экране, с привязкой по сторонам js Call.infoPopup("Сообщение",60,500,500,500,500,500);
Спавн блока в мире js block = Blocks.coreShard; player = Groups.player.getByID(id); ConstructBlock.constructFinish(player.tileOn(),block,null,0,player.team(),null);
Проверка на валидность установки блока в точке js player = Groups.player.getByID(id); Build.validPlace(player.team(), player.tileX(), player.tileY(), Blocks.rtgGenerator, 0);
Спавн мобов и выдача им предметов js player = Groups.player.getByID(id); unit = UnitTypes.antumbra.spawn(Team.sharded,player.x(), player.y()); unit.addItem(Items.coal,30);
Смена ника js Groups.player.getByID(id).name = "Ник"
Выдача предметов игроку js player = Groups.player.getByID(id).addItem(Items.coal,30);
Убить последнего заспавненоготюнита js unit.onDeath()
Помещение предметов в ядро js Team.sharded.cores().first().items.set(Items.coal,30);
Смена команды js player = Groups.player.getByID(id).team(Team.sharded);
Спавн пули js player = Groups.player.getByID(id); Calls.createBullet(Bullets.lancerLaser, player.getTeam(), player.getX(), player.getY(), Mathf.random(360), Mathf.random(0.5, 1.0), Mathf.random(0.2, 1.0))}

Юниты, предметы, команды, блоки

Категория Список
Юниты mace, dagger, crawler, fortress, scepter, reign

vela, nova, pulsar, quasar, corvus

atrax, spiroct, arkyid, toxopid

flare, eclipse, horizon, zenith, antumbra

mono, poly, mega, quad, oct, alpha, beta, gamma

risso, minke, bryde, sei, omura, retusa, oxynoe, cyerce, aegires, navanax

Предметы scrap, copper, lead, graphite, coal, titanium, thorium, silicon, plastanium, phasefabric, surgealloy, sporePod, sand, blastCompound, pyratite, metaglass
Команды derelict, sharded, crux, green, purple, blue
Блоки
siliconSmelter, siliconCrucible, kiln, graphitePress, plastaniumCompressor, multiPress, phaseWeaver, surgeSmelter, pyratiteMixer, blastMixer, cryofluidMixer, melter, separator, disassembler, sporePress, pulverizer, incinerator, coalCentrifuge 
powerSource, powerVoid, itemSource, itemVoid, liquidSource, liquidVoid, payloadSource, payloadVoid, illuminator
copperWall, copperWallLarge, titaniumWall, titaniumWallLarge, plastaniumWall, plastaniumWallLarge, thoriumWall, thoriumWallLarge, door, doorLarge, phaseWall, phaseWallLarge, surgeWall, surgeWallLarge, mender, mendProjector, overdriveProjector, overdriveDome, forceProjector, shockMine, scrapWall, scrapWallLarge, scrapWallHuge, scrapWallGigantic, thruster
conveyor, titaniumConveyor, plastaniumConveyor, armoredConveyor, distributor, junction, itemBridge, phaseConveyor, sorter, invertedSorter, router, overflowGate, underflowGate, massDriver, duct, ductRouter, ductBridge
mechanicalPump, rotaryPump, thermalPump, conduit, pulseConduit, platedConduit, liquidRouter, liquidContainer, liquidTank, liquidJunction, bridgeConduit, phaseConduit
combustionGenerator, thermalGenerator, steamGenerator, differentialGenerator, rtgGenerator, solarPanel, largeSolarPanel, thoriumReactor, impactReactor, battery, batteryLarge, powerNode, powerNodeLarge, surgeTower, diode
mechanicalDrill, pneumaticDrill, laserDrill, blastDrill, waterExtractor, oilExtractor, cultivator
coreShard, coreFoundation, coreNucleus, vault, container, unloader
duo, scatter, scorch, hail, arc, wave, lancer, swarmer, salvo, fuse, ripple, cyclone, foreshadow, spectre, meltdown, segment, parallax, tsunami
commandCenter, groundFactory, airFactory, navalFactory, additiveReconstructor, multiplicativeReconstructor, exponentialReconstructor, tetrativeReconstructor, repairPoint, repairTurret
payloadConveyor, payloadRouter, payloadPropulsionTower, deconstructor, constructor, largeConstructor, payloadLoader, payloadUnloader
message, switchBlock, microProcessor, logicProcessor, hyperProcessor, largeLogicDisplay, logicDisplay, memoryCell, memoryBank
Зоны groundZero, desertWastes,
   craters, frozenForest, ruinousShores, stainedMountains, tarFields, fungalPass,
   saltFlats, overgrowth, impact0078, crags,
   desolateRift, nuclearComplex

Также посмотрите

Пользовательские правила