mirror of
https://github.com/djhackersdev/minime.git
synced 2026-07-18 16:21:23 -05:00
idz: Add idz_settings.driving_style column
This commit is contained in:
parent
9f6b0e59c8
commit
48a9bcbdbd
|
|
@ -104,7 +104,8 @@ create table "idz_settings" (
|
|||
"pack" integer not null,
|
||||
"aura" integer not null,
|
||||
"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" (
|
||||
|
|
|
|||
33
schema/migrate/M0017-idz-v2-support.sql
Normal file
33
schema/migrate/M0017-idz-v2-support.sql
Normal file
|
|
@ -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),
|
||||
paperCup: buf.readUInt8(0x00f6),
|
||||
gauges: buf.readUInt8(0x00f7),
|
||||
drivingStyle: 0, // Not supported until idz2
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ export function saveProfile3(buf: Buffer): SaveProfileRequest {
|
|||
aura: buf.readUInt8(0x002c),
|
||||
paperCup: buf.readUInt8(0x00f6),
|
||||
gauges: buf.readUInt8(0x00f7),
|
||||
drivingStyle: 0, // Not supported until idz2
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ export function saveSettings(buf: Buffer): SaveSettingsRequest {
|
|||
paperCup: buf.readUInt8(0x0011),
|
||||
gauges: buf.readUInt8(0x0012),
|
||||
aura: buf.readUInt8(0x0013),
|
||||
drivingStyle: 0, // Not supported until idz2
|
||||
},
|
||||
field_0010: buf.readUInt8(0x0010),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ export async function createProfile(
|
|||
aura: 0,
|
||||
paperCup: 0,
|
||||
gauges: 5,
|
||||
drivingStyle: 0, // Not supported until idz2
|
||||
};
|
||||
const story: Story = {
|
||||
x: 0,
|
||||
|
|
|
|||
|
|
@ -4,4 +4,5 @@ export interface Settings {
|
|||
aura: number;
|
||||
paperCup: number;
|
||||
gauges: number;
|
||||
drivingStyle: number;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ export class SqlSettingsRepository implements FacetRepository<Settings> {
|
|||
aura: parseInt(row.aura!),
|
||||
paperCup: parseInt(row.paper_cup!),
|
||||
gauges: parseInt(row.gauges!),
|
||||
drivingStyle: parseInt(row.driving_style!),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user