19 RegisterNetSyncVariableBool(
"m_Openable.m_IsOpened");
20 RegisterNetSyncVariableBool(
"m_IsSoundSynchRemote");
21 RegisterNetSyncVariableBool(
"m_IsPlaceSound");
45 if (!
super.OnStoreLoad(
ctx, version))
128 SetAnimationPhase(
"Lid", 1);
129 SetAnimationPhase(
"Lid2", 0);
133 SetAnimationPhase(
"Lid", 0);
134 SetAnimationPhase(
"Lid2", 1);
140 super.OnVariablesSynchronized();
157 sound.SetAutodestroy(
true);
163 sound.SetAutodestroy(
true);
254 int item_count = GetInventory().GetCargo().GetItemCount();
261 item = GetInventory().GetCargo().GetItem(
i);
262 if (
item.IsPeltBase())
268 lambda.SetTransferParams(
true,
true,
true);
289 int item_count = GetInventory().GetCargo().GetItemCount();
295 item = GetInventory().GetCargo().GetItem(
i);
296 if (
item.IsClothing())
298 if (
GetGame().ObjectIsKindOf(
item,
"LeatherSack_Natural"))
300 else if (
GetGame().ObjectIsKindOf(
item,
"LeatherStorageVest_Natural"))
302 else if (
GetGame().ObjectIsKindOf(
item,
"LeatherJacket_Natural"))
304 else if (
GetGame().ObjectIsKindOf(
item,
"LeatherPants_Natural"))
306 else if (
GetGame().ObjectIsKindOf(
item,
"LeatherMoccasinsShoes_Natural"))
308 else if (
GetGame().ObjectIsKindOf(
item,
"LeatherHat_Natural"))
313 lambda.SetTransferParams(
true,
true,
true);
327 int item_count = GetInventory().GetCargo().GetItemCount();
332 item = GetInventory().GetCargo().GetItem(
i);
333 if (
item.IsClothing())
337 if ((
GetGame().ObjectIsKindOf(
item,
"TShirt_ColorBase") && !
GetGame().ObjectIsKindOf(
item,
"TShirt_White")) || (
GetGame().ObjectIsKindOf(
item,
"Armband_ColorBase") && !
GetGame().ObjectIsKindOf(
item,
"Armband_White")))
346 if (
GetGame().IsKindOf(
item.GetDisplayName(),
"LeatherSack_ColorBase"))
348 else if (
GetGame().IsKindOf(
item.GetDisplayName(),
"LeatherStorageVest_ColorBase"))
349 item_name =
"LeatherStorageVest_Natural";
350 else if (
GetGame().IsKindOf(
item.GetDisplayName(),
"LeatherJacket_ColorBase"))
352 else if (
GetGame().IsKindOf(
item.GetDisplayName(),
"LeatherPants_ColorBase"))
354 else if (
GetGame().IsKindOf(
item.GetDisplayName(),
"LeatherMoccasinsShoes_ColorBase"))
355 item_name =
"LeatherMoccasinsShoes_Natural";
356 else if (
GetGame().IsKindOf(
item.GetDisplayName(),
"LeatherHat_ColorBase"))
361 lambda.SetTransferParams(
true,
true,
true);
386 int item_count = GetInventory().GetCargo().GetItemCount();
390 r =
rci.GetQuantity() / 10;
395 g =
gci.GetQuantity() / 10;
400 b =
bci.GetQuantity() / 10;
405 item = GetInventory().GetCargo().GetItem(
i);
406 if (
item.IsClothing())
415 clambda.SetTransferParams(
true,
true,
true);
445 if (!
super.CanPutInCargo(parent))
456 if (!
super.CanPutIntoHands(parent))
468 return super.CanReceiveItemIntoCargo(
item);
497 return "placeBarrel_SoundSet";
549 ib.SetColor(
r * 255,
g * 255,
b * 255,
a * 255);
570 Debug.
LogError(
"TanLeatherLambda: failed to create new item",
"static");
void AddAction(typename actionName)
Container_Base m_HalfExtents
int GetNumberOfItems()
Returns the number of items in cargo, otherwise returns 0(non-cargo objects). Recursive.
override float GetQuantity()
override void SetTakeable(bool pState)
void SetIsPlaceSound(bool is_place_sound)
override bool IsBeingPlaced()
bool IsSoundSynchRemote()
class JsonUndergroundAreaTriggerData GetPosition
override bool CanDetachAttachment(EntityAI parent)
override bool CanPutInCargo(EntityAI parent)
override bool CanReleaseCargo(EntityAI attachment)
override void OnVariablesSynchronized()
override void OnDebugSpawn()
override bool OnStoreLoad(ParamsReadContext ctx, int version)
ref RainProcurementManager m_RainProcurement
override bool CanReceiveItemIntoCargo(EntityAI item)
void ColourLeatherClothes(ItemBase color_source, PlayerBase player, string color)
override void EECargoIn(EntityAI item)
void BleachClothes(ItemBase bleach, PlayerBase player)
void ProduceFertilizer(ItemBase guts, ItemBase plant, PlayerBase player)
override string GetPlaceSoundset()
void DetermineAction(PlayerBase player)
override void OnWasDetached(EntityAI parent, int slot_id)
override void OnPlacementComplete(Man player, vector position="0 0 0", vector orientation="0 0 0")
void ColourClothes(ItemBase rci, ItemBase gci, ItemBase bci, PlayerBase player)
void SoundBarrelClosePlay()
override void SetActions()
void SoundBarrelOpenPlay()
void Lock(float actiontime)
override float GetLiquidThroughputCoef()
override int GetDamageSystemVersionChange()
override void OnStoreSave(ParamsWriteContext ctx)
override bool CanPutIntoHands(EntityAI parent)
override void OnWasAttached(EntityAI parent, int slot_id)
ref OpenableBehaviour m_Openable
ref RainProcurementComponentBarrel m_RainProcComponent
void TanPelts(ItemBase lime, PlayerBase player)
void ColourClothesLambda(EntityAI old_item, string new_item_type, PlayerBase player, int rr, int gg, int bb, int aa)
override void CopyOldPropertiesToNew(notnull EntityAI old_item, EntityAI new_item)
static void LogError(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message as error message.
Wrapper class for managing sound through SEffectManager.
provides access to slot configuration
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id
DEPRECATED, done through the RainProcurementHandler / component instead.
Manager class for managing Effect (EffectParticle, EffectSound)
static EffectSound PlaySound(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.
Serialization general interface. Serializer API works with:
override void CopyOldPropertiesToNew(notnull EntityAI old_item, EntityAI new_item)
void TanLeatherLambda(EntityAI old_item, string new_item_type, PlayerBase player, int pelt_count)
proto native CGame GetGame()
const int BAREL_BLEACH_PER_CLOTH
const int BAREL_LIME_PER_PELT
const float BAREL_LIME_PER_PLANT
const float LIQUID_THROUGHPUT_BARREL
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto float Floor(float f)
Returns floor of value.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.