[MIRROR] some fixes (#9265)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
Co-authored-by: CHOMPStation2 <chompsation2@gmail.com>
This commit is contained in:
CHOMPStation2
2024-10-20 05:21:04 -07:00
committed by GitHub
parent 433ddfe2ab
commit 3fa21dbdab
7 changed files with 27 additions and 9 deletions

View File

@@ -365,6 +365,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster)
if(!viewing_channel.censored) if(!viewing_channel.censored)
for(var/datum/feed_message/M in viewing_channel.messages) for(var/datum/feed_message/M in viewing_channel.messages)
var/list/msgdata = list( var/list/msgdata = list(
"title" = M.title,
"body" = M.body, "body" = M.body,
"img" = null, "img" = null,
"type" = M.message_type, "type" = M.message_type,

View File

@@ -654,8 +654,10 @@ var/list/global/slot_flags_enumeration = list(
return return
//if we haven't made our blood_overlay already //if we haven't made our blood_overlay already
if( !blood_overlay ) if(!blood_overlay)
generate_blood_overlay() generate_blood_overlay()
else
overlays.Remove(blood_overlay)
//Make the blood_overlay have the proper color then apply it. //Make the blood_overlay have the proper color then apply it.
blood_overlay.color = blood_color blood_overlay.color = blood_color

View File

@@ -75,7 +75,7 @@
var/fake_oxy = max(rand(1,40), M.getOxyLoss(), (300 - (M.getToxLoss() + M.getFireLoss() + M.getBruteLoss()))) var/fake_oxy = max(rand(1,40), M.getOxyLoss(), (300 - (M.getToxLoss() + M.getFireLoss() + M.getBruteLoss())))
var/OX = M.getOxyLoss() > 50 ? span_bold("[M.getOxyLoss()]") : M.getOxyLoss() var/OX = M.getOxyLoss() > 50 ? span_bold("[M.getOxyLoss()]") : M.getOxyLoss()
var/TX = M.getToxLoss() > 50 ? span_bold("[M.getToxLoss()]") : M.getToxLoss() var/TX = M.getToxLoss() > 50 ? span_bold("[M.getToxLoss()]") : M.getToxLoss()
var/BU = M.getFireLoss() > 50 ? span_bold("M.getFireLoss()]") : M.getFireLoss() var/BU = M.getFireLoss() > 50 ? span_bold("[M.getFireLoss()]") : M.getFireLoss()
var/BR = M.getBruteLoss() > 50 ? span_bold("[M.getBruteLoss()]") : M.getBruteLoss() var/BR = M.getBruteLoss() > 50 ? span_bold("[M.getBruteLoss()]") : M.getBruteLoss()
var/analyzed_results = "" var/analyzed_results = ""
if(M.status_flags & FAKEDEATH) if(M.status_flags & FAKEDEATH)

View File

@@ -559,9 +559,22 @@
return return
busy = 0 busy = 0
user.clean_blood()
if(ishuman(user)) if(ishuman(user))
user:update_inv_gloves() var/mob/living/carbon/human/H = user
H.gunshot_residue = null
if(H.gloves)
H.gloves.clean_blood()
H.update_inv_gloves()
H.gloves.germ_level = 0
else
if(H.r_hand)
H.r_hand.clean_blood()
if(H.l_hand)
H.l_hand.clean_blood()
H.bloody_hands = 0
H.germ_level = 0
else
user.clean_blood()
for(var/mob/V in viewers(src, null)) for(var/mob/V in viewers(src, null))
V.show_message(span_notice("[user] washes their hands using \the [src].")) V.show_message(span_notice("[user] washes their hands using \the [src]."))

View File

@@ -212,16 +212,16 @@
var/slot_num var/slot_num
if(slot_start == 0) if(slot_start == 0)
slot_num = 1 slot_num = 1
slot_start = 2
else else
slot_num = slot_start + 1 slot_num = slot_start + 1
if(slot_num > 3)
while(slot_start != slot_num) //If we wrap around without finding any free slots, just give up. return
// Attempt to rotate through the slots until we're past slot 3, or find the next usable slot. Allows skipping empty slots, while still having an empty slot at end of rotation.
while(slot_num <= 3)
if(module_active(slot_num)) if(module_active(slot_num))
select_module(slot_num) select_module(slot_num)
return return
slot_num++ slot_num++
if(slot_num > 3) slot_num = 1 //Wrap around.
return return

View File

@@ -84,7 +84,8 @@ export const NewscasterViewSelected = (props: { setScreen: Function }) => {
{(!!viewing_channel.messages.length && {(!!viewing_channel.messages.length &&
viewing_channel.messages.map((message) => ( viewing_channel.messages.map((message) => (
<Section key={message.ref}> <Section key={message.ref}>
- {decodeHtmlEntities(message.body)} {message.title && decodeHtmlEntities(message.title) + ' - '}
{decodeHtmlEntities(message.body)}
{!!message.img && ( {!!message.img && (
<Box> <Box>
<Image src={'data:image/png;base64,' + message.img} /> <Image src={'data:image/png;base64,' + message.img} />

View File

@@ -31,6 +31,7 @@ export type Data = {
author: string; author: string;
censored: BooleanLike; censored: BooleanLike;
messages: { messages: {
title: string | null;
body: string; body: string;
img: string | null; img: string | null;
type: string; type: string;