From 6207846cc685c8cd0713255732b8230dde85d9f0 Mon Sep 17 00:00:00 2001 From: ceikry Date: Sat, 10 Jul 2021 23:27:48 -0500 Subject: [PATCH] Added the unlock trigger for Volcanic Vikings --- Server/src/main/kotlin/api/ContentAPI.kt | 9 +++++++++ .../main/kotlin/rs09/game/world/repository/Repository.kt | 5 +++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Server/src/main/kotlin/api/ContentAPI.kt b/Server/src/main/kotlin/api/ContentAPI.kt index df3981d11..994f9b745 100644 --- a/Server/src/main/kotlin/api/ContentAPI.kt +++ b/Server/src/main/kotlin/api/ContentAPI.kt @@ -1146,4 +1146,13 @@ object ContentAPI { fun addClimbDest(ladderLoc: Location, dest: Location){ SpecialLadders.add(ladderLoc,dest) } + + /** + * Sends a news announcement in game chat. + * @param message the message to announce + */ + @JvmStatic + fun sendNews(message: String){ + Repository.sendNews(message, 12, "CC6600") + } } \ No newline at end of file diff --git a/Server/src/main/kotlin/rs09/game/world/repository/Repository.kt b/Server/src/main/kotlin/rs09/game/world/repository/Repository.kt index ea3a6436e..039ecd6b9 100644 --- a/Server/src/main/kotlin/rs09/game/world/repository/Repository.kt +++ b/Server/src/main/kotlin/rs09/game/world/repository/Repository.kt @@ -72,12 +72,12 @@ object Repository { * @param icon The icon. */ @JvmStatic - fun sendNews(string: String, icon: Int = 12, color: String = "") { + fun sendNews(string: String, icon: Int = 12, color: String = "CC6600") { val players: Array = playerNames.values.toTypedArray() val size = players.size for (i in 0 until size) { val player = players[i] as Player ?: continue - player.sendMessage("" + color + "News: " + string) + player.sendMessage("News: $string") } } @@ -87,6 +87,7 @@ object Repository { * I fucking hate java. */ @JvmStatic + @Deprecated("Old and bad",ReplaceWith("ContentAPI.sendNews()"),DeprecationLevel.WARNING) fun sendNews(string: String){ sendNews(string,12) }