Charakterbewegungen hinzugefügt, Deko hinzugefügt, Kochrezepte angepasst
This commit is contained in:
parent
95945c0306
commit
a0c893ca0b
1124 changed files with 64294 additions and 763 deletions
11
mods/fmod/.cdb.json
Normal file
11
mods/fmod/.cdb.json
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"type": "MOD",
|
||||
"name": "fmod",
|
||||
"title": "fmod",
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"media_license": "CC-BY-SA-4.0",
|
||||
"repo": "https://github.com/fluxionary/minetest-fmod.git",
|
||||
"website": "https://github.com/fluxionary/minetest-fmod",
|
||||
"issue_tracker": "https://github.com/fluxionary/minetest-fmod/issues",
|
||||
"short_description": "flux's mod boilerplate"
|
||||
}
|
3
mods/fmod/.check_date.sh
Normal file
3
mods/fmod/.check_date.sh
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
grep $(date -u -I) mod.conf
|
||||
exit $?
|
14
mods/fmod/.editorconfig
Normal file
14
mods/fmod/.editorconfig
Normal file
|
@ -0,0 +1,14 @@
|
|||
# See https://editorconfig.org/
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.{lua,luacheckrc}]
|
||||
indent_style = tab
|
1
mods/fmod/.github/FUNDING.yml
vendored
Normal file
1
mods/fmod/.github/FUNDING.yml
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
github: fluxionary
|
34
mods/fmod/.github/workflows/pre-commit.yml
vendored
Normal file
34
mods/fmod/.github/workflows/pre-commit.yml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
name: pre-commit
|
||||
on: [push, pull_request, workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: update
|
||||
run: sudo apt-get update -y
|
||||
|
||||
- uses: actions/checkout@master
|
||||
- uses: actions/setup-python@master
|
||||
|
||||
- name: install luarocks
|
||||
run: sudo apt-get install -y luarocks
|
||||
|
||||
- name: add luarocks path
|
||||
run: echo "$HOME/.luarocks/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: luacheck install
|
||||
run: luarocks install --local luacheck
|
||||
|
||||
- name: install cargo
|
||||
run: sudo apt-get install -y cargo
|
||||
|
||||
- name: install stylua
|
||||
run: cargo install stylua
|
||||
|
||||
- name: Install pre-commit
|
||||
run: pip3 install pre-commit
|
||||
|
||||
- name: Run pre-commit
|
||||
run: pre-commit run --all-files
|
655
mods/fmod/.luacheckrc
Normal file
655
mods/fmod/.luacheckrc
Normal file
|
@ -0,0 +1,655 @@
|
|||
std = "lua51+luajit+minetest+fmod"
|
||||
unused_args = false
|
||||
max_line_length = 120
|
||||
|
||||
stds.minetest = {
|
||||
read_globals = {
|
||||
"DIR_DELIM",
|
||||
"dump",
|
||||
"dump2",
|
||||
"INIT",
|
||||
|
||||
math = {
|
||||
fields = {
|
||||
abs = {},
|
||||
acos = {},
|
||||
asin = {},
|
||||
atan = {},
|
||||
atan2 = {},
|
||||
ceil = {},
|
||||
cos = {},
|
||||
cosh = {},
|
||||
deg = {},
|
||||
exp = {},
|
||||
factorial = {},
|
||||
floor = {},
|
||||
fmod = {},
|
||||
frexp = {},
|
||||
huge = {},
|
||||
hypot = {},
|
||||
ldexp = {},
|
||||
log = {},
|
||||
log10 = {},
|
||||
max = {},
|
||||
min = {},
|
||||
modf = {},
|
||||
pi = {},
|
||||
pow = {},
|
||||
rad = {},
|
||||
random = {},
|
||||
randomseed = {},
|
||||
round = {},
|
||||
sign = {},
|
||||
sin = {},
|
||||
sinh = {},
|
||||
sqrt = {},
|
||||
tan = {},
|
||||
tanh = {},
|
||||
},
|
||||
},
|
||||
table = {
|
||||
fields = {
|
||||
copy = {},
|
||||
concat = {},
|
||||
foreach = {},
|
||||
foreachi = {},
|
||||
getn = {},
|
||||
indexof = {},
|
||||
insert = {},
|
||||
insert_all = {},
|
||||
key_value_swap = {},
|
||||
maxn = {},
|
||||
move = {},
|
||||
remove = {},
|
||||
shuffle = {},
|
||||
sort = {},
|
||||
},
|
||||
},
|
||||
string = {
|
||||
fields = {
|
||||
byte = {},
|
||||
char = {},
|
||||
dump = {},
|
||||
find = {},
|
||||
format = {},
|
||||
gmatch = {},
|
||||
len = {},
|
||||
lower = {},
|
||||
match = {},
|
||||
rep = {},
|
||||
reverse = {},
|
||||
split = {},
|
||||
sub = {},
|
||||
trim = {},
|
||||
upper = {},
|
||||
},
|
||||
},
|
||||
vector = {
|
||||
fields = {
|
||||
add = {},
|
||||
angle = {},
|
||||
apply = {},
|
||||
check = {},
|
||||
combine = {},
|
||||
copy = {},
|
||||
cross = {},
|
||||
dir_to_rotation = {},
|
||||
direction = {},
|
||||
distance = {},
|
||||
divide = {},
|
||||
dot = {},
|
||||
equals = {},
|
||||
floor = {},
|
||||
from_string = {},
|
||||
length = {},
|
||||
metatable = {},
|
||||
multiply = {},
|
||||
new = {},
|
||||
normalize = {},
|
||||
offset = {},
|
||||
rotate = {},
|
||||
rotate_around_axis = {},
|
||||
round = {},
|
||||
sort = {},
|
||||
subtract = {},
|
||||
to_string = {},
|
||||
zero = {},
|
||||
},
|
||||
},
|
||||
|
||||
ItemStack = {
|
||||
fields = {
|
||||
add_item = {},
|
||||
add_wear = {},
|
||||
add_wear_by_uses = {},
|
||||
clear = {},
|
||||
get_count = {},
|
||||
get_definition = {},
|
||||
get_description = {},
|
||||
get_free_space = {},
|
||||
get_meta = {},
|
||||
get_metadata = {},
|
||||
get_name = {},
|
||||
get_short_description = {},
|
||||
get_stack_max = {},
|
||||
get_tool_capabilities = {},
|
||||
get_wear = {},
|
||||
is_empty = {},
|
||||
is_known = {},
|
||||
item_fits = {},
|
||||
peek_item = {},
|
||||
replace = {},
|
||||
set_count = {},
|
||||
set_metadata = {},
|
||||
set_name = {},
|
||||
set_wear = {},
|
||||
take_item = {},
|
||||
to_string = {},
|
||||
to_table = {},
|
||||
},
|
||||
},
|
||||
PerlinNoise = {
|
||||
fields = {
|
||||
get_2d = {},
|
||||
get_3d = {},
|
||||
},
|
||||
},
|
||||
PerlinNoiseMap = {
|
||||
fields = {
|
||||
calc_2d_map = {},
|
||||
calc_3d_map = {},
|
||||
get_2d_map = {},
|
||||
get_2d_map_flat = {},
|
||||
get_3d_map = {},
|
||||
get_3d_map_flat = {},
|
||||
get_map_slice = {},
|
||||
},
|
||||
},
|
||||
PseudoRandom = {
|
||||
fields = {
|
||||
next = {},
|
||||
},
|
||||
},
|
||||
PcgRandom = {
|
||||
fields = {
|
||||
next = {},
|
||||
rand_normal_dist = {},
|
||||
},
|
||||
},
|
||||
SecureRandom = {
|
||||
fields = {
|
||||
next_bytes = {},
|
||||
},
|
||||
},
|
||||
Settings = {
|
||||
fields = {
|
||||
get = {},
|
||||
get_bool = {},
|
||||
get_flags = {},
|
||||
get_names = {},
|
||||
get_np_group = {},
|
||||
remove = {},
|
||||
set = {},
|
||||
set_bool = {},
|
||||
set_np_group = {},
|
||||
to_table = {},
|
||||
write = {},
|
||||
},
|
||||
},
|
||||
VoxelArea = {
|
||||
fields = {
|
||||
MaxEdge = {},
|
||||
MinEdge = {},
|
||||
contains = {},
|
||||
containsi = {},
|
||||
containsp = {},
|
||||
getExtent = {},
|
||||
getVolume = {},
|
||||
index = {},
|
||||
indexp = {},
|
||||
iter = {},
|
||||
iterp = {},
|
||||
new = {},
|
||||
position = {},
|
||||
ystride = {},
|
||||
zstride = {},
|
||||
},
|
||||
},
|
||||
VoxelManip = {
|
||||
fields = {
|
||||
calc_lighting = {},
|
||||
get_data = {},
|
||||
get_emerged_area = {},
|
||||
get_light_data = {},
|
||||
get_node_at = {},
|
||||
get_param2_data = {},
|
||||
read_from_map = {},
|
||||
set_data = {},
|
||||
set_light_data = {},
|
||||
set_lighting = {},
|
||||
set_node_at = {},
|
||||
set_param2_data = {},
|
||||
update_liquids = {},
|
||||
update_map = {},
|
||||
was_modified = {},
|
||||
write_to_map = {},
|
||||
},
|
||||
},
|
||||
|
||||
minetest = {
|
||||
fields = {
|
||||
CONTENT_AIR = {},
|
||||
CONTENT_IGNORE = {},
|
||||
CONTENT_UNKNOWN = {},
|
||||
EMERGE_CANCELLED = {},
|
||||
EMERGE_ERRORED = {},
|
||||
EMERGE_FROM_DISK = {},
|
||||
EMERGE_FROM_MEMORY = {},
|
||||
EMERGE_GENERATED = {},
|
||||
LIGHT_MAX = {},
|
||||
MAP_BLOCKSIZE = {},
|
||||
PLAYER_MAX_BREATH_DEFAULT = {},
|
||||
PLAYER_MAX_HP_DEFAULT = {},
|
||||
add_entity = {},
|
||||
add_item = {},
|
||||
add_node = {},
|
||||
add_node_level = {},
|
||||
add_particle = {},
|
||||
add_particlespawner = {},
|
||||
after = {},
|
||||
async_event_handler = {},
|
||||
async_jobs = {},
|
||||
auth_reload = {},
|
||||
ban_player = {},
|
||||
builtin_auth_handler = {},
|
||||
bulk_set_node = {},
|
||||
calculate_knockback = {},
|
||||
callback_origins = {},
|
||||
cancel_shutdown_requests = {},
|
||||
chat_send_all = {},
|
||||
chat_send_player = {},
|
||||
chatcommands = {},
|
||||
check_for_falling = {},
|
||||
check_password_entry = {},
|
||||
check_player_privs = {},
|
||||
check_single_for_falling = {},
|
||||
clear_craft = {},
|
||||
clear_objects = {},
|
||||
clear_registered_biomes = {},
|
||||
clear_registered_decorations = {},
|
||||
clear_registered_ores = {},
|
||||
clear_registered_schematics = {},
|
||||
close_formspec = {},
|
||||
colorize = {},
|
||||
colorspec_to_bytes = {},
|
||||
colorspec_to_colorstring = {},
|
||||
compare_block_status = {},
|
||||
compress = {},
|
||||
cpdir = {},
|
||||
craft_predict = {},
|
||||
craftitemdef_default = {},
|
||||
create_detached_inventory = {},
|
||||
create_detached_inventory_raw = {},
|
||||
create_schematic = {},
|
||||
debug = {},
|
||||
decode_base64 = {},
|
||||
decompress = {},
|
||||
delete_area = {},
|
||||
delete_particlespawner = {},
|
||||
deserialize = {},
|
||||
detached_inventories = {},
|
||||
dig_node = {},
|
||||
dir_to_facedir = {},
|
||||
dir_to_wallmounted = {},
|
||||
dir_to_yaw = {},
|
||||
disconnect_player = {},
|
||||
do_async_callback = {},
|
||||
do_item_eat = {},
|
||||
dynamic_add_media = {},
|
||||
dynamic_media_callbacks = {},
|
||||
emerge_area = {},
|
||||
encode_base64 = {},
|
||||
encode_png = {},
|
||||
env = {},
|
||||
explode_scrollbar_event = {},
|
||||
explode_table_event = {},
|
||||
explode_textlist_event = {},
|
||||
facedir_to_dir = {},
|
||||
features = {},
|
||||
find_node_near = {},
|
||||
find_nodes_in_area = {},
|
||||
find_nodes_in_area_under_air = {},
|
||||
find_nodes_with_meta = {},
|
||||
find_path = {},
|
||||
fix_light = {},
|
||||
forceload_block = {},
|
||||
forceload_free_block = {},
|
||||
format_chat_message = {},
|
||||
formspec_escape = {},
|
||||
generate_decorations = {},
|
||||
generate_ores = {},
|
||||
get_all_craft_recipes = {},
|
||||
get_artificial_light = {},
|
||||
get_auth_handler = {},
|
||||
get_background_escape_sequence = {},
|
||||
get_ban_description = {},
|
||||
get_ban_list = {},
|
||||
get_biome_data = {},
|
||||
get_biome_id = {},
|
||||
get_biome_name = {},
|
||||
get_builtin_path = {},
|
||||
get_color_escape_sequence = {},
|
||||
get_connected_players = {},
|
||||
get_content_id = {},
|
||||
get_craft_recipe = {},
|
||||
get_craft_result = {},
|
||||
get_current_modname = {},
|
||||
get_day_count = {},
|
||||
get_decoration_id = {},
|
||||
get_dig_params = {},
|
||||
get_dir_list = {},
|
||||
get_gametime = {},
|
||||
get_gen_notify = {},
|
||||
get_heat = {},
|
||||
get_hit_params = {},
|
||||
get_humidity = {},
|
||||
get_inventory = {},
|
||||
get_item_group = {},
|
||||
get_last_run_mod = {},
|
||||
get_mapgen_object = {},
|
||||
get_mapgen_params = {},
|
||||
get_mapgen_setting = {},
|
||||
get_mapgen_setting_noiseparams = {},
|
||||
get_meta = {},
|
||||
get_mod_storage = {},
|
||||
get_modnames = {},
|
||||
get_modpath = {},
|
||||
get_name_from_content_id = {},
|
||||
get_natural_light = {},
|
||||
get_node = {},
|
||||
get_node_drops = {},
|
||||
get_node_group = {},
|
||||
get_node_level = {},
|
||||
get_node_light = {},
|
||||
get_node_max_level = {},
|
||||
get_node_or_nil = {},
|
||||
get_node_timer = {},
|
||||
get_noiseparams = {},
|
||||
get_objects_in_area = {},
|
||||
get_objects_inside_radius = {},
|
||||
get_password_hash = {},
|
||||
get_perlin = {},
|
||||
get_perlin_map = {},
|
||||
get_player_by_name = {},
|
||||
get_player_information = {},
|
||||
get_player_ip = {},
|
||||
get_player_privs = {},
|
||||
get_player_radius_area = {},
|
||||
get_pointed_thing_position = {},
|
||||
get_position_from_hash = {},
|
||||
get_server_max_lag = {},
|
||||
get_server_status = {},
|
||||
get_server_uptime = {},
|
||||
get_spawn_level = {},
|
||||
get_timeofday = {},
|
||||
get_tool_wear_after_use = {},
|
||||
get_translated_string = {},
|
||||
get_translator = {},
|
||||
get_us_time = {},
|
||||
get_user_path = {},
|
||||
get_version = {},
|
||||
get_voxel_manip = {},
|
||||
get_worldpath = {},
|
||||
global_exists = {},
|
||||
handle_async = {},
|
||||
handle_node_drops = {},
|
||||
has_feature = {},
|
||||
hash_node_position = {},
|
||||
hud_replace_builtin = {},
|
||||
inventorycube = {},
|
||||
is_area_protected = {},
|
||||
is_colored_paramtype = {},
|
||||
is_creative_enabled = {},
|
||||
is_nan = {},
|
||||
is_player = {},
|
||||
is_protected = {},
|
||||
is_singleplayer = {},
|
||||
is_yes = {},
|
||||
item_drop = {},
|
||||
item_eat = {},
|
||||
item_place = {},
|
||||
item_place_node = {},
|
||||
item_place_object = {},
|
||||
item_secondary_use = {},
|
||||
itemstring_with_color = {},
|
||||
itemstring_with_palette = {},
|
||||
kick_player = {},
|
||||
line_of_sight = {},
|
||||
load_area = {},
|
||||
log = {},
|
||||
luaentities = {},
|
||||
mkdir = {},
|
||||
mod_channel_join = {},
|
||||
mvdir = {},
|
||||
node_dig = {},
|
||||
node_punch = {},
|
||||
nodedef_default = {},
|
||||
noneitemdef_default = {},
|
||||
notify_authentication_modified = {},
|
||||
object_refs = {},
|
||||
on_craft = {},
|
||||
override_chatcommand = {},
|
||||
override_item = {},
|
||||
parse_coordinates = {},
|
||||
parse_json = {},
|
||||
parse_relative_number = {},
|
||||
place_node = {},
|
||||
place_schematic = {},
|
||||
place_schematic_on_vmanip = {},
|
||||
player_exists = {},
|
||||
pointed_thing_to_face_pos = {},
|
||||
pos_to_string = {},
|
||||
print = {},
|
||||
privs_to_string = {},
|
||||
punch_node = {},
|
||||
raillike_group = {},
|
||||
raycast = {},
|
||||
read_schematic = {},
|
||||
record_protection_violation = {},
|
||||
register_abm = {},
|
||||
register_alias = {},
|
||||
register_alias_force = {},
|
||||
register_allow_player_inventory_action = {},
|
||||
register_async_dofile = {},
|
||||
register_authentication_handler = {},
|
||||
register_biome = {},
|
||||
register_can_bypass_userlimit = {},
|
||||
register_chatcommand = {},
|
||||
register_craft = {},
|
||||
register_craft_predict = {},
|
||||
register_craftitem = {},
|
||||
register_decoration = {},
|
||||
register_entity = {},
|
||||
register_globalstep = {},
|
||||
register_item = {},
|
||||
register_lbm = {},
|
||||
register_node = {},
|
||||
register_on_auth_fail = {},
|
||||
register_on_authplayer = {},
|
||||
register_on_chat_message = {},
|
||||
register_on_chatcommand = {},
|
||||
register_on_cheat = {},
|
||||
register_on_craft = {},
|
||||
register_on_dieplayer = {},
|
||||
register_on_dignode = {},
|
||||
register_on_generated = {},
|
||||
register_on_item_eat = {},
|
||||
register_on_joinplayer = {},
|
||||
register_on_leaveplayer = {},
|
||||
register_on_liquid_transformed = {},
|
||||
register_on_mapgen_init = {},
|
||||
register_on_modchannel_message = {},
|
||||
register_on_mods_loaded = {},
|
||||
register_on_newplayer = {},
|
||||
register_on_placenode = {},
|
||||
register_on_player_hpchange = {},
|
||||
register_on_player_inventory_action = {},
|
||||
register_on_player_receive_fields = {},
|
||||
register_on_prejoinplayer = {},
|
||||
register_on_priv_grant = {},
|
||||
register_on_priv_revoke = {},
|
||||
register_on_protection_violation = {},
|
||||
register_on_punchnode = {},
|
||||
register_on_punchplayer = {},
|
||||
register_on_respawnplayer = {},
|
||||
register_on_rightclickplayer = {},
|
||||
register_on_shutdown = {},
|
||||
register_ore = {},
|
||||
register_playerevent = {},
|
||||
register_privilege = {},
|
||||
register_schematic = {},
|
||||
register_tool = {},
|
||||
registered_abms = {other_fields = true},
|
||||
registered_aliases = {other_fields = true},
|
||||
registered_allow_player_inventory_actions = {other_fields = true},
|
||||
registered_biomes = {other_fields = true},
|
||||
registered_can_bypass_userlimit = {other_fields = true},
|
||||
registered_chatcommands = {other_fields = true},
|
||||
registered_craft_predicts = {other_fields = true},
|
||||
registered_craftitems = {other_fields = true},
|
||||
registered_decorations = {other_fields = true},
|
||||
registered_entities = {other_fields = true},
|
||||
registered_globalsteps = {other_fields = true},
|
||||
registered_items = {other_fields = true},
|
||||
registered_lbms = {other_fields = true},
|
||||
registered_nodes = {other_fields = true},
|
||||
registered_on_authplayers = {other_fields = true},
|
||||
registered_on_chat_messages = {other_fields = true},
|
||||
registered_on_chatcommands = {other_fields = true},
|
||||
registered_on_cheats = {other_fields = true},
|
||||
registered_on_crafts = {other_fields = true},
|
||||
registered_on_dieplayers = {other_fields = true},
|
||||
registered_on_dignodes = {other_fields = true},
|
||||
registered_on_generateds = {other_fields = true},
|
||||
registered_on_item_eats = {other_fields = true},
|
||||
registered_on_joinplayers = {other_fields = true},
|
||||
registered_on_leaveplayers = {other_fields = true},
|
||||
registered_on_liquid_transformed = {other_fields = true},
|
||||
registered_on_modchannel_message = {other_fields = true},
|
||||
registered_on_mods_loaded = {other_fields = true},
|
||||
registered_on_newplayers = {other_fields = true},
|
||||
registered_on_placenodes = {other_fields = true},
|
||||
registered_on_player_hpchange = {other_fields = true},
|
||||
registered_on_player_hpchanges = {other_fields = true},
|
||||
registered_on_player_inventory_actions = {other_fields = true},
|
||||
registered_on_player_receive_fields = {other_fields = true},
|
||||
registered_on_prejoinplayers = {other_fields = true},
|
||||
registered_on_priv_grant = {other_fields = true},
|
||||
registered_on_priv_revoke = {other_fields = true},
|
||||
registered_on_protection_violation = {other_fields = true},
|
||||
registered_on_punchnodes = {other_fields = true},
|
||||
registered_on_punchplayers = {other_fields = true},
|
||||
registered_on_respawnplayers = {other_fields = true},
|
||||
registered_on_rightclickplayers = {other_fields = true},
|
||||
registered_on_shutdown = {other_fields = true},
|
||||
registered_ores = {other_fields = true},
|
||||
registered_playerevents = {other_fields = true},
|
||||
registered_privileges = {other_fields = true},
|
||||
registered_tools = {other_fields = true},
|
||||
remove_detached_inventory = {},
|
||||
remove_detached_inventory_raw = {},
|
||||
remove_node = {},
|
||||
remove_player = {},
|
||||
remove_player_auth = {},
|
||||
request_http_api = {},
|
||||
request_insecure_environment = {},
|
||||
request_shutdown = {},
|
||||
rgba = {},
|
||||
rmdir = {},
|
||||
rollback_get_last_node_actor = {},
|
||||
rollback_get_node_actions = {},
|
||||
rollback_punch_callbacks = {},
|
||||
rollback_revert_actions_by = {},
|
||||
rotate_and_place = {},
|
||||
rotate_node = {},
|
||||
run_callbacks = {},
|
||||
run_priv_callbacks = {},
|
||||
safe_file_write = {},
|
||||
send_join_message = {},
|
||||
send_leave_message = {},
|
||||
serialize = {},
|
||||
serialize_roundtrip = {},
|
||||
serialize_schematic = {},
|
||||
set_gen_notify = {},
|
||||
set_last_run_mod = {},
|
||||
set_mapgen_params = {},
|
||||
set_mapgen_setting = {},
|
||||
set_mapgen_setting_noiseparams = {},
|
||||
set_node = {},
|
||||
set_node_level = {},
|
||||
set_noiseparams = {},
|
||||
set_player_password = {},
|
||||
set_player_privs = {},
|
||||
set_timeofday = {},
|
||||
setting_get = {},
|
||||
setting_get_pos = {},
|
||||
setting_getbool = {},
|
||||
setting_save = {},
|
||||
setting_set = {},
|
||||
setting_setbool = {},
|
||||
settings = {
|
||||
fields = {
|
||||
get = {},
|
||||
get_bool = {},
|
||||
get_np_group = {},
|
||||
get_flags = {},
|
||||
set = {},
|
||||
set_bool = {},
|
||||
set_np_group = {},
|
||||
remove = {},
|
||||
get_names = {},
|
||||
write = {},
|
||||
to_table = {},
|
||||
},
|
||||
},
|
||||
sha1 = {},
|
||||
show_formspec = {},
|
||||
show_general_help_formspec = {},
|
||||
show_privs_help_formspec = {},
|
||||
sound_fade = {},
|
||||
sound_play = {},
|
||||
sound_stop = {},
|
||||
spawn_falling_node = {},
|
||||
spawn_item = {},
|
||||
spawn_tree = {},
|
||||
string_to_area = {},
|
||||
string_to_pos = {},
|
||||
string_to_privs = {},
|
||||
strip_background_colors = {},
|
||||
strip_colors = {},
|
||||
strip_foreground_colors = {},
|
||||
strip_param2_color = {},
|
||||
swap_node = {},
|
||||
tooldef_default = {},
|
||||
transforming_liquid_add = {},
|
||||
translate = {},
|
||||
unban_player_or_ip = {},
|
||||
unregister_biome = {},
|
||||
unregister_chatcommand = {},
|
||||
unregister_item = {},
|
||||
wallmounted_to_dir = {},
|
||||
wrap_text = {},
|
||||
write_json = {},
|
||||
yaw_to_dir = {},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
stds.fmod = {
|
||||
globals = {
|
||||
"fmod",
|
||||
},
|
||||
read_globals = {
|
||||
},
|
||||
}
|
41
mods/fmod/.pre-commit-config.yaml
Normal file
41
mods/fmod/.pre-commit-config.yaml
Normal file
|
@ -0,0 +1,41 @@
|
|||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v3.3.0
|
||||
hooks:
|
||||
- id: fix-byte-order-marker
|
||||
- id: end-of-file-fixer
|
||||
- id: trailing-whitespace
|
||||
- id: mixed-line-ending
|
||||
args: [ --fix=lf ]
|
||||
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: detect_debug
|
||||
name: detect debug
|
||||
language: pygrep
|
||||
entry: DEBUG
|
||||
pass_filenames: true
|
||||
exclude: .pre-commit-config.yaml
|
||||
fail_fast: true
|
||||
- id: date_version
|
||||
name: date version
|
||||
language: script
|
||||
entry: .check_date.sh
|
||||
files: mod.conf
|
||||
always_run: true
|
||||
fail_fast: true
|
||||
- id: stylua
|
||||
name: stylua
|
||||
language: system
|
||||
entry: stylua
|
||||
pass_filenames: true
|
||||
types: [ file, lua ]
|
||||
fail_fast: true
|
||||
- id: luacheck
|
||||
name: luacheck
|
||||
language: system
|
||||
entry: luacheck
|
||||
pass_filenames: true
|
||||
types: [ file, lua ]
|
||||
args: [ -q ]
|
||||
fail_fast: true
|
168
mods/fmod/LICENSE.txt
Normal file
168
mods/fmod/LICENSE.txt
Normal file
|
@ -0,0 +1,168 @@
|
|||
this license is for the code.
|
||||
any non-code media included in this repository is covered by the contents of MEDIA_LICENSE.txt.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
427
mods/fmod/MEDIA_LICENSE.txt
Normal file
427
mods/fmod/MEDIA_LICENSE.txt
Normal file
|
@ -0,0 +1,427 @@
|
|||
Attribution-ShareAlike 4.0 International
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Corporation ("Creative Commons") is not a law firm and
|
||||
does not provide legal services or legal advice. Distribution of
|
||||
Creative Commons public licenses does not create a lawyer-client or
|
||||
other relationship. Creative Commons makes its licenses and related
|
||||
information available on an "as-is" basis. Creative Commons gives no
|
||||
warranties regarding its licenses, any material licensed under their
|
||||
terms and conditions, or any related information. Creative Commons
|
||||
disclaims all liability for damages resulting from their use to the
|
||||
fullest extent possible.
|
||||
|
||||
Using Creative Commons Public Licenses
|
||||
|
||||
Creative Commons public licenses provide a standard set of terms and
|
||||
conditions that creators and other rights holders may use to share
|
||||
original works of authorship and other material subject to copyright
|
||||
and certain other rights specified in the public license below. The
|
||||
following considerations are for informational purposes only, are not
|
||||
exhaustive, and do not form part of our licenses.
|
||||
|
||||
Considerations for licensors: Our public licenses are
|
||||
intended for use by those authorized to give the public
|
||||
permission to use material in ways otherwise restricted by
|
||||
copyright and certain other rights. Our licenses are
|
||||
irrevocable. Licensors should read and understand the terms
|
||||
and conditions of the license they choose before applying it.
|
||||
Licensors should also secure all rights necessary before
|
||||
applying our licenses so that the public can reuse the
|
||||
material as expected. Licensors should clearly mark any
|
||||
material not subject to the license. This includes other CC-
|
||||
licensed material, or material used under an exception or
|
||||
limitation to copyright. More considerations for licensors:
|
||||
wiki.creativecommons.org/Considerations_for_licensors
|
||||
|
||||
Considerations for the public: By using one of our public
|
||||
licenses, a licensor grants the public permission to use the
|
||||
licensed material under specified terms and conditions. If
|
||||
the licensor's permission is not necessary for any reason--for
|
||||
example, because of any applicable exception or limitation to
|
||||
copyright--then that use is not regulated by the license. Our
|
||||
licenses grant only permissions under copyright and certain
|
||||
other rights that a licensor has authority to grant. Use of
|
||||
the licensed material may still be restricted for other
|
||||
reasons, including because others have copyright or other
|
||||
rights in the material. A licensor may make special requests,
|
||||
such as asking that all changes be marked or described.
|
||||
Although not required by our licenses, you are encouraged to
|
||||
respect those requests where reasonable. More considerations
|
||||
for the public:
|
||||
wiki.creativecommons.org/Considerations_for_licensees
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Attribution-ShareAlike 4.0 International Public
|
||||
License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree
|
||||
to be bound by the terms and conditions of this Creative Commons
|
||||
Attribution-ShareAlike 4.0 International Public License ("Public
|
||||
License"). To the extent this Public License may be interpreted as a
|
||||
contract, You are granted the Licensed Rights in consideration of Your
|
||||
acceptance of these terms and conditions, and the Licensor grants You
|
||||
such rights in consideration of benefits the Licensor receives from
|
||||
making the Licensed Material available under these terms and
|
||||
conditions.
|
||||
|
||||
|
||||
Section 1 -- Definitions.
|
||||
|
||||
a. Adapted Material means material subject to Copyright and Similar
|
||||
Rights that is derived from or based upon the Licensed Material
|
||||
and in which the Licensed Material is translated, altered,
|
||||
arranged, transformed, or otherwise modified in a manner requiring
|
||||
permission under the Copyright and Similar Rights held by the
|
||||
Licensor. For purposes of this Public License, where the Licensed
|
||||
Material is a musical work, performance, or sound recording,
|
||||
Adapted Material is always produced where the Licensed Material is
|
||||
synched in timed relation with a moving image.
|
||||
|
||||
b. Adapter's License means the license You apply to Your Copyright
|
||||
and Similar Rights in Your contributions to Adapted Material in
|
||||
accordance with the terms and conditions of this Public License.
|
||||
|
||||
c. BY-SA Compatible License means a license listed at
|
||||
creativecommons.org/compatiblelicenses, approved by Creative
|
||||
Commons as essentially the equivalent of this Public License.
|
||||
|
||||
d. Copyright and Similar Rights means copyright and/or similar rights
|
||||
closely related to copyright including, without limitation,
|
||||
performance, broadcast, sound recording, and Sui Generis Database
|
||||
Rights, without regard to how the rights are labeled or
|
||||
categorized. For purposes of this Public License, the rights
|
||||
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
||||
Rights.
|
||||
|
||||
e. Effective Technological Measures means those measures that, in the
|
||||
absence of proper authority, may not be circumvented under laws
|
||||
fulfilling obligations under Article 11 of the WIPO Copyright
|
||||
Treaty adopted on December 20, 1996, and/or similar international
|
||||
agreements.
|
||||
|
||||
f. Exceptions and Limitations means fair use, fair dealing, and/or
|
||||
any other exception or limitation to Copyright and Similar Rights
|
||||
that applies to Your use of the Licensed Material.
|
||||
|
||||
g. License Elements means the license attributes listed in the name
|
||||
of a Creative Commons Public License. The License Elements of this
|
||||
Public License are Attribution and ShareAlike.
|
||||
|
||||
h. Licensed Material means the artistic or literary work, database,
|
||||
or other material to which the Licensor applied this Public
|
||||
License.
|
||||
|
||||
i. Licensed Rights means the rights granted to You subject to the
|
||||
terms and conditions of this Public License, which are limited to
|
||||
all Copyright and Similar Rights that apply to Your use of the
|
||||
Licensed Material and that the Licensor has authority to license.
|
||||
|
||||
j. Licensor means the individual(s) or entity(ies) granting rights
|
||||
under this Public License.
|
||||
|
||||
k. Share means to provide material to the public by any means or
|
||||
process that requires permission under the Licensed Rights, such
|
||||
as reproduction, public display, public performance, distribution,
|
||||
dissemination, communication, or importation, and to make material
|
||||
available to the public including in ways that members of the
|
||||
public may access the material from a place and at a time
|
||||
individually chosen by them.
|
||||
|
||||
l. Sui Generis Database Rights means rights other than copyright
|
||||
resulting from Directive 96/9/EC of the European Parliament and of
|
||||
the Council of 11 March 1996 on the legal protection of databases,
|
||||
as amended and/or succeeded, as well as other essentially
|
||||
equivalent rights anywhere in the world.
|
||||
|
||||
m. You means the individual or entity exercising the Licensed Rights
|
||||
under this Public License. Your has a corresponding meaning.
|
||||
|
||||
|
||||
Section 2 -- Scope.
|
||||
|
||||
a. License grant.
|
||||
|
||||
1. Subject to the terms and conditions of this Public License,
|
||||
the Licensor hereby grants You a worldwide, royalty-free,
|
||||
non-sublicensable, non-exclusive, irrevocable license to
|
||||
exercise the Licensed Rights in the Licensed Material to:
|
||||
|
||||
a. reproduce and Share the Licensed Material, in whole or
|
||||
in part; and
|
||||
|
||||
b. produce, reproduce, and Share Adapted Material.
|
||||
|
||||
2. Exceptions and Limitations. For the avoidance of doubt, where
|
||||
Exceptions and Limitations apply to Your use, this Public
|
||||
License does not apply, and You do not need to comply with
|
||||
its terms and conditions.
|
||||
|
||||
3. Term. The term of this Public License is specified in Section
|
||||
6(a).
|
||||
|
||||
4. Media and formats; technical modifications allowed. The
|
||||
Licensor authorizes You to exercise the Licensed Rights in
|
||||
all media and formats whether now known or hereafter created,
|
||||
and to make technical modifications necessary to do so. The
|
||||
Licensor waives and/or agrees not to assert any right or
|
||||
authority to forbid You from making technical modifications
|
||||
necessary to exercise the Licensed Rights, including
|
||||
technical modifications necessary to circumvent Effective
|
||||
Technological Measures. For purposes of this Public License,
|
||||
simply making modifications authorized by this Section 2(a)
|
||||
(4) never produces Adapted Material.
|
||||
|
||||
5. Downstream recipients.
|
||||
|
||||
a. Offer from the Licensor -- Licensed Material. Every
|
||||
recipient of the Licensed Material automatically
|
||||
receives an offer from the Licensor to exercise the
|
||||
Licensed Rights under the terms and conditions of this
|
||||
Public License.
|
||||
|
||||
b. Additional offer from the Licensor -- Adapted Material.
|
||||
Every recipient of Adapted Material from You
|
||||
automatically receives an offer from the Licensor to
|
||||
exercise the Licensed Rights in the Adapted Material
|
||||
under the conditions of the Adapter's License You apply.
|
||||
|
||||
c. No downstream restrictions. You may not offer or impose
|
||||
any additional or different terms or conditions on, or
|
||||
apply any Effective Technological Measures to, the
|
||||
Licensed Material if doing so restricts exercise of the
|
||||
Licensed Rights by any recipient of the Licensed
|
||||
Material.
|
||||
|
||||
6. No endorsement. Nothing in this Public License constitutes or
|
||||
may be construed as permission to assert or imply that You
|
||||
are, or that Your use of the Licensed Material is, connected
|
||||
with, or sponsored, endorsed, or granted official status by,
|
||||
the Licensor or others designated to receive attribution as
|
||||
provided in Section 3(a)(1)(A)(i).
|
||||
|
||||
b. Other rights.
|
||||
|
||||
1. Moral rights, such as the right of integrity, are not
|
||||
licensed under this Public License, nor are publicity,
|
||||
privacy, and/or other similar personality rights; however, to
|
||||
the extent possible, the Licensor waives and/or agrees not to
|
||||
assert any such rights held by the Licensor to the limited
|
||||
extent necessary to allow You to exercise the Licensed
|
||||
Rights, but not otherwise.
|
||||
|
||||
2. Patent and trademark rights are not licensed under this
|
||||
Public License.
|
||||
|
||||
3. To the extent possible, the Licensor waives any right to
|
||||
collect royalties from You for the exercise of the Licensed
|
||||
Rights, whether directly or through a collecting society
|
||||
under any voluntary or waivable statutory or compulsory
|
||||
licensing scheme. In all other cases the Licensor expressly
|
||||
reserves any right to collect such royalties.
|
||||
|
||||
|
||||
Section 3 -- License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the
|
||||
following conditions.
|
||||
|
||||
a. Attribution.
|
||||
|
||||
1. If You Share the Licensed Material (including in modified
|
||||
form), You must:
|
||||
|
||||
a. retain the following if it is supplied by the Licensor
|
||||
with the Licensed Material:
|
||||
|
||||
i. identification of the creator(s) of the Licensed
|
||||
Material and any others designated to receive
|
||||
attribution, in any reasonable manner requested by
|
||||
the Licensor (including by pseudonym if
|
||||
designated);
|
||||
|
||||
ii. a copyright notice;
|
||||
|
||||
iii. a notice that refers to this Public License;
|
||||
|
||||
iv. a notice that refers to the disclaimer of
|
||||
warranties;
|
||||
|
||||
v. a URI or hyperlink to the Licensed Material to the
|
||||
extent reasonably practicable;
|
||||
|
||||
b. indicate if You modified the Licensed Material and
|
||||
retain an indication of any previous modifications; and
|
||||
|
||||
c. indicate the Licensed Material is licensed under this
|
||||
Public License, and include the text of, or the URI or
|
||||
hyperlink to, this Public License.
|
||||
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any
|
||||
reasonable manner based on the medium, means, and context in
|
||||
which You Share the Licensed Material. For example, it may be
|
||||
reasonable to satisfy the conditions by providing a URI or
|
||||
hyperlink to a resource that includes the required
|
||||
information.
|
||||
|
||||
3. If requested by the Licensor, You must remove any of the
|
||||
information required by Section 3(a)(1)(A) to the extent
|
||||
reasonably practicable.
|
||||
|
||||
b. ShareAlike.
|
||||
|
||||
In addition to the conditions in Section 3(a), if You Share
|
||||
Adapted Material You produce, the following conditions also apply.
|
||||
|
||||
1. The Adapter's License You apply must be a Creative Commons
|
||||
license with the same License Elements, this version or
|
||||
later, or a BY-SA Compatible License.
|
||||
|
||||
2. You must include the text of, or the URI or hyperlink to, the
|
||||
Adapter's License You apply. You may satisfy this condition
|
||||
in any reasonable manner based on the medium, means, and
|
||||
context in which You Share Adapted Material.
|
||||
|
||||
3. You may not offer or impose any additional or different terms
|
||||
or conditions on, or apply any Effective Technological
|
||||
Measures to, Adapted Material that restrict exercise of the
|
||||
rights granted under the Adapter's License You apply.
|
||||
|
||||
|
||||
Section 4 -- Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that
|
||||
apply to Your use of the Licensed Material:
|
||||
|
||||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
||||
to extract, reuse, reproduce, and Share all or a substantial
|
||||
portion of the contents of the database;
|
||||
|
||||
b. if You include all or a substantial portion of the database
|
||||
contents in a database in which You have Sui Generis Database
|
||||
Rights, then the database in which You have Sui Generis Database
|
||||
Rights (but not its individual contents) is Adapted Material,
|
||||
including for purposes of Section 3(b); and
|
||||
|
||||
c. You must comply with the conditions in Section 3(a) if You Share
|
||||
all or a substantial portion of the contents of the database.
|
||||
|
||||
For the avoidance of doubt, this Section 4 supplements and does not
|
||||
replace Your obligations under this Public License where the Licensed
|
||||
Rights include other Copyright and Similar Rights.
|
||||
|
||||
|
||||
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
||||
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
||||
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
||||
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
||||
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
||||
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
||||
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
||||
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
||||
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
||||
|
||||
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
||||
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
||||
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
||||
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
||||
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
||||
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
||||
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
||||
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
||||
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
c. The disclaimer of warranties and limitation of liability provided
|
||||
above shall be interpreted in a manner that, to the extent
|
||||
possible, most closely approximates an absolute disclaimer and
|
||||
waiver of all liability.
|
||||
|
||||
|
||||
Section 6 -- Term and Termination.
|
||||
|
||||
a. This Public License applies for the term of the Copyright and
|
||||
Similar Rights licensed here. However, if You fail to comply with
|
||||
this Public License, then Your rights under this Public License
|
||||
terminate automatically.
|
||||
|
||||
b. Where Your right to use the Licensed Material has terminated under
|
||||
Section 6(a), it reinstates:
|
||||
|
||||
1. automatically as of the date the violation is cured, provided
|
||||
it is cured within 30 days of Your discovery of the
|
||||
violation; or
|
||||
|
||||
2. upon express reinstatement by the Licensor.
|
||||
|
||||
For the avoidance of doubt, this Section 6(b) does not affect any
|
||||
right the Licensor may have to seek remedies for Your violations
|
||||
of this Public License.
|
||||
|
||||
c. For the avoidance of doubt, the Licensor may also offer the
|
||||
Licensed Material under separate terms or conditions or stop
|
||||
distributing the Licensed Material at any time; however, doing so
|
||||
will not terminate this Public License.
|
||||
|
||||
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
||||
License.
|
||||
|
||||
|
||||
Section 7 -- Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different
|
||||
terms or conditions communicated by You unless expressly agreed.
|
||||
|
||||
b. Any arrangements, understandings, or agreements regarding the
|
||||
Licensed Material not stated herein are separate from and
|
||||
independent of the terms and conditions of this Public License.
|
||||
|
||||
|
||||
Section 8 -- Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and
|
||||
shall not be interpreted to, reduce, limit, restrict, or impose
|
||||
conditions on any use of the Licensed Material that could lawfully
|
||||
be made without permission under this Public License.
|
||||
|
||||
b. To the extent possible, if any provision of this Public License is
|
||||
deemed unenforceable, it shall be automatically reformed to the
|
||||
minimum extent necessary to make it enforceable. If the provision
|
||||
cannot be reformed, it shall be severed from this Public License
|
||||
without affecting the enforceability of the remaining terms and
|
||||
conditions.
|
||||
|
||||
c. No term or condition of this Public License will be waived and no
|
||||
failure to comply consented to unless expressly agreed to by the
|
||||
Licensor.
|
||||
|
||||
d. Nothing in this Public License constitutes or may be interpreted
|
||||
as a limitation upon, or waiver of, any privileges and immunities
|
||||
that apply to the Licensor or You, including from the legal
|
||||
processes of any jurisdiction or authority.
|
||||
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons is not a party to its public
|
||||
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
||||
its public licenses to material it publishes and in those instances
|
||||
will be considered the “Licensor.” The text of the Creative Commons
|
||||
public licenses is dedicated to the public domain under the CC0 Public
|
||||
Domain Dedication. Except for the limited purpose of indicating that
|
||||
material is shared under a Creative Commons public license or as
|
||||
otherwise permitted by the Creative Commons policies published at
|
||||
creativecommons.org/policies, Creative Commons does not authorize the
|
||||
use of the trademark "Creative Commons" or any other trademark or logo
|
||||
of Creative Commons without its prior written consent including,
|
||||
without limitation, in connection with any unauthorized modifications
|
||||
to any of its public licenses or any other arrangements,
|
||||
understandings, or agreements concerning use of licensed material. For
|
||||
the avoidance of doubt, this paragraph does not form part of the
|
||||
public licenses.
|
||||
|
||||
Creative Commons may be contacted at creativecommons.org.
|
81
mods/fmod/README.md
Normal file
81
mods/fmod/README.md
Normal file
|
@ -0,0 +1,81 @@
|
|||
# fmod
|
||||
|
||||
flux's mod boilerplate
|
||||
|
||||
## what?
|
||||
|
||||
i use this to create a common basic API that all of my mods share. it grabs a lot of mod metadata from e.g. mod.conf
|
||||
and settingtypes.txt and automatically makes those values available.
|
||||
|
||||
this mod is primarily for my own use, but i'd be elated if other people find it useful. suggestions are welcome, but
|
||||
note that my own patterns come first in any suggested changes. the more mods i create which depend on this (there's
|
||||
over 70 and counting, though only 50 or 60 are released), the harder it will be to change fundamental features. but
|
||||
if i've made major mistake somehow, please let me know sooner rather than later!
|
||||
|
||||
## public API
|
||||
|
||||
* `modname = fmod.create(fork)`
|
||||
|
||||
creates the boilerplate.
|
||||
|
||||
`fork` is an optional parameter for other people to use if they fork a mod.
|
||||
|
||||
the api which is created looks like this:
|
||||
|
||||
```lua
|
||||
local f = string.format
|
||||
local modname = minetest.get_current_modname()
|
||||
local S = minetest.get_translator(modname)
|
||||
local modpath = minetest.get_modpath(modname)
|
||||
local mod_conf = Settings(modpath .. DIR_DELIM .. "settingtypes.txt")
|
||||
|
||||
modname = {
|
||||
modname = modname,
|
||||
modpath = modpath,
|
||||
title = mod_conf:get("title") or modname,
|
||||
description = mod_conf:get("description"),
|
||||
author = mod_conf:get("author"),
|
||||
license = mod_conf:get("license"),
|
||||
version = mod_conf:get("version"),
|
||||
fork = fork or "flux", -- fork is the argument to `fmod.create(fork)`
|
||||
|
||||
S = S,
|
||||
|
||||
has = build_has(mod_conf), -- this reads mod.conf and creates a set from optional_depends
|
||||
settings = get_settings(modname), -- this reads and parses settingtypes.txt, and populates w/ values from
|
||||
-- minetest.conf, or otherwise the defaults specified in settingtypes.txt
|
||||
|
||||
check_version = function(required)
|
||||
assert(mod_conf:get("version") >= required, f("%s requires a newer version of %s; please update it", minetest.get_current_modname(), modname))
|
||||
end,
|
||||
|
||||
check_minetest_version = function(major, minor, patch, other, reason)
|
||||
assert(..., "check that the required version of the game engine is present. \"other\" is reserved for " ..
|
||||
"future use, once i figure out how to deal w/ engine forks."
|
||||
)
|
||||
end,
|
||||
|
||||
log = function(level, messagefmt, ...)
|
||||
return minetest.log(level, f("[%s] %s", modname, f(messagefmt, ...)))
|
||||
end,
|
||||
|
||||
chat_send_player = function(player, messagefmt, ...)
|
||||
minetest.chat_send_player(player, f("[%s] %s", modname, S(messagefmt, ...)))
|
||||
end,
|
||||
|
||||
chat_send_all = function(message, ...)
|
||||
minetest.chat_send_all(f("[%s] %s", modname, S(message, ...)))
|
||||
end,
|
||||
|
||||
dofile = function(...)
|
||||
return dofile(table.concat({modpath, ...}, DIR_DELIM) .. ".lua")
|
||||
end,
|
||||
|
||||
async_dofile = function(...) -- load a file into the async environment
|
||||
return minetest.register_async_dofile(table.concat({ modpath, ... }, DIR_DELIM) .. ".lua")
|
||||
end,
|
||||
}
|
||||
```
|
||||
|
||||
note that fmod itself is created w/ this same boilerplate; therefore, i can indicate that certain mods require an
|
||||
up-to-date version of fmod to operate.
|
12
mods/fmod/build_has.lua
Normal file
12
mods/fmod/build_has.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
return function(mod_conf)
|
||||
local optional_depends = mod_conf:get("optional_depends")
|
||||
if not optional_depends then
|
||||
return {}
|
||||
end
|
||||
local has = {}
|
||||
for _, mod in ipairs(optional_depends:split()) do
|
||||
mod = mod:trim()
|
||||
has[mod] = minetest.get_modpath(mod) and true or false
|
||||
end
|
||||
return has
|
||||
end
|
150
mods/fmod/get_settings.lua
Normal file
150
mods/fmod/get_settings.lua
Normal file
|
@ -0,0 +1,150 @@
|
|||
-- https://github.com/minetest/minetest/blob/master/builtin/settingtypes.txt
|
||||
-- https://github.com/minetest/minetest/blob/master/builtin/mainmenu/settings/settingtypes.lua
|
||||
|
||||
local f = string.format
|
||||
|
||||
local function get_lines_from_file(filename)
|
||||
local fh = io.open(filename, "r")
|
||||
if not fh then
|
||||
return
|
||||
end
|
||||
local lines = fh:read("*all"):split("\n")
|
||||
fh:close()
|
||||
return lines
|
||||
end
|
||||
|
||||
local function strip_readable_name(text)
|
||||
if text:sub(1, 1) ~= "(" then
|
||||
error(f("%q %s", text, text))
|
||||
end
|
||||
local depth = 1
|
||||
local i = 2
|
||||
while depth > 0 do
|
||||
if text:sub(i, i) == ")" then
|
||||
depth = depth - 1
|
||||
elseif text:sub(i, i) == "(" then
|
||||
depth = depth + 1
|
||||
end
|
||||
i = i + 1
|
||||
end
|
||||
return text:sub(i):trim()
|
||||
end
|
||||
|
||||
local function starts_with(s, start)
|
||||
return s:sub(1, #start) == start
|
||||
end
|
||||
|
||||
local function parse_line(modname, line)
|
||||
if line:match("^%s*#") or line:match("^%s*%[") or line:match("^%s*$") then
|
||||
return
|
||||
end
|
||||
line = line:trim()
|
||||
local full_name, rest = unpack(line:split("%s+", false, 1, true))
|
||||
if not (full_name and rest) then
|
||||
return
|
||||
end
|
||||
local secure = false
|
||||
if starts_with(full_name, "secure.") then
|
||||
secure = true
|
||||
full_name = full_name:sub(#"secure." + 1)
|
||||
end
|
||||
local modname2, short_name = unpack(full_name:split("[:%.]", false, 1, true))
|
||||
assert(modname2 == modname, f("invalid setting name %s", full_name))
|
||||
rest = strip_readable_name(rest)
|
||||
local datatype, default, params
|
||||
datatype, rest = unpack(rest:split("%s", true, 1, true))
|
||||
rest = rest or ""
|
||||
if datatype == "string" then
|
||||
if rest:sub(1, 1) == '"' and rest:sub(#rest, #rest) == '"' then
|
||||
-- this is not actually according to spec settingtypes.txt, but there's no good way to specify that the
|
||||
-- default value is a single space, so we invent our own syntax
|
||||
default = rest:sub(2, #rest - 1)
|
||||
elseif rest:sub(1, 2) == '\\"' then
|
||||
default = rest:sub(2)
|
||||
else
|
||||
default = rest
|
||||
end
|
||||
params = ""
|
||||
else
|
||||
default, params = unpack(rest:split("%s+", false, 1, true))
|
||||
end
|
||||
|
||||
full_name = (secure and "secure." or "") .. full_name
|
||||
return full_name, short_name, datatype, default, params
|
||||
end
|
||||
|
||||
local getters = {
|
||||
-- TODO there's other setting types, but i don't use them and no-one else uses this mod
|
||||
int = function(full_name, default, params)
|
||||
return tonumber(minetest.settings:get(full_name)) or tonumber(default)
|
||||
end,
|
||||
string = function(full_name, default, params)
|
||||
return minetest.settings:get(full_name) or default
|
||||
end,
|
||||
bool = function(full_name, default, params)
|
||||
return minetest.settings:get_bool(full_name, minetest.is_yes(default))
|
||||
end,
|
||||
float = function(full_name, default, params)
|
||||
return tonumber(minetest.settings:get(full_name)) or tonumber(default)
|
||||
end,
|
||||
enum = function(full_name, default, params)
|
||||
return minetest.settings:get(full_name) or default
|
||||
end,
|
||||
path = function(full_name, default, params)
|
||||
return minetest.settings:get(full_name) or default or ""
|
||||
end,
|
||||
filepath = function(full_name, default, params)
|
||||
return minetest.settings:get(full_name) or default or ""
|
||||
end,
|
||||
key = function(full_name, default, params)
|
||||
return minetest.settings:get(full_name) or default
|
||||
end,
|
||||
flags = function(full_name, default, params)
|
||||
return (minetest.settings:get(full_name) or default):split()
|
||||
end,
|
||||
v3f = function(full_name, default, params)
|
||||
return minetest.string_to_pos(minetest.settings:get(full_name) or default)
|
||||
end,
|
||||
}
|
||||
|
||||
return function(modname)
|
||||
local modpath = minetest.get_modpath(modname)
|
||||
local settingtypes_lines = get_lines_from_file(modpath .. DIR_DELIM .. "settingtypes.txt")
|
||||
|
||||
if not settingtypes_lines then
|
||||
return
|
||||
end
|
||||
|
||||
local settings = {}
|
||||
for _, line in ipairs(settingtypes_lines) do
|
||||
local full_name, short_name, datatype, default, params = parse_line(modname, line)
|
||||
if full_name then
|
||||
local getter = getters[datatype]
|
||||
if getter then
|
||||
settings[short_name] = getter(full_name, default, params)
|
||||
else
|
||||
error("TODO: implement parsing settings of type " .. datatype)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local listeners_by_key = {}
|
||||
|
||||
return setmetatable({
|
||||
_subscribe_for_modification = function(self, key, func)
|
||||
local listeners = listeners_by_key[key] or {}
|
||||
table.insert(listeners, func)
|
||||
listeners_by_key[key] = listeners
|
||||
end,
|
||||
}, {
|
||||
__index = function(self, key)
|
||||
return settings[key]
|
||||
end,
|
||||
__newindex = function(self, key, value)
|
||||
settings[key] = value
|
||||
for _, func in ipairs(listeners_by_key[key] or {}) do
|
||||
func(value)
|
||||
end
|
||||
end,
|
||||
})
|
||||
end
|
169
mods/fmod/init.lua
Normal file
169
mods/fmod/init.lua
Normal file
|
@ -0,0 +1,169 @@
|
|||
local f = string.format
|
||||
|
||||
local get_current_modname = minetest.get_current_modname
|
||||
local get_modpath = minetest.get_modpath
|
||||
|
||||
local our_modname = get_current_modname()
|
||||
local our_modpath = get_modpath(our_modname)
|
||||
|
||||
local build_has = dofile(our_modpath .. DIR_DELIM .. "build_has.lua")
|
||||
local get_settings = dofile(our_modpath .. DIR_DELIM .. "get_settings.lua")
|
||||
local parse_version = dofile(our_modpath .. DIR_DELIM .. "parse_version.lua")
|
||||
|
||||
local function create(fork, extra_private_state)
|
||||
local modname = get_current_modname()
|
||||
local modpath = get_modpath(modname)
|
||||
local S = minetest.get_translator(modname)
|
||||
local F = minetest.formspec_escape
|
||||
|
||||
local mod_conf = Settings(modpath .. DIR_DELIM .. "mod.conf")
|
||||
assert(modname == mod_conf:get("name"), "mod name mismatch")
|
||||
|
||||
local version = parse_version(mod_conf:get("version"))
|
||||
|
||||
local private_state = {
|
||||
-- minetest.request_insecure_environment() can't be used here
|
||||
-- minetest.request_http_api() can't be used here
|
||||
mod_storage = INIT == "game" and minetest.get_mod_storage(),
|
||||
}
|
||||
|
||||
if extra_private_state then
|
||||
for k, v in pairs(extra_private_state) do
|
||||
private_state[k] = v
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
modname = modname,
|
||||
modpath = modpath,
|
||||
|
||||
title = mod_conf:get("title") or modname,
|
||||
description = mod_conf:get("description"),
|
||||
author = mod_conf:get("author"),
|
||||
license = mod_conf:get("license"),
|
||||
media_license = mod_conf:get("media_license"),
|
||||
website = mod_conf:get("website") or mod_conf:get("url"),
|
||||
version = version,
|
||||
fork = fork or "flux",
|
||||
|
||||
S = S,
|
||||
FS = function(...)
|
||||
return F(S(...))
|
||||
end,
|
||||
|
||||
has = build_has(mod_conf),
|
||||
settings = get_settings(modname),
|
||||
|
||||
check_version = function(required, reason)
|
||||
if type(required) == "table" then
|
||||
required = os.time(required)
|
||||
end
|
||||
local calling_modname = minetest.get_current_modname() or "UNKNOWN"
|
||||
if reason then
|
||||
assert(
|
||||
version >= required,
|
||||
f(
|
||||
"%s requires a newer version of %s because %q; please update it.\n"
|
||||
.. "go to the main game menu, click the content tab, browse online content, and update all.\n"
|
||||
.. "(have %s, require %s)",
|
||||
calling_modname,
|
||||
modname,
|
||||
reason,
|
||||
version,
|
||||
required
|
||||
)
|
||||
)
|
||||
else
|
||||
assert(
|
||||
version >= required,
|
||||
f(
|
||||
"%s requires a newer version of %s; please update it.\n"
|
||||
.. "go to the main game menu, click the content tab, browse online content, and update all.\n"
|
||||
.. "(have %s, require %s)",
|
||||
calling_modname,
|
||||
modname,
|
||||
version,
|
||||
required
|
||||
)
|
||||
)
|
||||
end
|
||||
end,
|
||||
|
||||
check_minetest_version = function(major, minor, patch, other, reason)
|
||||
local mt_version = minetest.get_version()
|
||||
-- TODO: figure out how to allow various "projects" (e.g. Minetest, Multicraft) properly
|
||||
-- TODO: we perhaps want to allow depending on multiple projects, so this is complicated.
|
||||
local mt_major, mt_minor, mt_patch = mt_version.string:match("^(%d+)%.(%d+)%.(%d+)")
|
||||
if not (mt_major and mt_minor and mt_patch) then
|
||||
error(
|
||||
f(
|
||||
"%s is not compatible w/ minetest %s because we don't understand the version",
|
||||
modname,
|
||||
mt_version.string
|
||||
)
|
||||
)
|
||||
end
|
||||
mt_major = tonumber(mt_major)
|
||||
mt_minor = tonumber(mt_minor)
|
||||
mt_patch = tonumber(mt_patch)
|
||||
local check = true
|
||||
if mt_major < major then
|
||||
check = false
|
||||
elseif mt_major == major then
|
||||
if mt_minor < minor then
|
||||
check = false
|
||||
elseif mt_minor == minor then
|
||||
if mt_patch < patch then
|
||||
check = false
|
||||
end
|
||||
end
|
||||
end
|
||||
if not check then
|
||||
if reason then
|
||||
error(
|
||||
f("%s requires at least minetest %i.%i.%i because it %q", modname, major, minor, patch, reason)
|
||||
)
|
||||
else
|
||||
error(f("%s requires at least minetest %i.%i.%i", modname, major, minor, patch))
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
||||
log = function(level, messagefmt, ...)
|
||||
return minetest.log(level, f("[%s] %s", modname, f(messagefmt, ...)))
|
||||
end,
|
||||
|
||||
chat_send_player = INIT == "game" and function(player, messagefmt, ...)
|
||||
if player.get_player_name then
|
||||
player = player:get_player_name()
|
||||
end
|
||||
|
||||
minetest.chat_send_player(player, f("[%s] %s", modname, S(messagefmt, ...)))
|
||||
end,
|
||||
|
||||
chat_send_all = INIT == "game" and function(message, ...)
|
||||
minetest.chat_send_all(f("[%s] %s", modname, S(message, ...)))
|
||||
end,
|
||||
|
||||
dofile = function(...)
|
||||
assert(modname == get_current_modname(), "attempt to call dofile from external mod")
|
||||
local filename = table.concat({ modpath, ... }, DIR_DELIM) .. ".lua"
|
||||
local loader = assert(loadfile(filename))
|
||||
return loader(private_state)
|
||||
end,
|
||||
|
||||
async_dofile = function(...)
|
||||
assert(modname == get_current_modname(), "attempt to call async_dofile from external mod")
|
||||
local filename = table.concat({ modpath, ... }, DIR_DELIM) .. ".lua"
|
||||
return minetest.register_async_dofile(filename)
|
||||
end,
|
||||
},
|
||||
private_state
|
||||
end
|
||||
|
||||
fmod = create()
|
||||
fmod.create = create
|
||||
|
||||
if INIT == "game" then
|
||||
fmod.async_dofile("init")
|
||||
end
|
11
mods/fmod/mod.conf
Normal file
11
mods/fmod/mod.conf
Normal file
|
@ -0,0 +1,11 @@
|
|||
name = fmod
|
||||
title = fmod
|
||||
description = flux's mod boilerplate
|
||||
website = https://content.minetest.net/packages/rheo/fmod/
|
||||
author = rheo
|
||||
license = LGPL-3.0-or-later
|
||||
media_license = CC-BY-SA-4.0
|
||||
version = 2024-04-03
|
||||
min_minetest_version = 5.8.0
|
||||
supported_games = *
|
||||
release = 24515
|
28
mods/fmod/parse_version.lua
Normal file
28
mods/fmod/parse_version.lua
Normal file
|
@ -0,0 +1,28 @@
|
|||
local f = string.format
|
||||
|
||||
return function(version)
|
||||
local y, m, d, h, mi, s
|
||||
y, m, d = version:match("^(%d%d%d%d)-(%d%d)-(%d%d)$")
|
||||
if y and m and d then
|
||||
return os.time({ year = tonumber(y), month = tonumber(m), day = tonumber(d) })
|
||||
end
|
||||
|
||||
y, m, d, s = version:match("^(%d%d%d%d)-(%d%d)-(%d%d)[%.%s](%d+)$")
|
||||
if y and m and d and s then
|
||||
return os.time({ year = tonumber(y), month = tonumber(m), day = tonumber(d), sec = tonumber(s) })
|
||||
end
|
||||
|
||||
y, m, d, h, mi, s = version:match("^(%d%d%d%d)-(%d%d)-(%d%d)[T ](%d%d):(%d%d):(%d%d)$")
|
||||
if y and m and d and h and mi and s then
|
||||
return os.time({
|
||||
year = tonumber(y),
|
||||
month = tonumber(m),
|
||||
day = tonumber(d),
|
||||
hour = tonumber(h),
|
||||
min = tonumber(mi),
|
||||
sec = tonumber(s),
|
||||
})
|
||||
end
|
||||
|
||||
error(f("can't parse version %q", version))
|
||||
end
|
BIN
mods/fmod/screenshot.png
Normal file
BIN
mods/fmod/screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 160 KiB |
Loading…
Add table
Add a link
Reference in a new issue