From 509c1d563835bc0ff846b20d04d98fead3cdbd13 Mon Sep 17 00:00:00 2001 From: S34N <12197162+S34NW@users.noreply.github.com> Date: Sun, 16 May 2021 09:35:00 +0100 Subject: [PATCH] Fixes rogue characters on strip menu (#16009) --- .../objects/items/devices/radio/headset.dm | 12 +++---- .../living/carbon/alien/humanoid/humanoid.dm | 8 ++--- code/modules/mob/living/carbon/carbon.dm | 10 +++--- code/modules/mob/living/carbon/human/human.dm | 32 +++++++++---------- .../mob/living/simple_animal/friendly/dog.dm | 4 +-- .../mob/living/simple_animal/parrot.dm | 4 +-- .../mob/living/simple_animal/simple_animal.dm | 3 +- code/modules/mob/mob.dm | 4 +-- 8 files changed, 38 insertions(+), 39 deletions(-) diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index 5a493904839..235750a2b48 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -190,14 +190,14 @@ ks2type = /obj/item/encryptionkey/heads/captain /obj/item/radio/headset/heads/captain/alt - name = "\proper the captain's bowman headset" + name = "captain's bowman headset" desc = "The headset of the boss. Protects ears from flashbangs." flags = EARBANGPROTECT icon_state = "com_headset_alt" item_state = "com_headset_alt" /obj/item/radio/headset/heads/rd - name = "Research Director's headset" + name = "research director's headset" desc = "Headset of the researching God." icon_state = "com_headset" item_state = "headset" @@ -211,7 +211,7 @@ ks2type = /obj/item/encryptionkey/heads/hos /obj/item/radio/headset/heads/hos/alt - name = "\proper the head of security's bowman headset" + name = "head of security's bowman headset" desc = "The headset of the man in charge of keeping order and protecting the station. Protects ears from flashbangs." flags = EARBANGPROTECT icon_state = "com_headset_alt" @@ -272,7 +272,7 @@ ks2type = /obj/item/encryptionkey/heads/magistrate /obj/item/radio/headset/heads/magistrate/alt - name = "\proper magistrate's bowman headset" + name = "magistrate's bowman headset" desc = "The headset of the Magistrate. Protects ears from flashbangs." flags = EARBANGPROTECT icon_state = "com_headset_alt" @@ -286,7 +286,7 @@ ks2type = /obj/item/encryptionkey/heads/blueshield /obj/item/radio/headset/heads/blueshield/alt - name = "\proper blueshield's bowman headset" + name = "blueshield's bowman headset" desc = "The headset of the Blueshield. Protects ears from flashbangs." flags = EARBANGPROTECT icon_state = "com_headset_alt" @@ -314,7 +314,7 @@ instant = TRUE /obj/item/radio/headset/centcom - name = "\proper centcom officer's bowman headset" + name = "centcom officer's bowman headset" desc = "The headset of final authority. Protects ears from flashbangs. Can transmit even if telecomms are down." flags = EARBANGPROTECT icon_state = "com_headset_alt" diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index 6d706c94ede..b14f82758b9 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -77,15 +77,15 @@ user.set_machine(src) var/dat = {" - - + + "} - dat += "" + dat += "" dat += "" - dat += "" + dat += "" dat += "
Left Hand:[(l_hand && !(l_hand.flags&ABSTRACT)) ? l_hand : "Empty"]
Right Hand:[(r_hand && !(r_hand.flags&ABSTRACT)) ? r_hand : "Empty"]
Left Hand:[(l_hand && !(l_hand.flags&ABSTRACT)) ? html_encode(l_hand) : "Empty"]
Right Hand:[(r_hand && !(r_hand.flags&ABSTRACT)) ? html_encode(r_hand) : "Empty"]
 
Head:[(head && !(head.flags&ABSTRACT)) ? head : "Empty"]
Head:[(head && !(head.flags&ABSTRACT)) ? html_encode(head) : "Empty"]
 
Exosuit:[(wear_suit && !(wear_suit.flags&ABSTRACT)) ? wear_suit : "Empty"]
Exosuit:[(wear_suit && !(wear_suit.flags&ABSTRACT)) ? html_encode(wear_suit) : "Empty"]
Pouches:[((l_store && !(l_store.flags&ABSTRACT)) || (r_store && !(r_store.flags&ABSTRACT))) ? "Full" : "Empty"]" dat += {"
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 077b4073ca1..8877281fd39 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -667,19 +667,19 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven user.set_machine(src) var/dat = {" - - + + "} - dat += "" - dat += "" + dat += "" - dat += "" + dat += "" if(istype(wear_mask, /obj/item/clothing/mask/muzzle)) var/obj/item/clothing/mask/muzzle/M = wear_mask diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index cd36a902c33..ea3d135402f 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -284,17 +284,17 @@ var/list/obscured = check_obscured_slots() var/dat = {"
Left Hand:[(l_hand && !(l_hand.flags&ABSTRACT)) ? l_hand : "Empty"]
Right Hand:[(r_hand && !(r_hand.flags&ABSTRACT)) ? r_hand : "Empty"]
Left Hand:[(l_hand && !(l_hand.flags&ABSTRACT)) ? html_encode(l_hand) : "Empty"]
Right Hand:[(r_hand && !(r_hand.flags&ABSTRACT)) ? html_encode(r_hand) : "Empty"]
 
Back:[(back && !(back.flags&ABSTRACT)) ? back : "Empty"]" + dat += "
Back:[(back && !(back.flags&ABSTRACT)) ? html_encode(back) : "Empty"]" if(istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/tank)) dat += " [internal ? "Disable Internals" : "Set Internals"]" dat += "
 
Head:[(head && !(head.flags&ABSTRACT)) ? head : "Empty"]
Head:[(head && !(head.flags&ABSTRACT)) ? html_encode(head) : "Empty"]
Mask:[(wear_mask && !(wear_mask.flags&ABSTRACT)) ? wear_mask : "Empty"]
Mask:[(wear_mask && !(wear_mask.flags&ABSTRACT)) ? html_encode(wear_mask) : "Empty"]
- - + + "} - dat += "" - dat += "" + dat += "" var/obj/item/organ/internal/headpocket/C = get_int_organ(/obj/item/organ/internal/headpocket) if(C) @@ -309,7 +309,7 @@ if(slot_wear_mask in obscured) dat += "" else - dat += "" else - dat += "" + dat += "" if(slot_l_ear in obscured) dat += "" else - dat += "" + dat += "" if(slot_r_ear in obscured) dat += "" else - dat += "" + dat += "" dat += "" - dat += "" + dat += "" if(wear_suit) - dat += "" @@ -348,17 +348,17 @@ if(slot_shoes in obscured) dat += "" else - dat += "" + dat += "" if(slot_gloves in obscured) dat += "" else - dat += "" + dat += "" if(slot_w_uniform in obscured) dat += "" else - dat += "" + dat += "" if((w_uniform == null && !(dna && dna.species.nojumpsuit)) || (slot_w_uniform in obscured)) dat += "" @@ -367,7 +367,7 @@ dat += "" dat += "" else - dat += "" @@ -387,8 +387,8 @@ else dat += "Right (Empty)" dat += "" - dat += "" - dat += "" + dat += "" + dat += "" if(istype(w_uniform, /obj/item/clothing/under)) var/obj/item/clothing/under/U = w_uniform diff --git a/code/modules/mob/living/simple_animal/friendly/dog.dm b/code/modules/mob/living/simple_animal/friendly/dog.dm index cd66b3e9d90..73cf8f6a155 100644 --- a/code/modules/mob/living/simple_animal/friendly/dog.dm +++ b/code/modules/mob/living/simple_animal/friendly/dog.dm @@ -140,8 +140,8 @@ var/dat = "
Inventory of [name]

" - dat += "
Head: [inventory_head]" : "add_inv=head'>Nothing"]" - dat += "
Back: [inventory_back]" : "add_inv=back'>Nothing"]" + dat += "
Head: [html_encode(inventory_head)]" : "add_inv=head'>Nothing"]" + dat += "
Back: [html_encode(inventory_back)]" : "add_inv=back'>Nothing"]" dat += "
Collar: [pcollar]" : "add_inv=collar'>Nothing"]" var/datum/browser/popup = new(user, "mob[UID()]", "[src]", 440, 250) diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 18c7e17e655..2dfc5ca2376 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -137,10 +137,10 @@ var/dat = {"

Left Hand:[(l_hand && !(l_hand.flags&ABSTRACT)) ? l_hand : "Empty"]
Right Hand:[(r_hand && !(r_hand.flags&ABSTRACT)) ? r_hand : "Empty"]
Left Hand:[(l_hand && !(l_hand.flags&ABSTRACT)) ? html_encode(l_hand) : "Empty"]
Right Hand:[(r_hand && !(r_hand.flags&ABSTRACT)) ? html_encode(r_hand) : "Empty"]
 
Back:[(back && !(back.flags&ABSTRACT)) ? back : "Empty"]" + dat += "
Back:[(back && !(back.flags&ABSTRACT)) ? html_encode(back) : "Empty"]" if(has_breathable_mask && istype(back, /obj/item/tank)) dat += " [internal ? "Disable Internals" : "Set Internals"]" dat += "
 
Head:[(head && !(head.flags&ABSTRACT)) ? head : "Empty"]
Head:[(head && !(head.flags&ABSTRACT)) ? html_encode(head) : "Empty"]
Mask:Obscured
Mask:[(wear_mask && !(wear_mask.flags&ABSTRACT)) ? wear_mask : "Empty"]" + dat += "
Mask:[(wear_mask && !(wear_mask.flags&ABSTRACT)) ? html_encode(wear_mask) : "Empty"]" if(istype(wear_mask, /obj/item/clothing/mask/muzzle)) var/obj/item/clothing/mask/muzzle/M = wear_mask @@ -322,23 +322,23 @@ if(slot_glasses in obscured) dat += "
Eyes:Obscured
Eyes:[(glasses && !(glasses.flags&ABSTRACT)) ? glasses : "Empty"]
Eyes:[(glasses && !(glasses.flags&ABSTRACT)) ? html_encode(glasses) : "Empty"]
Left Ear:Obscured
Left Ear:[(l_ear && !(l_ear.flags&ABSTRACT)) ? l_ear : "Empty"]
Left Ear:[(l_ear && !(l_ear.flags&ABSTRACT)) ? html_encode(l_ear) : "Empty"]
Right Ear:Obscured
Right Ear:[(r_ear && !(r_ear.flags&ABSTRACT)) ? r_ear : "Empty"]
Right Ear:[(r_ear && !(r_ear.flags&ABSTRACT)) ? html_encode(r_ear) : "Empty"]
 
Exosuit:[(wear_suit && !(wear_suit.flags&ABSTRACT)) ? wear_suit : "Empty"]
Exosuit:[(wear_suit && !(wear_suit.flags&ABSTRACT)) ? html_encode(wear_suit) : "Empty"]
 ↳Suit Storage:[(s_store && !(s_store.flags&ABSTRACT)) ? s_store : "Empty"]" + dat += "
 ↳Suit Storage:[(s_store && !(s_store.flags&ABSTRACT)) ? html_encode(s_store) : "Empty"]" if(has_breathable_mask && istype(s_store, /obj/item/tank)) dat += " [internal ? "Disable Internals" : "Set Internals"]" dat += "
Shoes:Obscured
Shoes:[(shoes && !(shoes.flags&ABSTRACT)) ? shoes : "Empty"]
Shoes:[(shoes && !(shoes.flags&ABSTRACT)) ? html_encode(shoes) : "Empty"]
Gloves:Obscured
Gloves:[(gloves && !(gloves.flags&ABSTRACT)) ? gloves : "Empty"]
Gloves:[(gloves && !(gloves.flags&ABSTRACT)) ? html_encode(gloves) : "Empty"]
Uniform:Obscured
Uniform:[(w_uniform && !(w_uniform.flags&ABSTRACT)) ? w_uniform : "Empty"]
Uniform:[(w_uniform && !(w_uniform.flags&ABSTRACT)) ? html_encode(w_uniform) : "Empty"]
 ↳Pockets:
 ↳Suit Sensors:
 ↳PDA:
 ↳Belt:[(belt && !(belt.flags&ABSTRACT)) ? belt : "Empty"]" + dat += "
 ↳Belt:[(belt && !(belt.flags&ABSTRACT)) ? html_encode(belt) : "Empty"]" if(has_breathable_mask && istype(belt, /obj/item/tank)) dat += " [internal ? "Disable Internals" : "Set Internals"]" dat += "
 ↳ID:[(wear_id && !(wear_id.flags&ABSTRACT)) ? wear_id : "Empty"]
 ↳PDA:[(wear_pda && !(wear_pda.flags&ABSTRACT)) ? wear_pda : "Empty"]
 ↳ID:[(wear_id && !(wear_id.flags&ABSTRACT)) ? html_encode(wear_id) : "Empty"]
 ↳PDA:[(wear_pda && !(wear_pda.flags&ABSTRACT)) ? html_encode(wear_pda) : "Empty"]
"} - dat += "" + dat += "" if(can_collar) dat += "" - dat += "" + dat += "" dat += {"
Headset:[(ears && !(ears.flags&ABSTRACT)) ? ears : "Empty"]
Headset:[(ears && !(ears.flags&ABSTRACT)) ? html_encode(ears) : "Empty"]
 
Collar:[(pcollar && !(pcollar.flags&ABSTRACT)) ? pcollar : "Empty"]
Collar:[(pcollar && !(pcollar.flags&ABSTRACT)) ? html_encode(pcollar) : "Empty"]
Close diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index f117d03ccdb..7a34f746728 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -474,7 +474,7 @@ return user.set_machine(src) - var/dat = "
Collar:[(pcollar && !(pcollar.flags & ABSTRACT)) ? pcollar : "Empty"]
" + var/dat = "
Collar:[(pcollar && !(pcollar.flags & ABSTRACT)) ? html_encode(pcollar) : "Empty"]
" dat += "Close" var/datum/browser/popup = new(user, "mob\ref[src]", "[src]", 440, 250) @@ -645,4 +645,3 @@ /mob/living/simple_animal/Login() ..() walk(src, 0) // if mob is moving under ai control, then stop AI movement - diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 95538b18995..601b73a3a38 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -560,8 +560,8 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ /mob/proc/show_inv(mob/user) user.set_machine(src) var/dat = {" - - + + "} dat += {"
Left Hand:[(l_hand && !(l_hand.flags&ABSTRACT)) ? l_hand : "Empty"]
Right Hand:[(r_hand && !(r_hand.flags&ABSTRACT)) ? r_hand : "Empty"]
Left Hand:[(l_hand && !(l_hand.flags&ABSTRACT)) ? html_encode(l_hand) : "Empty"]
Right Hand:[(r_hand && !(r_hand.flags&ABSTRACT)) ? html_encode(r_hand) : "Empty"]
 
Close