diff --git a/UnityProject/Assets/Prefabs/Items/Implants/Moth/Moth Lungs.prefab b/UnityProject/Assets/Prefabs/Items/Implants/Moth/Moth Lungs.prefab
index 617753c2fe4..7c902de464c 100644
--- a/UnityProject/Assets/Prefabs/Items/Implants/Moth/Moth Lungs.prefab
+++ b/UnityProject/Assets/Prefabs/Items/Implants/Moth/Moth Lungs.prefab
@@ -17,7 +17,7 @@ PrefabInstance:
- target: {fileID: 62102685253320784, guid: cfda4a920ce328d449993498e023ddfc,
type: 3}
propertyPath: toxicGases.Array.size
- value: 4
+ value: 5
objectReference: {fileID: 0}
- target: {fileID: 62102685253320784, guid: cfda4a920ce328d449993498e023ddfc,
type: 3}
@@ -35,7 +35,7 @@ PrefabInstance:
type: 3}
propertyPath: toxicGases.Array.data[4].GasType
value:
- objectReference: {fileID: 11400000, guid: c8a6070e2fed0ac43a0bb73c019af97f,
+ objectReference: {fileID: 11400000, guid: b8b09ca82f31d764595ddf8b2ecc9ffd,
type: 2}
- target: {fileID: 62102685253320784, guid: cfda4a920ce328d449993498e023ddfc,
type: 3}
@@ -55,7 +55,7 @@ PrefabInstance:
- target: {fileID: 62102685253320784, guid: cfda4a920ce328d449993498e023ddfc,
type: 3}
propertyPath: toxicGases.Array.data[4].PressureSafeMax
- value: 0.4
+ value: 0.8
objectReference: {fileID: 0}
- target: {fileID: 62102685253320784, guid: cfda4a920ce328d449993498e023ddfc,
type: 3}
@@ -65,7 +65,7 @@ PrefabInstance:
- target: {fileID: 62102685253320784, guid: cfda4a920ce328d449993498e023ddfc,
type: 3}
propertyPath: toxicGases.Array.data[4].UnsafeLevelDamage
- value: 0.2
+ value: 0.1
objectReference: {fileID: 0}
- target: {fileID: 62102685253320784, guid: cfda4a920ce328d449993498e023ddfc,
type: 3}
diff --git a/UnityProject/Assets/Prefabs/Items/Other/CigarettesAndLighters/Smokeables/CigaretteBase.prefab b/UnityProject/Assets/Prefabs/Items/Other/CigarettesAndLighters/Smokeables/CigaretteBase.prefab
index 3c79105d6df..8da92a50603 100644
--- a/UnityProject/Assets/Prefabs/Items/Other/CigarettesAndLighters/Smokeables/CigaretteBase.prefab
+++ b/UnityProject/Assets/Prefabs/Items/Other/CigarettesAndLighters/Smokeables/CigaretteBase.prefab
@@ -43,7 +43,7 @@ PrefabInstance:
type: 3}
propertyPath: 'allClothingData.Array.data[1]'
value:
- objectReference: {fileID: 11400000, guid: cdcd12bdb1bc3254d8612ce30c1020ab,
+ objectReference: {fileID: 11400000, guid: 65e3fb4ec431d2142be2cd64754b5660,
type: 2}
- target: {fileID: 3585452806818900716, guid: 05a135eab68164d34bb02b82fff3cde0,
type: 3}
@@ -234,6 +234,24 @@ PrefabInstance:
value:
objectReference: {fileID: 11400000, guid: ef8586345eb0c3c47a23aeb676b3d708,
type: 2}
+ - target: {fileID: 8040391005062056419, guid: 05a135eab68164d34bb02b82fff3cde0,
+ type: 3}
+ propertyPath: InitialitemSprites.SpriteLeftHand
+ value:
+ objectReference: {fileID: 11400000, guid: 7200b79852101844aa394b1465cba17b,
+ type: 2}
+ - target: {fileID: 8040391005062056419, guid: 05a135eab68164d34bb02b82fff3cde0,
+ type: 3}
+ propertyPath: InitialitemSprites.SpriteRightHand
+ value:
+ objectReference: {fileID: 11400000, guid: c1d8e86307fb8db4da9da99a6cff3325,
+ type: 2}
+ - target: {fileID: 8040391005062056419, guid: 05a135eab68164d34bb02b82fff3cde0,
+ type: 3}
+ propertyPath: InitialitemSprites.SpriteInventoryIcon
+ value:
+ objectReference: {fileID: 11400000, guid: ef8586345eb0c3c47a23aeb676b3d708,
+ type: 2}
m_RemovedComponents:
- {fileID: -9097270597331898786, guid: 05a135eab68164d34bb02b82fff3cde0, type: 3}
m_RemovedGameObjects: []
@@ -302,9 +320,12 @@ MonoBehaviour:
syncInterval: 0.1
buttPrefab: {fileID: 9060380378923672138, guid: 76c1cf9465a29384faac0d9df2eec3c9,
type: 3}
- smokeTimeSeconds: 12
+ smokeTimeSeconds: 16
spriteHandler: {fileID: 3499719427789762796}
reagentContainer: {fileID: 8431387283529515776}
+ gasProduct:
+ - {fileID: 11400000, guid: c8a6070e2fed0ac43a0bb73c019af97f, type: 2}
+ - {fileID: 11400000, guid: b8b09ca82f31d764595ddf8b2ecc9ffd, type: 2}
--- !u!114 &8431387283529515776
MonoBehaviour:
m_ObjectHideFlags: 0
diff --git a/UnityProject/Assets/Scripts/Items/Food/Cigarette.cs b/UnityProject/Assets/Scripts/Items/Food/Cigarette.cs
index 6325b39c812..7ed0b857551 100644
--- a/UnityProject/Assets/Scripts/Items/Food/Cigarette.cs
+++ b/UnityProject/Assets/Scripts/Items/Food/Cigarette.cs
@@ -1,14 +1,19 @@
-using System.Collections;
+using System.Collections.Generic;
using Chemistry.Components;
using UnityEngine;
using Mirror;
+using ScriptableObjects.Atmospherics;
using Systems.Atmospherics;
+using Systems.Clothing;
namespace Items
{
///
/// Base class for smokable cigarette
///
+ [RequireComponent(typeof(ClothingV2))]
+ [RequireComponent(typeof(FireSource))]
+ [RequireComponent(typeof(Pickupable))]
public class Cigarette : NetworkBehaviour, IServerDespawn, ICheckedInteractable,
ICheckedInteractable, IServerInventoryMove
{
@@ -29,13 +34,16 @@ public class Cigarette : NetworkBehaviour, IServerDespawn, ICheckedInteractable<
[SyncVar] private bool isLit = false;
[SerializeField] private ReagentContainer reagentContainer = null;
+ [SerializeField] private List gasProduct = new List();
private RegisterPlayer smoker;
+ private ClothingV2 clothing;
private void Awake()
{
pickupable = GetComponent();
fireSource = GetComponent();
reagentContainer ??= GetComponent();
+ clothing = GetComponent();
}
public void OnDespawnServer(DespawnInfo info)
@@ -115,13 +123,13 @@ private void ServerChangeLit(bool isLitNow)
{
UpdateManager.Add(CigBurnLogic, smokeTimeSeconds);
}
-
isLit = isLitNow;
+ clothing.ChangeSprite(1);
}
private bool TryLightByObject(GameObject usedObject)
{
- if (!isLit)
+ if (isLit == false)
{
// check if player tries to lit cigarette with something
if (usedObject != null)
@@ -170,6 +178,18 @@ private void CigBurnLogic()
smoker.PlayerScript.playerHealth.reagentPoolSystem.BloodPool.Add(burnReagent);
Chat.AddExamineMsg(smoker.PlayerScript.gameObject, $"You take a drag out of the {gameObject.ExpensiveName()}");
}
+ if (gasProduct.Count > 0)
+ {
+ var tile = gameObject.RegisterTile();
+ if (tile == null) return;
+ var gasNode = tile.Matrix.GetMetaDataNode(tile.LocalPositionServer, false);
+ if (gasNode == null) return;
+ var node = gasNode.GasMixLocal;
+ foreach (var gas in gasProduct)
+ {
+ node.AddGas(gas, burnReagent.Total, Kelvin.FromC(2f));
+ }
+ }
if (reagentContainer.ReagentMixTotal.Approx(0)) Burn();
}
diff --git a/UnityProject/Assets/Textures/clothing/mask/cigarette/cigarette-lit.asset b/UnityProject/Assets/Textures/clothing/mask/cigarette/cigarette-lit.asset
new file mode 100644
index 00000000000..966eb537085
--- /dev/null
+++ b/UnityProject/Assets/Textures/clothing/mask/cigarette/cigarette-lit.asset
@@ -0,0 +1,28 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!114 &11400000
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 0}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: cd5a08c3d2a815a459870fba3d969bfc, type: 3}
+ m_Name: cigarette-lit
+ m_EditorClassIdentifier:
+ SpriteEquipped: {fileID: 11400000, guid: 8bda7b658bd6daf4b91c1b08bd6767a0, type: 2}
+ SpriteInHandsLeft: {fileID: 11400000, guid: a238d6d8b8c07984c8d06531ae40cb83, type: 2}
+ SpriteInHandsRight: {fileID: 11400000, guid: 1b73af8cb0b21284da72461aa4f02583, type: 2}
+ SpriteItemIcon: {fileID: 11400000, guid: fd9b131e114294a44a244a3f668a81e4, type: 2}
+ Palette:
+ - {r: 0, g: 0, b: 0, a: 0}
+ - {r: 0, g: 0, b: 0, a: 0}
+ - {r: 0, g: 0, b: 0, a: 0}
+ - {r: 0, g: 0, b: 0, a: 0}
+ - {r: 0, g: 0, b: 0, a: 0}
+ - {r: 0, g: 0, b: 0, a: 0}
+ - {r: 0, g: 0, b: 0, a: 0}
+ - {r: 0, g: 0, b: 0, a: 0}
+ IsPaletted: 0
diff --git a/UnityProject/Assets/Textures/clothing/mask/cigarette/cigarette-lit.asset.meta b/UnityProject/Assets/Textures/clothing/mask/cigarette/cigarette-lit.asset.meta
new file mode 100644
index 00000000000..cf7fd1f95b9
--- /dev/null
+++ b/UnityProject/Assets/Textures/clothing/mask/cigarette/cigarette-lit.asset.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 65e3fb4ec431d2142be2cd64754b5660
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 11400000
+ userData:
+ assetBundleName:
+ assetBundleVariant: