-
Notifications
You must be signed in to change notification settings - Fork 12
fixes for deployer and node breaker #139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
- add `nb_nouse` group to prevent node breaker from using items not intended to be used by it - deployer now reverses creative mod's on_placenode override, taking away item it added
@@ -258,7 +258,7 @@ sbz_api.register_plant("pyrograss", { | |||
minetest.register_craftitem("sbz_bio:pyrograss", { | |||
description = "Pyrograss", | |||
inventory_image = "pyrograss_4.png", | |||
groups = { burn = 30, eat = 1 }, | |||
groups = { burn = 30, eat = 1, nb_nouse = 1 }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really really small nitpick: it would be better named "nb_no_use" :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im just following convention of nb_nodig
. i'll change that too i guess
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
@@ -293,6 +294,9 @@ pipeworks.register_wielder({ | |||
local def = minetest.registered_items[stack:get_name()] | |||
if def and def.on_place then | |||
local new_stack, placed_pos = def.on_place(stack, fakeplayer, pointed) | |||
if new_stack and core.is_creative_enabled(fakeplayer:get_player_name()) then | |||
new_stack:take_item() -- undoes creative's auto-add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not good, what if you are using a deployer with a tool
example: you use deployer with the replacer tool
The replacer tool will vanish
BTW: feel free to modify the creative mod, it's heavily modified in sbz anyway (feel free to modify any mod, just state that it has been modified in sbz)
it seems i'll be busy with a couple different things for the near future (a couple weeks?). in the mean time, to anyone, feel free to write your own fix, no need to credit me or anything like that. i'll leave this open so people know it's an open issue |
bug 1: node breaker uses items not intended to be used by it
i solved it by adding
nb_nouse
group to plants (the only item withon_place
+on_use
) to prevent node breaker from using items not intended to be used by it. i hope no one is going to suggest a blanket no-op on all items with both of those set.bug 2: deployers of owners with
creative
priv does not take away nodes after placing it.i added an edge case for this. deployer now reverses creative mod's on_placenode override, taking away item creative mod added. i'd prefer if creative mod is changed, but i don't know how people would feel about it.