Fix the species list not scrolling, fix halloween species runtimes (#61764)

This commit is contained in:
Mothblocks
2021-10-01 03:54:21 +03:00
committed by GitHub
parent 9941044951
commit 0e08ec89c3
2 changed files with 32 additions and 23 deletions
+9
View File
@@ -910,6 +910,15 @@
///Add a spell to the mobs spell list
/mob/proc/AddSpell(obj/effect/proc_holder/spell/S)
// HACK: Preferences menu creates one of every selectable species.
// Some species, like vampires, create spells when they're made.
// The "action" is created when those spells Initialize.
// Preferences menu can create these assets at *any* time, primarily before
// the atoms SS initializes.
// That means "action" won't exist.
if (isnull(S.action))
return
LAZYADD(mob_spell_list, S)
S.action.Grant(src)
@@ -259,33 +259,33 @@ const SpeciesPageInner = (props: {
<Stack.Item grow>
<Stack fill>
<Stack.Item>
<Stack vertical fill>
<Box height="calc(100vh - 170px)" overflowY="auto" pr={3}>
{species.map(([speciesKey, species]) => {
return (
<Stack.Item key={speciesKey}>
<Button
onClick={() => setSpecies(speciesKey)}
selected={
data.character_preferences.misc.species === speciesKey
}
tooltip={species.name}
style={{
height: "64px",
width: "64px",
}}
>
<Box
className={classes([
"species64x64",
species.icon,
])}
ml={-1}
/>
</Button>
</Stack.Item>
<Button
key={speciesKey}
onClick={() => setSpecies(speciesKey)}
selected={
data.character_preferences.misc.species === speciesKey
}
tooltip={species.name}
style={{
display: "block",
height: "64px",
width: "64px",
}}
>
<Box
className={classes([
"species64x64",
species.icon,
])}
ml={-1}
/>
</Button>
);
})}
</Stack>
</Box>
</Stack.Item>
<Stack.Item grow>