-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added unsiegeable towns #315
Conversation
/swa town <town> setunsiegeable <true|false>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple a small changes needed.
The only thing I would consider adding is maybe something to the town status screen event, so its visible that the town is unsiege-able from the /town screen.
} | ||
else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undo un-needed change.
This comment has been minimized.
This comment has been minimized.
I can also agree with this, re-using the existing metadata at -1 is the move. |
All makes sense - working on it now - as for removing a town's 'unsiegeable' status, just /swa immunity town|nation|all 0 or some other command/parameter? |
I wouldn't use 0, you can accept permanent and include 'permanent' in the tab complete. |
Changed to work with immunityendtime rather than a whole new flag
Integer.parseInt(args[2]); | ||
} | ||
} catch (NumberFormatException | ArrayIndexOutOfBoundsException e) { | ||
Messaging.sendMsg(sender, Translation.of("msg_error_must_be_num")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚧
- The above translation string is currently this:
'&cAmount must be a number.'
- Along with the new permanent option, this text should be changed to something more suitable e.g.
'&cValue must be a number or permanent.'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, wasn't sure of how to phrase it, I'll implement this in next commit :^)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This language string still needs updating
- e.g. "msg_error_must_be_num" needs to be changed
- I suggest removing the current string and adding a new one right at the end of the file called:
msg_error_must_be_num_or_permanent
- Make sure to change this in both the english.yml and french.yml files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can do, but how should I go about getting a french translation? Just use google translate or is there someone I should message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To update the french.yml file
- Create a new comment at the bottom of the file called
#Added in 23
- Add the new lines there, just like in the english.yml file
- (No need to translate them yourself)
src/main/java/com/gmail/goosius/siegewar/command/SiegeWarAdminCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gmail/goosius/siegewar/command/SiegeWarAdminCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gmail/goosius/siegewar/command/SiegeWarAdminCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gmail/goosius/siegewar/playeractions/PlaceBlock.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gmail/goosius/siegewar/listeners/SiegeWarTownEventListener.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
This comment has been minimized.
This comment has been minimized.
Believe I have fixed grammatical errors and resolved conflicts, not terribly experienced with managing conflicts so please do look over my changes and make sure everythings all good :^) |
src/main/java/com/gmail/goosius/siegewar/listeners/SiegeWarTownEventListener.java
Show resolved
Hide resolved
src/main/java/com/gmail/goosius/siegewar/command/SiegeWarAdminCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gmail/goosius/siegewar/command/SiegeWarAdminCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gmail/goosius/siegewar/command/SiegeWarAdminCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gmail/goosius/siegewar/listeners/SiegeWarTownEventListener.java
Show resolved
Hide resolved
src/main/java/com/gmail/goosius/siegewar/command/SiegeWarAdminCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gmail/goosius/siegewar/command/SiegeWarAdminCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gmail/goosius/siegewar/command/SiegeWarAdminCommand.java
Outdated
Show resolved
Hide resolved
Believe I've made all those changes, just need to find someone who can translate the 2 additional lang strings for me so I can do the french lang file too =] |
Adding the English lines is fine, someone french will do teh translation later. |
src/main/resources/english.yml
Outdated
#Unsiegeable towns strings | ||
msg_permanent: "permanent" | ||
msg_error_must_be_num_or_permanent: '&cAmount must be a number or ''permanent''.' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚧
- The english.yml file now needs a little rearranging
- Please make the following small updates:
- Update the version at the top of the file to
23
- Add a new comment line at the bottom of the file called
#Added in 23
- Move all the new lines under the new comment line
- Update the version at the top of the file to
Hi Poilet, nearly there! a few more small fixes and it will be ready to merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
src/main/resources/english.yml
Outdated
msg_set_siege_immunities_all: 'Siege immunities for all towns set to %s hours.' | ||
msg_set_siege_immunities_town: 'Siege immunity for town %s set to %s.' | ||
msg_set_siege_immunities_nation: 'Siege immunities for all towns in nation %s set to %s.' | ||
msg_set_siege_immunities_all: 'Siege immunities for all towns set to %s.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚧
- Apologies, I mis-typed something in the last review:
- I meant to write: please move both and new and modified lines down to the bottom of the language files.
- This is particularly so that the translators of the existing French file, will more easily see that they have to change their translation.
Hi, there's a few things still needed here.
|
|
Adds an unsiegeable flag to towns, run the following command to toggle unsiegeability:
/swa town setunsiegeable <true|false>
Description:
So that admins can easier create admin towns that are unsiegeable and just toggle this setting, rather than having to unecessarily give large amounts of immunity timer.
New Nodes/Commands/ConfigOptions:
2 new lines in english.yml that'll need translating, they can be found under the names:
msg_swa_town_unsiegeable_set and msg_err_cannot_start_siege_at_unsiegeable_town
Relevant Issue ticket:
By making this pull request, I represent that I have the right to waive copyright and related rights to my contribution, and agree that all copyright and related rights in my contributions are waived, and I acknowledge that the TownyAdvanced organization has the copyright to use and modify my contribution under the SiegeWar License for perpetuity.