mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: shell range defs
This commit is contained in:
1 parent
1cf6a9e76a
commit
f2f7d8aa3d
3 files changed
+22
No files matched your search
@@ -170,6 +170,7 @@ message ShellDefinition {
|
|||||||
optional float normalization = 10;
|
optional float normalization = 10;
|
||||||
optional float ricochet = 11;
|
optional float ricochet = 11;
|
||||||
optional float explosion_radius = 12;
|
optional float explosion_radius = 12;
|
||||||
|
required uint32 range = 13;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum ShellType {
|
enum ShellType {
|
||||||
|
|||||||
@@ -499,6 +499,7 @@ export interface ShellDefinition {
|
|||||||
normalization?: number | undefined;
|
normalization?: number | undefined;
|
||||||
ricochet?: number | undefined;
|
ricochet?: number | undefined;
|
||||||
explosion_radius?: number | undefined;
|
explosion_radius?: number | undefined;
|
||||||
|
range: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ShellPenetration {
|
export interface ShellPenetration {
|
||||||
@@ -3232,6 +3233,7 @@ function createBaseShellDefinition(): ShellDefinition {
|
|||||||
normalization: undefined,
|
normalization: undefined,
|
||||||
ricochet: undefined,
|
ricochet: undefined,
|
||||||
explosion_radius: undefined,
|
explosion_radius: undefined,
|
||||||
|
range: 0,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3273,6 +3275,9 @@ export const ShellDefinition: MessageFns<ShellDefinition> = {
|
|||||||
if (message.explosion_radius !== undefined && message.explosion_radius !== undefined) {
|
if (message.explosion_radius !== undefined && message.explosion_radius !== undefined) {
|
||||||
writer.uint32(101).float(message.explosion_radius);
|
writer.uint32(101).float(message.explosion_radius);
|
||||||
}
|
}
|
||||||
|
if (message.range !== 0) {
|
||||||
|
writer.uint32(104).uint32(message.range);
|
||||||
|
}
|
||||||
return writer;
|
return writer;
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -3379,6 +3384,14 @@ export const ShellDefinition: MessageFns<ShellDefinition> = {
|
|||||||
message.explosion_radius = reader.float();
|
message.explosion_radius = reader.float();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
case 13: {
|
||||||
|
if (tag !== 104) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
message.range = reader.uint32();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ((tag & 7) === 4 || tag === 0) {
|
if ((tag & 7) === 4 || tag === 0) {
|
||||||
break;
|
break;
|
||||||
@@ -3402,6 +3415,7 @@ export const ShellDefinition: MessageFns<ShellDefinition> = {
|
|||||||
normalization: isSet(object.normalization) ? globalThis.Number(object.normalization) : undefined,
|
normalization: isSet(object.normalization) ? globalThis.Number(object.normalization) : undefined,
|
||||||
ricochet: isSet(object.ricochet) ? globalThis.Number(object.ricochet) : undefined,
|
ricochet: isSet(object.ricochet) ? globalThis.Number(object.ricochet) : undefined,
|
||||||
explosion_radius: isSet(object.explosion_radius) ? globalThis.Number(object.explosion_radius) : undefined,
|
explosion_radius: isSet(object.explosion_radius) ? globalThis.Number(object.explosion_radius) : undefined,
|
||||||
|
range: globalThis.Number(assertSet("ShellDefinition.range", object.range)),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -3443,6 +3457,9 @@ export const ShellDefinition: MessageFns<ShellDefinition> = {
|
|||||||
if (message.explosion_radius !== undefined && message.explosion_radius !== undefined) {
|
if (message.explosion_radius !== undefined && message.explosion_radius !== undefined) {
|
||||||
obj.explosion_radius = message.explosion_radius;
|
obj.explosion_radius = message.explosion_radius;
|
||||||
}
|
}
|
||||||
|
if (message.range !== 0) {
|
||||||
|
obj.range = Math.round(message.range);
|
||||||
|
}
|
||||||
return obj;
|
return obj;
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -3465,6 +3482,7 @@ export const ShellDefinition: MessageFns<ShellDefinition> = {
|
|||||||
message.normalization = object.normalization ?? undefined;
|
message.normalization = object.normalization ?? undefined;
|
||||||
message.ricochet = object.ricochet ?? undefined;
|
message.ricochet = object.ricochet ?? undefined;
|
||||||
message.explosion_radius = object.explosion_radius ?? undefined;
|
message.explosion_radius = object.explosion_radius ?? undefined;
|
||||||
|
message.range = object.range ?? 0;
|
||||||
return message;
|
return message;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -323,6 +323,7 @@ interface GunDefinitionsList {
|
|||||||
[key: string]: {
|
[key: string]: {
|
||||||
speed: number;
|
speed: number;
|
||||||
piercingPower: string;
|
piercingPower: string;
|
||||||
|
maxDistance: number;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -1276,6 +1277,7 @@ export async function definitions() {
|
|||||||
near: penetrationRaw[0],
|
near: penetrationRaw[0],
|
||||||
far: penetrationRaw[1],
|
far: penetrationRaw[1],
|
||||||
},
|
},
|
||||||
|
range: gunShellEntry.maxDistance,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -1648,6 +1650,7 @@ export async function definitions() {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return;
|
||||||
await commitAssets('definitions', [
|
await commitAssets('definitions', [
|
||||||
{
|
{
|
||||||
content: encodePBBuffer(GameDefinitions, gameDefinitions),
|
content: encodePBBuffer(GameDefinitions, gameDefinitions),
|
||||||
|
|||||||
Reference in new issue
Block a user