Skip to content

Commit

Permalink
Increases character slots from 6 to 15, member slots to 20, add dropd…
Browse files Browse the repository at this point in the history
…own (#497)
  • Loading branch information
CRITAWAKETS authored Jun 12, 2024
1 parent e6e599f commit 79a4bfd
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 19 deletions.
4 changes: 2 additions & 2 deletions code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
/// Ensures that we always load the last used save, QOL
var/default_slot = 1
/// The maximum number of slots we're allowed to contain
var/max_save_slots = 6 // NON-MODULE CHANGE
var/max_save_slots = 15 // NON-MODULE CHANGE

/// Bitflags for communications that are muted
var/muted = NONE
Expand Down Expand Up @@ -107,7 +107,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
try_savefile_type_migration()
unlock_content = !!parent.IsByondMember()
if(unlock_content)
max_save_slots = 8
max_save_slots = 20 // NON-MODULE CHANGE
else
CRASH("attempted to create a preferences datum without a client or mock!")
load_savefile()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { exhaustiveCheck } from 'common/exhaustive';
import { useState } from 'react';

import { useBackend } from '../../backend';
import { Button, Stack } from '../../components';
import { Dropdown, Flex, Stack } from '../../components'; // NON-MODULE CHANGE : Adds in Dropdown and Flex
import { Window } from '../../layouts';
import { LanguagePage } from './_LanguagePicker'; // NON-MODULE CHANGE
import { LimbManagerPage } from './_LimbManager'; // NON-MODULE CHANGE
Expand Down Expand Up @@ -31,24 +31,28 @@ const CharacterProfiles = (props: {
onClick: (index: number) => void;
profiles: (string | null)[];
}) => {
const { profiles } = props;
const { profiles, activeSlot, onClick } = props; // NON-MODULE CHANGE : activeSlot and onClick

return (
<Stack justify="center" wrap>
{profiles.map((profile, slot) => (
<Stack.Item key={slot}>
<Button
selected={slot === props.activeSlot}
onClick={() => {
props.onClick(slot);
}}
fluid
>
{profile ?? 'New Character'}
</Button>
</Stack.Item>
))}
</Stack>
<Flex // NON-MODULE CHANGE START - Ports in the dropdown from Nova instead of using buttons
align="center"
justify="center"
>
<Flex.Item width="25%">
<Dropdown
width="100%"
selected={activeSlot as unknown as string}
displayText={profiles[activeSlot]}
options={profiles.map((profile, slot) => ({
value: slot,
displayText: profile ?? 'New Character',
}))}
onSelected={(slot) => {
onClick(slot);
}}
/>
</Flex.Item>
</Flex> // NON-MODULE CHANGE END
);
};

Expand Down

0 comments on commit 79a4bfd

Please sign in to comment.