This commit is contained in:
SergoDobro 2024-08-20 14:31:14 +03:00
parent f37b404cde
commit 3f5938a124
4 changed files with 28 additions and 88 deletions

View file

@ -329,6 +329,18 @@
/processorParam:TextureFormat=Color
/build:Textures/AnimationTextures/Zombie/zombie_spritesheet_v2.png
#begin Textures/Effects/explosion.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:Textures/Effects/explosion.png
#begin Textures/GUI/background/base.png
/importer:TextureImporter
/processor:TextureProcessor
@ -629,18 +641,6 @@
/processorParam:TextureFormat=Color
/build:Textures/icons/Collectables/Ammo.png
#begin Textures/icons/Collectables/Ammo.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:Textures/icons/Collectables/Ammo.png
#begin Textures/icons/Collectables/BottleOfWater.png
/importer:TextureImporter
/processor:TextureProcessor
@ -653,30 +653,6 @@
/processorParam:TextureFormat=Color
/build:Textures/icons/Collectables/BottleOfWater.png
#begin Textures/icons/Collectables/BottleOfWater.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:Textures/icons/Collectables/BottleOfWater.png
#begin Textures/icons/Collectables/Peeble.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:Textures/icons/Collectables/Peeble.png
#begin Textures/icons/Collectables/Peeble.png
/importer:TextureImporter
/processor:TextureProcessor
@ -701,30 +677,6 @@
/processorParam:TextureFormat=Color
/build:Textures/icons/Collectables/PureBottleOfWater.png
#begin Textures/icons/Collectables/PureBottleOfWater.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:Textures/icons/Collectables/PureBottleOfWater.png
#begin Textures/icons/Collectables/RottenFlesh.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:Textures/icons/Collectables/RottenFlesh.png
#begin Textures/icons/Collectables/RottenFlesh.png
/importer:TextureImporter
/processor:TextureProcessor
@ -749,30 +701,6 @@
/processorParam:TextureFormat=Color
/build:Textures/icons/Collectables/Steel.png
#begin Textures/icons/Collectables/Steel.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:Textures/icons/Collectables/Steel.png
#begin Textures/icons/Collectables/Wood.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:Textures/icons/Collectables/Wood.png
#begin Textures/icons/Collectables/Wood.png
/importer:TextureImporter
/processor:TextureProcessor

View file

@ -251,7 +251,10 @@ namespace ZoFo.GameCore
}
else if (update is UpdateLoot)
{
if ((update as UpdateLoot).quantity == 0)
{
return;
}
var ent = FindEntityById(update.IdEntity);
if (ent != null)
(ent as Player).lootData.AddLoot_Client((update as UpdateLoot).lootName, (update as UpdateLoot).quantity);

View file

@ -11,15 +11,16 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient
/// </summary>
public class UpdateLoot : UpdateData
{
public string lootName;
public int quantity;
public UpdateLoot() { UpdateType = "UpdateLoot"; }
public string lootName { get; set; }
public int quantity { get; set; }
public UpdateLoot() { UpdateType = "UpdateLoot"; isImportant = true; }
public UpdateLoot(string lootName, int quantity, int id)
{
UpdateType = "UpdateLoot";
this.lootName = lootName;
this.quantity = quantity;
IdEntity = id;
isImportant = true;
}
}
}

View file

@ -5,6 +5,7 @@ using System.Text;
using System.Threading.Tasks;
using ZoFo.GameCore.GameManagers;
using ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient;
using ZoFo.GameCore.GUI;
namespace ZoFo.GameCore.GameObjects
{
@ -14,6 +15,13 @@ namespace ZoFo.GameCore.GameObjects
public void AddLoot(string lootName, int quantity, int id)
{
if (lootName == null)
{
DebugHUD.DebugLog("PROBLEM, loot is null");
DebugHUD.DebugLog("PROBLEM, loot is null");
DebugHUD.DebugLog("PROBLEM, loot is null");
return;
}
AppManager.Instance.server.AddData(new UpdateLoot(lootName, quantity, id));
if (loots.ContainsKey(lootName))