Advertisement
Guest User

Untitled

a guest
May 29th, 2016
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.42 KB | None | 0 0
  1.  
  2. // Note: THIS IS PSEUDOCODE, it is meant to give those with programming knowledge a quickly glance-worthy
  3. // way to review the information in the object file. It is NOT meant to be compiled. It won't harm your
  4. // system if you try, but it won't work, either.
  5.  
  6. int itemIndex; // this is the "key" value in the Dictionary<int,string>
  7.  
  8. string itemType = Regex.Replace(values[3],"/\-[0-9]+$/","");
  9. string flag = Regex.Match(values[3],"/\-[0-9]+$/").ToString();
  10. string flagType = "";
  11.  
  12. string[] headers = new string[7];
  13.  
  14. switch (itemType) {
  15.     case "Arch" : {
  16.         headers = new [] { "Name", "Sell Price", "-300", "Item Type", "Description", "Drop rates", "Dwarf Location / Item Pointer" };
  17.         // no flags
  18.         break;
  19.     }
  20.     case "Seeds":
  21.     case "Quest":
  22.     case "Minerals":
  23.     case "asdf": {
  24.         headers = new [] { "Name", "Sell Price", "-300", "Item Type", "Description", "", "", "" };
  25.         if (itemType == "asdf") {
  26.             switch (values[0]) {
  27.                 case "Lost Book": { headers[5] = "Drop Rates"; break; }
  28.                 case "Artifact Spot": { headers[5] = "Item Pointer"; headers[6] = "Drop Rates"; }
  29.             }
  30.         }
  31.         // asdf: No flags
  32.         // Minerals: -2: Gems, -12: (assumption) Stones
  33.         // Quest: No flags
  34.         // Seeds: Everything is -74, and using the assumption for Crafting below, I'd say it's to signify that it can be planted.
  35.     }
  36.     case "Basic": {
  37.         headers = new [] { "Name", "Sell Price", "Buff on consume", "Item Type", "Description", "drink/item list (geodes)/treasure chest requirements", "Stat modifiers", "Buff duration" };
  38.         switch (flag) {
  39.             case "-5": { flagType = "Egg"; break; }
  40.             case "-6": { flagType = "Milk"; break; }
  41.             case "-18": { flagType = "Animal product"; break; }
  42.             case "-75": { flagType = "Vegetables"; break; }
  43.             case "-79": { flagType = "Fruit"; break; }
  44.             case "-80": { flagType = "Flower"; break; }
  45.             case "": { flagType = "None"; break; }
  46.             default: { flagType = "Currently unknown"; break; }
  47.         }
  48.         break;
  49.     }
  50.     case "Cooking": {
  51.         headers = new [] { "Name", "Sell Price", "Buff Indicator", "Item Type", "Description", "Food", "Stat modifiers", "Buff Duration" };
  52.         // all Cooking type items have a flag of -7, this is where I think the 2nd index holds more than just whether or not it gives a buff...
  53.         // the number at this index for the cooking stuff ranges from 20 to 105, so if it only indicates whether or not the food gives a buff
  54.         // (a boolean value), then why not use -1 and 1, or 0 and 1, etc? There's more to this number than I'm currently aware of. That's why
  55.         // I call it an "indicator" here instead of "Buff on consume".
  56.         break;
  57.     }
  58.     case "Crafting": {
  59.         headers = new [] { "Name", "Sell Price", "Buff Indicator", "Item Type", "Description", "drink", "Stat Modifiers", "Buff Duration" };
  60.         // various flags, all of which I know nothing about from source.. making assumptions, these are my best guess:
  61.         // -24: flooring, -74: plantables, -8: all ideas I quickly come up with are negated by other items not having this flag
  62.         break;
  63.     }
  64.     case "Fish": {
  65.         headers = new [] { "Name", "Sell Price", "Buff Indicator", "Item Type", "Description", "Fish requirements (day/night/etc)", "Stat modifiers", "Buff Duration" };
  66.         // Only Joja Cola gives a buff, and the modifiers and duration are all zeroed out, which means it's not really a buff..
  67.         // flags: -4 = "flopping", -20 = (assumption) "trash"
  68.         break;
  69.     }
  70.     case "Ring": {
  71.         header = new [] { "Name", "Description", "Price", "Ring" };
  72.         // No flags
  73.         break;
  74.     }
  75. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement