Constants
#mind_code_lines
Current number of mindustry processors code lines.
Operators
<< and <<<
Example
var x = @shooting << duo1
var y = 0 <<< cell1
//x = is duo1 shooting
//y = 0 index from cell1Keywords
class
Example
class x(cell1) = { x: 0, y: 1 }
//x_x = 0 index from cell1
//x_y = 1 index from cell1
x.x = 10
//write 10 to 0 index in cell1#macro
Example
#macro setx: var x = 0
setx
//x = 0
#macro setx: var x = 2
setx
//x = 2print_flush
Example
print("Hello!")
print_flush message1
//Now we have "Hello!" in message1unit_pay_drop
Functions
World
get_flag(name)
get_block(x, y)
get_building(x, y)
get_ore(x, y)
get_floor(x, y)
spawn(team, unit, x, y, rot)
fetch_build(team, block, link)
fetch_core(team, link)
fetch_player(team, link)
fetch_unit(team, link)
fetch_build_count(team, block)
fetch_core_count(team)
fetch_player_count(team)
fetch_unit_count(team)
color(r, g, b, a)
distance_radar(from, order, type0, type1, type2)
health_radar(from, order, type0, type1, type2)
shield_radar(from, order, type0, type1, type2)
armor_radar(from, order, type0, type1, type2)
max_health_radar(from, order, type0, type1, type2)
unit_distance_radar(order, type0, type1, type2)
unit_health_radar(order, type0, type1, type2)
unit_shield_radar(order, type0, type1, type2)
unit_armor_radar(order, type0, type1, type2)
unit_max_health_radar(order, type0, type1, type2)
unit_get_block(x, y, type, floor)
unit_inside(x, y, radius)
unit_locate_ore(ore, out x, out y)
unit_locate_build(type, enemy, out x, out y, found)
unit_locate_spawn(out x, out y, found)
unit_locate_damaged(out x, out y, found)
not(bool)
Math
max(a, b)
min(a, b)
angle(x, y)
len(x, y)
noise(x, y)
abs(number)
log(number)
log10(number)
floor(number)
ceil(number)
sqrt(number)
rand(number)
sin(angle)
cos(angle)
tan(angle)
asin(angle)
acos(angle)
atan(angle)
Operations
print(values...)
set_color(unit, color)
set_config(unit, b)
set_enabled(unit, bool)
shoot_to(unit, x, y, bool)
shoot_unit(unit, to, bool)
draw_clear(r, g, b)
draw_rgba(r, g, b, a)
draw_color(color)
draw_stroke(value)
draw_line(x1, y1, x2, y2)
draw_rect(x, y, x_size, y_size)
draw_line_poly(x, y, sides, radius, rotation)
draw_poly(x, y, sides, radius, rotation)
draw_line_rect(x, y, x_size, y_size)
draw_triangle(x1, y1, x2, y2, x3, y3)
draw_image(x, y, texture, size, rotation)
unit_move(x, y, [range])
unit_boost(bool)
unit_shoot_to(x, y, b)
unit_shoot_unit(unit, b)
unit_item_drop(to, amount)
unit_item_take(from, item, amount)
unit_pay_take(block)
unit_mine(x, y)
unit_flag(flag)
unit_build(x, y, block, rot, config)
set_block(team, block, x, y, rot)
set_ore(block, x, y)
shock_unit(unit)
boss_unit(unit)
apply_status(status, unit)
remove_status(status, unit)
spawn_wave(x, y, nat)
set_map_area((x, y, w, h)
set_rule(rule, value)
set_team_rule(team, rule, x)
cutscene_pan(x, y, speed)
explosion(team, x, y, radius, damage, flying, ground, pierce)
set_flag(flag, b)