Used %ModDir% instead of old semi-manual setting that is broken now.

master
Jaka Perovšek 2022-12-17 16:19:52 +01:00
parent 053810c5c6
commit 085072e583
3 changed files with 40 additions and 40 deletions

View File

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
{% if config['slug'] != "sunken_tapes" %}<!--This mod is based on Sunken Tapes. See https://git.kompot.si/jaka/barotrauma-sunken-tapes and https://steamcommunity.com/sharedfiles/filedetails/?id=2616577901 for the source material and code generator.-->{% else %}<!--Code licensed under GPLv3 and generated with a script available at https://git.kompot.si/jaka/barotrauma-sunken-tapes-->{% endif %}
<contentpackage name="{{ config['name'] }}" path="Mods/{{ config['name'] }}/filelist.xml" corepackage="false" gameversion="0.15.12.0" {% if config['slug'] == "Sunken Tapes" %}steamworkshopid="2616577901"{% endif %}>
<Item file="Mods/{{ config['name'] }}/{{ config['slug'] }}.xml" />
<UIStyle file="Mods/{{ config['name'] }}/{{ config['slug'] }}_style.xml" />
<None file="Mods/{{ config['name'] }}/PreviewImage.png" />
<None file="Mods/{{ config['name'] }}/icons.png" />
<None file="Mods/{{ config['name'] }}/covers.png" />
<None file="Mods/{{ config['name'] }}/sprites.png" />
<None file="Mods/{{ config['name'] }}/players_icons.png" />
<None file="Mods/{{ config['name'] }}/players_sprites.png" />{% for tape in tapes %}
<None file="Mods/{{ config['name'] }}/music/{{ tape["identifier"] }}.ogg" />
<None file="Mods/{{ config['name'] }}/music/{{ tape["identifier"] }}-walkman.ogg" />{% endfor %}
<None file="Mods/{{ config['name'] }}/sound_effects/boombox_insert_cassette.ogg" />
<None file="Mods/{{ config['name'] }}/sound_effects/boombox_play_cassette.ogg" />
<None file="Mods/{{ config['name'] }}/sound_effects/cassette_drop.ogg" />
<contentpackage name="{{ config['name'] }}" path="%ModDir%/filelist.xml" corepackage="false" gameversion="0.15.12.0" {% if config['slug'] == "Sunken Tapes" %}steamworkshopid="2616577901"{% endif %}>
<Item file="%ModDir%/{{ config['slug'] }}.xml" />
<UIStyle file="%ModDir%/{{ config['slug'] }}_style.xml" />
<None file="%ModDir%/PreviewImage.png" />
<None file="%ModDir%/icons.png" />
<None file="%ModDir%/covers.png" />
<None file="%ModDir%/sprites.png" />
<None file="%ModDir%/players_icons.png" />
<None file="%ModDir%/players_sprites.png" />{% for tape in tapes %}
<None file="%ModDir%/music/{{ tape["identifier"] }}.ogg" />
<None file="%ModDir%/music/{{ tape["identifier"] }}-walkman.ogg" />{% endfor %}
<None file="%ModDir%/sound_effects/boombox_insert_cassette.ogg" />
<None file="%ModDir%/sound_effects/boombox_play_cassette.ogg" />
<None file="%ModDir%/sound_effects/cassette_drop.ogg" />
</contentpackage>

View File

@ -181,7 +181,7 @@
{% if config['slug'] != "sunken_tapes" %}<!--This mod is based on Sunken Tapes. See https://git.kompot.si/jaka/barotrauma-sunken-tapes and https://steamcommunity.com/sharedfiles/filedetails/?id=2616577901 for the source material and code generator.-->{% else %}<!--The following section of the code is licensed under GPLv3 and generated with a script available at https://git.kompot.si/jaka/barotrauma-sunken-tapes-->{% endif %}
{% for tape in tapes %}
<{{ config['slug'] }}_cover_{{ tape.identifier }} color="255,255,255,255" textcolor="0,0,0,255">
<Sprite name="{{ config['slug'] }}_cover_{{ tape.identifier }}" texture="Mods/{{ config['name'] }}/covers.png" size="0.0, 0.0" sourcerect="{{ 512 * positions[loop.index0]['column'] }},{{ 328 * positions[loop.index0]['row'] }},512,328" origin="0.5,0.5" compress="false" tile="false"/>
<Sprite name="{{ config['slug'] }}_cover_{{ tape.identifier }}" texture="%ModDir%/covers.png" size="0.0, 0.0" sourcerect="{{ 512 * positions[loop.index0]['column'] }},{{ 328 * positions[loop.index0]['row'] }},512,328" origin="0.5,0.5" compress="false" tile="false"/>
</{{ config['slug'] }}_cover_{{ tape.identifier }}>{% endfor %}
<!-- end of the moded part of the code -->
<InnerGlow color="255,255,255,204" hovercolor="255,255,255,204" selectedcolor="255,255,255,204">

View File

@ -24,8 +24,8 @@
<RequiredItem identifier="fpgacircuit" />
</Fabricate>
<Upgrade gameversion="0.9.2.0" scale="0.5" />
<InventoryIcon texture="Mods/{{ config['name'] }}/players_icons.png" sourcerect="0,0,64,42" origin="0.5,0.5" />
<Sprite texture="Mods/{{ config['name'] }}/players_sprites.png" sourcerect="0,0,117,76" depth="0.55" origin="0.5,0.5" />
<InventoryIcon texture="%ModDir%/players_icons.png" sourcerect="0,0,64,42" origin="0.5,0.5" />
<Sprite texture="%ModDir%/players_sprites.png" sourcerect="0,0,117,76" depth="0.55" origin="0.5,0.5" />
<Body width="117" height="76" />
<LightComponent LightColor="0.0,0.85,0.0,0.7" range="4" powerconsumption="0" blinkfrequency="0" IsOn="false" canbeselected="false">
</LightComponent>
@ -34,11 +34,11 @@
<TickBox text="Play">
<StatusEffect type="OnUse" targettype="This" IsOn="true">
<Conditional IsOn="false" />
<sound file="Mods/{{ config['name'] }}/sound_effects/boombox_play_cassette.ogg" type="OnUse" range="300" volume="1.0" />
<sound file="%ModDir%/sound_effects/boombox_play_cassette.ogg" type="OnUse" range="300" volume="1.0" />
</StatusEffect>
<StatusEffect type="OnSecondaryUse" targettype="This" IsOn="false" >
<Conditional IsOn="true" />
<sound file="Mods/{{ config['name'] }}/sound_effects/boombox_play_cassette.ogg" type="OnUse" range="300" volume="1.0" />
<sound file="%ModDir%/sound_effects/boombox_play_cassette.ogg" type="OnUse" range="300" volume="1.0" />
<Use />
</StatusEffect>
</TickBox>
@ -78,8 +78,8 @@
<RequiredItem identifier="fpgacircuit" />
</Fabricate>
<Upgrade gameversion="0.9.2.0" scale="0.5" />
<InventoryIcon texture="Mods/{{ config['name'] }}/players_icons.png" sourcerect="64,0,64,40" origin="0.5,0.5" />
<Sprite texture="Mods/{{ config['name'] }}/players_sprites.png" sourcerect="117,0,51,33" depth="0.55" origin="0.5,0.5" />
<InventoryIcon texture="%ModDir%/players_icons.png" sourcerect="64,0,64,40" origin="0.5,0.5" />
<Sprite texture="%ModDir%/players_sprites.png" sourcerect="117,0,51,33" depth="0.55" origin="0.5,0.5" />
<Body width="51" height="33" />
<LightComponent LightColor="0.0,0.0,0.0,0.0" range="1" powerconsumption="0" blinkfrequency="0" IsOn="false" canbeselected="false">
</LightComponent>
@ -88,11 +88,11 @@
<TickBox text="Play">
<StatusEffect type="OnUse" targettype="This" IsOn="true">
<Conditional IsOn="false" />
<sound file="Mods/{{ config['name'] }}/sound_effects/boombox_play_cassette.ogg" type="OnUse" range="300" volume="1.0" />
<sound file="%ModDir%/sound_effects/boombox_play_cassette.ogg" type="OnUse" range="300" volume="1.0" />
</StatusEffect>
<StatusEffect type="OnSecondaryUse" targettype="This" IsOn="false" >
<Conditional IsOn="true" />
<sound file="Mods/{{ config['name'] }}/sound_effects/boombox_play_cassette.ogg" type="OnUse" range="300" volume="1.0" />
<sound file="%ModDir%/sound_effects/boombox_play_cassette.ogg" type="OnUse" range="300" volume="1.0" />
<Use />
</StatusEffect>
</TickBox>
@ -132,8 +132,8 @@
<RequiredItem identifier="fpgacircuit" />
</Fabricate>
<Upgrade gameversion="0.9.2.0" scale="0.5" />
<InventoryIcon texture="Mods/{{ config['name'] }}/players_icons.png" sourcerect="128,0,64,40" origin="0.5,0.5" />
<Sprite texture="Mods/{{ config['name'] }}/players_sprites.png" sourcerect="168,0,51,33" depth="0.55" origin="0.5,0.5" />
<InventoryIcon texture="%ModDir%/players_icons.png" sourcerect="128,0,64,40" origin="0.5,0.5" />
<Sprite texture="%ModDir%/players_sprites.png" sourcerect="168,0,51,33" depth="0.55" origin="0.5,0.5" />
<Body width="51" height="33" />
<LightComponent LightColor="0.0,0.0,0.0,0.0" range="1" powerconsumption="0" blinkfrequency="0" IsOn="false" canbeselected="false">
</LightComponent>
@ -142,11 +142,11 @@
<TickBox text="Play">
<StatusEffect type="OnUse" targettype="This" IsOn="true">
<Conditional IsOn="false" />
<sound file="Mods/{{ config['name'] }}/sound_effects/boombox_play_cassette.ogg" type="OnUse" range="300" volume="1.0" />
<sound file="%ModDir%/sound_effects/boombox_play_cassette.ogg" type="OnUse" range="300" volume="1.0" />
</StatusEffect>
<StatusEffect type="OnSecondaryUse" targettype="This" IsOn="false" >
<Conditional IsOn="true" />
<sound file="Mods/{{ config['name'] }}/sound_effects/boombox_play_cassette.ogg" type="OnUse" range="300" volume="1.0" />
<sound file="%ModDir%/sound_effects/boombox_play_cassette.ogg" type="OnUse" range="300" volume="1.0" />
<Use />
</StatusEffect>
</TickBox>
@ -186,8 +186,8 @@
<RequiredItem identifier="fpgacircuit" />
</Fabricate>
<Upgrade gameversion="0.9.2.0" scale="0.5" />
<InventoryIcon texture="Mods/{{ config['name'] }}/players_icons.png" sourcerect="192,0,64,40" origin="0.5,0.5" />
<Sprite texture="Mods/{{ config['name'] }}/players_sprites.png" sourcerect="219,0,51,33" depth="0.55" origin="0.5,0.5" />
<InventoryIcon texture="%ModDir%/players_icons.png" sourcerect="192,0,64,40" origin="0.5,0.5" />
<Sprite texture="%ModDir%/players_sprites.png" sourcerect="219,0,51,33" depth="0.55" origin="0.5,0.5" />
<Body width="51" height="33" />
<LightComponent LightColor="0.0,0.0,0.0,0.0" range="1" powerconsumption="0" blinkfrequency="0" IsOn="false" canbeselected="false">
</LightComponent>
@ -196,11 +196,11 @@
<TickBox text="Play">
<StatusEffect type="OnUse" targettype="This" IsOn="true">
<Conditional IsOn="false" />
<sound file="Mods/{{ config['name'] }}/sound_effects/boombox_play_cassette.ogg" type="OnUse" range="300" volume="1.0" />
<sound file="%ModDir%/sound_effects/boombox_play_cassette.ogg" type="OnUse" range="300" volume="1.0" />
</StatusEffect>
<StatusEffect type="OnSecondaryUse" targettype="This" IsOn="false" >
<Conditional IsOn="true" />
<sound file="Mods/{{ config['name'] }}/sound_effects/boombox_play_cassette.ogg" type="OnUse" range="300" volume="1.0" />
<sound file="%ModDir%/sound_effects/boombox_play_cassette.ogg" type="OnUse" range="300" volume="1.0" />
<Use />
</StatusEffect>
</TickBox>
@ -240,8 +240,8 @@
<RequiredItem identifier="fpgacircuit" />
</Fabricate>
<Upgrade gameversion="0.9.2.0" scale="0.5" />
<InventoryIcon texture="Mods/{{ config['name'] }}/players_icons.png" sourcerect="256,0,64,40" origin="0.5,0.5" />
<Sprite texture="Mods/{{ config['name'] }}/players_sprites.png" sourcerect="270,0,51,33" depth="0.55" origin="0.5,0.5" />
<InventoryIcon texture="%ModDir%/players_icons.png" sourcerect="256,0,64,40" origin="0.5,0.5" />
<Sprite texture="%ModDir%/players_sprites.png" sourcerect="270,0,51,33" depth="0.55" origin="0.5,0.5" />
<Body width="51" height="33" />
<LightComponent LightColor="0.0,0.0,0.0,0.0" range="1" powerconsumption="0" blinkfrequency="0" IsOn="false" canbeselected="false">
</LightComponent>
@ -250,11 +250,11 @@
<TickBox text="Play">
<StatusEffect type="OnUse" targettype="This" IsOn="true">
<Conditional IsOn="false" />
<sound file="Mods/{{ config['name'] }}/sound_effects/boombox_play_cassette.ogg" type="OnUse" range="300" volume="1.0" />
<sound file="%ModDir%/sound_effects/boombox_play_cassette.ogg" type="OnUse" range="300" volume="1.0" />
</StatusEffect>
<StatusEffect type="OnSecondaryUse" targettype="This" IsOn="false" >
<Conditional IsOn="true" />
<sound file="Mods/{{ config['name'] }}/sound_effects/boombox_play_cassette.ogg" type="OnUse" range="300" volume="1.0" />
<sound file="%ModDir%/sound_effects/boombox_play_cassette.ogg" type="OnUse" range="300" volume="1.0" />
<Use />
</StatusEffect>
</TickBox>
@ -291,12 +291,12 @@
<RequiredItem identifier="{% if config['slug'] != "sunken_tapes" %}{{ config["slug"] }}-{% endif %}cassette-blank" />
<RequiredItem identifier="fpgacircuit" />
</Fabricate>
<InventoryIcon texture="Mods/{{ config['name'] }}/icons.png" sourcerect="{{ 64 * positions[loop.index0]['column'] }},{{ 41 * positions[loop.index0]['row'] }},64,41" origin="0.5,0.5" />
<Sprite texture="Mods/{{ config['name'] }}/sprites.png" sourcerect="{{ 33 * positions[loop.index0]['column'] }},{{ 21 * positions[loop.index0]['row'] }},33,21" depth="0.6" origin="0.5,0.5" />
<InventoryIcon texture="%ModDir%/icons.png" sourcerect="{{ 64 * positions[loop.index0]['column'] }},{{ 41 * positions[loop.index0]['row'] }},64,41" origin="0.5,0.5" />
<Sprite texture="%ModDir%/sprites.png" sourcerect="{{ 33 * positions[loop.index0]['column'] }},{{ 21 * positions[loop.index0]['row'] }},33,21" depth="0.6" origin="0.5,0.5" />
<Body width="33" height="21" />
<Throwable slots="Any,RightHand,LeftHand" holdpos="5,-65" holdangle="0" handle1="0,1" throwforce="4.0" aimpos="35,-10" msg="Aim to throw">
<StatusEffect type="OnImpact" target="This" Condition="-5.0" disabledeltatime="true">
<sound file="Mods/{{ config['name'] }}/sound_effects/cassette_drop.ogg" range="500" volume="1.0" />
<sound file="%ModDir%/sound_effects/cassette_drop.ogg" range="500" volume="1.0" />
</StatusEffect>
</Throwable>
<CustomInterface canbeselected="true" drawhudwhenequipped="true" allowuioverlap="true" msg="Equip to inspect">
@ -343,7 +343,7 @@
<InventoryIcon texture="Content/Items/Electricity/signalcomp.png" sourcerect="0,160,4,4" origin="0.5,0.5" />
<ItemComponent>
<StatusEffect type="Always" target="This">
<sound file="Mods/{{ config['name'] }}/music/{{ tape.identifier }}.ogg" type="OnUse" range="1000" loop="true" volume="1.0" />
<sound file="%ModDir%/music/{{ tape.identifier }}.ogg" type="OnUse" range="1000" loop="true" volume="1.0" />
</StatusEffect>{% if tape.buffs %}
<StatusEffect type="Always" target="NearbyCharacters" range="1000">{% for buff in tape.buffs %}
{% if buff == "psychosis" %}<Affliction identifier="{{ buff }}" strength= "{{ '%0.4f' % (tape.buff_multiplier*(delta + 0.1)) }}" />{% else %}<Affliction identifier="{{ buff }}" strength= "{{ '%0.4f' % (tape.buff_multiplier*(delta*4 + 1)) }}" />{% endif %}{% endfor %}
@ -363,7 +363,7 @@
<InventoryIcon texture="Content/Items/Electricity/signalcomp.png" sourcerect="0,160,4,4" origin="0.5,0.5" />
<ItemComponent>
<StatusEffect type="Always" target="This">
<sound file="Mods/{{ config['name'] }}/music/{{ tape.identifier }}-walkman.ogg" type="OnUse" range="200" loop="true" volume="1.0" />
<sound file="%ModDir%/music/{{ tape.identifier }}-walkman.ogg" type="OnUse" range="200" loop="true" volume="1.0" />
</StatusEffect>{% if tape.buffs %}
<StatusEffect type="Always" target="NearbyCharacters" range="200">{% for buff in tape.buffs %}
{% if buff == "psychosis" %}<Affliction identifier="{{ buff }}" strength= "{{ '%0.4f' % (tape.buff_multiplier*(delta + 0.1)*0.5) }}" />{% else %}<Affliction identifier="{{ buff }}" strength= "{{ '%0.4f' % (tape.buff_multiplier*(delta*4 + 1)*0.5) }}" />{% endif %}{% endfor %}