-
Notifications
You must be signed in to change notification settings - Fork 80
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
Implemented new property to block imps from taking objects #3541
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
DEBUG=0 | ||
DEBUG=1 | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -320,7 +320,8 @@ long check_out_unclaimed_spells(struct Thing *spdigtng, long range) | |
break; | ||
i = thing->next_of_class; | ||
// Per-thing code | ||
if (thing_is_spellbook(thing) || thing_is_special_box(thing)) | ||
if ((thing_is_spellbook(thing) || thing_is_special_box(thing)) && | ||
thing_can_be_picked_to_place_in_player_room_of_role(thing, spdigtng->owner, RoRoF_PowersStorage, TngFRPickF_Default)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about crates? If mapmaker gives the flag to crate, it will still be able to be dragged on right? Altho I can't imagine a scenario where mapmaker would want a not draggable crate. 🤔 Another thing, what about gold pot or gold pile? Not technically draggable but the name So maybe a name change to make sense? Like Let me know what you think about it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suppose the (thing_is_spellbook(thing) || thing_is_special_box(thing)) is unneeded as thing_can_be_picked_to_place_in_player_room_of_role should cover it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
check_out_unclaimed_traps already uses thing_can_be_picked_to_place_in_player_room_of_role so should be ok There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
looks like get_next_unclaimed_gold_thing_pickable_by_digger has it as a TODO but indeed it could also make use of thing_can_be_picked_to_place_in_player_room_of_role There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as far as tested, this works with crates, spellbooks, and special boxes, also in possession mode There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
yes, I think mapmakers could appreciate having this option |
||
{ | ||
if ((thing->owner != spdigtng->owner) && !thing_is_dragged_or_pulled(thing) | ||
&& (get_slab_owner_thing_is_on(thing) == spdigtng->owner) && thing_revealed(thing, spdigtng->owner)) | ||
|
@@ -566,22 +567,18 @@ long check_out_unclaimed_gold(struct Thing *spdigtng, long range) | |
break; | ||
i = thing->next_of_class; | ||
// Per-thing code | ||
if (thing_is_object(thing) && !thing_is_picked_up(thing) && thing_revealed(thing, spdigtng->owner)) | ||
if (!thing_is_picked_up(thing) && thing_can_be_picked_to_place_in_player_room_of_role(thing, thing->owner, RoRoF_GoldStorage, TngFRPickF_Default)) | ||
{ | ||
if (object_is_gold_pile(thing)) | ||
{ | ||
struct SlabMap* slb = get_slabmap_thing_is_on(thing); | ||
if ((slabmap_owner(slb) == spdigtng->owner) || (slabmap_owner(slb) == game.neutral_player_num)) | ||
if ((range < 0) || get_chessboard_distance(&thing->mappos, &spdigtng->mappos) < range) | ||
{ | ||
if ((range < 0) || get_chessboard_distance(&thing->mappos, &spdigtng->mappos) < range) | ||
if (!imp_will_soon_be_working_at_excluding(spdigtng, thing->mappos.x.stl.num, thing->mappos.y.stl.num)) | ||
{ | ||
if (!imp_will_soon_be_working_at_excluding(spdigtng, thing->mappos.x.stl.num, thing->mappos.y.stl.num)) | ||
{ | ||
if (setup_person_move_to_coord(spdigtng, &thing->mappos, NavRtF_Default)) { | ||
spdigtng->continue_state = CrSt_ImpPicksUpGoldPile; | ||
//cctrl->pickup_object_id = thing->index; -- don't do that; picking up gold destroys the object | ||
return 1; | ||
} | ||
if (setup_person_move_to_coord(spdigtng, &thing->mappos, NavRtF_Default)) { | ||
spdigtng->continue_state = CrSt_ImpPicksUpGoldPile; | ||
//cctrl->pickup_object_id = thing->index; -- don't do that; picking up gold destroys the object | ||
return 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.
I assume this is an oversight?