@laslo67 its not shilling to show support to plugin creaters . @Orange is a good coder and everyone should try to suppport all the dev's in umod we work hard to make the imposible posible.......
Not protecting all foundationsSolved
Why is this still marked as maintained ?
FuelStream
Why is this still marked as maintained ?
Good Question
Because plugins are manually marked.FuelStream
Why is this still marked as maintained ?
Wulf
Because plugins are manually marked.
Thanks <3
Hello,
I found the bug, it's happening when the foundation is too close to the ground. If you place your foundation high enough, it will be invulnerable. When it's too close, the raycasting (function) miss the foundation (it goes through or something like that) and see only the ground below.
If you replace the function OnEntityBuilt by mine, it will fix the issue by raycasting slightly higher than where the cupboard is to be sure not to miss the foundation. It will NOT protect the foundation already existing, only the new ones ! You need to destroy and replace the existing TC.
Nothing else is needed to be changed.
I found the bug, it's happening when the foundation is too close to the ground. If you place your foundation high enough, it will be invulnerable. When it's too close, the raycasting (function) miss the foundation (it goes through or something like that) and see only the ground below.
If you replace the function OnEntityBuilt by mine, it will fix the issue by raycasting slightly higher than where the cupboard is to be sure not to miss the foundation. It will NOT protect the foundation already existing, only the new ones ! You need to destroy and replace the existing TC.
Nothing else is needed to be changed.
private void OnEntityBuilt(Planner plan, GameObject go)
{
var Priv = go.GetComponent<BaseEntity>() as BuildingPrivlidge;
if (!Priv) return;
Vector3 oldPosition = Priv.transform.position;
Vector3 tempPosition = new Vector3(Priv.transform.position.x, Priv.transform.position.y + 1F, Priv.transform.position.z);
Priv.transform.position = tempPosition;
var Foundation = GetFoundation(Priv);
Priv.transform.position = oldPosition;
if (!Foundation) return;
IDData.IDs.Add(Priv.net.ID, Foundation.net.ID);
}
The code could be better, we should create a copy of Priv instead of modifiying the existing one but ok, it works ...
Moderator edit: Please do not post random versions of plugins in threads, thanks.
I have a working version that also lets the TC Owner damage their own TC and foundation (this does not).
Contact me if you want it.
I just tested it on my own foundation my tc stands on.
Used a jackhammer and damaged the foundation.
updated rust assemblys and tested all 5 foundation protected .... do keep in mind that when uploading update only newly palced (after update ) will be protected ...... tested wit rockets , c4 , ins rocket and jackhammer 0 damage to foundations
Locked automatically
- 1
- 2