I had demolish time set to -1 so people could do infinite demolish. Everything was working fine, but now a day later it has stopped. The only thing that has changed is that the server reset over night? What am I doing wrong? Any help would be appreciated as I am very new to this.

Hammer Time
Tweak "Demolish" and "Rotate" time when using the hammer
Total Downloads: 4,351 - First Release: Feb 19, 2016 - Last Update: Jun 30, 2018
- 5/5, 18 likes
-
-
For some reason this plugin only works for server admins. How do I get it to work for everyone?
-
works for all players
Attached Files:
-
-
-
Thanks ^0Corn^2holio - Those were the same settings that I was already using though and for some reason I was the only one who had the option to demolish past the 10 minute mark.
-
EDIT: To clarify, that's only the case if the config options are enabled for it to do so after the restart.
Last edited by a moderator: Jul 31, 2016 -
Ok thanks Shady. I'll try rebooting the server and see if the problem still persists.
-
So then do I have to delete it from the server and then reinstall it? Or, would it be best to just not restart the server as little as possible? And if I do re-install the plugin, will players be able to demo previously built items?
Thanks for your help! -
I am trying to run a PVE server where players can build whatever they want and demolish anything they want with an infinite amount of time as long as they have building privileges there. I am running the hammer time plugin for this that I installed after a server restart. I changed the script to say...
{
"AllowDemolishAfterServerRestart": true,
"AllowRotateAfterServerRestart": true,
"AuthLevelOverrideDemolish": true,
"DemolishTime": -1.0,
"MustOwnToDemolish": true,
"MustOwnToRotate": true,
"RepairDamageCooldown": 8.0,
"RotateTime": -1.0
}
I am not sure what I am doing wrong as this should work, but players are saying that it doesn't let them demo stuff after 10 minutes. Also, I have players who say they cannot demolish craftable items like a tool cupboard, etc. Any idea why this is happening too? -
As for the 10 minutes think, I'm not really sure, it has to be something that changed on the Rust side. I'll remove myself from authlevel and see if I get the same results as you guys, then see how I can work on it from there. -
Can any of you having issues with it not working after 10 minutes try using the attached one and see if the same issue still occurs?
Attached Files:
-
-
I had this too on BetterLoot and FancyDrop, to catch things right after start, but not to early...
And its a damn thing to get it managed:
This code will with "updateScheduled=3" delay it for 3 Ticks..normal the 3 works in most cases...
Code:bool initialized = false; int updateScheduled = 3; private void OnTick() { if (initialized) return; try { if (updateScheduled == 0) { initialized = true; updateScheduled = -1; UpdateInternals(); // << replaces OnServerInitialized } else if (updateScheduled > 0) { --updateScheduled; } } catch (Exception ex) { PrintError("OnTick scheduled update failed: " + ex.Message); } } void UpdateInternals() // before OnServerInitialized { if (!DemolishAfterRestart && !RotateAfterServerRestart) return; var blocks = GameObject.FindObjectsOfType<BuildingBlock>(); for(int i = 0; i < blocks.Length; i++) { var block = blocks[i]; var grade = block?.grade.ToString() ?? string.Empty; if (grade.ToLower().Contains("twig")) continue; //ignore twigs (performance) var doRotate = RotateAfterServerRestart; if (doRotate) doRotate = block?.blockDefinition?.canRotate ?? RotateAfterServerRestart; if (!doRotate && !DemolishAfterRestart) continue; DoInvokes(block, DemolishAfterRestart, doRotate, false); } initialized = true; // initiated }
-
I just ran my server again today and found that the remove functionality was still only working for me even after making my friend a moderator.
I'll try the new .cs file tomorrow and let you know if that fixes anything.
@Rooster Cogburn- If you want to be able to remove placeables (boxes, shelves, barricades etc.) you'll need to also use the Rremove plugin. The hammer won't let you do that. -
-
I want players to demo stuff infinitely after they build something and currently have the hammer time plugin as follows...
{
"AllowDemolishAfterServerRestart": true,
"AllowRotateAfterServerRestart": true,
"AuthLevelOverrideDemolish": true,
"DemolishTime": -1,
"MustOwnToDemolish": true,
"MustOwnToRotate": true,
"RepairDamageCooldown": 8.0,
"RotateTime": -1
}
However, this does not appear to be working. Am I doing something wrong? This was installed after a server restart so that should not be an issue. If you could provide some guidance, it would be greatly appreciated! -
-
I did gave your actual code including someone to test, and the inital function run through successful, but afterwards he told me he had zero effect.
So, it kinda confusing to say exactly, whats the right code to use.... -
So I tried the new CS file... still not working for my friend. I get the remove immediate icon but he doesn't get anything. Just the regular bomb icon that stops working after a few minutes.
-
As an alternative, try setting the Demolish time to something higher than 600, like 900, and see if it goes that long, it might just be an issue with setting it to 0.