Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f1e6262
Auto Commands Update Try again (#129)
N1Ran Sep 10, 2019
47bf34f
Revert "Auto Commands Update Try again (#129)"
rexxar-tc Sep 10, 2019
8864a16
Promised nothing is forgotten this time (#130)
N1Ran Sep 10, 2019
8ac340f
Stop fixing shit that ain't broke N1
N1Ran Sep 11, 2019
3818e63
Merge pull request #131 from N1Ran/master
Jimmacle Sep 12, 2019
c94132c
Ignore projected grids
Jimmacle Sep 20, 2019
4b70415
Added a few more convenience commands (#139)
LordTylus Nov 26, 2019
70fdb93
Clean up voxel reset code; fix an edge case bug
rexxar-tc Feb 12, 2020
1f82b65
Fix !sandbox clean breaking factions when removing founder (#147)
LordTylus Apr 22, 2020
5308d5f
Added PCU conditions for the Cleanup command. (#148)
SKO85 Apr 22, 2020
96b4154
add '!admin give' command (#154)
Bishbash777 May 11, 2020
0ba711d
Add a visible notification for the player to indicate when they have …
Bishbash777 May 12, 2020
e2a99d9
Add a visible notification for the player to indicate when they have …
Bishbash777 May 12, 2020
2ebeb92
Some requested commands (#152)
N1Ran May 12, 2020
8a18411
Update GridModule.cs (#153)
dylloop May 12, 2020
1ffb255
Added HasOwnerType condition for Cleanup command (#151)
SKO85 May 12, 2020
1361914
Revert "Update GridModule.cs (#153)"
rexxar-tc May 12, 2020
5f87e89
Merge branch 'master' of https://github.com/Bishbash777/Essentials
Bishbash777 May 13, 2020
e8085f7
Add new economy interaction commands for both players and admins
Bishbash777 May 14, 2020
17edcf6
Add a client popup message to signal if they have send/recieved credits
Bishbash777 May 14, 2020
d1a5f60
Fix voxel reset counting
rexxar-tc May 15, 2020
470fc4d
Merge branch 'master' of https://github.com/Bishbash777/Essentials
Bishbash777 May 15, 2020
4f04344
Updated incorrect grammar
Bishbash777 May 15, 2020
90cebb6
Add new economy interaction commands for both players and admins (#158)
Bishbash777 May 15, 2020
e77f39d
fix sandbox clean removing faction reputations (#159)
N1Ran May 15, 2020
188fc31
Add "!identity clear" command to clear an identity of a specific play…
Bishbash777 Jun 9, 2020
c62a602
Merge branch 'master' of https://github.com/Bishbash777/Essentials
Bishbash777 Jun 9, 2020
8fd659c
Merge pull request #162 from Bishbash777/master
Bishbash777 Jun 9, 2020
2ac4390
Only turn off blocks which are enabled
Bishbash777 Jun 18, 2020
ad8734e
Merge pull request #163 from Bishbash777/master
Bishbash777 Jun 18, 2020
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix !sandbox clean breaking factions when removing founder (#147)
* Added !tphere command to teleport players to you more easy

* Added command to Kill given player instantly

* Added Eject Command for specific player

* Added Ejectall command for grids. You can also use it by looking at the grid in question

* Typo fixed

* Turns out essentials already had eject and kill. Moved my code over and improved it a little to deal with offline players as well.

* Code-Review reworks

* Uses VisualScriptLogicProvider to kick members

Main Advantage over faction.KickMember is that KickMember is only used for actually kicking members.

If the founder is kicked the next player in line wont be promoted. There are isntances where the identityID of the founder was still in the safe file, but the identity itself was deleted. causing internal NREs on faction.Members.Keys as the founder ID will always be in the members list.

But without identity building the DictionaryReader fails internally as it doesnt like NULL
  • Loading branch information
LordTylus authored Apr 22, 2020
commit 1f82b654e9fc878e02c2e0db7bc2ab2a2d9d3dce
12 changes: 11 additions & 1 deletion Essentials/Commands/WorldModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
using VRage.Game;
using VRage.Game.ModAPI;
using VRage.Network;
using Sandbox.Game;

namespace Essentials.Commands
{
Expand Down Expand Up @@ -204,7 +205,16 @@ private static bool RemoveFromFaction_Internal(MyIdentity identity)
var fac = MySession.Static.Factions.GetPlayerFaction(identity.IdentityId);
if (fac == null)
return false;
fac.KickMember(identity.IdentityId);

/*
* VisualScriptLogicProvider takes care of removal of faction if last
* identity is kicked, and promotes the next player in line to Founder
* if the founder is being kicked.
*
* Factions must have a founder otherwise calls like MyFaction.Members.Keys will NRE.
*/
MyVisualScriptLogicProvider.KickPlayerFromFaction(identity.IdentityId);

return true;
}

Expand Down