Ignore:
Timestamp:
Jun 21, 2024, 2:58:18 PM (6 months ago)
Author:
alloc
Message:

27_32_48

  • V1.0 compatibility
Location:
binary-improvements/MapRendering
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements/MapRendering/API/GetPlayerInventory.cs

    r455 r488  
    9494                        _writer.WriteBeginObject ();
    9595                       
    96                         AddEquipment (ref _writer, "head", _equ, EquipmentSlots.Headgear, _showIconColor, _showIconName);
    97                         _writer.WriteValueSeparator ();
    98                         AddEquipment (ref _writer, "eyes", _equ, EquipmentSlots.Eyewear, _showIconColor, _showIconName);
    99                         _writer.WriteValueSeparator ();
    100                         AddEquipment (ref _writer, "face", _equ, EquipmentSlots.Face, _showIconColor, _showIconName);
     96                        AddEquipment (ref _writer, "head", _equ, EquipmentSlots.Head, _showIconColor, _showIconName);
    10197                        _writer.WriteValueSeparator ();
    10298
    103                         AddEquipment (ref _writer, "armor", _equ, EquipmentSlots.ChestArmor, _showIconColor, _showIconName);
    104                         _writer.WriteValueSeparator ();
    105                         AddEquipment (ref _writer, "jacket", _equ, EquipmentSlots.Jacket, _showIconColor, _showIconName);
    106                         _writer.WriteValueSeparator ();
    107                         AddEquipment (ref _writer, "shirt", _equ, EquipmentSlots.Shirt, _showIconColor, _showIconName);
     99                        AddEquipment (ref _writer, "armor", _equ, EquipmentSlots.Chest, _showIconColor, _showIconName);
    108100                        _writer.WriteValueSeparator ();
    109101
    110                         AddEquipment (ref _writer, "legarmor", _equ, EquipmentSlots.LegArmor, _showIconColor, _showIconName);
    111                         _writer.WriteValueSeparator ();
    112                         AddEquipment (ref _writer, "pants", _equ, EquipmentSlots.Legs, _showIconColor, _showIconName);
    113                         _writer.WriteValueSeparator ();
    114102                        AddEquipment (ref _writer, "boots", _equ, EquipmentSlots.Feet, _showIconColor, _showIconName);
    115103                        _writer.WriteValueSeparator ();
     
    123111                        _writer.WritePropertyName (_slotname);
    124112
    125                         int[] slotindices = XUiM_PlayerEquipment.GetSlotIndicesByEquipmentSlot (_slot);
     113                        int slotindex = (int)_slot;
    126114
    127                         for (int i = 0; i < slotindices.Length; i++) {
    128                                 if (_items? [slotindices [i]] != null) {
    129                                         InvItem item = _items [slotindices [i]];
    130                                        
    131                                         GetJsonForItem (ref _writer, item, _showIconColor, _showIconName);
    132                                         return;
    133                                 }
     115                        if (_items == null || _items[slotindex] == null) {
     116                                // Slot not found / empty
     117                                _writer.WriteNull ();
     118                                return;
    134119                        }
    135 
    136                         // Slot not found / empty
    137                         _writer.WriteNull ();
     120                       
     121                        InvItem item = _items [slotindex];
     122                        GetJsonForItem (ref _writer, item, _showIconColor, _showIconName);
    138123                }
    139124
  • binary-improvements/MapRendering/ModInfo.xml

    r464 r488  
    55        <Description value="Render the game map to image map tiles as it is uncovered" />
    66        <Author value="Christian 'Alloc' Illy" />
    7         <Version value="47" />
     7        <Version value="48" />
    88        <Website value="https://7dtd.illy.bz" />
    99</xml>
  • binary-improvements/MapRendering/WebAndMapRendering.csproj

    r470 r488  
    4848    <Reference Include="LogLibrary">
    4949      <HintPath>..\7dtd-binaries\LogLibrary.dll</HintPath>
    50       <Private>False</Private>
    51     </Reference>
    52     <Reference Include="MapRendering, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
    53       <HintPath>..\7dtd-binaries\MapRendering.dll</HintPath>
    5450      <Private>False</Private>
    5551    </Reference>
  • binary-improvements/MapRendering/WebTokens_Legacy.cs

    r456 r488  
    55                private const string notUsedMessage = "NOT USED - WebTokens are managed through vanilla 7DTD now. Please use the 'webtokens' command instead.";
    66               
    7                 protected override string[] getCommands () {
     7                public override string[] getCommands () {
    88                        return new[] {"webtokens_legacy"};
    99                }
    1010
    11                 protected override string getDescription () {
     11                public override string getDescription () {
    1212                        return notUsedMessage;
    1313                }
    1414
    15                 protected override string getHelp () {
     15                public override string getHelp () {
    1616                        return notUsedMessage;
    1717                }
Note: See TracChangeset for help on using the changeset viewer.