3 override void InitItemVariables()
5 super.InitItemVariables();
11 override bool CanPutAsAttachment(
EntityAI parent)
13 if (!super.CanPutAsAttachment(parent))
16 const int SLOTS_ARRAY = 8;
19 bool slotsEmptyTest =
true;
20 string slotNames[SLOTS_ARRAY] = {
"BerryR",
"BerryB",
"Plant",
"Nails",
"OakBark",
"BirchBark",
"Lime",
"Guts"};
22 if (parent.IsKindOf(
"Barrel_ColorBase"))
25 if (isBarrel && parent.GetAnimationPhase(
"Lid") == 1)
26 isBarrelOpened =
true;
28 for (
int i = 0; i < SLOTS_ARRAY ; ++i)
30 if (parent.FindAttachmentBySlotName(slotNames[i]) != null)
32 slotsEmptyTest =
false;
37 if ((isBarrelOpened && slotsEmptyTest) || !isBarrel)
43 override bool CanDetachAttachment(
EntityAI parent )
49 if (parent.IsKindOf(
"Barrel_ColorBase"))
52 if (isBarrel && parent.GetAnimationPhase(
"Lid") == 1)
53 isBarrelOpened =
true;
55 if (isBarrelOpened || !isBarrel)
61 override float GetDisinfectQuantity(
int system = 0,
Param param1 = null)
66 override void SetActions()