Last active
December 17, 2021 20:53
-
-
Save BrettMayson/5e6c40bd8a751adb28d49d5fe6e236f7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use arma_rs::{arma, Extension}; | |
#[arma] | |
fn init() -> Extension { | |
Extension::build() | |
.command("side_select", side_select) | |
.finish() | |
} | |
fn side_select(side: String) -> Vec<String> { | |
match side.as_str() { | |
"WEST" => vec!["B_Placeholder1", "B_Placeholder2"], | |
"EAST" => vec!["O_Placeholder1", "O_Placeholder2"], | |
_ => vec!["I_Placeholder1", "I_Placeholder2"], | |
}.into_iter().map(|s| s.to_string()).collect() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
("ext" callExtension ["side_select", [str _side]]) params ["_classes", "_code"]; | |
if (_code == 0) then { | |
private _unitList = parseSimpleArray _classes; | |
} else { | |
WARN_1("Error encountered determining side classes: %1",_code); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment