public override void CreateDecal(float timeInSeconds = -1f) { if (GraffitiOG.LoadedCount > 0 || GraffitiMethods.AvailableDecalTypeExists()) { if (GraffitiOG.LoadedCount < 1) { GraffitiOG.LoadedCount = 0; // Just in case it some how goes negative.. GraffitiOG.DecalTypeIndex = GraffitiMethods.NextAvailableDecalType(); } if (!DecalTypeIndexIsValid()) { return; } GraffitiMethods.UsableDecalTypes[GraffitiOG.DecalTypeIndex].Available = false; Handle = DecalHelper.AddDecalTexture(TaggedVehicle.GetOffsetInWorldCoords(Location), Direction, RotationAngle, GraffitiOG.TextureDictionary, GraffitiOG.TextureName, GraffitiMethods.UsableDecalTypes[GraffitiOG.DecalTypeIndex].DecalTypeID, DisplayWidth, DisplayHeight, RGB_Red, RGB_Green, RGB_Blue, RGB_Alpha, timeInSeconds, true, TaggedVehicle); if (MirrorFlip != GraffitiMethods.MirrorFlip.None) { CreateMirroredDecal(timeInSeconds); } if (Exists() && !isCounted) { GraffitiOG.LoadedCount++; isCounted = true; } } else { UI.ShowSubtitle("There are too many decals in this area!\nSome will not display.", 1); } }
public override void CreateDecal(float timeInSeconds = -1f) { if (GraffitiOG.LoadedCount > 0 || GraffitiMethods.AvailableDecalTypeExists()) { if (GraffitiOG.LoadedCount < 1) { GraffitiOG.LoadedCount = 0; // Just in case it some how goes negative.. GraffitiOG.DecalTypeIndex = GraffitiMethods.NextAvailableDecalType(); } if (!DecalTypeIndexIsValid()) { return; } GraffitiMethods.UsableDecalTypes[GraffitiOG.DecalTypeIndex].Available = false; Handle = DecalHelper.AddDecalTexture(Location, Direction, RotationAngle, GraffitiOG.TextureDictionary, GraffitiOG.TextureName, GraffitiMethods.UsableDecalTypes[GraffitiOG.DecalTypeIndex].DecalTypeID, DisplayWidth, DisplayHeight, 255f, 255f, 255f, 255f, timeInSeconds); if (Exists() && !isCounted) { GraffitiOG.LoadedCount++; isCounted = true; } } else { UI.ShowSubtitle("There are too many decals in this area!\nSome will not display.", 1); } }