Skip to content

Commit

Permalink
no-quest
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Jan 26, 2024
1 parent 3d9820f commit 8bc2701
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 44 deletions.
34 changes: 15 additions & 19 deletions src/views/Alts.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,27 @@ import * as store from '../store.jsx';
export default function Alts() {
const rx = store.useRx();

const flagNames = [
'no-oracle',
'no-quest',
'no-shop',
'no-up-pillar',
'no-up-merge',
'no-trade',
'hardcore',
];
const flags = Object.create(null);
let altname, ele;

return (
<>
<ExitBtn x={12} y={12} />
<div style="margin-top:72px">
<label style="display:block">
<input type="checkbox" ref={flags['no-oracle']} /> no-oracle
</label>
<label style="display:block">
<input type="checkbox" ref={flags['no-shop']} /> no-shop
</label>
<label style="display:block">
<input type="checkbox" ref={flags['no-trade']} /> no-trade
</label>
<label style="display:block">
<input type="checkbox" ref={flags['no-up-pillar']} /> no-up-pillar
</label>
<label style="display:block">
<input type="checkbox" ref={flags['no-up-merge']} /> no-up-merge
</label>
<label style="display:block">
<input type="checkbox" ref={flags['hardcore']} /> hardcore
</label>
{flagNames.map(name => (
<label style="display:block">
<input type="checkbox" ref={flags[name]} /> {name}
</label>
))}
<input type="number" value="1" ref={ele} min="1" max="13" /> element
<input type="input" placeholder="Alt Name" ref={altname} />
<input
Expand Down Expand Up @@ -65,7 +61,7 @@ export default function Alts() {
{name => {
if (!name) return null;
return (
<div style={`color:#${name === rx.uname ? 'ffa' : 'ccc'}`}>
<div style={`color:#${name === rx.uname ? 'ed8' : 'ccb'}`}>
{name}
<input
type="button"
Expand Down
54 changes: 29 additions & 25 deletions src/views/MainMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,14 +265,16 @@ export default function MainMenu(props) {
]}
/>
</div>
<div style="display:inline-block;width:49%;text-align:center">
<input
type="button"
value="Quests"
onClick={() => store.doNav(import('./Quest.jsx'))}
onMouseOver={[setTip, 'Go on an adventure']}
/>
</div>
{!hasflag(rx.user, 'no-quest') && (
<div style="display:inline-block;width:49%;text-align:center">
<input
type="button"
value="Quests"
onClick={() => store.doNav(import('./Quest.jsx'))}
onMouseOver={[setTip, 'Go on an adventure']}
/>
</div>
)}
</div>
<div style="margin-top:4px">
<div style="display:inline-block;width:49%;text-align:center">
Expand Down Expand Up @@ -307,7 +309,7 @@ export default function MainMenu(props) {
}
onMouseOver={[
setTip,
'A mode attempting to imitate the original EtG',
'A mode attempting to imitate original EtG',
]}
/>
</div>
Expand Down Expand Up @@ -479,22 +481,24 @@ export default function MainMenu(props) {
onClick={() => sock.sendChallenge(foename())}
style="position:absolute;left:10px;top:88px"
/>
<input
type="button"
value="Trade"
onClick={() => {
sock.userEmit('offertrade', {
f: foename(),
cards: '',
g: 0,
forcards: null,
forg: null,
});
store.doNav(import('./Trade.jsx'), { foe: foename() });
}}
onMouseOver={[setTip, 'Trade cards/$ with another player']}
style="position:absolute;left:10px;top:64px"
/>
{!hasflag(rx.user, 'no-trade') && (
<input
type="button"
value="Trade"
onClick={() => {
sock.userEmit('offertrade', {
f: foename(),
cards: '',
g: 0,
forcards: null,
forg: null,
});
store.doNav(import('./Trade.jsx'), { foe: foename() });
}}
onMouseOver={[setTip, 'Trade cards/$ with another player']}
style="position:absolute;left:10px;top:64px"
/>
)}
<input
type="button"
value="Reward"
Expand Down

0 comments on commit 8bc2701

Please sign in to comment.