private void OnSurveyGather(SurveyCharge surveyCharge, Item item) { if (SurveyResourceModifiers.ContainsKey(item.info.displayName.english)) { item.amount = (int)(item.amount * SurveyResourceModifiers[item.info.displayName.english]); } else if (SurveyResourceModifiers.ContainsKey("*")) { item.amount = (int)(item.amount * SurveyResourceModifiers["*"]); } }
private void OnSurveyGather(SurveyCharge survey, Item item) { if (item.info.name != "crude_oil.item") { return; } var pos = survey.transform.position; var posID = $"{pos.x}{pos.y}{pos.z}"; if (duplicate.Contains(posID)) { timer.In(1f, () => { duplicate.Remove(posID); }); return; } if (!IsAllowed((BasePlayer)survey.creatorEntity, true)) { item.Remove(); DeSpawn("survey_crater", pos, 0f); if (missingPermission) { SendReply((BasePlayer)survey.creatorEntity, "You don't have the privileges to perform an oil drilling"); } return; } if (dryOnly && TerrainMeta.BiomeMap.GetBiome(pos, TerrainBiome.ARID) < 0.5f) { item.Remove(); DeSpawn("survey_crater", pos, 0f); if (missingPermission) { SendReply((BasePlayer)survey.creatorEntity, "You can only find oil in the southern desert"); } return; } if (!quarryLiquid) { DeSpawn("survey_crater.prefab", pos, 0f); } Spawn("assets/prefabs/tools/surveycharge/survey_crater_oil.prefab", pos); DeSpawn("survey_crater", pos, oilCrateDespawn); duplicate.Add(posID); if (!dropFreePumpjack) { return; } var pumpJack = ItemManager.CreateByName("mining.pumpjack", 1); pumpJack.Drop(pos + new Vector3(.5f, .5f), Vector3.zero, Quaternion.AngleAxis(0, Vector3.left)); }
private void OnSurveyGather(SurveyCharge surveyCharge, Item item) { float modifier; if (SurveyResourceModifiers.TryGetValue(item.info.displayName.english, out modifier)) { item.amount = (int)(item.amount * modifier); } else if (SurveyResourceModifiers.TryGetValue("*", out modifier)) { item.amount = (int)(item.amount * modifier); } }
private void OnSurveyGather(SurveyCharge survey, Item item) { Hash <int, SurveyItem> surveyItems = _activeSurveyCharges[survey.GetInstanceID()].Items; int itemId = item.info.itemid; if (surveyItems[itemId] != null) { surveyItems[itemId].Amount += item.amount; } else { surveyItems[itemId] = new SurveyItem(item.info.displayName.translated, item.amount); } }
private void OnSurveyGather(SurveyCharge survey, Item item) { if (this.IsInBadlands(survey)) { var multiplier = this.rand.Next(3, 5); item.amount = item.amount * multiplier; } // // Remove HQM in the badlands + south of it // if (survey.transform.position.z < this.zoneTop) // { // if (item.info.displayName.english == this.hqmName) // { // item.Remove(0f); // } // } // // Remove Oil in the badlands + noth of it // if (survey.transform.position.z > this.zoneBottom) // { // if (item.info.displayName.english == this.oilName) // { // item.Remove(0f); // } // } }
private void OnSurveyGather(SurveyCharge surveyCharge, Item item) { item.amount = (int)(item.amount * GatherRate); }
private void OnSurveyGather(SurveyCharge survey, Item item) { HookCalled("OnSurveyGather"); }
private void OnSurveyGather(SurveyCharge surveyCharge, Item item) { HookCalled("OnSurveyGather"); }
private void OnSurveyGather(SurveyCharge surveyCharge, Item item) { item.amount = item.amount * config.CurrentMultiplier; }
private void OnSurveyGather(SurveyCharge surveyCharge, Item item) { item.amount = (int)(item.amount * privileges["gatherplus.defualt"][QUARRY_GATHER]); }