mirror of
https://github.com/jugeeya/UltimateTrainingModpack.git
synced 2024-11-28 04:44:06 +00:00
Enable save states toggle (#276)
* enable save state toggle * update version to beta version * fix * fix 2 * Add icon
This commit is contained in:
parent
d45871cf68
commit
b52a956f61
6 changed files with 86 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "training_modpack"
|
||||
version = "3.0.0"
|
||||
version = "3.1.0-beta"
|
||||
authors = ["jugeeya <jugeeya@live.com>"]
|
||||
edition = "2018"
|
||||
|
||||
|
|
|
@ -755,6 +755,7 @@ url_params! {
|
|||
pub save_damage: OnOff,
|
||||
pub save_state_mirroring: SaveStateMirroring,
|
||||
pub frame_advantage: OnOff,
|
||||
pub save_state_enable: OnOff,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -801,6 +802,7 @@ impl TrainingModpackMenu {
|
|||
save_damage = OnOff::from_val(val),
|
||||
frame_advantage = OnOff::from_val(val),
|
||||
save_state_mirroring = num::FromPrimitive::from_u32(val),
|
||||
save_state_enable = OnOff::from_val(val),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -511,6 +511,12 @@ pub unsafe fn write_menu() {
|
|||
stringify!("Input Delay: Frames to delay player inputs by"),
|
||||
);
|
||||
|
||||
add_onoff_submenu!(
|
||||
overall_menu,
|
||||
"Save States",
|
||||
save_state_enable,
|
||||
"Save States: Enable save states! Save a state with Grab+Down Taunt, load it with Grab+Up Taunt."
|
||||
);
|
||||
add_onoff_submenu!(
|
||||
overall_menu,
|
||||
"Save Damage",
|
||||
|
|
|
@ -39,6 +39,7 @@ pub static DEFAULT_MENU: consts::TrainingModpackMenu = consts::TrainingModpackMe
|
|||
save_damage: OnOff::On,
|
||||
save_state_mirroring: SaveStateMirroring::None,
|
||||
frame_advantage: OnOff::Off,
|
||||
save_state_enable: OnOff::On,
|
||||
};
|
||||
|
||||
pub static mut MENU: TrainingModpackMenu = DEFAULT_MENU;
|
||||
|
|
72
src/templates/save_state_enable.svg
Normal file
72
src/templates/save_state_enable.svg
Normal file
|
@ -0,0 +1,72 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="80.0px"
|
||||
height="80.0px"
|
||||
viewBox="0 0 80.0 80.0"
|
||||
version="1.1"
|
||||
id="SVGRoot"
|
||||
sodipodi:docname="save_state_enable.svg"
|
||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
||||
<defs
|
||||
id="defs833" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#000000"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="12.281281"
|
||||
inkscape:cx="21.645441"
|
||||
inkscape:cy="33.158233"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer2"
|
||||
inkscape:document-rotation="0"
|
||||
showgrid="true"
|
||||
inkscape:window-width="3440"
|
||||
inkscape:window-height="1369"
|
||||
inkscape:window-x="1912"
|
||||
inkscape:window-y="205"
|
||||
inkscape:window-maximized="1">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid1403" />
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid1400" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata836">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer2"
|
||||
inkscape:label="Layer 2">
|
||||
<path
|
||||
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 16,59 c 4,6 9,10 24,11 C 54,70 71,59 71,40 71,20 55,9 41,9 22,9 11,26 11,40"
|
||||
id="path1411"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#ffffff;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 4,35 6,6 9,-3"
|
||||
id="path1994"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.3 KiB |
|
@ -103,6 +103,10 @@ fn set_damage(module_accessor: &mut app::BattleObjectModuleAccessor, damage: f32
|
|||
}
|
||||
|
||||
pub unsafe fn save_states(module_accessor: &mut app::BattleObjectModuleAccessor) {
|
||||
if MENU.save_state_enable == OnOff::Off {
|
||||
return;
|
||||
}
|
||||
|
||||
let status = StatusModule::status_kind(module_accessor) as i32;
|
||||
let save_state = if WorkModule::get_int(module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID)
|
||||
== FighterId::CPU as i32
|
||||
|
|
Loading…
Reference in a new issue