|
@ -60,13 +60,13 @@ pub struct ShipBlockList { |
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
impl ShipBlockList {
|
|
|
impl ShipBlockList {
|
|
|
pub fn new(num_blocks: usize) -> ShipBlockList {
|
|
|
|
|
|
|
|
|
pub fn new(shipname: &str, num_blocks: usize) -> ShipBlockList {
|
|
|
ShipBlockList {
|
|
|
ShipBlockList {
|
|
|
shipblock: BlockEntry {
|
|
|
shipblock: BlockEntry {
|
|
|
menu: BLOCK_MENU_ID,
|
|
|
menu: BLOCK_MENU_ID,
|
|
|
item: 0,
|
|
|
item: 0,
|
|
|
flags: 0,
|
|
|
flags: 0,
|
|
|
name: utf8_to_utf16_array!("Shipname", 0x11)
|
|
|
|
|
|
|
|
|
name: utf8_to_utf16_array!(shipname, 0x11)
|
|
|
},
|
|
|
},
|
|
|
blocks: (0..num_blocks).map(|i| BlockEntry {
|
|
|
blocks: (0..num_blocks).map(|i| BlockEntry {
|
|
|
menu: BLOCK_MENU_ID,
|
|
|
menu: BLOCK_MENU_ID,
|
|
|