Skip to content

Commit

Permalink
Merge pull request #79 from RocketModFix/remove-command-compass
Browse files Browse the repository at this point in the history
Remove command compass
  • Loading branch information
MrRousek committed May 27, 2024
2 parents d70523c + 95bda77 commit 8f6a170
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 131 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ You can still use old plugins without any changes/recompilation/updates.
- [x] Commands:
- [x] /position /pos (current position of the player).
- [x] /tpwp (improved version of /tp wp).
- [ ] Remove Features:
- [x] Command /compass
- [x] Gather a Team with a direct access to the repo edit without admins help. (We still gather a team)
- [ ] RocketModFix Video Installation Guide (could be uploaded on YouTube).

Expand Down
112 changes: 0 additions & 112 deletions Rocket.Unturned/Commands/CommandCompass.cs

This file was deleted.

27 changes: 9 additions & 18 deletions Rocket.Unturned/U.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace Rocket.Unturned
{
public class U : MonoBehaviour, IRocketImplementation, IModuleNexus
{
private static GameObject rocketGameObject;
private static GameObject rocketGameObject;
public static U Instance;

private static readonly TranslationList defaultTranslations = new TranslationList(){
Expand Down Expand Up @@ -84,15 +84,6 @@ public class U : MonoBehaviour, IRocketImplementation, IModuleNexus
{ "command_heal_success_me","{0} was successfully healed"},
{ "command_heal_success_other","You were healed by {0}"},
{ "command_heal_success","You were healed"},
{ "command_compass_facing_private","You are facing {0}"},
{ "command_compass_north","N"},
{ "command_compass_east","E"},
{ "command_compass_south","S"},
{ "command_compass_west","W"},
{ "command_compass_northwest","NW"},
{ "command_compass_northeast","NE"},
{ "command_compass_southwest","SW"},
{ "command_compass_southeast","SE"},
{ "command_rocket_plugins_loaded","Loaded: {0}"},
{ "command_rocket_plugins_unloaded","Unloaded: {0}"},
{ "command_rocket_plugins_failure","Failure: {0}"},
Expand Down Expand Up @@ -120,7 +111,7 @@ public class U : MonoBehaviour, IRocketImplementation, IModuleNexus
{ "invalid_character_name","invalid character name"},
{ "command_not_found","Command not found."}
};


public static XMLFileAsset<UnturnedSettings> Settings;
public static XMLFileAsset<TranslationList> Translation;
Expand Down Expand Up @@ -150,7 +141,7 @@ public void initialize()
#pragma warning disable CS0618
Console = rocketGameObject.AddComponent<UnturnedConsole>();
#pragma warning restore CS0618

CommandWindow.Log("Rocket Unturned v" + Assembly.GetExecutingAssembly().GetName().Version.ToString() + " for Unturned v" + Provider.APP_VERSION);

IPluginAdvertising pluginAdvertising = PluginAdvertising.Get();
Expand All @@ -168,7 +159,7 @@ public void initialize()
};
}
}

private void Awake()
{
Instance = this;
Expand Down Expand Up @@ -228,7 +219,7 @@ internal void Initialize()
}
pluginAdvertising.AddPlugins(pluginNames);
};

SteamGameServer.SetKeyValue("unturned", Provider.APP_VERSION);
SteamGameServer.SetKeyValue("rocket", Assembly.GetExecutingAssembly().GetName().Version.ToString());
}
Expand All @@ -245,7 +236,7 @@ internal void Initialize()
Core.Logging.Logger.LogException(ex);
}
}

private void bindDelegates()
{
CommandWindow.onCommandWindowInputted += (string text, ref bool shouldExecuteCommand) =>
Expand All @@ -266,7 +257,7 @@ private void bindDelegates()
UnturnedPlayerEvents.TriggerReceive(channel, steamID, packet, offset, size);
};
*/

// Replacements for Rocket usage of onTriggerSend:
SDG.Unturned.Player.onPlayerStatIncremented += UnturnedPlayerEvents.InternalOnPlayerStatIncremented;
PlayerClothing.OnShirtChanged_Global += UnturnedPlayerEvents.InternalOnShirtChanged;
Expand Down Expand Up @@ -331,8 +322,8 @@ public string InstanceId
get
{
return Dedicator.serverID;
}
}
}
}

}
2 changes: 1 addition & 1 deletion Rocket/Rocket.API/Serialisation/RocketPermissions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public void LoadDefaults()
{
DefaultGroup = "default";
Groups = new List<RocketPermissionsGroup> {
new RocketPermissionsGroup("default","Guest",null, new List<string>() , new List<Permission>() { new Permission("p"), new Permission("compass"), new Permission("rocket")},"white"),
new RocketPermissionsGroup("default","Guest",null, new List<string>() , new List<Permission>() { new Permission("p"), new Permission("rocket")},"white"),
new RocketPermissionsGroup("vip","VIP", "default",new List<string>() { "76561198016438091" }, new List<Permission>() { new Permission("effect"), new Permission("heal",120), new Permission("v",30) },"FF9900")
};
}
Expand Down

0 comments on commit 8f6a170

Please sign in to comment.