I added a new ware to the list of a trader:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<mdscript name="HUDOnlyCockpit" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="md.xsd">
<cues>
<cue name="AddCockpit" instantiate="false">
<conditions>
<check_any>
<event_cue_completed cue="md.Setup.Start"/>
<event_game_loaded/>
</check_any>
</conditions>
<actions>
<include_actions ref="PatchAddCockpit" />
</actions>
</cue>
<library name="PatchAddCockpit">
<actions>
<set_value name="$MechanicNewItemList" exact="
[
[ware.spe_cockpit_test, 1, 1, 100]
]
"/>
<do_all exact="$MechanicNewItemList.count" counter="$Counter">
<do_if value="md.$CockpitUpgradetraderLists.{1}.indexof.{$MechanicNewItemList.{$Counter}}" negate="true" >
<append_to_list name="md.$CockpitUpgradetraderLists.{1}" exact="$MechanicNewItemList.{$Counter}" />
</do_if>
</do_all>
</actions>
</library>
</cues>
</mdscript>
How do I remove the item from the list on uninstallation?