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

svn-log at scrymud.net svn-log at scrymud.net
Fri Feb 29 08:43:35 PST 2008


Author: kaj
Date: 2008-02-29 08:43:35 -0800 (Fri, 29 Feb 2008)
New Revision: 971

Modified:
   trunk/mud/grrmud/server/command2.cc
   trunk/mud/grrmud/server/translations.spec
Log:
Added bag percent weight to identify results. It says:
It reduces its contents' weight to 50%.

It also shows the bag weight and capacity, as does "look." This fixes MUD-89 (from Sept 1999!)



Modified: trunk/mud/grrmud/server/command2.cc
===================================================================
--- trunk/mud/grrmud/server/command2.cc	2008-02-29 16:27:10 UTC (rev 970)
+++ trunk/mud/grrmud/server/command2.cc	2008-02-29 16:43:35 UTC (rev 971)
@@ -2834,6 +2834,22 @@
       Sprintf(buf, "\nThis object is of level: %i\n", obj.getLevel());
       pc.show(buf);
 
+      //show bag holding capacity if it's a bag
+      if (obj.bag != NULL) {
+         Sprintf(buf, cstr(CS_BAG_CUR_MAX_WEIGHT, pc),
+         obj.getCurWeight(), obj.getMaxWeight());
+         pc.show(buf);
+         Sprintf(buf, cstr(CS_BAG_EMPTY_WEIGHT, pc),
+         obj.getShortName(), obj.getEmptyWeight());
+         pc.show(buf);
+         Sprintf(buf, cstr(CS_BAG_PERCENT, pc), obj.bag->percentage_weight);
+         pc.show(buf);
+      } else { //show weight when you look at an object
+         int weight = obj.getCurWeight();
+         Sprintf(buf, cstr(CS_OBJECT_WEIGHT, pc), weight);
+         pc.show(buf);
+      }
+
       if (!obj.affected_by.isEmpty()) {
          show("It is affected by:\n", pc);
          out_spell_list(obj.affected_by, pc, FALSE);      

Modified: trunk/mud/grrmud/server/translations.spec
===================================================================
--- trunk/mud/grrmud/server/translations.spec	2008-02-29 16:27:10 UTC (rev 970)
+++ trunk/mud/grrmud/server/translations.spec	2008-02-29 16:43:35 UTC (rev 971)
@@ -1546,6 +1546,10 @@
 	eng "The %S itself weighs %i pounds.\n"
 	~
 
+CS_BAG_PERCENT
+	eng "It reduces its contents' weight to %i%%.\n"
+	~
+
 CS_OBJECT_WEIGHT
 	eng "It weighs %i pounds.\n"
 	~




More information about the ScryMUD mailing list