From 9dc5956e89750a824b4d87784b44f44102eeb175 Mon Sep 17 00:00:00 2001 From: Tony Bark <35226681+tonytins@users.noreply.github.com> Date: Wed, 26 May 2021 03:48:50 -0400 Subject: [PATCH] News outlet variable Two possible news outlets: FNN (Furtropolis News Network) or Pawprint Press. --- dialog/ticker.json | 2 +- scripts/ticker.gd | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dialog/ticker.json b/dialog/ticker.json index de3b89e..84d7d79 100644 --- a/dialog/ticker.json +++ b/dialog/ticker.json @@ -9,7 +9,7 @@ "text": "All Raccoons Cheat At Poker, Animal Researchers Say." }, "4": { - "text": "Pawprint News. Always there." + "text": "[outlet]. Always there." }, "5": { "text": "Cat Hijacks Municipal Bus; Riders Applaud Good Timing At Stops And Courteous Meows." diff --git a/scripts/ticker.gd b/scripts/ticker.gd index 26b8d4a..94ab5c9 100644 --- a/scripts/ticker.gd +++ b/scripts/ticker.gd @@ -42,6 +42,12 @@ func _random_news(file): var ticker_range = rng.randi_range(0, max_mange) var news = news_keys[ticker_range].text + if SimData.city_name == "Furtropolis" and "[outlet]" in news: + # FNN = Furtropolis News Network + news = news.replace("[outlet]", "FNN") + elif "[outlet]" in news: + news = news.replace("[outlet]", "Pawprint Press") + if "[city]" in news: news = news.replace("[city]", SimData.city_name)