[ScryMUD] SVN Commit Info r687 - trunk/mud/grrmud/server
scrymud at wanfear.com
scrymud at wanfear.com
Thu Jul 22 02:30:48 PDT 2004
Author: eroper
Date: 2004-07-22 02:30:47 -0700 (Thu, 22 Jul 2004)
New Revision: 687
Modified:
trunk/mud/grrmud/server/const.cc
trunk/mud/grrmud/server/object.h
Log:
added is_factory bag flag.
bag::isFactory()
object::needsResetting()
I thought I had a decent solution to the whole honey regeneration in the
beehives problem but then I realised it would potentially create portable
object factories that players could keep in their inventories. Sanity checking
just wouldn't be very much fun under all possible scenarios. So, instead I'm
going to use an explicit is_factory flag (on bags) and require that any
factory "bags" be non-portable by PCs. The needs resetting flag initially
looked like a good way to handle it, except that all SOBJs *do* need resetting
;)
Perhaps in the future I'll expand this to include factories that require
ingredients to operate (over time).
Modified: trunk/mud/grrmud/server/const.cc
===================================================================
--- trunk/mud/grrmud/server/const.cc 2004-07-22 07:45:06 UTC (rev 686)
+++ trunk/mud/grrmud/server/const.cc 2004-07-22 09:30:47 UTC (rev 687)
@@ -78,7 +78,8 @@
"NULL",
"NULL",
"NULL",
- "consume_key"//17
+ "consume_key",//17
+ "is_factory"//18
};
const BitfieldNames BAG_FLAGS_NAMES(sizeof(bf_names)/sizeof(const char*),
bf_names, "Bag Flags:");
Modified: trunk/mud/grrmud/server/object.h
===================================================================
--- trunk/mud/grrmud/server/object.h 2004-07-22 07:45:06 UTC (rev 686)
+++ trunk/mud/grrmud/server/object.h 2004-07-22 09:30:47 UTC (rev 687)
@@ -116,7 +116,8 @@
// 5 is_mag_lockable, 6 is_mag_locked
// 7 is_destructable
// {bash, fireball may open it till reset}
- // 8 is_corpse, 9 !close, 10 player_owned, 17 consume_key
+ // 8 is_corpse, 9 !close, 10 player_owned, 17 consume_key,
+ // 18 is_factory
int key_num; //0 if no key needed
short max_weight;
short percentage_weight; //1 to 100, ie 50 bag makes objs half as heavy
@@ -139,6 +140,7 @@
int isOpen() const { return !bag_flags.get(2); }
int isLocked() const { return bag_flags.get(3); }
int isPlayerOwned() const { return bag_flags.get(10); }
+ int isFactory() const { return bag_flags.get(18); }
static int getInstanceCount() { return _cnt; }
}; // bag_class
@@ -286,6 +288,7 @@
int isTwoHanded() const;
int isBoat() const { return OBJ_FLAGS.get(62); }
int isContainer() const { return obj_flags.get(54); }
+ int needsResetting() const { return obj_flags.get(70); }
void setComplete();
void setIncomplete();
More information about the ScryMUD
mailing list