You mean on loading in the plugin??
Could you describe it a bit more deeper? Would maybe explain some other things people asking me on BetterLoot thread.
R-Remover-Tool
Building and entity removal tool
Total Downloads: 63,252 - First Release: Apr 3, 2015 - Last Update: Feb 7, 2018
- 5/5, 105 likes
-
Thanks for this awsome plugin!
But was it that hard to make % of initial cost work with deployable?
Code:----->static Dictionary<string, string> PrefabNameToDeployableShort = new Dictionary<string, string>(); void InitializeItems() { foreach (var item in ItemManager.GetItemDefinitions()) { if (!ItemNameToItemID.ContainsKey(item.displayName.english.ToLower())) ItemNameToItemID.Add(item.displayName.english.ToLower(), item.itemid); var itemdeployable = item?.GetComponent<ItemModDeployable>(); if (itemdeployable == null) continue; if (!PrefabNameToDeployable.ContainsKey(itemdeployable.entityPrefab.resourcePath)) PrefabNameToDeployable.Add(itemdeployable.entityPrefab.resourcePath, item.displayName.english); ----->if(!PrefabNameToDeployableShort.ContainsKey(itemdeployable.entityPrefab.resourcePath)) PrefabNameToDeployableShort.Add(itemdeployable.entityPrefab.resourcePath, item.shortname); } }
Code:static Dictionary<string, object> GetRefund(BaseEntity TargetEntity) { var refund = new Dictionary<string, object>(); var buildingblock = TargetEntity.GetComponent<BuildingBlock>(); if (buildingblock != null) { ... } else { var Name = GetName(TargetEntity.PrefabName); ----->if (PrefabNameToDeployableShort.ContainsKey(TargetEntity.PrefabName)) ----->{ -----> var shortname = PrefabNameToDeployableShort[TargetEntity.PrefabName]; -----> var def = ItemManager.FindItemDefinition(shortname); -----> if(def != null) -----> { -----> foreach (var item in def.Blueprint.ingredients) -----> { ----> refund.Add(item.itemDef.displayName.english.ToLower(), (int)item.amount/2); -----> //Interface.Oxide.LogWarning($"{item.itemDef.shortname} - x{item.amount}"); -----> } -----> } ----->} } //if (Refund.ContainsKey(Name)) refund = Refund[Name] as Dictionary<string, object>; return refund; }
-
Would I require the building owners mod if I just wanted to let anyone with cupboard access remove items?
-
hi, I have an issue that it won't let players even when they have the required resources on them to remove sheet metal walls. It justs says that they don't have the required resources to remove it.
-
Could we get the Flame Thrower and Vending Machine added to the config, please?
-
^^ and Tuna lights!
-
-
Here's a fix for Vending Machines. I believe it will work for the Flame Thrower Turret and Tuna Lights, but haven't' tested it yet (See update below). Add the following lines to your RemoverTool.json config file. I put my in alphabetical order after "U Shaped Stairs" and"Two Sided Town Sign Post" but I don't think you have to. (I included the item above for reference. Don't add it twice.)
Under "Remove - Normal - Allowed Entities" (about line 158)
Code:"U Shaped Stairs": true, "Vending Machine": true,
Code:"Two Sided Town Sign Post": { "two sided town sign post": 1 }, "Vending Machine": { "vending machine": 1 },
Quick note: I have deleted the "Remove - Normal - Price" section making all remove functions free on my server. You'll have to add something in that section like what's below if you haven't, otherwise it'll be free.
Code:"Vending Machine": { "metal fragments": 10, "gears": 1 },
Last edited by a moderator: Feb 11, 2017 -
Hi!
I'm having problems removing sheet metal walls, frames, etc from my server.
Here's my cfg for the remover: https://api.myjson.com/bins/qv9e1
What am I doing wrong? -
-
-
I am the owner of a rust server and everytime I try to do /remove all, I get "Couldn't use the RemoverTool: No valid entity targeted, or entity is too far away."
-
Hey, been using this plugin for a while. I currently have it configured to only allow Entity Owners to remove items (config below), however the issue with this is it allows them to /remove even if they don't have tool cupboard access. However, when i set Tool Cupboard to True, it kinda overrides the Entity Owner true and lets anyone with TC access to /remove. Any fix for this?
Code:"Remove - Normal - Use Building Owners (You will need Building Owners plugin)": false, "Remove - Normal - Use Entity Owners": true, "Remove - Normal - Use Friends (Friends)": false, "Remove - Normal - Use Friends (RustIO)": false, "Remove - Normal - Use Tool Cupboards (strongly unrecommended)": false,
-
- Are we using EntityOwners? If the player is the Entity owner then stop checking and remove.
- Are we using BuildingOwners? If the player is the Building owner then stop checking and remove.
- Are we using Tool Cupboards? If the player is authorized on all TC's then stop checking and remove.
- If everything else fails: don't remove.
If you wanted to change the code, there is a not-so-easy fix. The only key is you'll have to remember to make the change every time the plug-in is updated in order keep it in effect. What we'll do is add an additional step to the Are we using EntityOwners check. This will look to see if the player has total TC access (that is, if the player is authorized on every TC that covers that block).
Code:In version 4.0.11, around line 1122 REPLACE: if (RemoveWithEntityOwners) WITH: if (RemoveWithEntityOwners && hasTotalAccess(player))
The potential downside is that if a person's TC is compromised, or someone else builds a TC that overlaps a block (say, just ouside the edge of the base) the builder will not be able to /remove the block. - Are we using EntityOwners? If the player is the Entity owner then stop checking and remove.
-
Would it be possible to enable ent.kill for non admins? (own entities only)
-
Hey! Thank you so much for the in depth info, I changed the plugin as you said and it works perfectly! Thanks a ton <3
-
After this update its making people pay to remove items regardless of how the config is setup. Any ideas?
Last edited by a moderator: Feb 16, 2017 -
Not sure how that could happen. AFAIK, the way to prevent people from having to pay is to remove the "Remove - Normal - Price": section from the config (starting around line 178). On my server, I've pulled the whole thing, but I guess you could remove the price for select items. How were you preventing people from being charged? If it was buy pulling the prices from the config, how does the plug-in know what to charge? Are they getting a message even if they have the items in their inventory?
You might check your config to make sure it wasn't overwritten with the default. Notifier does this to me all the time when I forget a comma. -
Thanks again! -
getting this error
Code:NullReferenceException: Object reference not set to an instance of an object at Oxide.Plugins.RemoverTool.GetRefund (.BaseEntity TargetEntity) [0x00000] in <filename unknown>:0 at Oxide.Plugins.RemoverTool.GUIRefundUpdate (.BasePlayer player, Boolean useRefund, .BaseEntity TargetEntity) [0x00000] in <filename uknown>:0 at Oxide.Plugins.RemoverTool+ToolRemover.RemoveUpdate () [0x00000] in <filename unknown>:0