Example #1
0
            private void CreateTrunk()
            {
                container = (StorageContainer)GameManager.server.CreateEntity(prefabFridge, car.transform.position, car.transform.rotation, false);
                container.enableSaving = true;
                container.skinID       = (ulong)886416273;
                container.Spawn();

                container.GetComponent <DestroyOnGroundMissing>().enabled = false;
                container.GetComponent <GroundWatch>().enabled            = false;

                container.SetParent(car);
                container.transform.localPosition = new Vector3(1f, 0.85f, -1.8f);
                container.transform.localRotation = Quaternion.Euler(263f + 180f, 0, 90f);

                container.panelName  = "generic";
                container.isLockable = false;
                //container.displayHealth = false;
                container.pickup.enabled     = false;
                container.onlyAcceptCategory = ItemCategory.All;

                if (plug.trunks.ContainsKey(car.net.ID))
                {
                    plug.trunks[car.net.ID].RestoreItems(ref container.inventory);
                }
            }
Example #2
0
        void DestroyAnyTracker()
        {
            SetMapMarker(Vector3.zero);
            Tracker tracker = containerAK?.GetComponent <Tracker>() ?? holdingPlayer?.GetComponent <Tracker>() ?? droppedAK?.GetComponent <Tracker>();

            if (tracker != null)
            {
                UnityEngine.Object.Destroy(tracker);
            }
        }
Example #3
0
                static void _updateAndProcessActions(StorageContainer instance)
                {
                    if (instance.GetComponent <IStorageActions>() is not IStorageActions storageActions)
                    {
                        return;
                    }

                    HandReticle.main.setText(textHand: storageActions.actions);
                    storageActions.processActions();
                }