Merge branch 'Code-Sploit:main' into documentation

master^2
TechDudie 2021-05-19 12:27:34 -05:00
commit ea6bc590e9
4 changed files with 66 additions and 3 deletions

19
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,19 @@
# This is a basic workflow to help you get started with Actions
name: luacheck
# Controls when the action will run.
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
luacheck:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: luacheck
uses: nebularg/actions-luacheck@v1.1.0

39
.luacheckrc Normal file
View File

@ -0,0 +1,39 @@
unused_args = false
allow_defined_top = true
max_line_length = 125
globals = {
"minetest",
mcl_death_messages = {fields = {"messages"}},
}
read_globals = {
string = {fields = {"split"}},
table = {fields = {"copy", "getn", "shuffle"}},
math = {fields = {"round"}},
-- Builtin
"vector", "ItemStack",
"dump", "DIR_DELIM", "VoxelArea", "Settings",
-- MCL
--------------------------------------------
-- CORE
"biomeinfo", "flowlib", "mcl_explosions", "mcl_sounds", "mcl_loot", "mcl_particles", "mcl_util", "mcl_worlds", "walkover", "mcl_colors", "mcl_autogroup",
-- ENTITIES
"mobs", "mobs_mc",
-- ENVIRONNEMENT
"lightning", "mcl_weather",
-- HELP
"mcl_craftguide",
-- HUD
"awards", "mcl_death_messages", "mcl_experience", "mcl_formspec",
-- ITEMS
"mcl_armor", "mcl_crafting_table", "mcl_buckets", "mcl_doors", "mcl_enchanting", "mcl_fire",
"mcl_potions", "mcl_throwing", "mcl_stairs", "screwdriver", "mesecon", "tnt",
-- PLAYER
"mcl_hunger", "playerphysics", "mcl_death_drop", "mcl_damage",
--OTHER
"mcl_vars",
}

View File

@ -54,7 +54,8 @@ function kitpvp.api.register_kit(def)
--local effects = def.effects
-- Is $def completly filled in?
if not _def.name or not _def.items or not _def.armor or not _def.armor_enchantments or not _def.default_items then return end
if not _def.name or not _def.items or not _def.armor or not _def.armor_enchantments or
not _def.default_items then return end
-- Register the kit
kitpvp.kits[_def.name] = _def

View File

@ -4,12 +4,16 @@ HOW TO ADD KITS:
kitpvp.api.register_kit({
name = agreatkitname,
items = {
item(itemstr1, count, {enchantment1 = value, enchantment2 = value}),
item(itemstr1, count, {enchantment1 = value, enchantment2 = value}),
item(itemstr2, count, {enchantment1 = value, enchantment2 = value}),
item(itemstr3, count, {enchantment1 = value, enchantment2 = value})
},
armor = leather/chain/iron/gold/diamond/netherite,
armor_enchantments = {{enchantmentsforhelmet = value}, {enchantmentsforchestplate = value}, {enchantmentsforleggings = value}, {enchantmentsforboots = value}}
armor_enchantments = {
{enchantmentsforhelmet = value},
{enchantmentsforchestplate = value},
{enchantmentsforleggings = value},
{enchantmentsforboots = value}},
})
]]