diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index d8df9b90750..47a3480bfe6 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -17,7 +17,7 @@ action_button_name = "Toggle Paddles" var/obj/item/shockpaddles/linked/paddles - var/obj/item/cell/bcell = null + var/obj/item/cell/bcell /obj/item/defibrillator/Initialize() //starts without a cell for rnd . = ..() @@ -120,7 +120,7 @@ reattach_paddles(user) else if(istype(W, /obj/item/cell)) if(bcell) - to_chat(user, SPAN_NOTICE("\the [src] already has a cell.")) + to_chat(user, SPAN_NOTICE("\The [src] already has a cell.")) else if(!user.unEquip(W)) return @@ -251,15 +251,20 @@ playsound(src, 'sound/machines/defib_ready.ogg', 50, 0) /obj/item/shockpaddles/proc/wield() - var/mob/living/M = loc - if(istype(M) && !wielded) - wielded = TRUE - name = "[initial(name)] (wielded)" - var/obj/item/offhand/O = new(M) - O.name = "[initial(name)] - offhand" - O.desc = "The second set of paddles." - M.put_in_inactive_hand(O) - update_icon() + var/mob/living/carbon/human/M = loc + if(istype(M)) + var/obj/A = M.get_inactive_hand() + if(A) + to_chat(M, SPAN_WARNING("Your other hand is occupied!")) + return + if(!wielded) + wielded = TRUE + name = "[initial(name)] (wielded)" + var/obj/item/offhand/O = new(M) + O.name = "[initial(name)] - offhand" + O.desc = "The second set of paddles." + M.put_in_inactive_hand(O) + update_icon() /obj/item/shockpaddles/proc/unwield() wielded = FALSE @@ -598,7 +603,7 @@ /obj/item/shockpaddles/linked/equipped(mob/user, slot, assisted_equip) . = ..() if(ismob(loc)) - RegisterSignal(loc, COMSIG_MOVABLE_MOVED, PROC_REF(unlatch)) + RegisterSignal(loc, COMSIG_MOVABLE_MOVED, PROC_REF(unlatch), TRUE) /obj/item/shockpaddles/linked/proc/unlatch() if(get_dist(loc, base_unit) > 1) diff --git a/code/modules/multiz/movement.dm b/code/modules/multiz/movement.dm index e66c2e93af4..7bb9e41e607 100644 --- a/code/modules/multiz/movement.dm +++ b/code/modules/multiz/movement.dm @@ -809,7 +809,10 @@ qdel(src) /atom/movable/z_observer/z_down/follow() - forceMove(get_step(tile_shifted ? src : owner, DOWN)) + var/turf/down_step = get_step(tile_shifted ? src : owner, DOWN) + /// If we move down more than 1 step, don't move down again. + if((GET_Z(owner) - down_step.z) < 2) + forceMove(down_step) var/turf/T = get_turf(tile_shifted ? get_step(owner, owner.dir) : owner) if(T && TURF_IS_MIMICING(T)) return diff --git a/code/modules/overmap/ship_weaponry/_ship_ammunition.dm b/code/modules/overmap/ship_weaponry/_ship_ammunition.dm index 6a0cfc12fdf..c951d6a29db 100644 --- a/code/modules/overmap/ship_weaponry/_ship_ammunition.dm +++ b/code/modules/overmap/ship_weaponry/_ship_ammunition.dm @@ -128,6 +128,10 @@ return /obj/item/ship_ammunition/proc/wield(var/mob/living/carbon/human/user) + var/obj/A = user.get_inactive_hand() + if(A) + to_chat(user, SPAN_WARNING("Your other hand is occupied!")) + return wielded = TRUE var/obj/item/offhand/O = new(user) O.name = "[initial(name)] - offhand" diff --git a/html/changelogs/mattatlas-chatclientfixes.yml b/html/changelogs/mattatlas-chatclientfixes.yml new file mode 100644 index 00000000000..5c638196f44 --- /dev/null +++ b/html/changelogs/mattatlas-chatclientfixes.yml @@ -0,0 +1,44 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: MattAtlas + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "The chat client no longer crashes to a bluescreen. Rejoice." + - bugfix: "Defibrillator paddles and ship ammunition no longer make items get stuck in your offhand." + - bugfix: "You can no longer peer through solid floors with the Look Down verb." + - bugfix: "Staff can now actually cancel votes." diff --git a/tgui/packages/tgui/interfaces/ChatClient.tsx b/tgui/packages/tgui/interfaces/ChatClient.tsx index 7bdfd1c398e..63ee95879b5 100644 --- a/tgui/packages/tgui/interfaces/ChatClient.tsx +++ b/tgui/packages/tgui/interfaces/ChatClient.tsx @@ -113,17 +113,21 @@ export const Users = (props, context) => { onClick={() => act('set_active', { set_active: null })}> All - {data.channels - .filter((chn) => chn.can_interact) - .map((channel) => ( - act('set_active', { set_active: channel.ref })}> - {channel.title} - - ))} + {data.channels && + data.channels.length && + data.channels + .filter((chn) => chn.can_interact) + .map((channel) => ( + + act('set_active', { set_active: channel.ref }) + }> + {channel.title} + + ))} {data.active && data.active.can_interact ? : } @@ -153,19 +157,21 @@ export const AllUsers = (props, context) => { }} value={searchTerm} /> - {data.users - .filter( - (usr) => - usr.username?.toLowerCase().indexOf(searchTerm.toLowerCase()) > -1 - ) - .map((user) => ( - -