[ScryMUD] SVN Commit Info r970 - trunk/mud/grrmud/server

svn-log at scrymud.net svn-log at scrymud.net
Fri Feb 29 08:27:11 PST 2008


Author: kaj
Date: 2008-02-29 08:27:10 -0800 (Fri, 29 Feb 2008)
New Revision: 970

Modified:
   trunk/mud/grrmud/server/commands.cc
   trunk/mud/grrmud/server/translations.spec
Log:
Added weight to "look" command. For bags, it will display:
It is holding 1000 out of 5000 pounds.
The altar itself weights 1000 pounds.

And for objects: 
It weighs 3 pounds.

after the long description in the output. Hopefully the bag output makes it clear that max weight is empty weight + contents, but the wording may need to be changed.



Modified: trunk/mud/grrmud/server/commands.cc
===================================================================
--- trunk/mud/grrmud/server/commands.cc	2008-02-26 22:43:58 UTC (rev 969)
+++ trunk/mud/grrmud/server/commands.cc	2008-02-29 16:27:10 UTC (rev 970)
@@ -865,6 +865,19 @@
          pc.show("\n\n");
          pc.show(obj_ptr->long_desc);
          pc.show("\n");
+         //show bag holding capacity if it's a bag
+         if (obj_ptr->bag != NULL) {
+            Sprintf(buf, cstr(CS_BAG_CUR_MAX_WEIGHT, pc),
+               obj_ptr->getCurWeight(), obj_ptr->getMaxWeight());
+            pc.show(buf);
+            Sprintf(buf, cstr(CS_BAG_EMPTY_WEIGHT, pc),
+               obj_ptr->getShortName(), obj_ptr->getEmptyWeight());
+            pc.show(buf);
+         } else { //show weight when you look at an object
+            int weight = obj_ptr->getCurWeight();
+            Sprintf(buf, cstr(CS_OBJECT_WEIGHT, pc), weight);
+            pc.show(buf);
+         }
          
          String cmd = "look";
          rm.checkForProc(cmd, NULL_STRING, pc, obj_ptr->OBJ_NUM);

Modified: trunk/mud/grrmud/server/translations.spec
===================================================================
--- trunk/mud/grrmud/server/translations.spec	2008-02-26 22:43:58 UTC (rev 969)
+++ trunk/mud/grrmud/server/translations.spec	2008-02-29 16:27:10 UTC (rev 970)
@@ -1538,6 +1538,18 @@
         ser "%S nemoze da sadrzi %S.\n"
 	~
 
+CS_BAG_CUR_MAX_WEIGHT
+	eng  "It is holding %i out of %i pounds.\n"
+	~
+
+CS_BAG_EMPTY_WEIGHT
+	eng "The %S itself weighs %i pounds.\n"
+	~
+
+CS_OBJECT_WEIGHT
+	eng "It weighs %i pounds.\n"
+	~
+
 CS_YOU_PUT
         eng "You put %S in %S.\n"
         spa "Pones %S en %S.\n"




More information about the ScryMUD mailing list