idz: Add idz_settings.driving_style column
This commit is contained in:
+2
-1
@@ -104,7 +104,8 @@ create table "idz_settings" (
|
|||||||
"pack" integer not null,
|
"pack" integer not null,
|
||||||
"aura" integer not null,
|
"aura" integer not null,
|
||||||
"paper_cup" integer not null, -- Not a boolean, oddly enough
|
"paper_cup" integer not null, -- Not a boolean, oddly enough
|
||||||
"gauges" integer not null
|
"gauges" integer not null,
|
||||||
|
"driving_style" integer not null
|
||||||
);
|
);
|
||||||
|
|
||||||
create table "idz_story_state" (
|
create table "idz_story_state" (
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
create table "new_idz_settings" (
|
||||||
|
"id" integer primary key not null
|
||||||
|
references "idz_profile"("id")
|
||||||
|
on delete cascade,
|
||||||
|
"music" integer not null,
|
||||||
|
"pack" integer not null,
|
||||||
|
"aura" integer not null,
|
||||||
|
"paper_cup" integer not null, -- Not a boolean, oddly enough
|
||||||
|
"gauges" integer not null,
|
||||||
|
"driving_style" integer not null
|
||||||
|
);
|
||||||
|
|
||||||
|
insert into "new_idz_settings" (
|
||||||
|
"id",
|
||||||
|
"music",
|
||||||
|
"pack",
|
||||||
|
"aura",
|
||||||
|
"paper_cup",
|
||||||
|
"gauges",
|
||||||
|
"driving_style"
|
||||||
|
) select
|
||||||
|
x."id",
|
||||||
|
x."music",
|
||||||
|
x."pack",
|
||||||
|
x."aura",
|
||||||
|
x."paper_cup",
|
||||||
|
x."gauges",
|
||||||
|
0
|
||||||
|
from "idz_settings" as x;
|
||||||
|
|
||||||
|
drop table "idz_settings";
|
||||||
|
|
||||||
|
alter table "new_idz_settings" rename to "idz_settings";
|
||||||
@@ -95,6 +95,7 @@ export function saveProfile2(buf: Buffer): SaveProfileRequest {
|
|||||||
aura: buf.readUInt8(0x002c),
|
aura: buf.readUInt8(0x002c),
|
||||||
paperCup: buf.readUInt8(0x00f6),
|
paperCup: buf.readUInt8(0x00f6),
|
||||||
gauges: buf.readUInt8(0x00f7),
|
gauges: buf.readUInt8(0x00f7),
|
||||||
|
drivingStyle: 0, // Not supported until idz2
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ export function saveProfile3(buf: Buffer): SaveProfileRequest {
|
|||||||
aura: buf.readUInt8(0x002c),
|
aura: buf.readUInt8(0x002c),
|
||||||
paperCup: buf.readUInt8(0x00f6),
|
paperCup: buf.readUInt8(0x00f6),
|
||||||
gauges: buf.readUInt8(0x00f7),
|
gauges: buf.readUInt8(0x00f7),
|
||||||
|
drivingStyle: 0, // Not supported until idz2
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ export function saveSettings(buf: Buffer): SaveSettingsRequest {
|
|||||||
paperCup: buf.readUInt8(0x0011),
|
paperCup: buf.readUInt8(0x0011),
|
||||||
gauges: buf.readUInt8(0x0012),
|
gauges: buf.readUInt8(0x0012),
|
||||||
aura: buf.readUInt8(0x0013),
|
aura: buf.readUInt8(0x0013),
|
||||||
|
drivingStyle: 0, // Not supported until idz2
|
||||||
},
|
},
|
||||||
field_0010: buf.readUInt8(0x0010),
|
field_0010: buf.readUInt8(0x0010),
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ export async function createProfile(
|
|||||||
aura: 0,
|
aura: 0,
|
||||||
paperCup: 0,
|
paperCup: 0,
|
||||||
gauges: 5,
|
gauges: 5,
|
||||||
|
drivingStyle: 0, // Not supported until idz2
|
||||||
};
|
};
|
||||||
const story: Story = {
|
const story: Story = {
|
||||||
x: 0,
|
x: 0,
|
||||||
|
|||||||
@@ -4,4 +4,5 @@ export interface Settings {
|
|||||||
aura: number;
|
aura: number;
|
||||||
paperCup: number;
|
paperCup: number;
|
||||||
gauges: number;
|
gauges: number;
|
||||||
|
drivingStyle: number;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ export class SqlSettingsRepository implements FacetRepository<Settings> {
|
|||||||
aura: parseInt(row.aura!),
|
aura: parseInt(row.aura!),
|
||||||
paperCup: parseInt(row.paper_cup!),
|
paperCup: parseInt(row.paper_cup!),
|
||||||
gauges: parseInt(row.gauges!),
|
gauges: parseInt(row.gauges!),
|
||||||
|
drivingStyle: parseInt(row.driving_style!),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user