public void UpdateOffsetTables() { foreach (Fetchable data in fetchables.GetDataList()) { Fetchable current = data; current.pickupable.GetOffsets(current.pickupable.cachedCell); } }
public void UpdateTags(HandleVector <int> .Handle fetchable_handle) { Fetchable data = fetchables.GetData(fetchable_handle); TagBits rhs = new TagBits(ref disallowedTagMask); data.pickupable.KPrefabID.AndTagBits(ref rhs); data.tagBitsHash = rhs.GetHashCode(); fetchables.SetData(fetchable_handle, data); }
public void Sim1000ms(float dt) { foreach (KeyValuePair <HandleVector <int> .Handle, Rottable.Instance> rotUpdater in rotUpdaters) { HandleVector <int> .Handle key = rotUpdater.Key; Rottable.Instance value = rotUpdater.Value; Fetchable data = fetchables.GetData(key); data.freshness = QuantizeRotValue(value.RotValue); fetchables.SetData(key, data); } }
public void UpdateStorage(HandleVector <int> .Handle fetchable_handle, Storage storage) { Fetchable data = fetchables.GetData(fetchable_handle); byte masterPriority = 0; Prioritizable prioritizable = null; Pickupable pickupable = data.pickupable; if ((Object)pickupable.storage != (Object)null) { prioritizable = pickupable.storage.prioritizable; if ((Object)prioritizable != (Object)null) { PrioritySetting masterPriority2 = prioritizable.GetMasterPriority(); masterPriority = (byte)masterPriority2.priority_value; } } data.masterPriority = masterPriority; fetchables.SetData(fetchable_handle, data); }
private void GatherPickupablesWhichCanBePickedUp(GameObject worker_go) { pickupsWhichCanBePickedUp.Clear(); foreach (Fetchable data in fetchables.GetDataList()) { Fetchable current = data; Pickupable pickupable = current.pickupable; if (pickupable.CouldBePickedUpByMinion(worker_go)) { pickupsWhichCanBePickedUp.Add(new Pickup { pickupable = pickupable, tagBitsHash = current.tagBitsHash, PathCost = 65535, masterPriority = current.masterPriority, freshness = current.freshness, foodQuality = current.foodQuality }); } } }