Skip to content

Bones:bone. Add random bone and random rotation. LG-2056. - #2426

Open
Shojo-muheheheh wants to merge 1 commit into
lord-server:devfrom
Shojo-muheheheh:bones_III
Open

Shojo-muheheheh wants to merge 1 commit into
lord-server:devfrom
Shojo-muheheheh:bones_III

Conversation

@Shojo-muheheheh

Copy link
Copy Markdown
Contributor

Добавил новую модель миниатюрной кости.
Теперь при установке кости появляется рандомная модель.

Uploading bones_random.mp4…

Comment on lines +14 to +17
core.register_craftitem('bones:bone_2', {
description = S('Bone'),
inventory_image = 'bones_bone_inv.png',
})

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это не нужно

or itemstack
end,
})
core.override_item('bones:bone_2', {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не нужно, нужен только math.random(1, 2) или 3, если их будет 3

drop = 'bones:bone',
node_box = {
type = "fixed",
fixed = {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

мелочь: у первого и седьмого боксов min > max по X и Z, порядок боксов перепутан

},
},
})
core.register_node("bones:bone_2", {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

лучше общие свойства вынести в отдельную таблицу common_definition и в обоих случаях делать table.merge().
и мы вроде 3 варианта хотели ? или я запамятовал ?

},
},
})
core.register_node("bones:bone_2", {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

одинарные кавычки, см. код-стайл

Suggested change
core.register_node("bones:bone_2", {
core.register_node('bones:bone_2', {

paramtype = 'light',
paramtype2 = 'facedir',
is_ground_content = false,
drawtype = "nodebox",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

одинарные кавычки, выравнивание, см. код-стайл

Suggested change
drawtype = "nodebox",
drawtype = 'nodebox',

groups = { dig_immediate = 2 },
drop = 'bones:bone',
node_box = {
type = "fixed",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

одинарные кавычки, выравнивание, см. код-стайл

Suggested change
type = "fixed",
type = 'fixed',

tiles = { 'bones_bone.png' },
groups = { dig_immediate = 2 },
drop = 'bones:bone',
node_box = {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
node_box = {
node_box = {

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants