Mindustry/core/assets/scripts/global.js

160 lines
7.9 KiB
JavaScript
Raw Normal View History

2019-11-28 01:51:07 +07:00
//Generated class. Do not modify.
2019-12-01 05:45:02 +07:00
"use strict";
2019-12-08 02:10:39 +07:00
const log = function(context, obj){
2020-04-02 01:44:17 +07:00
Vars.mods.getScripts().log(context, String(obj))
2019-12-04 05:16:23 +07:00
}
2019-12-01 05:45:02 +07:00
const readString = path => Vars.mods.getScripts().readString(path)
const readBytes = path => Vars.mods.getScripts().readBytes(path)
2020-08-23 01:05:41 +07:00
const loadMusic = path => Vars.mods.getScripts().loadMusic(path)
const loadSound = path => Vars.mods.getScripts().loadSound(path)
2020-02-12 05:50:16 +07:00
var scriptName = "base.js"
var modName = "none"
const print = text => log(modName + "/" + scriptName, text);
2020-02-12 05:50:16 +07:00
2019-12-07 10:24:32 +07:00
const extendContent = function(classType, name, params){
2019-12-08 03:41:52 +07:00
return new JavaAdapter(classType, params, name)
2019-12-04 05:16:23 +07:00
}
2019-12-07 10:24:32 +07:00
const extend = function(classType, params){
return new JavaAdapter(classType, params)
}
2019-12-09 06:34:23 +07:00
2020-08-17 05:51:17 +07:00
//these are not sctrictly necessary, but are kept for edge cases
const run = method => new java.lang.Runnable(){run: method}
const boolf = method => new Boolf(){get: method}
const boolp = method => new Boolp(){get: method}
const floatf = method => new Floatf(){get: method}
const floatp = method => new Floatp(){get: method}
const cons = method => new Cons(){get: method}
const prov = method => new Prov(){get: method}
const func = method => new Func(){get: method}
2019-12-09 06:34:23 +07:00
const newEffect = (lifetime, renderer) => new Effects.Effect(lifetime, new Effects.EffectRenderer({render: renderer}))
2019-12-30 05:56:10 +07:00
Call = Packages.mindustry.gen.Call
2020-02-12 05:50:16 +07:00
2020-08-05 02:14:01 +07:00
importPackage(Packages.arc)
importPackage(Packages.arc.func)
importPackage(Packages.arc.graphics)
importPackage(Packages.arc.graphics.g2d)
2020-08-23 01:05:41 +07:00
importPackage(Packages.arc.graphics.gl)
2020-08-05 02:14:01 +07:00
importPackage(Packages.arc.math)
importPackage(Packages.arc.math.geom)
importPackage(Packages.arc.scene)
importPackage(Packages.arc.scene.actions)
importPackage(Packages.arc.scene.event)
importPackage(Packages.arc.scene.style)
2020-07-30 21:51:43 +07:00
importPackage(Packages.arc.scene.ui)
2020-08-05 02:14:01 +07:00
importPackage(Packages.arc.scene.ui.layout)
importPackage(Packages.arc.scene.utils)
importPackage(Packages.arc.struct)
importPackage(Packages.arc.util)
importPackage(Packages.mindustry)
2020-07-30 21:51:43 +07:00
importPackage(Packages.mindustry.ai)
2020-08-05 02:14:01 +07:00
importPackage(Packages.mindustry.ai.formations)
importPackage(Packages.mindustry.ai.formations.patterns)
importPackage(Packages.mindustry.ai.types)
importPackage(Packages.mindustry.async)
importPackage(Packages.mindustry.audio)
2020-07-30 21:51:43 +07:00
importPackage(Packages.mindustry.content)
2020-08-05 02:14:01 +07:00
importPackage(Packages.mindustry.core)
2020-07-30 21:51:43 +07:00
importPackage(Packages.mindustry.ctype)
2020-08-05 02:14:01 +07:00
importPackage(Packages.mindustry.editor)
importPackage(Packages.mindustry.entities)
importPackage(Packages.mindustry.entities.abilities)
2020-07-30 21:51:43 +07:00
importPackage(Packages.mindustry.entities.bullet)
2020-08-05 02:14:01 +07:00
importPackage(Packages.mindustry.entities.comp)
importPackage(Packages.mindustry.entities.units)
importPackage(Packages.mindustry.game)
importPackage(Packages.mindustry.gen)
importPackage(Packages.mindustry.graphics)
importPackage(Packages.mindustry.graphics.g3d)
importPackage(Packages.mindustry.input)
importPackage(Packages.mindustry.logic)
importPackage(Packages.mindustry.maps)
importPackage(Packages.mindustry.maps.filters)
importPackage(Packages.mindustry.maps.generators)
importPackage(Packages.mindustry.maps.planet)
importPackage(Packages.mindustry.net)
2020-08-05 02:14:01 +07:00
importPackage(Packages.mindustry.type)
2020-07-30 21:51:43 +07:00
importPackage(Packages.mindustry.ui)
2020-08-05 02:14:01 +07:00
importPackage(Packages.mindustry.ui.dialogs)
2020-07-30 21:51:43 +07:00
importPackage(Packages.mindustry.ui.fragments)
2020-08-05 02:14:01 +07:00
importPackage(Packages.mindustry.ui.layout)
2020-07-30 21:51:43 +07:00
importPackage(Packages.mindustry.world)
importPackage(Packages.mindustry.world.blocks)
2020-08-05 02:14:01 +07:00
importPackage(Packages.mindustry.world.blocks.campaign)
importPackage(Packages.mindustry.world.blocks.defense)
importPackage(Packages.mindustry.world.blocks.defense.turrets)
importPackage(Packages.mindustry.world.blocks.distribution)
2020-07-30 21:51:43 +07:00
importPackage(Packages.mindustry.world.blocks.environment)
importPackage(Packages.mindustry.world.blocks.experimental)
2020-08-05 02:14:01 +07:00
importPackage(Packages.mindustry.world.blocks.legacy)
importPackage(Packages.mindustry.world.blocks.liquid)
2020-08-17 05:51:17 +07:00
importPackage(Packages.mindustry.world.blocks.logic)
2020-07-30 21:51:43 +07:00
importPackage(Packages.mindustry.world.blocks.payloads)
2020-08-05 02:14:01 +07:00
importPackage(Packages.mindustry.world.blocks.power)
importPackage(Packages.mindustry.world.blocks.production)
importPackage(Packages.mindustry.world.blocks.sandbox)
importPackage(Packages.mindustry.world.blocks.storage)
importPackage(Packages.mindustry.world.blocks.units)
importPackage(Packages.mindustry.world.consumers)
importPackage(Packages.mindustry.world.draw)
importPackage(Packages.mindustry.world.meta)
importPackage(Packages.mindustry.world.meta.values)
importPackage(Packages.mindustry.world.modules)
2020-07-30 21:51:43 +07:00
importPackage(Packages.mindustry.world.producers)
2020-05-05 05:05:47 +07:00
const PlayerIpUnbanEvent = Packages.mindustry.game.EventType.PlayerIpUnbanEvent
const PlayerIpBanEvent = Packages.mindustry.game.EventType.PlayerIpBanEvent
const PlayerUnbanEvent = Packages.mindustry.game.EventType.PlayerUnbanEvent
const PlayerBanEvent = Packages.mindustry.game.EventType.PlayerBanEvent
const PlayerLeave = Packages.mindustry.game.EventType.PlayerLeave
const PlayerConnect = Packages.mindustry.game.EventType.PlayerConnect
const PlayerJoin = Packages.mindustry.game.EventType.PlayerJoin
2020-05-31 08:04:41 +07:00
const UnitChangeEvent = Packages.mindustry.game.EventType.UnitChangeEvent
2020-05-05 05:05:47 +07:00
const UnitCreateEvent = Packages.mindustry.game.EventType.UnitCreateEvent
const UnitDestroyEvent = Packages.mindustry.game.EventType.UnitDestroyEvent
const BlockDestroyEvent = Packages.mindustry.game.EventType.BlockDestroyEvent
const BuildSelectEvent = Packages.mindustry.game.EventType.BuildSelectEvent
const BlockBuildEndEvent = Packages.mindustry.game.EventType.BlockBuildEndEvent
const BlockBuildBeginEvent = Packages.mindustry.game.EventType.BlockBuildBeginEvent
const ResearchEvent = Packages.mindustry.game.EventType.ResearchEvent
const UnlockEvent = Packages.mindustry.game.EventType.UnlockEvent
const StateChangeEvent = Packages.mindustry.game.EventType.StateChangeEvent
2020-09-04 02:22:27 +07:00
const TileChangeEvent = Packages.mindustry.game.EventType.TileChangeEvent
2020-05-05 05:05:47 +07:00
const GameOverEvent = Packages.mindustry.game.EventType.GameOverEvent
const ConfigEvent = Packages.mindustry.game.EventType.ConfigEvent
2020-05-05 05:05:47 +07:00
const DepositEvent = Packages.mindustry.game.EventType.DepositEvent
const WithdrawEvent = Packages.mindustry.game.EventType.WithdrawEvent
2020-05-31 08:04:41 +07:00
const SectorCaptureEvent = Packages.mindustry.game.EventType.SectorCaptureEvent
const PlayerChatEvent = Packages.mindustry.game.EventType.PlayerChatEvent
const ClientPreConnectEvent = Packages.mindustry.game.EventType.ClientPreConnectEvent
2020-05-31 08:04:41 +07:00
const CommandIssueEvent = Packages.mindustry.game.EventType.CommandIssueEvent
const LaunchItemEvent = Packages.mindustry.game.EventType.LaunchItemEvent
const SectorLoseEvent = Packages.mindustry.game.EventType.SectorLoseEvent
2020-05-31 08:04:41 +07:00
const WorldLoadEvent = Packages.mindustry.game.EventType.WorldLoadEvent
const ClientLoadEvent = Packages.mindustry.game.EventType.ClientLoadEvent
2020-05-05 05:05:47 +07:00
const BlockInfoEvent = Packages.mindustry.game.EventType.BlockInfoEvent
const CoreItemDeliverEvent = Packages.mindustry.game.EventType.CoreItemDeliverEvent
const TurretAmmoDeliverEvent = Packages.mindustry.game.EventType.TurretAmmoDeliverEvent
const LineConfirmEvent = Packages.mindustry.game.EventType.LineConfirmEvent
const TurnEvent = Packages.mindustry.game.EventType.TurnEvent
2020-05-05 05:05:47 +07:00
const WaveEvent = Packages.mindustry.game.EventType.WaveEvent
const ResetEvent = Packages.mindustry.game.EventType.ResetEvent
const PlayEvent = Packages.mindustry.game.EventType.PlayEvent
const DisposeEvent = Packages.mindustry.game.EventType.DisposeEvent
const ServerLoadEvent = Packages.mindustry.game.EventType.ServerLoadEvent
const ClientCreateEvent = Packages.mindustry.game.EventType.ClientCreateEvent
const SaveLoadEvent = Packages.mindustry.game.EventType.SaveLoadEvent
const MapPublishEvent = Packages.mindustry.game.EventType.MapPublishEvent
const MapMakeEvent = Packages.mindustry.game.EventType.MapMakeEvent
2020-05-31 08:04:41 +07:00
const ResizeEvent = Packages.mindustry.game.EventType.ResizeEvent
2020-05-05 05:05:47 +07:00
const LaunchEvent = Packages.mindustry.game.EventType.LaunchEvent
const LoseEvent = Packages.mindustry.game.EventType.LoseEvent
const WinEvent = Packages.mindustry.game.EventType.WinEvent
const Trigger = Packages.mindustry.game.EventType.Trigger