mirror of
https://gitlab.com/YuukiPS/GC-Proto.git
synced 2024-12-25 07:59:24 +03:00
Update cmdid
This commit is contained in:
parent
2a3611c3fa
commit
e421fd849c
7134
PacketOpcodes.java
7134
PacketOpcodes.java
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
|||||||
# Anime Game Protos 4.0 (For Grasscutters)
|
# Anime Game Protos 4.5 (For Grasscutters)
|
||||||
This repository contains the [ProtoBuf](https://github.com/google/protobuf) `.proto` files for Anime Game API.<br/>
|
This repository contains the [ProtoBuf](https://github.com/google/protobuf) `.proto` files for Anime Game API.<br/>
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
- [Beach Simulator](https://github.com/SlushinPS/beach-simulator) for 4.0 public<br/>
|
- [UnknownAnimeGamePS](https://github.com/XeonSucksLAB/UnknownAnimeGamePS) for 4.5 public<br/>
|
28164
cmdid_gc.json
28164
cmdid_gc.json
File diff suppressed because it is too large
Load Diff
13
op.js
13
op.js
@ -99,22 +99,27 @@ function read_cmdid_ht_json() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create cmdid from gc which comes from PacketOpcodes
|
// create cmdid from gc which comes from PacketOpcodes
|
||||||
|
var tes = 50000;
|
||||||
function get_cmdid_gc() {
|
function get_cmdid_gc() {
|
||||||
const inputStreamcmdid = fs.createReadStream(read_cmdid_gc);
|
const inputStreamcmdid = fs.createReadStream(read_cmdid_gc);
|
||||||
var lineReadercmdid = readline.createInterface({
|
var lineReadercmdid = readline.createInterface({
|
||||||
input: inputStreamcmdid,
|
input: inputStreamcmdid,
|
||||||
terminal: false,
|
terminal: false,
|
||||||
});
|
});
|
||||||
|
//41528
|
||||||
lineReadercmdid.on("line", function (line) {
|
lineReadercmdid.on("line", function (line) {
|
||||||
var config = line.split(" = ");
|
var config = line.split(" = ");
|
||||||
var name = config[0];
|
var name = config[0];
|
||||||
var id = parseInt(config[1]);
|
var id = parseInt(config[1]);
|
||||||
if (name.includes("public static final int")) {
|
if (name.includes("public static final int")) {
|
||||||
name = name.replace("\tpublic static final int ", "");
|
name = name.replace(" public static final int ", "");
|
||||||
// skip 0 ?
|
// skip 0 ?
|
||||||
if (id == 0) {
|
if (id == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (id == 8888888) {
|
||||||
|
id = tes++;
|
||||||
|
}
|
||||||
var subdata = new Object();
|
var subdata = new Object();
|
||||||
subdata["name"] = name;
|
subdata["name"] = name;
|
||||||
subdata["id"] = id;
|
subdata["id"] = id;
|
||||||
@ -294,7 +299,7 @@ function cmdid_to_op() {
|
|||||||
//const read_file_gcneed = fs.readFileSync(file_gc_needed2);
|
//const read_file_gcneed = fs.readFileSync(file_gc_needed2);
|
||||||
//const json_gcneed_raw = JSON.parse(read_file_gcneed);
|
//const json_gcneed_raw = JSON.parse(read_file_gcneed);
|
||||||
|
|
||||||
const cmdidfix_raw = fs.readFileSync(read_cmdid_output_gc_update);
|
const cmdidfix_raw = fs.readFileSync(read_cmdid_output_gc);
|
||||||
const json_cmdidfix_raw = JSON.parse(cmdidfix_raw);
|
const json_cmdidfix_raw = JSON.parse(cmdidfix_raw);
|
||||||
|
|
||||||
//const json_cmdidfix_raw = read_json(read_cmdid_output_gc_update);
|
//const json_cmdidfix_raw = read_json(read_cmdid_output_gc_update);
|
||||||
@ -983,12 +988,12 @@ function cmdid_json_to_csv() {
|
|||||||
|
|
||||||
// cmdid_json_to_csv();
|
// cmdid_json_to_csv();
|
||||||
// Update GC Proto
|
// Update GC Proto
|
||||||
// get_cmdid_gc(); // 1. get cmd old gc
|
//get_cmdid_gc(); // 1. get cmd old gc
|
||||||
//read_cmdid_ht_json(); // 2 or
|
//read_cmdid_ht_json(); // 2 or
|
||||||
// get_cmdid_json(); // 2. get last cmdid.csv to json
|
// get_cmdid_json(); // 2. get last cmdid.csv to json
|
||||||
// now we have cmdid_gc.json and cmdid.json
|
// now we have cmdid_gc.json and cmdid.json
|
||||||
// update_cmdid_gc(); // 3. update gc cmdid (mode by id)
|
// update_cmdid_gc(); // 3. update gc cmdid (mode by id)
|
||||||
// cmdid_to_op(); // 4. update op
|
cmdid_to_op(); // 4. update op
|
||||||
// npx prettier --write PacketOpcodes.java
|
// npx prettier --write PacketOpcodes.java
|
||||||
// scan_gc(); // 5. scan gc
|
// scan_gc(); // 5. scan gc
|
||||||
// clean_proto_event(); // 6. clean event, need manual
|
// clean_proto_event(); // 6. clean event, need manual
|
||||||
|
Loading…
Reference in New Issue
Block a user