Beispiel #1
0
        public void OnRepairedByMe(EscapePod pod)
        {
            NitroxId id = null;

            foreach (KeyValuePair <NitroxId, GameObject> dict in escapePodsById)
            {
                if (NitroxEntity.GetId(dict.Value) == NitroxEntity.GetId(pod.gameObject))
                {
                    id = dict.Key; // we're looking for serverside id here
                    break;
                }
            }

            if (id != null)
            {
                EscapePodRepair repair = new EscapePodRepair(id);
                packetSender.Send(repair);
            }
            else
            {
                Log.Warn("Couldn't find escape pod id on repair");
            }
        }
Beispiel #2
0
        public void OnRepairedByMe(EscapePod pod)
        {
            string guid = "";

            foreach (KeyValuePair <string, GameObject> dict in escapePodsByGuid)
            {
                if (dict.Value.GetGuid() == pod.gameObject.GetGuid())
                {
                    guid = dict.Key; // we're looking for serverside guid here
                    break;
                }
            }

            if (!guid.Equals(""))
            {
                EscapePodRepair repair = new EscapePodRepair(guid);
                packetSender.Send(repair);
            }
            else
            {
                Log.Warn("Couldn't find escape pod guid on repair");
            }
        }