MCPcopy Create free account
hub / github.com/NetHack/NetHack / add_to_migration

Function add_to_migration

src/mkobj.c:2697–2717  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2695}
2696
2697void
2698add_to_migration(struct obj *obj)
2699{
2700 if (obj->where != OBJ_FREE)
2701 panic("add_to_migration: obj where=%d, not free", obj->where);
2702
2703 if (obj->unpaid) /* caller should have changed unpaid item to stolen */
2704 impossible("unpaid object migrating to another level? [%s]",
2705 simpleonames(obj));
2706 obj->no_charge = 0; /* was only relevant while inside a shop */
2707
2708 /* lock picking context becomes stale if it's for this object */
2709 if (Is_container(obj))
2710 maybe_reset_pick(obj);
2711
2712 obj->where = OBJ_MIGRATING;
2713 obj->nobj = gm.migrating_objs;
2714 obj->omigr_from_dnum = u.uz.dnum;
2715 obj->omigr_from_dlevel = u.uz.dlevel;
2716 gm.migrating_objs = obj;
2717}
2718
2719void
2720add_to_buried(struct obj *obj)

Callers 6

moverock_coreFunction · 0.85
mksobj_migr_to_speciesFunction · 0.85
launch_objFunction · 0.85
wizkit_addinvFunction · 0.85
impact_dropFunction · 0.85
ship_objectFunction · 0.85

Calls 4

simpleonamesFunction · 0.85
maybe_reset_pickFunction · 0.85
impossibleFunction · 0.70
panicFunction · 0.50

Tested by

no test coverage detected