Implemented Admin Upgrade#121
Open
Schmille wants to merge 1 commit intoAlmuraDev:masterfrom
Schmille:master
Open
Implemented Admin Upgrade#121Schmille wants to merge 1 commit intoAlmuraDev:masterfrom Schmille:master
Schmille wants to merge 1 commit intoAlmuraDev:masterfrom
Schmille:master
Conversation
Additions/changes: - SGBaseTE - added field "takesBlastDamage" - if false stargates will not be destroyed due to explosions (default: true) - added field "requiresAdminToBreak" - if true stargates cannot be broken unless the player is an operator (default: false) - added method "applyAdminUpgrade" - sets takeBlastDamage to false, canPlayerBreakGate to false and requiresAdminToBreak to true - SGBlock - added method "takesBlastDamage" - used to access the SGBaseTE field of the same name - added method "isOperator" - checks if the player is an operator (SGCraft.hasPermission causes error due to not being able to cast EntityPlayerSP to Sponge EntityPlayer) - added method "requiresAdminToBreak" - used to access the SGBaseTE field of the same name - changed "removedByPlayer" - method now checks if "requiresAdminToBreak" is true - added override "onBlockExploded" - used to cancel destruction if "takesBlastDamage" is false - SGAdminUpgradeItem - Added a simple item to apply the upgrade, in a similar way to SGChevronUpgradeItem, SGIrisUpgradeItem or SGPegasusUpgradeItem - Added appropriate entries to English and German lang files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an Admin Upgrade that, as suggested in #118, makes the stargate indestructible when applied.
After applying the upgrade, the Stargate can only be destroyed by an operator in creative mode.
To accomplish this the following additions and changes have been made:
SGBaseTE
SGBlock
SGAdminUpgradeItem
Added appropriate entries to English and German lang files
Added "output.resourcesDir = output.classesDir" to build.grade to make IntelliJ recognise the mod's assets (I don't know why it didn't before)
The new fields are currently not available through the Configurator, though they could be added.
It might be a good idea to not make the "requiresAdminToBreak" field available in this way, to keep gates from being broken even by players that have full access to the Configurator.