Newspaper update (#93073)

This commit is contained in:
FeudeyTF
2025-09-30 10:12:38 +10:00
committed by GitHub
parent f13d1d841c
commit 0efc106ea9
3 changed files with 27 additions and 24 deletions
@@ -781,7 +781,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/newscaster, 30)
if(current_channel.receiving_cross_sector)
return
var/temp_message = tgui_input_text(user, "Write your Feed story", "Network Channel Handler", feed_channel_message, max_length = MAX_BROADCAST_LEN, multiline = TRUE)
var/temp_message = tgui_input_text(user, "Write your Feed story", "Network Channel Handler", feed_channel_message, max_length = MAX_MESSAGE_LEN, multiline = TRUE)
if(length(temp_message) <= 1)
return TRUE
+1 -2
View File
@@ -262,8 +262,7 @@
channel_data["channel_messages"] = list()
for(var/datum/feed_message/feed_messages as anything in current_channel.messages)
if(feed_messages.creation_time > creation_time)
data["channel_has_messages"] = FALSE
break
continue
data["channel_has_messages"] = TRUE
var/has_image = FALSE
if(feed_messages.img)
+25 -21
View File
@@ -41,23 +41,6 @@ export const Newspaper = (props) => {
return (
<Window width={300} height={400}>
<Window.Content backgroundColor="#858387" scrollable>
{current_page === channels.length + 1 ? (
<NewspaperEnding />
) : current_page ? (
<NewspaperChannel />
) : (
<NewspaperIntro />
)}
{!!scribble_message && (
<Box
style={{
borderTop: '3px dotted rgba(255, 255, 255, 0.8)',
borderBottom: '3px dotted rgba(255, 255, 255, 0.8)',
}}
>
{scribble_message}
</Box>
)}
<Section>
<Button
icon="arrow-left"
@@ -76,6 +59,23 @@ export const Newspaper = (props) => {
Next Page
</Button>
</Section>
{current_page === channels.length + 1 ? (
<NewspaperEnding />
) : current_page ? (
<NewspaperChannel />
) : (
<NewspaperIntro />
)}
{!!scribble_message && (
<Box
style={{
borderTop: '3px dotted rgba(255, 255, 255, 0.8)',
borderBottom: '3px dotted rgba(255, 255, 255, 0.8)',
}}
>
{scribble_message}
</Box>
)}
</Window.Content>
</Window>
);
@@ -120,8 +120,9 @@ const NewspaperChannel = (props) => {
<Box fontSize="12px">
Channel made by: {individual_channel.author_name}
</Box>
{channel_has_messages
? individual_channel.channel_messages.map((message) => (
{channel_has_messages ? (
<>
{individual_channel.channel_messages.map((message) => (
<>
<Box key={message.message}>
<Box
@@ -132,8 +133,11 @@ const NewspaperChannel = (props) => {
</Box>
<Divider />
</>
))
: 'No feed stories stem from this channel...'}
))}
</>
) : (
'No feed stories stem from this channel...'
)}
</Box>
))}
</Section>