Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increases character slots from 6 to 15, member slots to 20, makes Character Selection a dropdown. #497

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading