Address AA

This commit is contained in:
mochi
2020-10-04 20:54:47 +02:00
parent 8a9b3c5e74
commit 444a7bfe92
10 changed files with 429 additions and 444 deletions
+3
View File
@@ -15,6 +15,7 @@
* * name - The name
*/
/datum/feed_network/proc/get_channel_by_name(name)
RETURN_TYPE(/datum/feed_channel)
for(var/fc in channels)
var/datum/feed_channel/FC = fc
if(FC.channel_name == name)
@@ -27,6 +28,7 @@
* * author - The author
*/
/datum/feed_network/proc/get_channel_by_author(author)
RETURN_TYPE(/datum/feed_channel)
for(var/fc in channels)
var/datum/feed_channel/FC = fc
if(FC.author == author)
@@ -39,6 +41,7 @@
* * idx - The index
*/
/datum/feed_network/proc/get_channel_by_idx(idx)
RETURN_TYPE(/datum/feed_channel)
if(!ISINDEXSAFE(channels, idx))
return
return channels[idx]
+2 -8
View File
@@ -513,14 +513,8 @@
return
// Find the named channel the user is trying to publish a story to
var/user_name = get_scanned_user(usr)["name"]
var/datum/feed_channel/FC
for(var/fc in GLOB.news_network.channels)
var/datum/feed_channel/_FC = fc
if(_FC.channel_name == channel)
if(_FC.can_publish(usr, user_name))
FC = _FC
break
if(!FC)
var/datum/feed_channel/FC = GLOB.news_network.get_channel_by_name(channel)
if(!FC || !FC.can_publish(usr, user_name))
return
var/datum/feed_message/FM = new
FM.author = usr.can_admin_interact() ? author : scanned_user
+2 -1
View File
@@ -117,7 +117,8 @@
to_chat(user, "<span class='warning'>The paper is full of unintelligible symbols!</span>")
/obj/item/newspaper/Topic(href, href_list)
..()
if(..())
return
var/mob/living/M = usr
if(!Adjacent(M))
return