8 static const string OVENPOINT_ACTION_SELECTION =
"oven_action";
9 static const string OVENPOINT_FIRE_POSITION =
"oven_point";
10 static const string OVENPOINT_PLACE_ROT =
"oven_rot";
11 static const string OVENPOINT_SMOKE_POSITION =
"oven_smoke";
25 RegisterNetSyncVariableFloat(
"m_SmokePosX", 0, 0, 2 );
26 RegisterNetSyncVariableFloat(
"m_SmokePosY", 0, 0, 2 );
27 RegisterNetSyncVariableFloat(
"m_SmokePosZ", 0, 0, 2 );
28 RegisterNetSyncVariableInt(
"m_FirePointIndex", 0, 9 );
43 super.OnStoreSave( ctx );
49 ctx.Write( m_SmokePosX );
50 ctx.Write( m_SmokePosY );
51 ctx.Write( m_SmokePosZ );
56 if ( !super.OnStoreLoad( ctx, version ) )
68 if ( !ctx.Read( m_SmokePosX ) )
73 if ( !ctx.Read( m_SmokePosY ) )
78 if ( !ctx.Read( m_SmokePosZ ) )
94 int index_location = action_selection.Length() - 1;
95 return action_selection.Substring( index_location, 1 ).ToInt();
106 vector fire_point_pos = building.GetSelectionPositionMS( OVENPOINT_FIRE_POSITION + fire_point_index.ToString() );
107 vector fire_point_rot = building.GetSelectionPositionMS( OVENPOINT_PLACE_ROT + fire_point_index.ToString() );
108 fire_point_pos_world = building.ModelToWorld( fire_point_pos );
109 fire_point_rot_world = building.ModelToWorld( fire_point_rot );
114 GetGame().GetObjectsAtPosition3D( fire_point_pos_world, 1, nearest_objects, proxy_cargos );
116 for (
int i = 0; i < nearest_objects.Count(); ++i )
118 Object object = nearest_objects.Get( i );
120 if (
object.IsInherited( OvenIndoor ) )
131 m_SmokePosX = smoke_point_pos[0];
132 m_SmokePosY = smoke_point_pos[1];
133 m_SmokePosZ = smoke_point_pos[2];
141 return Vector( m_SmokePosX, m_SmokePosY, m_SmokePosZ );
166 if (!super.CanReleaseAttachment(attachment))
182 super.EEItemAttached(item, slot_name);
192 bool edible_base_attached =
false;
195 case "DirectCookingA":
197 edible_base_attached =
true;
201 edible_base_attached =
true;
205 edible_base_attached =
true;
214 super.EEItemDetached(item, slot_name);
228 case "DirectCookingA":
241 if (item_base.IsCookware())
244 item_base.RemoveAudioVisualsOnClient();
247 if (item_base.IsLiquidContainer())
248 item_base.RemoveAudioVisualsOnClient();
ActionPlaceFireplaceIndoor m_FirePointIndex
void SetSmokePointPosition(vector smoke_point_pos)
override bool CanRemoveFromHands(EntityAI parent)
override bool CanIgniteItem(EntityAI ignite_target=NULL)
vector GetSmokeEffectPosition()
override void EEItemAttached(EntityAI item, string slot_name)
override void ParticleSmallSmokeStart()
override bool CanPutIntoHands(EntityAI parent)
override void ParticleNormalSmokeStart()
override bool IsIndoorOven()
override bool CanBeIgnitedBy(EntityAI igniter=NULL)
override bool HasFlammableMaterial()
override bool CanPutInCargo(EntityAI parent)
override void OnIgnitedTarget(EntityAI target_item)
override bool IsIgnited()
override void OnIgnitedThis(EntityAI fire_source)
static int GetFirePointIndex(string action_selection)
void SetFirePointIndex(int fire_point_index)
override bool IsThisIgnitionSuccessful(EntityAI item_source=NULL)
static bool CanPlaceFireplaceInSelectedSpot(Object building, int fire_point_index, out vector fire_point_pos_world, out vector fire_point_rot_world)
override bool OnStoreLoad(ParamsReadContext ctx, int version)
override void EEItemDetached(EntityAI item, string slot_name)
override bool CanRemoveFromCargo(EntityAI parent)
override void OnStoreSave(ParamsWriteContext ctx)
override bool CanReleaseAttachment(EntityAI attachment)
Serialization general interface. Serializer API works with:
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
void RefreshFireplaceVisuals()
void RemoveFromFireConsumables(FireConsumable fire_consumable)
ref UniversalTemperatureSourceSettings m_UTSSettings
override void CheckForDestroy()
Particle m_ParticleSmallSmoke
void AddToFireConsumables(ItemBase item)
bool IsFuel(ItemBase item)
Returns if item attached to fireplace is fuel.
int PARTICLE_NORMAL_SMOKE
void StartFire(bool force_start=false)
ItemBase m_DirectCookingSlots[DIRECT_COOKING_SLOT_COUNT]
void ClearCookingEquipment()
DEPRECATED.
FireConsumable GetFireConsumableByItem(ItemBase item)
ItemBase m_SmokingSlots[SMOKING_SLOT_COUNT]
bool IsKindling(ItemBase item)
Returns if item attached to fireplace is kindling.
Particle m_ParticleNormalSmoke
proto native CGame GetGame()
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
void PlayParticle(int particle_id=-1)
Method to tell the particle to start playing.