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

Beta54 #126

Merged
merged 66 commits into from
Apr 5, 2024
Merged
Changes from 1 commit
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
1479feb
beta9
Hoshinonyaruko Jan 26, 2024
4a6f523
beta11
Hoshinonyaruko Jan 26, 2024
8739198
beta11
Hoshinonyaruko Jan 26, 2024
d9e0844
beta13
Hoshinonyaruko Jan 26, 2024
ab96bf7
beta14
Hoshinonyaruko Jan 26, 2024
9b7bf0e
beta12
Hoshinonyaruko Jan 26, 2024
7c66e7d
beta13
Hoshinonyaruko Jan 26, 2024
eb0b186
beta15
Hoshinonyaruko Jan 26, 2024
122de8b
beta16
Hoshinonyaruko Jan 26, 2024
5e4903f
beta17
Hoshinonyaruko Jan 26, 2024
7a82cfb
beta18
Hoshinonyaruko Jan 27, 2024
ecc8263
mergefix
Hoshinonyaruko Jan 27, 2024
d0a0a85
beta19
Hoshinonyaruko Jan 27, 2024
afcb856
beta20
Hoshinonyaruko Jan 27, 2024
fafe0f9
beta20
Hoshinonyaruko Jan 27, 2024
397d4c7
beta21
Hoshinonyaruko Jan 27, 2024
c00e1a8
fixmerge
Hoshinonyaruko Jan 27, 2024
42ed202
add_playermanager_api
Hoshinonyaruko Jan 27, 2024
31a6771
beta22
Hoshinonyaruko Jan 27, 2024
050d359
beta22
Hoshinonyaruko Jan 27, 2024
939e818
beta23
Hoshinonyaruko Jan 28, 2024
19cf927
merge
Hoshinonyaruko Jan 28, 2024
8073f3a
beta24
Hoshinonyaruko Jan 29, 2024
fdd6016
mergechanges
Hoshinonyaruko Jan 29, 2024
b167455
beta25
Hoshinonyaruko Jan 30, 2024
844698b
merge
Hoshinonyaruko Jan 30, 2024
f5c8d82
beta26
Hoshinonyaruko Jan 30, 2024
2d5e94d
merge
Hoshinonyaruko Jan 30, 2024
3076085
beta27
Hoshinonyaruko Jan 30, 2024
a8a67ed
beta28
Hoshinonyaruko Jan 31, 2024
4c954fa
beta28
Hoshinonyaruko Jan 31, 2024
2f9063e
beta28
Hoshinonyaruko Jan 31, 2024
cd6fad7
beta29
Hoshinonyaruko Jan 31, 2024
2651176
beta29
Hoshinonyaruko Jan 31, 2024
265b5e3
beta30
Hoshinonyaruko Jan 31, 2024
8aac47a
beta31
Hoshinonyaruko Feb 2, 2024
a559fa2
beta31
Hoshinonyaruko Feb 2, 2024
f5bb66a
beta32
Hoshinonyaruko Feb 2, 2024
44fac8f
beta33
Hoshinonyaruko Feb 6, 2024
a44ef68
merge
Hoshinonyaruko Feb 6, 2024
e731f93
beta34
Hoshinonyaruko Feb 8, 2024
c8921a1
beta34
Hoshinonyaruko Feb 8, 2024
e6b4a3e
beta35
Hoshinonyaruko Feb 8, 2024
ac77292
merge
Hoshinonyaruko Feb 8, 2024
3992e84
beta35
Hoshinonyaruko Feb 8, 2024
d19fc5c
beta36
Hoshinonyaruko Feb 8, 2024
ff271bc
merge
Hoshinonyaruko Feb 8, 2024
a451334
beta37
Hoshinonyaruko Feb 18, 2024
6e4f28c
beta37
Hoshinonyaruko Feb 18, 2024
89d6c06
beta38
Hoshinonyaruko Feb 18, 2024
75002bc
beta39
Hoshinonyaruko Feb 18, 2024
e808a36
beta40
Hoshinonyaruko Feb 18, 2024
d2d5f4c
beta41
Hoshinonyaruko Feb 25, 2024
a40afd7
beta41
Hoshinonyaruko Feb 25, 2024
5977c8d
beat43
Hoshinonyaruko Mar 2, 2024
0ca7960
beta43
Hoshinonyaruko Mar 2, 2024
44b7bb5
beta45
Hoshinonyaruko Mar 2, 2024
d40d897
beta45
Hoshinonyaruko Mar 2, 2024
18282f6
beta46
Hoshinonyaruko Mar 3, 2024
4c89765
beta47
Hoshinonyaruko Mar 3, 2024
881dd1f
beta50
Hoshinonyaruko Mar 3, 2024
b5a8fbd
beta51
Hoshinonyaruko Mar 3, 2024
74bcb7c
beta52
Hoshinonyaruko Mar 3, 2024
4ef420a
beta53
Hoshinonyaruko Mar 3, 2024
159fd6a
Merge branch 'main' of https://github.com/Hoshinonyaruko/palworld-go …
Hoshinonyaruko Apr 5, 2024
dccfad2
beta54
Hoshinonyaruko Apr 5, 2024
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
Prev Previous commit
Next Next commit
beta52
Hoshinonyaruko committed Mar 3, 2024
commit 74bcb7cbc903c9e6630e7d2535adba96cd916389
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
@@ -29,6 +29,7 @@ import (

"github.com/hoshinonyaruko/palworld-go/bot"
"github.com/hoshinonyaruko/palworld-go/config"
"github.com/hoshinonyaruko/palworld-go/status"
"github.com/hoshinonyaruko/palworld-go/sys"
"github.com/hoshinonyaruko/palworld-go/tool"
"github.com/hoshinonyaruko/palworld-go/webui"
@@ -115,6 +116,8 @@ func main() {
fmt.Println("PalServer.exe exists in the current directory.")
}
}
//还原状态
status.SetManualServerShutdown(false)

// 设置监控和自动重启
supervisor := NewSupervisor(jsonconfig)
44 changes: 27 additions & 17 deletions sys/restart_unix.go
Original file line number Diff line number Diff line change
@@ -98,24 +98,34 @@ func RestartService(config config.Config) {
if config.WorldSettings.RconEnabled {
args = append(args, "-rcon")
}

args = append(args, config.ServerOptions...) // 添加GameWorldSettings参数

// 执行启动命令
log.Printf("启动命令: %s %s", exePath, strings.Join(args, " "))

cmd := exec.Command(exePath, args...)
cmd.Dir = config.GamePath // 设置工作目录为游戏路径

// 启动进程
if err := cmd.Start(); err != nil {
log.Printf("Failed to restart game server: %v", err)
// 添加GameWorldSettings参数
args = append(args, config.ServerOptions...)

if config.GameService && config.GameServiceName != "" {
cmd := exec.Command("sudo", "systemctl", "restart", config.GameServiceName)
// 启动进程
if err := cmd.Start(); err != nil {
log.Printf("Failed to restart game server: %v", err)
} else {
log.Printf("Game server restarted successfully")
}
} else {
log.Printf("Game server restarted successfully")
// 执行启动命令
log.Printf("启动命令: %s %s", exePath, strings.Join(args, " "))

cmd := exec.Command(exePath, args...)
cmd.Dir = config.GamePath // 设置工作目录为游戏路径

// 启动进程
if err := cmd.Start(); err != nil {
log.Printf("Failed to restart game server: %v", err)
} else {
log.Printf("Game server restarted successfully")
}

// 获取并打印 PID
log.Printf("Game server started successfully with PID %d", cmd.Process.Pid)
status.SetGlobalPid(cmd.Process.Pid)
}

// 获取并打印 PID
log.Printf("Game server started successfully with PID %d", cmd.Process.Pid)
status.SetGlobalPid(cmd.Process.Pid)

}

Unchanged files with check annotations Beta

[K in keyof T]: T[K] extends Constructor<infer S> ? S : never;
};
const transform =

Check warning on line 13 in front/palworld-front/src/router/routes.ts

GitHub Actions / Build on linux for amd64

'transform' is assigned a value but never used

Check warning on line 13 in front/palworld-front/src/router/routes.ts

GitHub Actions / Build on darwin for arm64

'transform' is assigned a value but never used

Check warning on line 13 in front/palworld-front/src/router/routes.ts

GitHub Actions / Build on windows for amd64

'transform' is assigned a value but never used

Check warning on line 13 in front/palworld-front/src/router/routes.ts

GitHub Actions / Build on linux for arm64

'transform' is assigned a value but never used

Check warning on line 13 in front/palworld-front/src/router/routes.ts

GitHub Actions / Build on darwin for amd64

'transform' is assigned a value but never used
<T extends Record<string, Constructor>>(fields: T) =>
(to: RouteLocationNormalized) =>
Object.entries(to.params)
uin: Number,
});
const players = ref([]);

Check warning on line 1097 in front/palworld-front/src/pages/IndexView.vue

GitHub Actions / Build on linux for amd64

'players' is assigned a value but never used

Check warning on line 1097 in front/palworld-front/src/pages/IndexView.vue

GitHub Actions / Build on darwin for arm64

'players' is assigned a value but never used

Check warning on line 1097 in front/palworld-front/src/pages/IndexView.vue

GitHub Actions / Build on windows for amd64

'players' is assigned a value but never used

Check warning on line 1097 in front/palworld-front/src/pages/IndexView.vue

GitHub Actions / Build on linux for arm64

'players' is assigned a value but never used

Check warning on line 1097 in front/palworld-front/src/pages/IndexView.vue

GitHub Actions / Build on darwin for amd64

'players' is assigned a value but never used
const status = ref(null); // 假设 ProcessInfo 是一个对象,这里使用 null 作为初始值
const showDifficultyTooltip = ref(false);
const showDeathPenaltyTooltip = ref(false);
const toggleTooltip = (type) => {

Check warning on line 1111 in front/palworld-front/src/pages/IndexView.vue

GitHub Actions / Build on linux for amd64

'type' is defined but never used

Check warning on line 1111 in front/palworld-front/src/pages/IndexView.vue

GitHub Actions / Build on darwin for arm64

'type' is defined but never used

Check warning on line 1111 in front/palworld-front/src/pages/IndexView.vue

GitHub Actions / Build on windows for amd64

'type' is defined but never used

Check warning on line 1111 in front/palworld-front/src/pages/IndexView.vue

GitHub Actions / Build on linux for arm64

'type' is defined but never used

Check warning on line 1111 in front/palworld-front/src/pages/IndexView.vue

GitHub Actions / Build on darwin for amd64

'type' is defined but never used
showDeathPenaltyTooltip.value = !showDeathPenaltyTooltip.value;
};
const toggleTooltip2 = (type) => {

Check warning on line 1115 in front/palworld-front/src/pages/IndexView.vue

GitHub Actions / Build on linux for amd64

'type' is defined but never used

Check warning on line 1115 in front/palworld-front/src/pages/IndexView.vue

GitHub Actions / Build on darwin for arm64

'type' is defined but never used

Check warning on line 1115 in front/palworld-front/src/pages/IndexView.vue

GitHub Actions / Build on windows for amd64

'type' is defined but never used

Check warning on line 1115 in front/palworld-front/src/pages/IndexView.vue

GitHub Actions / Build on linux for arm64

'type' is defined but never used

Check warning on line 1115 in front/palworld-front/src/pages/IndexView.vue

GitHub Actions / Build on darwin for amd64

'type' is defined but never used
showDifficultyTooltip.value = !showDifficultyTooltip.value;
};
<script setup lang="ts">
import { ref } from 'vue';
import EssentialLink, {

Check warning on line 48 in front/palworld-front/src/layouts/MainLayout.vue

GitHub Actions / Build on linux for amd64

'EssentialLink' is defined but never used

Check warning on line 48 in front/palworld-front/src/layouts/MainLayout.vue

GitHub Actions / Build on darwin for arm64

'EssentialLink' is defined but never used

Check warning on line 48 in front/palworld-front/src/layouts/MainLayout.vue

GitHub Actions / Build on windows for amd64

'EssentialLink' is defined but never used

Check warning on line 48 in front/palworld-front/src/layouts/MainLayout.vue

GitHub Actions / Build on linux for arm64

'EssentialLink' is defined but never used

Check warning on line 48 in front/palworld-front/src/layouts/MainLayout.vue

GitHub Actions / Build on darwin for amd64

'EssentialLink' is defined but never used
EssentialLinkProps,
} from 'components/EssentialLink.vue';
const essentialLinks: EssentialLinkProps[] = [

Check warning on line 52 in front/palworld-front/src/layouts/MainLayout.vue

GitHub Actions / Build on linux for amd64

'essentialLinks' is assigned a value but never used

Check warning on line 52 in front/palworld-front/src/layouts/MainLayout.vue

GitHub Actions / Build on darwin for arm64

'essentialLinks' is assigned a value but never used

Check warning on line 52 in front/palworld-front/src/layouts/MainLayout.vue

GitHub Actions / Build on windows for amd64

'essentialLinks' is assigned a value but never used

Check warning on line 52 in front/palworld-front/src/layouts/MainLayout.vue

GitHub Actions / Build on linux for arm64

'essentialLinks' is assigned a value but never used

Check warning on line 52 in front/palworld-front/src/layouts/MainLayout.vue

GitHub Actions / Build on darwin for amd64

'essentialLinks' is assigned a value but never used
{
title: 'Docs',
caption: 'quasar.dev',
import { defineProps } from 'vue';
import axios from 'axios';
const props = defineProps<{ status: any }>();

Check warning on line 50 in front/palworld-front/src/components/RunningProcessStatus.vue

GitHub Actions / Build on linux for amd64

'props' is assigned a value but never used

Check warning on line 50 in front/palworld-front/src/components/RunningProcessStatus.vue

GitHub Actions / Build on linux for amd64

Unexpected any. Specify a different type

Check warning on line 50 in front/palworld-front/src/components/RunningProcessStatus.vue

GitHub Actions / Build on darwin for arm64

'props' is assigned a value but never used

Check warning on line 50 in front/palworld-front/src/components/RunningProcessStatus.vue

GitHub Actions / Build on darwin for arm64

Unexpected any. Specify a different type

Check warning on line 50 in front/palworld-front/src/components/RunningProcessStatus.vue

GitHub Actions / Build on windows for amd64

'props' is assigned a value but never used

Check warning on line 50 in front/palworld-front/src/components/RunningProcessStatus.vue

GitHub Actions / Build on windows for amd64

Unexpected any. Specify a different type

Check warning on line 50 in front/palworld-front/src/components/RunningProcessStatus.vue

GitHub Actions / Build on linux for arm64

'props' is assigned a value but never used

Check warning on line 50 in front/palworld-front/src/components/RunningProcessStatus.vue

GitHub Actions / Build on linux for arm64

Unexpected any. Specify a different type

Check warning on line 50 in front/palworld-front/src/components/RunningProcessStatus.vue

GitHub Actions / Build on darwin for amd64

'props' is assigned a value but never used

Check warning on line 50 in front/palworld-front/src/components/RunningProcessStatus.vue

GitHub Actions / Build on darwin for amd64

Unexpected any. Specify a different type
const sendRequest = async (url: string) => {
try {
});
$q.notify({
type: 'positive',
message: `加白成功`,

Check warning on line 160 in front/palworld-front/src/components/PlayerManage.vue

GitHub Actions / Build on linux for amd64

Strings must use singlequote

Check warning on line 160 in front/palworld-front/src/components/PlayerManage.vue

GitHub Actions / Build on darwin for arm64

Strings must use singlequote

Check warning on line 160 in front/palworld-front/src/components/PlayerManage.vue

GitHub Actions / Build on windows for amd64

Strings must use singlequote

Check warning on line 160 in front/palworld-front/src/components/PlayerManage.vue

GitHub Actions / Build on linux for arm64

Strings must use singlequote

Check warning on line 160 in front/palworld-front/src/components/PlayerManage.vue

GitHub Actions / Build on darwin for amd64

Strings must use singlequote
});
} catch (error) {
$q.notify({ type: 'negative', message: '操作失败' });
}
};
const deleteSaves = async () => {

Check warning on line 93 in front/palworld-front/src/components/SaveManage.vue

GitHub Actions / Build on linux for amd64

'deleteSaves' is assigned a value but never used

Check warning on line 93 in front/palworld-front/src/components/SaveManage.vue

GitHub Actions / Build on darwin for arm64

'deleteSaves' is assigned a value but never used

Check warning on line 93 in front/palworld-front/src/components/SaveManage.vue

GitHub Actions / Build on windows for amd64

'deleteSaves' is assigned a value but never used

Check warning on line 93 in front/palworld-front/src/components/SaveManage.vue

GitHub Actions / Build on linux for arm64

'deleteSaves' is assigned a value but never used

Check warning on line 93 in front/palworld-front/src/components/SaveManage.vue

GitHub Actions / Build on darwin for amd64

'deleteSaves' is assigned a value but never used
try {
await axios.post('/api/delsave', { saves: selectedSaves.value });
} catch (error) {