Fixes communicator newsfeed app. (#6713)

* Fixes communicator newsfeed app.
Fixes non-terminal while loop in get_latest_news(), helper.dm
Newscaster posts now have a world.time-esque timestamp number, so they can be (almost) uniquely identified

* whoopsie
This commit is contained in:
Atermonera
2020-02-29 15:05:02 -08:00
committed by GitHub
parent 7903911e43
commit d13336bbe6
5 changed files with 81 additions and 48 deletions
@@ -122,6 +122,8 @@
data["manifest"] = PDA_Manifest
data["feeds"] = compile_news()
data["latest_news"] = get_recent_news()
if(newsfeed_channel)
data["target_feed"] = data["feeds"][newsfeed_channel]
if(cartridge) // If there's a cartridge, we need to grab the information from it
data["cart_devices"] = cartridge.get_device_status()
data["cart_templates"] = cartridge.ui_templates
@@ -280,6 +282,9 @@
var/obj/O = cartridge.internal_devices[text2num(href_list["toggle_device"])]
cartridge.active_devices ^= list(O) // Exclusive or, will toggle its presence
if(href_list["newsfeed"])
newsfeed_channel = text2num(href_list["newsfeed"])
if(href_list["cartridge_topic"] && cartridge) // Has to have a cartridge to perform these functions
cartridge.Topic(href, href_list)