PillarRestrictions

Approved PillarRestrictions 1.0

No permission to download

salva

Friendly self-taught developer
Administrator
Jan 31, 2016
577
612
63
salva submitted a new resource:

PillarRestrictions - PillarRestrictions proposes a control on your server to avoid those annoying "Pillar Bases"

PillarRestrictions proposes a control on your server to avoid those annoying "Pillar Bases"

Players will be able to build normal house as usual and it does not affect construction at all, however it will prevent them from placing too many pillars together.

Below I leave a sample video:

The calculations made by the plugin are already pre-adjusted, it is not necessary to adjust anything, simply install and...
Read more about this resource...
 
  • Like
Reactions: ice cold

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,785
113
At your house.
github.com
salva submitted a new resource:

PillarRestrictions - PillarRestrictions proposes a control on your server to avoid those annoying "Pillar Bases"



Read more about this resource...
https://github.com/salvadj1/PillarRestrictions/blob/master/PillarRestrictions.cs#L49

The "player" variable was the old crappy thing from magma, which tries to find the structurecomponent's owner.

If the player would be offline you will get a null for It.

What I mean is that if you place a wood foundation, you become the owner of the structure component, and that can't be changed. Anyone who builds something to that foundation the owner is still the same.

Use actualplacer instead, that was what I added before, It is the actual player who is placing the object.
 
  • Agree
Reactions: salva

salva

Friendly self-taught developer
Administrator
Jan 31, 2016
577
612
63
https://github.com/salvadj1/PillarRestrictions/blob/master/PillarRestrictions.cs#L49

The "player" variable was the old crappy thing from magma, which tries to find the structurecomponent's owner.

If the player would be offline you will get a null for It.

What I mean is that if you place a wood foundation, you become the owner of the structure component, and that can't be changed. Anyone who builds something to that foundation the owner is still the same.

Use actualplacer instead, that was what I added before, It is the actual player who is placing the object.
Thank you, you're right ... I'll update it as soon as I can
 

ice cold

Active Member
Trusted Member
Member
Oct 24, 2016
606
876
43
Canada
Thank you, you're right ... I'll update it as soon as I can
Instead of checking entities around you can check linked structures

Otherwise it also blocks pillars that are in other foundations but in radius like i had on my server
 
  • Disagree
Reactions: salva

salva

Friendly self-taught developer
Administrator
Jan 31, 2016
577
612
63
Instead of checking entities around you can check linked structures

Otherwise it also blocks pillars that are in other foundations but in radius like i had on my server
GetLinkedStructures will give me a total of the objects linked to the emplaced (foundation, walls, ceiling, blah, blah, blah), things that I do not need to check and also if the structure is too big it will generate a horrible LAG ... very horrible.
If you want to leave doubts check yourself this code.
C#:
public void OnEntityDeployed(Fougerite.Player pl, Fougerite.Entity e, Fougerite.Player actualplacer)
{
        foreach (var x in e.GetLinkedStructs())
        {
             actualplacer.Message(x.Name);
        }
}
The type of restriction that makes this plugin look for the number of pillars around the abutment located by selecting the distance of a diameter in sphere (only 5 meters), in this way is how many pillars are around the abutment and to know if there are many or few limit the abusive construction of pillars but allowing a normal construction and without affecting the typical way of building in RustLegacy.

On the other hand, obviously block pillars that are in other bases (avoid bypass;))

I explained it well?
 
  • Agree
Reactions: ice cold