Page MenuHomeFeedback Tracker

New slots don't work
Acknowledged, UrgentPublic

Description

Good afternoon.

Slots for three objects do not work... sledgehammer, crowbar and shovel

class name:

Crowbar
Shovel
SledgeHammer

path to the config P:\DZ\gear\tools\config.cpp

Field Shovel can be added to the slot, but Shovel is not...

I don't understand why they don't work? Is this a bug?

Here is a video example https://youtu.be/Rsito1hOUbU
and here is the link to the mod https://steamcommunity.com/sharedfiles/filedetails/?id=2856232293
and here are the sources of the mod in the attachment

I'm so sad :'(

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General
Steps To Reproduce

Sign the mod and connect, the client-server mod.
Compare a chest, a hammer, a sledgehammer and a crowbar.

Additional Information

These are the only three things that don't work correctly...

Event Timeline

zilon created this task.Aug 30 2022, 12:14 PM
Geez changed the task status from New to Need More Info.Aug 31 2022, 3:48 PM
Geez added a subscriber: Geez.

Hello zilon.
Can you please describe what the exact problem is? As we are having trouble to understand.
Regards,
Geez

zilon added a comment.Sep 1 2022, 11:50 AM

The problem is that a new slot cannot be made for objects in which it can be placed. That is, I made a lot of new slots and only three items do not work like all the others.

In order for the slot to function, but not be displayed (without a proxy), you need only 3 conditions

  1. add class name to CfgSlots.
class CfgSlots
{ 
	
	class Slot_Instrumentus
	{
		name="Instrumentus";
		displayName="Instrumentus";
		ghostIcon = "set:table image:Instrumentus";
	};
	class Slot_Malleo
	{
		name="Malleo";
		displayName="Malleo";
		ghostIcon = "set:table image:Malleo";
	};
	class Slot_Frag
	{
		name="Frag";
		displayName="Frag";
		ghostIcon = "set:table image:Frag";
	};
	class Slot_Pala
	{
		name="Pala";
		displayName="Pala";
		ghostIcon = "set:table image:Pala";
	};
	class Slot_Sledge
	{
		name="Sledge";
		displayName="Sledge";
		ghostIcon = "set:table image:Sledge";
	};

};
  1. In the object that is inserted into the slot, add the name of the slot to inventorySlot
	class Crowbar: Inventory_Base
	{
		inventorySlot[]=
		{
			"Shoulder",
			"Melee",
			"Frag"
		};	
	};
	class Hammer: Inventory_Base
	{
		inventorySlot[]=
		{
			"Malleo"
		};	
	};
	class Shovel: Inventory_Base
	{
		inventorySlot[]=
		{
			"Shoulder",
			"Melee",
			"Pala"
		};
	};
	class SledgeHammer: Inventory_Base
	{
		inventorySlot[]=
		{
			"Shoulder",
			"Melee",
			"Sledge"
		};
	};
  1. In the object to which this item is added, add attachments and attachmentSlots and in attachments, the name of the slot of the object into which it is inserted.
	class Container_Base;
	
	class SeaChest: Container_Base
	{

		attachments[]=
		{
			"Instrumentus",
			"Malleo",
			"Frag",
			"Pala",
			"Sledge"			

		};
		class GUIInventoryAttachmentsProps
		{
			class ShelterWater
			{
				name="#Cs_board_0";
				description="";
				attachmentSlots[]=
				{
					"Malleo",
					"Frag",
					"Pala",
					"Sledge"				
				};
				icon="set:table image:Instrumentus";
				view_index=1;
			};	
		};		
	};

Then the slot should be displayed in the inventory and the object should be inserted into it. The fully working code is in the attachment with icons and everything. This is what happens with the hammer in the video. But with a sledgehammer, a crowbar and a shovel, it doesn’t work that way. I added a lot of slots so it always worked...

Geez changed the task status from Need More Info to Acknowledged.Sep 7 2022, 11:46 PM

Thank you.
We will look into what can be done.
Regards,
Geez