diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-08-20 22:22:04 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-08-20 22:22:04 +0000 |
commit | 037b6326b7b553ff7610b9ef70207aee35d9defa (patch) | |
tree | 3cff8782010bb1450e5a31c377a40066d3db6404 /crawl-ref/source/itemprop.cc | |
parent | 5b618acbca35621d699dc4ba3064f2a3228a5131 (diff) | |
download | crawl-ref-037b6326b7b553ff7610b9ef70207aee35d9defa.tar.gz crawl-ref-037b6326b7b553ff7610b9ef70207aee35d9defa.zip |
Throwing nets again.
Added a number of functions that allow to
differentiate between a net that currently
traps a monster and one that doesn't, even
if they are on the same square. This usually
works but can fail if there's already a net
lying on the target square.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2021 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/itemprop.cc')
-rw-r--r-- | crawl-ref/source/itemprop.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index c2fa3e1f9a..4526448db4 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -452,6 +452,24 @@ void do_uncurse_item( item_def &item ) } // +// Is item stationary (cannot be picked up?) +// +void set_item_stationary( item_def &item ) +{ + item.flags |= ISFLAG_STATIONARY; +} + +void remove_item_stationary( item_def &item ) +{ + item.flags &= (~ISFLAG_STATIONARY); +} + +bool item_is_stationary( const item_def &item ) +{ + return (item.flags & ISFLAG_STATIONARY); +} + +// // Item identification status: // bool item_ident( const item_def &item, unsigned long flags ) |