Shift click #37

Merged
Bremaweb merged 4 commits from shift_click into master 2016-09-21 14:30:17 -07:00
Bremaweb commented 2016-09-21 14:02:30 -07:00 (Migrated from github.com)
There is no content yet.
BadToad2000 commented 2016-09-23 02:05:00 -07:00 (Migrated from github.com)

Thanks for merging this, I really like the convenience of SHIFT-CLICK.

Since "formspec" is stored in the individual node items, this change only affects newly placed chests/shelves/... I have code to update the formspec for already placed chests and shelves "on_punch". This let me update those items in existing towns, but "on_punch" seems a little kludgy (not something I'd do without running it past you first). Do you know a smarter way of doing this?

I could do something like the following on server startup, but it might be a little excessive:
`
local fs_pos = find_nodes_in_area({x=-32000,y=-32000,z=-32000}, {x=32000,y=32000,z=32000},
{"default:chest", "default:npc_chest"})

for i = 0, #fs_pos - 1 do
local meta = minetest.get_meta(fs_pos[i])
meta:set_string("formspec",default.chest_formspec)
end
`

Thanks for merging this, I really like the convenience of SHIFT-CLICK. Since "formspec" is stored in the individual node items, this change only affects newly placed chests/shelves/... I have code to update the formspec for already placed chests and shelves "on_punch". This let me update those items in existing towns, but "on_punch" seems a little kludgy (not something I'd do without running it past you first). Do you know a smarter way of doing this? I could do something like the following on server startup, but it might be a little excessive: ` local fs_pos = find_nodes_in_area({x=-32000,y=-32000,z=-32000}, {x=32000,y=32000,z=32000}, {"default:chest", "default:npc_chest"}) for i = 0, #fs_pos - 1 do local meta = minetest.get_meta(fs_pos[i]) meta:set_string("formspec",default.chest_formspec) end `
Bremaweb commented 2016-09-23 08:37:01 -07:00 (Migrated from github.com)

I love the convenience of SHIFT-CLICK too I forgot about it and never updated the game.

Maybe the update could be done with an LBM. If I understand LBMs correctly it wouldn't have to run every time a block is loaded. I could be ran only the first time the block is loaded since that LBM was created.

I love the convenience of SHIFT-CLICK too I forgot about it and never updated the game. Maybe the update could be done with an LBM. If I understand LBMs correctly it wouldn't have to run every time a block is loaded. I could be ran only the first time the block is loaded since that LBM was created.
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: minenux/minetest-game-adventuretest#37
There is no content yet.