update: 玩家出生装备, 队伍和个人兼容.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @file config.c
|
||||
* @author 稻草人
|
||||
* @version 1.0
|
||||
* @date 2025-00-01
|
||||
* @date 2025-02-12
|
||||
* @copyright Copyright (c) 2025
|
||||
*
|
||||
* @brief This file contains the configuration for the custom revival suit feature.
|
||||
@@ -52,28 +52,21 @@ class CustomRevivalSuitCfg
|
||||
ref PlayerRevivalEquipmentData GetPlayerRevivalEquipmentData( string steamid )
|
||||
{
|
||||
foreach ( ref PlayerRevivalEquipmentData playerData : PlayerRevivalEquipmentDataList )
|
||||
if ( playerData.SteamId == steamid )
|
||||
{
|
||||
if ( !playerData ) continue;
|
||||
ref TStringArray TeamMembers = playerData.TeamMembers;
|
||||
if ( TeamMembers && TeamMembers.Find( steamid ) > -1 )
|
||||
return playerData;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void RemovePlayerRevivalEquipmentData( string steamid )
|
||||
{
|
||||
foreach ( ref PlayerRevivalEquipmentData playerData : PlayerRevivalEquipmentDataList )
|
||||
{
|
||||
if ( playerData.SteamId == steamid )
|
||||
{
|
||||
PlayerRevivalEquipmentDataList.RemoveItem( playerData );
|
||||
SaveConfig()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class PlayerRevivalEquipmentData
|
||||
{
|
||||
string SteamId;
|
||||
// string SteamId;
|
||||
ref TStringArray TeamMembers;
|
||||
|
||||
ref TStringArray Equipments;
|
||||
ref TStringArray ItemList;
|
||||
@@ -81,7 +74,10 @@ class PlayerRevivalEquipmentData
|
||||
|
||||
void PlayerRevivalEquipmentData( string steamid )
|
||||
{
|
||||
SteamId = steamid;
|
||||
// SteamId = steamid;
|
||||
TeamMembers = new TStringArray();
|
||||
TeamMembers.Insert( steamid );
|
||||
|
||||
Equipments = { "WoolGloves_White", "BaseballCap_Black",
|
||||
"Jeans_Blue", "Wellies_Black", "TShirt_Black"
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user