102 lines
4.1 KiB
Lua
102 lines
4.1 KiB
Lua
lzr_globals = {}
|
|
|
|
lzr_globals.DEFAULT_LEVEL_POS = vector.new(0, 1, -23000)
|
|
lzr_globals.MAX_LEVEL_SIZE = vector.new(22, 22, 22)
|
|
lzr_globals.MIN_LEVEL_SIZE = vector.new(2, 5, 2)
|
|
lzr_globals.DEFAULT_SKY = "bright_blue"
|
|
lzr_globals.DEFAULT_LEVEL_SIZE = vector.new(10, 6, 10)
|
|
lzr_globals.DEFAULT_CEILING_NODE = "lzr_core:wood"
|
|
lzr_globals.DEFAULT_WALL_NODE = "lzr_core:wood"
|
|
lzr_globals.DEFAULT_WINDOW_NODE = "lzr_decor:woodframed_glass"
|
|
lzr_globals.DEFAULT_FLOOR_NODE = "lzr_core:wood"
|
|
lzr_globals.DEFAULT_NPC_TEXTS = { goldie = "" }
|
|
lzr_globals.MENU_SHIP_POS = vector.new(-23000, -3, -23000)
|
|
lzr_globals.DEFAULT_WEATHER = "clear"
|
|
lzr_globals.DEFAULT_BACKDROP = "ocean"
|
|
lzr_globals.BACKDROP_POS_OCEAN = table.copy(lzr_globals.DEFAULT_LEVEL_POS)
|
|
lzr_globals.BACKDROP_POS_UNDERGROUND = vector.new(-2000, -2000, -23000)
|
|
lzr_globals.BACKDROP_POS_SKY = vector.new(-4000, 125, -23000)
|
|
lzr_globals.DEFAULT_BACKDROP_POS = vector.zero()
|
|
lzr_globals.MENU_SHIP_PLAYER_SPAWN_OFFSET = vector.new(7, 8.5, 29)
|
|
lzr_globals.MENU_SHIP_FALLOUT_Y_OFFSET = 8
|
|
lzr_globals.MENU_SHIP_STARTBOOK_OFFSET = vector.new(7, 10, 31)
|
|
lzr_globals.MENU_SHIP_CUSTOMBOOK_OFFSET = vector.new(8, 10, 31)
|
|
lzr_globals.MENU_SHIP_EDITOR_OFFSET = vector.new(13, 10, 31)
|
|
lzr_globals.MENU_SHIP_SPEAKER_OFFSET = vector.new(6, 9, 25)
|
|
lzr_globals.MENU_SHIP_TELEVISION_OFFSET = vector.new(5, 9, 25)
|
|
lzr_globals.MENU_PLAYER_SPAWN_POS = vector.add(lzr_globals.MENU_SHIP_POS, lzr_globals.MENU_SHIP_PLAYER_SPAWN_OFFSET)
|
|
lzr_globals.GRAVITY = tonumber(minetest.settings:get("movement_gravity")) or 9.81
|
|
lzr_globals.LASER_GLOW = 3
|
|
lzr_globals.LASER_ALPHA = 0x8E
|
|
lzr_globals.LASER_ALPHA_STRING = string.format("%02X", lzr_globals.LASER_ALPHA)
|
|
lzr_globals.AUTOSAVE_NAME = "_AUTOSAVE_"
|
|
lzr_globals.PARROT_SPAWN_OFFSET = vector.new(0, 0.01, 0)
|
|
|
|
lzr_globals.MAX_RECEIVER_RECALLS = 5
|
|
|
|
-- WARNING: This value is duplicated in lzr_mapgen.
|
|
-- Only change this value when also changing lzr_mapgen!
|
|
lzr_globals.DEEP_OCEAN_Z = -20000
|
|
|
|
-- Maximum number of nodes the player can see. We do this because
|
|
-- the map is segmented in multiple zones (e.g. islands, deep ocean)
|
|
-- with visible seams. By making sure the player is always far enough
|
|
-- from the zone borders, and by reducing the view distance,
|
|
-- the player will never see those borders.
|
|
lzr_globals.MAX_VIEW_DISTANCE = 1000
|
|
|
|
-- Laser color codes
|
|
lzr_globals.COLOR_NONE = 0 -- special case when there's no laser
|
|
lzr_globals.COLOR_RED = 1
|
|
lzr_globals.COLOR_GREEN = 2
|
|
lzr_globals.COLOR_YELLOW = 3
|
|
lzr_globals.COLOR_BLUE = 4
|
|
lzr_globals.COLOR_MAGENTA = 5
|
|
lzr_globals.COLOR_CYAN = 6
|
|
lzr_globals.COLOR_WHITE = 7
|
|
|
|
-- Maximum possible color code
|
|
lzr_globals.MAX_COLORCODE = 7
|
|
|
|
lzr_globals.COLOR_NAMES = {
|
|
[lzr_globals.COLOR_NONE] = "none",
|
|
[lzr_globals.COLOR_RED] = "red",
|
|
[lzr_globals.COLOR_GREEN] = "green",
|
|
[lzr_globals.COLOR_BLUE] = "blue",
|
|
[lzr_globals.COLOR_YELLOW] = "yellow",
|
|
[lzr_globals.COLOR_MAGENTA] = "magenta",
|
|
[lzr_globals.COLOR_CYAN] = "cyan",
|
|
[lzr_globals.COLOR_WHITE] = "white",
|
|
}
|
|
|
|
-- Same as lzr_globals.COLOR_NAMES, but with key and value swapped
|
|
lzr_globals.COLOR_NAMES_SWAPPED = table.key_value_swap(lzr_globals.COLOR_NAMES)
|
|
|
|
lzr_globals.OPAQUE_LASERS = minetest.settings:get_bool("lzr_opaque_lasers", false)
|
|
|
|
|
|
|
|
-- Collision box for rain membrane node
|
|
-- Rain membrane corner position
|
|
local RMC = 0.25
|
|
-- Rain membrane offset (a tiny value);
|
|
-- determines the X/Z size of the columns
|
|
local RMO = 0.01
|
|
lzr_globals.RAIN_MEMBRANE_COLLISION_BOX = {
|
|
-- The collision box is made of 4 very thin columns,
|
|
-- equally spaced apart. This is enough to prevent the player
|
|
-- from moving through it vertically, assuming the player collisionbox is
|
|
-- larger than the space between the columns (which is roughly
|
|
-- RMO times 2).
|
|
-- Because the columns are so thin, they leave enough space
|
|
-- for most rain particles to go through, except for the few unlucky ones
|
|
-- that directly hit the columns (but this is rare).
|
|
type = "fixed",
|
|
fixed = {
|
|
{ -RMC-RMO, -0.5, -RMC-RMO, -RMC+RMO, 0.5, -RMC+RMO }, -- (-1,-1)
|
|
{ -RMC-RMO, -0.5, RMC-RMO, -RMC+RMO, 0.5, RMC+RMO }, -- (-1, 1)
|
|
{ RMC-RMO, -0.5, -RMC-RMO, RMC+RMO, 0.5, -RMC+RMO }, -- ( 1,-1)
|
|
{ RMC-RMO, -0.5, RMC-RMO, RMC+RMO, 0.5, RMC+RMO }, -- ( 1, 1)
|
|
},
|
|
}
|