mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-27 06:54:18 +01:00
Fixes some bugs. (#16854)
* Fixes some bugs. * d --------- Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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."
|
||||
@@ -113,17 +113,21 @@ export const Users = (props, context) => {
|
||||
onClick={() => act('set_active', { set_active: null })}>
|
||||
All
|
||||
</Tabs.Tab>
|
||||
{data.channels
|
||||
.filter((chn) => chn.can_interact)
|
||||
.map((channel) => (
|
||||
<Tabs.Tab
|
||||
height="10%"
|
||||
key={channel.ref}
|
||||
selected={data.active && data.active.ref === channel.ref}
|
||||
onClick={() => act('set_active', { set_active: channel.ref })}>
|
||||
{channel.title}
|
||||
</Tabs.Tab>
|
||||
))}
|
||||
{data.channels &&
|
||||
data.channels.length &&
|
||||
data.channels
|
||||
.filter((chn) => chn.can_interact)
|
||||
.map((channel) => (
|
||||
<Tabs.Tab
|
||||
height="10%"
|
||||
key={channel.ref}
|
||||
selected={data.active && data.active.ref === channel.ref}
|
||||
onClick={() =>
|
||||
act('set_active', { set_active: channel.ref })
|
||||
}>
|
||||
{channel.title}
|
||||
</Tabs.Tab>
|
||||
))}
|
||||
</Tabs>
|
||||
</Section>
|
||||
{data.active && data.active.can_interact ? <Chat /> : <AllUsers />}
|
||||
@@ -153,19 +157,21 @@ export const AllUsers = (props, context) => {
|
||||
}}
|
||||
value={searchTerm}
|
||||
/>
|
||||
{data.users
|
||||
.filter(
|
||||
(usr) =>
|
||||
usr.username?.toLowerCase().indexOf(searchTerm.toLowerCase()) > -1
|
||||
)
|
||||
.map((user) => (
|
||||
<Stack.Item key={user.ref}>
|
||||
<Button
|
||||
content={user.username}
|
||||
onClick={() => act('direct', { direct: user.ref })}
|
||||
/>
|
||||
</Stack.Item>
|
||||
))}
|
||||
{data.users &&
|
||||
data.users.length &&
|
||||
data.users
|
||||
.filter(
|
||||
(usr) =>
|
||||
usr.username?.toLowerCase().indexOf(searchTerm.toLowerCase()) > -1
|
||||
)
|
||||
.map((user) => (
|
||||
<Stack.Item key={user.ref}>
|
||||
<Button
|
||||
content={user.username}
|
||||
onClick={() => act('direct', { direct: user.ref })}
|
||||
/>
|
||||
</Stack.Item>
|
||||
))}
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
@@ -368,44 +374,46 @@ export const ChannelsWindow = (props, context) => {
|
||||
}}
|
||||
value={channelSearchTerm}
|
||||
/>
|
||||
{data.channels
|
||||
.filter(
|
||||
(chn) =>
|
||||
chn.title
|
||||
?.toLowerCase()
|
||||
.indexOf(channelSearchTerm.toLowerCase()) > -1 && !chn.direct
|
||||
)
|
||||
.map((channel) => (
|
||||
<Stack.Item key={channel.ref}>
|
||||
{channel.password ? (
|
||||
<>
|
||||
{data.channels &&
|
||||
data.channels.length &&
|
||||
data.channels
|
||||
.filter(
|
||||
(chn) =>
|
||||
chn.title
|
||||
?.toLowerCase()
|
||||
.indexOf(channelSearchTerm.toLowerCase()) > -1 && !chn.direct
|
||||
)
|
||||
.map((channel) => (
|
||||
<Stack.Item key={channel.ref}>
|
||||
{channel.password ? (
|
||||
<>
|
||||
<Button
|
||||
content={channel.title}
|
||||
onClick={() => setJoinPassword('Password')}
|
||||
/>
|
||||
{joinPassword ? (
|
||||
<Input
|
||||
value={joinPassword}
|
||||
onInput={(e, v) => setJoinPassword(v)}
|
||||
onChange={(e, v) =>
|
||||
act('join', {
|
||||
target: channel.ref,
|
||||
password: joinPassword,
|
||||
})
|
||||
}
|
||||
/>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
</>
|
||||
) : (
|
||||
<Button
|
||||
content={channel.title}
|
||||
onClick={() => setJoinPassword('Password')}
|
||||
onClick={() => act('join', { target: channel.ref })}
|
||||
/>
|
||||
{joinPassword ? (
|
||||
<Input
|
||||
value={joinPassword}
|
||||
onInput={(e, v) => setJoinPassword(v)}
|
||||
onChange={(e, v) =>
|
||||
act('join', {
|
||||
target: channel.ref,
|
||||
password: joinPassword,
|
||||
})
|
||||
}
|
||||
/>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
</>
|
||||
) : (
|
||||
<Button
|
||||
content={channel.title}
|
||||
onClick={() => act('join', { target: channel.ref })}
|
||||
/>
|
||||
)}
|
||||
</Stack.Item>
|
||||
))}
|
||||
)}
|
||||
</Stack.Item>
|
||||
))}
|
||||
</Stack>
|
||||
</Section>
|
||||
);
|
||||
|
||||
@@ -35,7 +35,16 @@ export const Voting = (props, context) => {
|
||||
export const VoteWindow = (props, context) => {
|
||||
const { act, data } = useBackend<VotingData>(context);
|
||||
return (
|
||||
<Section collapsing title={data.question}>
|
||||
<Section
|
||||
collapsing
|
||||
title={data.question}
|
||||
buttons={
|
||||
data.is_staff ? (
|
||||
<Button content="Cancel" onClick={() => act('cancel')} />
|
||||
) : (
|
||||
''
|
||||
)
|
||||
}>
|
||||
<Table>
|
||||
<Table.Row header>
|
||||
<Table.Cell>
|
||||
|
||||
Reference in New Issue
Block a user