Skip to content

Commit

Permalink
Merge pull request #423 from TownyAdvanced/feature/siegecamp_in_guide…
Browse files Browse the repository at this point in the history
…book

Add SiegeCamps to guide book, bump min. Towny version to 0.97.5.0.
  • Loading branch information
LlmDl committed Dec 14, 2021
2 parents 2874205 + a9f070d commit 632de54
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.gmail.goosius</groupId>
<artifactId>SiegeWar</artifactId>
<version>0.6.7</version>
<version>0.7.0</version>
<name>siegewar</name> <!-- Leave lower-cased -->

<properties>
Expand Down Expand Up @@ -40,7 +40,7 @@
<dependency>
<groupId>com.github.TownyAdvanced</groupId>
<artifactId>Towny</artifactId>
<version>0.97.3.0</version>
<version>0.97.5.0</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/gmail/goosius/siegewar/SiegeWar.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
public class SiegeWar extends JavaPlugin {

private static SiegeWar plugin;
private final Version requiredTownyVersion = Version.fromString("0.97.3.0");
private final Version requiredTownyVersion = Version.fromString("0.97.5.0");
private static final SiegeHUDManager siegeHUDManager = new SiegeHUDManager();

private static boolean siegeWarPluginError = false;
Expand Down
14 changes: 14 additions & 0 deletions src/main/java/com/gmail/goosius/siegewar/utils/BookUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ private static String siegeWarUserGuide(String text) {
boolean peaceful = SiegeWarSettings.getWarCommonPeacefulTownsEnabled();
boolean surrender = SiegeWarSettings.getWarSiegeSurrenderEnabled();
boolean abandon = SiegeWarSettings.getWarSiegeAbandonEnabled();
boolean siegeCamps = SiegeWarSettings.areSiegeCampsEnabled();
String bannerCost = "zero";
String plunderCost = "zero";
if (TownyEconomyHandler.isActive()) {
Expand Down Expand Up @@ -65,6 +66,19 @@ private static String siegeWarUserGuide(String text) {
if(peaceful)
text += "Peaceful towns cannot be sieged at all.\n\n";

/*
* Siege Camps
*/
if (siegeCamps) {
text += "\nSiegeCamps\n\n";
text += "SiegeCamps precede Sieges, begun when a banner is first placed by an attacker.\n\n";
text += "SiegeCamps last " + SiegeWarSettings.getSiegeCampDurationInMinutes() + " minutes, in which the attacking town must score "
+ SiegeWarSettings.getSiegeCampPointsForSuccess() + " points. \n\n";
text += "Points are scored by standing near to the banner. " + SiegeWarSettings.getSiegeCampPointsPerMinute() + " points are given per minute.\n\n";
text += "If the required number of points are scored, the siege will begin. If the attacker fails to score enough points they will be unable to attempt a new siege for "
+ TimeMgmt.formatCountdownTime(SiegeWarSettings.getFailedSiegeCampCooldown()) + ".\n\n";
}

/*
* Siege participants info
*/
Expand Down

0 comments on commit 632de54

Please sign in to comment.