Last active
March 14, 2018 15:50
-
-
Save UniTrader/35df8aff3e50a5f577acc0f04756dbe0 to your computer and use it in GitHub Desktop.
Forward Undocking for XL Docks - Hack
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
<diff> | |
<replace sel="//move_undocking"> | |
<do_if value="true" comment="replace with multiple nodes was buggy iirc - so adding a no-op-node in-between"> | |
<do_if value="$olddockslot.component.parent.macro.id == 'buildmodule_ships_albion_xl_macro'"> | |
<set_value name="$undocktarget" exact="position.[0m,0m,6km]"/> | |
</do_if> | |
<do_elseif value="false" comment="add additional undock targets"/><!-- use pos="after" for this in the diff file--> | |
<do_if value="$undocktarget?" comment="an alternative undock target pos is set - use it"> | |
<transform_position name="$undocktarget" refposition="this.ship.position" refrotation="this.ship.rotation"> | |
<position value="$undocktarget"/> | |
</transform_position> | |
<move_to object="this.ship" destination="this.zone" finishonapproach="true" forceposition="false" commandaction="false"> | |
<position value="$undocktarget"/> | |
</move_to> | |
</do_if> | |
<do_else> | |
<move_undocking object="this.ship" dock="$olddockslot" finishonapproach="true" forceposition="false" commandaction="false"/> | |
</do_else> | |
</do_if> | |
</replace> | |
</diff> |
Added proper check and handling of alternative undock position (for now only in XL Albion Shipyards)
Edit1: Test performed, transform_position needs work..
Edit2: Now basically ready, Savegame compatibility outstanding though...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ToDo:
=> Make Savegame Compatible by using Versions (will break future Patches though!!!)
=> Add proper Check for Forward undock capability (compare with known Dock Macros? check for Tag? maybe even check for available Space in front? (line-of-sight, obstructed area))
=> Also IG-Test is not done yet (so far its just an approach to this..)