From 01f8f056333d7409d35d9dce7e2c1e3be7d6c436 Mon Sep 17 00:00:00 2001 From: mochi Date: Mon, 5 Oct 2020 21:16:34 +0200 Subject: [PATCH] Address SteelSlayer --- code/modules/newscaster/datums.dm | 7 +++++-- code/modules/newscaster/obj/newscaster.dm | 2 +- code/modules/newscaster/obj/newspaper.dm | 4 ++-- tgui/packages/tgui/interfaces/Newscaster.js | 12 ++++++------ tgui/packages/tgui/public/tgui.bundle.css | 2 +- tgui/packages/tgui/public/tgui.bundle.js | 2 +- tgui/packages/tgui/styles/interfaces/Newscaster.scss | 2 +- 7 files changed, 17 insertions(+), 14 deletions(-) diff --git a/code/modules/newscaster/datums.dm b/code/modules/newscaster/datums.dm index de0821e9819..5ac6076d9f8 100644 --- a/code/modules/newscaster/datums.dm +++ b/code/modules/newscaster/datums.dm @@ -4,8 +4,11 @@ * Singleton that contains all informations related to newscasters (channels, stories). */ /datum/feed_network + /// Contains all of the feed channels created during the round. var/list/datum/feed_channel/channels = list() + /// Contains all of the feed stories created during the round. var/list/datum/feed_message/stories = list() + /// The current wanted issue. var/datum/feed_message/wanted_issue /** @@ -127,7 +130,7 @@ * * scanned_user - The user's identifying information on the newscaster */ /datum/feed_channel/proc/can_publish(mob/user, scanned_user = "Unknown") - return (!frozen && (is_public || (author == scanned_user))) || user.can_admin_interact() + return (!frozen && (is_public || (author == scanned_user))) || user?.can_admin_interact() /** * Returns whether the given user can edit or delete this channel. @@ -137,7 +140,7 @@ * * scanned_user - The user's identifying information on the newscaster */ /datum/feed_channel/proc/can_modify(mob/user, scanned_user = "Unknown") - return (!frozen && author == scanned_user) || user.can_admin_interact() + return (!frozen && author == scanned_user) || user?.can_admin_interact() /** * Clears the channel's information. diff --git a/code/modules/newscaster/obj/newscaster.dm b/code/modules/newscaster/obj/newscaster.dm index 5a1f28388a8..198250689f3 100644 --- a/code/modules/newscaster/obj/newscaster.dm +++ b/code/modules/newscaster/obj/newscaster.dm @@ -150,7 +150,7 @@ else playsound(loc, 'sound/effects/glasshit.ogg', 90, TRUE) if(BURN) - playsound(src.loc, 'sound/items/welder.ogg', 100, TRUE) + playsound(loc, 'sound/items/welder.ogg', 100, TRUE) /obj/machinery/newscaster/deconstruct(disassembled = TRUE) if(!(flags & NODECONSTRUCT)) diff --git a/code/modules/newscaster/obj/newspaper.dm b/code/modules/newscaster/obj/newspaper.dm index 0f4124c2908..fe3ec257e32 100644 --- a/code/modules/newscaster/obj/newspaper.dm +++ b/code/modules/newscaster/obj/newspaper.dm @@ -43,7 +43,7 @@ if(SCREEN_COVER) //Cover dat += "
The Griffon
" dat += "
Nanotrasen-standard newspaper, for use on Nanotrasen Space Facilities

" - if(isemptylist(news_content)) + if(!length(news_content)) if(important_message) dat += "Contents:
" else @@ -70,7 +70,7 @@ if(C.censored) dat += "This channel was deemed dangerous to the general welfare of the station and therefore marked with a D-Notice. Its contents were not transferred to the newspaper at the time of printing." else - if(isemptylist(C.messages)) + if(!length(C.messages)) dat += "No Feed stories stem from this channel..." else dat += "