Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Commit

Permalink
Fix CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
Stuyk committed Aug 14, 2022
1 parent 5c86fc0 commit 21db9f5
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 34 deletions.
32 changes: 17 additions & 15 deletions scripts/runtime/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,21 +287,23 @@ if (passedArguments.includes('start')) {
}

runServer();
process.stdin.on('data', (data) => {
const result = data.toString().trim();
if (result.charAt(0) !== '+' && result.charAt(0) !== '/') {
console.log(`Use +help to see server maintenance commands. (This Console)`);
console.log(`Use /commands to see server magagement commands. (The Game Console)`);
if (!lastServerProcess.killed) {
return;
}

lastServerProcess.send(data);
return;
}
// process.stdin.on('data', (data) => {
// const result = data.toString().trim();
// if (result.charAt(0) !== '+' && result.charAt(0) !== '/') {
// console.log(`Use +help to see server maintenance commands. (This Console)`);
// console.log(`Use /commands to see server magagement commands. (The Game Console)`);
// if (!lastServerProcess.killed) {
// return;
// }

// lastServerProcess.send(data);
// return;
// }

// const inputs = result.split(' ');
// const cmdName = inputs.shift();
// console.log(cmdName, ...inputs);
// });

const inputs = result.split(' ');
const cmdName = inputs.shift();
console.log(cmdName, ...inputs);
});
}
22 changes: 18 additions & 4 deletions src/core/plugins/core-inventory/webview/Inventory2.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<template>
<div class="main-frame">
<Character />
<div class="spacer" />
<Inventory />
<div class="page-wrap">
<div class="main-frame">
<Character />
<div class="spacer" />
<Inventory />
</div>
</div>
</template>

Expand All @@ -23,6 +25,18 @@ export default defineComponent({
<style scoped>
@import '@/plugins/css/core-inventory/test.css';
.page-wrap {
display: flex;
justify-content: center;
align-items: center;
background: url('https://i.pinimg.com/originals/2a/c3/3a/2ac33ac33ee4fcc300e82307e39cebf9.jpg') !important;
background-size: cover;
min-width: 100vw;
min-height: 100vh;
max-width: 100vw;
max-height: 100vh;
}
.main-frame {
display: flex;
flex-direction: row;
Expand Down
25 changes: 17 additions & 8 deletions src/core/plugins/core-inventory/webview/components/Character.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,12 @@ export default defineComponent({

<style scoped>
.character-frame {
background: #cbcbcb;
min-width: 506px;
max-width: 506px;
background: rgba(0, 0, 0, 0.75);
min-width: 530px;
max-width: 530px;
border-radius: 6px;
border: 2px solid rgba(255, 255, 255, 0.2);
box-sizing: border-box;
}
.character-frame {
Expand All @@ -134,10 +137,10 @@ export default defineComponent({
flex-direction: column;
min-width: 80px;
max-width: 80px;
background: #a2a2a2;
overflow-y: hidden;
align-items: center;
padding: 8px;
padding-top: 12px;
box-sizing: border-box;
}
Expand All @@ -149,15 +152,18 @@ export default defineComponent({
max-width: 60px;
min-height: 60px;
max-height: 60px;
background: #7b7b7b;
background: rgba(0, 0, 0, 0.5);
box-sizing: border-box;
border: 2px solid rgba(255, 255, 255, 0.1);
border-radius: 6px;
margin-bottom: 8px;
overflow-x: hidden;
overflow-y: hidden;
}
.equipment {
min-width: calc(100% - 60px);
max-width: calc(100% - 60px);
min-width: calc(100% - 80px);
max-width: calc(100% - 80px);
display: flex;
flex-direction: row;
flex-wrap: wrap;
Expand All @@ -174,8 +180,11 @@ export default defineComponent({
max-width: 90px;
min-height: 90px;
max-height: 90px;
background: #a2a2a2;
position: relative;
background: rgba(0, 0, 0, 0.5);
box-sizing: border-box;
border: 2px solid rgba(255, 255, 255, 0.1);
border-radius: 6px;
}
.equipment > div:nth-child(even) {
Expand Down
21 changes: 14 additions & 7 deletions src/core/plugins/core-inventory/webview/components/Inventory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -211,23 +211,28 @@ export default defineComponent({

<style scoped>
.inventory-frame {
background: #cbcbcb;
background: rgba(0, 0, 0, 0.75);
min-width: 430px;
max-width: 430px;
box-sizing: border-box;
border-radius: 6px;
border: 2px solid rgba(255, 255, 255, 0.2);
box-sizing: border-box;
}
.inventory-frame .inventory-toolbar {
display: flex;
flex-direction: row;
justify-content: space-evenly;
align-items: center;
background: #a2a2a2;
min-height: 106px;
max-height: 106px;
}
.inventory-toolbar .slot {
background: #cbcbcb;
background: rgba(0, 0, 0, 0.5);
box-sizing: border-box;
border: 2px solid rgba(255, 255, 255, 0.1);
}
.inventory-description {
Expand All @@ -237,7 +242,6 @@ export default defineComponent({
flex-direction: column;
min-height: 60px;
max-height: 60px;
background: #7b7b7b;
font-size: 12px;
}
Expand All @@ -247,15 +251,18 @@ export default defineComponent({
padding-top: 8px;
box-sizing: border-box;
overflow-y: scroll;
min-height: 554px;
max-height: 554px;
min-height: 550px;
max-height: 550px;
justify-content: space-evenly;
}
.inventory-slots .slot {
background: #a2a2a2;
margin-bottom: 12px;
margin-right: 5px;
margin-left: 5px;
background: rgba(0, 0, 0, 0.5);
box-sizing: border-box;
border: 2px solid rgba(255, 255, 255, 0.1);
border-radius: 6px;
}
</style>

0 comments on commit 21db9f5

Please sign in to comment.