Merge remote-tracking branch 'barotrauma/master' into new-netcode
# Conflicts: # Subsurface/Source/Characters/Character.cs # Subsurface/Source/Items/Components/Machines/Steering.cs # Subsurface/Source/Map/Structure.cs # Subsurface/Source/Networking/GameClient.cs # Subsurface/Source/Networking/GameServer.cs
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
</limb>
|
</limb>
|
||||||
|
|
||||||
<!-- lower yaw -->
|
<!-- lower yaw -->
|
||||||
<limb id = "1" radius="70" height="100" impacttolerance="50.0">
|
<limb id = "1" radius="70" height="100">
|
||||||
<sprite texture="Content/Characters/Charybdis/charybdis.png" sourcerect="416,0,192,256" depth="0.025" origin="0.65,0.5"/>
|
<sprite texture="Content/Characters/Charybdis/charybdis.png" sourcerect="416,0,192,256" depth="0.025" origin="0.65,0.5"/>
|
||||||
<attack range="300" duration="0.5" damage="5.00" bleedingdamage="50" structuredamage="500" damagetype="slash" torque="200" targetforce="-50"/>
|
<attack range="300" duration="0.5" damage="5.00" bleedingdamage="50" structuredamage="500" damagetype="slash" torque="200" targetforce="-50"/>
|
||||||
</limb>
|
</limb>
|
||||||
|
|||||||
@@ -10,12 +10,12 @@
|
|||||||
<collider radius ="50"/>
|
<collider radius ="50"/>
|
||||||
|
|
||||||
<!-- head -->
|
<!-- head -->
|
||||||
<limb id = "0" radius="50" height="270" type="Head" steerforce="1.0" impacttolerance="50.0">
|
<limb id = "0" radius="50" height="270" type="Head" steerforce="1.0">
|
||||||
<sprite texture="Content/Characters/Coelanth/coelanth.png" sourcerect="267,171,162,392" depth="0.02" origin ="0.5,0.5"/>
|
<sprite texture="Content/Characters/Coelanth/coelanth.png" sourcerect="267,171,162,392" depth="0.02" origin ="0.5,0.5"/>
|
||||||
</limb>
|
</limb>
|
||||||
|
|
||||||
<!-- lower yaw -->
|
<!-- lower yaw -->
|
||||||
<limb id = "1" radius="20" height="240" impacttolerance="50.0">
|
<limb id = "1" radius="20" height="240">
|
||||||
<sprite texture="Content/Characters/Coelanth/coelanth.png" sourcerect="425,1,101,309" depth="0.025" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/Coelanth/coelanth.png" sourcerect="425,1,101,309" depth="0.025" origin="0.5,0.5"/>
|
||||||
<attack range="300" duration="0.5" damage="200" bleedingdamage="50" structuredamage="150" damagetype="slash" torque="100" targetforce="-50"/>
|
<attack range="300" duration="0.5" damage="200" bleedingdamage="50" structuredamage="150" damagetype="slash" torque="100" targetforce="-50"/>
|
||||||
</limb>
|
</limb>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<collider width="45" radius="22"/>
|
<collider width="45" radius="22"/>
|
||||||
|
|
||||||
<!-- head -->
|
<!-- head -->
|
||||||
<limb id = "0" radius="22" height="45" type="Head" flip="true" steerforce="1.0" armorsector="0.0,180.0" armorvalue="30.0" impacttolerance="50.0">
|
<limb id = "0" radius="22" height="45" type="Head" flip="true" steerforce="1.0" armorsector="0.0,180.0" armorvalue="30.0">
|
||||||
<sprite texture="Content/Characters/Crawler/crawler.png" sourcerect="0,0,51,121" depth="0.02" origin="0.45,0.63"/>
|
<sprite texture="Content/Characters/Crawler/crawler.png" sourcerect="0,0,51,121" depth="0.02" origin="0.45,0.63"/>
|
||||||
</limb>
|
</limb>
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
<sprite texture="Content/Characters/Crawler/crawler.png" sourcerect="6,141,60,95" depth="0.022" origin="0.37,0.43"/>
|
<sprite texture="Content/Characters/Crawler/crawler.png" sourcerect="6,141,60,95" depth="0.022" origin="0.37,0.43"/>
|
||||||
</limb>
|
</limb>
|
||||||
|
|
||||||
<limb id = "3" width="13" height="45" ignorecollisions="true" flip="true" impacttolerance="50.0">
|
<limb id = "3" width="13" height="45" ignorecollisions="true" flip="true">
|
||||||
<sprite texture="Content/Characters/Crawler/crawler.png" sourcerect="65,131,36,50" depth="0.15" origin="0.4,0.5"/>
|
<sprite texture="Content/Characters/Crawler/crawler.png" sourcerect="65,131,36,50" depth="0.15" origin="0.4,0.5"/>
|
||||||
<attack range="120" duration="0.5" damage="30" stun="0.1" bleedingdamage="3" structuredamage="50" damagetype="slash" force="20" torque="-20" targetforce="-30"/>
|
<attack range="120" duration="0.5" damage="30" stun="0.1" bleedingdamage="3" structuredamage="50" damagetype="slash" force="20" torque="-20" targetforce="-30"/>
|
||||||
</limb>
|
</limb>
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
<limb id = "4" width="11" height="34" type="RightLeg" flip="true">
|
<limb id = "4" width="11" height="34" type="RightLeg" flip="true">
|
||||||
<sprite texture="Content/Characters/Crawler/crawler.png" sourcerect="82,83,11,34" depth="0.03" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/Crawler/crawler.png" sourcerect="82,83,11,34" depth="0.03" origin="0.5,0.5"/>
|
||||||
</limb>
|
</limb>
|
||||||
<limb id = "5" width="5" height="40" type="RightFoot" flip="true" pullpos="0.0,15.0" refjoint="3" stepoffset="20.0,0.0" impacttolerance="50.0">
|
<limb id = "5" width="5" height="40" type="RightFoot" flip="true" pullpos="0.0,15.0" refjoint="3" stepoffset="20.0,0.0">
|
||||||
<sprite texture="Content/Characters/Crawler/crawler.png" sourcerect="59,78,19,43" depth="0.03" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/Crawler/crawler.png" sourcerect="59,78,19,43" depth="0.03" origin="0.5,0.5"/>
|
||||||
<sound file ="Content/Sounds/stepMetal.ogg"/>
|
<sound file ="Content/Sounds/stepMetal.ogg"/>
|
||||||
</limb>
|
</limb>
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
<limb id = "6" width="13" height="35" type="LeftLeg" flip="true">
|
<limb id = "6" width="13" height="35" type="LeftLeg" flip="true">
|
||||||
<sprite texture="Content/Characters/Crawler/crawler.png" sourcerect="82,83,11,34" depth="0.03" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/Crawler/crawler.png" sourcerect="82,83,11,34" depth="0.03" origin="0.5,0.5"/>
|
||||||
</limb>
|
</limb>
|
||||||
<limb id = "7" width="5" height="40" type="LeftFoot" flip="true" pullpos="0.0,15.0" refjoint="5" stepoffset="20.0,0.0" impacttolerance="50.0">
|
<limb id = "7" width="5" height="40" type="LeftFoot" flip="true" pullpos="0.0,15.0" refjoint="5" stepoffset="20.0,0.0">
|
||||||
<sprite texture="Content/Characters/Crawler/crawler.png" sourcerect="59,78,19,43" depth="0.03" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/Crawler/crawler.png" sourcerect="59,78,19,43" depth="0.03" origin="0.5,0.5"/>
|
||||||
<sound file ="Content/Sounds/stepMetal.ogg"/>
|
<sound file ="Content/Sounds/stepMetal.ogg"/>
|
||||||
</limb>
|
</limb>
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<limb id = "8" width="13" height="35" type="RightLeg" flip="true">
|
<limb id = "8" width="13" height="35" type="RightLeg" flip="true">
|
||||||
<sprite texture="Content/Characters/Crawler/crawler.png" sourcerect="82,83,11,34" depth="0.03" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/Crawler/crawler.png" sourcerect="82,83,11,34" depth="0.03" origin="0.5,0.5"/>
|
||||||
</limb>
|
</limb>
|
||||||
<limb id = "9" width="5" height="40" type="RightFoot" flip="true" pullpos="0.0,15.0" refjoint="7" stepoffset="20.0,0.0" impacttolerance="50.0">
|
<limb id = "9" width="5" height="40" type="RightFoot" flip="true" pullpos="0.0,15.0" refjoint="7" stepoffset="20.0,0.0">
|
||||||
<sprite texture="Content/Characters/Crawler/crawler.png" sourcerect="59,78,19,43" depth="0.03" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/Crawler/crawler.png" sourcerect="59,78,19,43" depth="0.03" origin="0.5,0.5"/>
|
||||||
<sound file ="Content/Sounds/stepMetal.ogg"/>
|
<sound file ="Content/Sounds/stepMetal.ogg"/>
|
||||||
</limb>
|
</limb>
|
||||||
|
|||||||
@@ -44,12 +44,12 @@
|
|||||||
<sprite texture="Content/Characters/Endworm/endworm.png" sourcerect="704,0,320,400" depth="0.07" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/Endworm/endworm.png" sourcerect="704,0,320,400" depth="0.07" origin="0.5,0.5"/>
|
||||||
</limb>
|
</limb>
|
||||||
|
|
||||||
<limb id = "8" width="50" height="320" impacttolerance="100.0">
|
<limb id = "8" width="50" height="320">
|
||||||
<sprite texture="Content/Characters/Endworm/endworm.png" sourcerect="755,552,137,470" depth="0.08" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/Endworm/endworm.png" sourcerect="755,552,137,470" depth="0.08" origin="0.5,0.5"/>
|
||||||
<attack range="800" duration="0.5" damage="30" stun="5.0" torque="-100" structuredamage="500" damagetype="slash"/>
|
<attack range="800" duration="0.5" damage="30" stun="5.0" torque="-100" structuredamage="500" damagetype="slash"/>
|
||||||
</limb>
|
</limb>
|
||||||
|
|
||||||
<limb id = "9" width="50" height="320" impacttolerance="100.0">
|
<limb id = "9" width="50" height="320">
|
||||||
<sprite texture="Content/Characters/Endworm/endworm.png" sourcerect="892,552,137,470" depth="0.08" origin="0.6,0.5"/>
|
<sprite texture="Content/Characters/Endworm/endworm.png" sourcerect="892,552,137,470" depth="0.08" origin="0.6,0.5"/>
|
||||||
<attack range="800" duration="0.5" damage="30" stun="5.0" torque="100" structuredamage="500" damagetype="slash"/>
|
<attack range="800" duration="0.5" damage="30" stun="5.0" torque="100" structuredamage="500" damagetype="slash"/>
|
||||||
</limb>
|
</limb>
|
||||||
|
|||||||
@@ -8,31 +8,31 @@
|
|||||||
|
|
||||||
<collider radius="50"/>
|
<collider radius="50"/>
|
||||||
<!-- head -->
|
<!-- head -->
|
||||||
<limb id = "0" radius="65" type="Head" steerforce="3.0" impacttolerance="100">
|
<limb id = "0" radius="65" type="Head" steerforce="3.0">
|
||||||
<sprite texture="Content/Characters/Fractalguardian/fractalguardian.png" sourcerect="0,0,129,128" depth="0.04"/>
|
<sprite texture="Content/Characters/Fractalguardian/fractalguardian.png" sourcerect="0,0,129,128" depth="0.04"/>
|
||||||
<attack type="Hit" range="120" duration="0.2" damage="50" stun="2" force="10" damagetype="blunt" targetforce="80"/>
|
<attack type="Hit" range="120" duration="0.2" damage="50" stun="2" force="10" damagetype="blunt" targetforce="80"/>
|
||||||
</limb>
|
</limb>
|
||||||
|
|
||||||
<!-- body -->
|
<!-- body -->
|
||||||
<limb id = "1" radius="50" type="Torso" impacttolerance="100">
|
<limb id = "1" radius="50">
|
||||||
<sprite texture="Content/Characters/Fractalguardian/fractalguardian.png" sourcerect="0,125,108,105" depth="0.03" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/Fractalguardian/fractalguardian.png" sourcerect="0,125,108,105" depth="0.03" origin="0.5,0.5"/>
|
||||||
</limb>
|
</limb>
|
||||||
|
|
||||||
<!-- body -->
|
<!-- body -->
|
||||||
<limb id = "2" radius="45" height="75" type="Torso" impacttolerance="100">
|
<limb id = "2" radius="45" height="75">
|
||||||
<sprite texture="Content/Characters/Fractalguardian/fractalguardian.png" sourcerect="0,239,90,136" depth="0.02" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/Fractalguardian/fractalguardian.png" sourcerect="0,239,90,136" depth="0.02" origin="0.5,0.5"/>
|
||||||
</limb>
|
</limb>
|
||||||
|
|
||||||
<limb id = "3" width="30" height="175" type="Tail" impacttolerance="100">
|
<limb id = "3" width="30" height="175" type="Tail">
|
||||||
<sprite texture="Content/Characters/Fractalguardian/fractalguardian.png" sourcerect="131,0,36,175" depth="0.01" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/Fractalguardian/fractalguardian.png" sourcerect="131,0,36,175" depth="0.01" origin="0.5,0.5"/>
|
||||||
</limb>
|
</limb>
|
||||||
|
|
||||||
<limb id = "4" width="30" height="239" impacttolerance="100.0">
|
<limb id = "4" width="30" height="239">
|
||||||
<sprite texture="Content/Characters/Fractalguardian/fractalguardian.png" sourcerect="183,0,53,238" depth="0.05" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/Fractalguardian/fractalguardian.png" sourcerect="183,0,53,238" depth="0.05" origin="0.5,0.5"/>
|
||||||
<attack range="150" duration="0.5" damage="30" stun="1.0" torque="-150" damagetype="slash"/>
|
<attack range="150" duration="0.5" damage="30" stun="1.0" torque="-150" damagetype="slash"/>
|
||||||
</limb>
|
</limb>
|
||||||
|
|
||||||
<limb id = "5" width="30" height="239" impacttolerance="100.0">
|
<limb id = "5" width="30" height="239">
|
||||||
<sprite texture="Content/Characters/Fractalguardian/fractalguardian.png" sourcerect="236,0,53,238" size="-1,1" depth="0.05" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/Fractalguardian/fractalguardian.png" sourcerect="236,0,53,238" size="-1,1" depth="0.05" origin="0.5,0.5"/>
|
||||||
<attack range="150" duration="0.5" damage="30" stun="1.0" torque="150" damagetype="slash"/>
|
<attack range="150" duration="0.5" damage="30" stun="1.0" torque="150" damagetype="slash"/>
|
||||||
</limb>
|
</limb>
|
||||||
|
|||||||
@@ -9,25 +9,25 @@
|
|||||||
<collider radius="80" height="30"/>
|
<collider radius="80" height="30"/>
|
||||||
|
|
||||||
<!-- head -->
|
<!-- head -->
|
||||||
<limb id = "0" radius="80" height="30" type="Head" steerforce="3.0" impacttolerance="100">
|
<limb id = "0" radius="80" height="30" type="Head" steerforce="3.0">
|
||||||
<sprite texture="Content/Characters/Fractalguardian/fractalguardian.png" sourcerect="299,0,171,208" depth="0.05"/>
|
<sprite texture="Content/Characters/Fractalguardian/fractalguardian.png" sourcerect="299,0,171,208" depth="0.05"/>
|
||||||
<attack type="Hit" range="120" duration="0.2" damage="50" stun="2" force="10" damagetype="blunt" targetforce="100"/>
|
<attack type="Hit" range="120" duration="0.2" damage="50" stun="2" force="10" damagetype="blunt" targetforce="100"/>
|
||||||
</limb>
|
</limb>
|
||||||
|
|
||||||
|
|
||||||
<limb id = "1" width="30" height="178" impacttolerance="100.0">
|
<limb id = "1" width="30" height="178">
|
||||||
<sprite texture="Content/Characters/Fractalguardian/fractalguardian.png" sourcerect="183,60,53,178" depth="0.08" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/Fractalguardian/fractalguardian.png" sourcerect="183,60,53,178" depth="0.08" origin="0.5,0.5"/>
|
||||||
</limb>
|
</limb>
|
||||||
<limb id = "2" width="30" height="175" impacttolerance="100">
|
<limb id = "2" width="30" height="175">
|
||||||
<sprite texture="Content/Characters/Fractalguardian/fractalguardian.png" sourcerect="131,0,36,175" depth="0.1" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/Fractalguardian/fractalguardian.png" sourcerect="131,0,36,175" depth="0.1" origin="0.5,0.5"/>
|
||||||
<attack range="150" duration="0.5" damage="30" stun="1.0" torque="150" damagetype="slash"/>
|
<attack range="150" duration="0.5" damage="30" stun="1.0" torque="150" damagetype="slash"/>
|
||||||
</limb>
|
</limb>
|
||||||
|
|
||||||
<limb id = "3" width="30" height="178" impacttolerance="100.0">
|
<limb id = "3" width="30" height="178">
|
||||||
<sprite texture="Content/Characters/Fractalguardian/fractalguardian.png" sourcerect="236,60,53,178" size="-1,1" depth="0.08" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/Fractalguardian/fractalguardian.png" sourcerect="236,60,53,178" size="-1,1" depth="0.08" origin="0.5,0.5"/>
|
||||||
</limb>
|
</limb>
|
||||||
|
|
||||||
<limb id = "4" width="30" height="175" impacttolerance="100">
|
<limb id = "4" width="30" height="175">
|
||||||
<sprite texture="Content/Characters/Fractalguardian/fractalguardian.png" sourcerect="131,0,36,175" depth="0.1" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/Fractalguardian/fractalguardian.png" sourcerect="131,0,36,175" depth="0.1" origin="0.5,0.5"/>
|
||||||
<attack range="150" duration="0.5" damage="30" stun="1.0" torque="-150" damagetype="slash"/>
|
<attack range="150" duration="0.5" damage="30" stun="1.0" torque="-150" damagetype="slash"/>
|
||||||
</limb>
|
</limb>
|
||||||
|
|||||||
@@ -10,21 +10,22 @@
|
|||||||
legtorque="15.0"
|
legtorque="15.0"
|
||||||
thightorque="-5.0"
|
thightorque="-5.0"
|
||||||
walkspeed="1.5"
|
walkspeed="1.5"
|
||||||
swimspeed="2.0">
|
swimspeed="2.0"
|
||||||
|
impacttolerance="7.5">
|
||||||
|
|
||||||
<collider height="100" radius="15"/>
|
<collider height="100" radius="15"/>
|
||||||
|
|
||||||
<!-- head -->
|
<!-- head -->
|
||||||
<limb id = "0" radius="13" mass = "6" type="Head" attackpriority="2" impacttolerance="5.0">
|
<limb id = "0" radius="13" mass = "6" type="Head" attackpriority="2">
|
||||||
<sprite texture="Content/Characters/Human/[GENDER]head[HEADID].png" sourcerect="1,1,37,38" depth="0.04" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/Human/[GENDER]head[HEADID].png" sourcerect="1,1,37,38" depth="0.04" origin="0.5,0.5"/>
|
||||||
<damagedsprite texture="Content/Characters/Human/damagedhead.png" sourcerect="1,1,37,38" origin="0.5,0.5"/>
|
<damagedsprite texture="Content/Characters/Human/damagedhead.png" sourcerect="1,1,37,38" origin="0.5,0.5"/>
|
||||||
</limb>
|
</limb>
|
||||||
<!-- body -->
|
<!-- body -->
|
||||||
<limb id = "1" radius="14" height="21" mass = "20" type="Torso" attackpriority="3" impacttolerance="10.0">
|
<limb id = "1" radius="14" height="21" mass = "20" type="Torso" attackpriority="3">
|
||||||
<sprite texture="Content/Characters/Human/[GENDER]torso.png" sourcerect="0,0,29,58" depth="0.05" origin="0.5,0.6"/>
|
<sprite texture="Content/Characters/Human/[GENDER]torso.png" sourcerect="0,0,29,58" depth="0.05" origin="0.5,0.6"/>
|
||||||
<damagedsprite texture="Content/Characters/Human/damagedtorso.png" sourcerect="0,0,29,58" origin="0.5,0.6"/>
|
<damagedsprite texture="Content/Characters/Human/damagedtorso.png" sourcerect="0,0,29,58" origin="0.5,0.6"/>
|
||||||
</limb>
|
</limb>
|
||||||
<limb id = "12" radius="13" mass = "20" type="Waist" impacttolerance="10.0">
|
<limb id = "12" radius="13" mass = "20" type="Waist">
|
||||||
<sprite texture="Content/Characters/Human/[GENDER]legs.png" sourcerect="0,0,32,29" depth="0.045" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/Human/[GENDER]legs.png" sourcerect="0,0,32,29" depth="0.045" origin="0.5,0.5"/>
|
||||||
<damagedsprite texture="Content/Characters/Human/damagedlegs.png" sourcerect="0,0,32,29" origin="0.5,0.5"/>
|
<damagedsprite texture="Content/Characters/Human/damagedlegs.png" sourcerect="0,0,32,29" origin="0.5,0.5"/>
|
||||||
</limb>
|
</limb>
|
||||||
|
|||||||
@@ -13,16 +13,16 @@
|
|||||||
swimspeed="2.0">
|
swimspeed="2.0">
|
||||||
|
|
||||||
<!-- head -->
|
<!-- head -->
|
||||||
<limb id = "0" radius="13" mass = "6" type="Head" attackpriority="2" impacttolerance="5.0">
|
<limb id = "0" radius="13" mass = "6" type="Head" attackpriority="2">
|
||||||
<sprite texture="Content/Characters/Human/[GENDER]head[HEADID].png" sourcerect="1,1,37,38" depth="0.04" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/Human/[GENDER]head[HEADID].png" sourcerect="1,1,37,38" depth="0.04" origin="0.5,0.5"/>
|
||||||
<damagedsprite texture="Content/Characters/Human/damagedhead.png" sourcerect="1,1,37,38" origin="0.5,0.5"/>
|
<damagedsprite texture="Content/Characters/Human/damagedhead.png" sourcerect="1,1,37,38" origin="0.5,0.5"/>
|
||||||
</limb>
|
</limb>
|
||||||
<!-- body -->
|
<!-- body -->
|
||||||
<limb id = "1" radius="14" height="21" mass = "20" type="Torso" attackpriority="3" impacttolerance="10.0">
|
<limb id = "1" radius="14" height="21" mass = "20" type="Torso" attackpriority="3">
|
||||||
<sprite texture="Content/Characters/Human/[GENDER]torso.png" sourcerect="0,0,29,58" depth="0.05" origin="0.5,0.6"/>
|
<sprite texture="Content/Characters/Human/[GENDER]torso.png" sourcerect="0,0,29,58" depth="0.05" origin="0.5,0.6"/>
|
||||||
<damagedsprite texture="Content/Characters/Human/damagedtorso.png" sourcerect="0,0,29,58" origin="0.5,0.6"/>
|
<damagedsprite texture="Content/Characters/Human/damagedtorso.png" sourcerect="0,0,29,58" origin="0.5,0.6"/>
|
||||||
</limb>
|
</limb>
|
||||||
<limb id = "12" radius="13" mass = "20" type="Waist" impacttolerance="10.0">
|
<limb id = "12" radius="13" mass = "20" type="Waist">
|
||||||
<sprite texture="Content/Characters/Human/[GENDER]legs.png" sourcerect="0,0,32,29" depth="0.045" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/Human/[GENDER]legs.png" sourcerect="0,0,32,29" depth="0.045" origin="0.5,0.5"/>
|
||||||
<damagedsprite texture="Content/Characters/Human/damagedlegs.png" sourcerect="0,0,32,29" origin="0.5,0.5"/>
|
<damagedsprite texture="Content/Characters/Human/damagedlegs.png" sourcerect="0,0,32,29" origin="0.5,0.5"/>
|
||||||
</limb>
|
</limb>
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
</limb>
|
</limb>
|
||||||
|
|
||||||
|
|
||||||
<limb id = "13" width="10" height="30" mass = "6" attackpriority="2" flip="true" impacttolerance="5.0" pullpos="0.0,25.0">
|
<limb id = "13" width="10" height="30" mass = "6" attackpriority="2" flip="true" pullpos="0.0,25.0">
|
||||||
<sprite texture="Content/Characters/Husk/DivingSuit.png" sourcerect="110,76,18,52" depth="0.5" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/Husk/DivingSuit.png" sourcerect="110,76,18,52" depth="0.5" origin="0.5,0.5"/>
|
||||||
<attack range="70" duration="0.1" bleedingdamage="3" damage="10" stun="0.5" torque="-50" damagetype="slash" targetforce="10">
|
<attack range="70" duration="0.1" bleedingdamage="3" damage="10" stun="0.5" torque="-50" damagetype="slash" targetforce="10">
|
||||||
<StatusEffect type="OnUse" target="Character" HuskInfectionState="0.01" disabledeltatime="true"/>
|
<StatusEffect type="OnUse" target="Character" HuskInfectionState="0.01" disabledeltatime="true"/>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<huskappendage>
|
<huskappendage>
|
||||||
<!-- spike/tentacle thingy -->
|
<!-- spike/tentacle thingy -->
|
||||||
<limb id = "13" width="10" height="30" mass = "6" attackpriority="2" flip="true" impacttolerance="5.0" pullpos="0.0,25.0">
|
<limb id = "13" width="10" height="30" mass = "6" attackpriority="2" flip="true" pullpos="0.0,25.0">
|
||||||
<sprite texture="Content/Characters/Husk/DivingSuit.png" sourcerect="110,76,18,52" depth="0.5" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/Husk/DivingSuit.png" sourcerect="110,76,18,52" depth="0.5" origin="0.5,0.5"/>
|
||||||
<attack range="70" duration="0.1" bleedingdamage="0.5" damage="10" stun="0.5" torque="-50" damagetype="slash" targetforce="10">
|
<attack range="70" duration="0.1" bleedingdamage="0.5" damage="10" stun="0.5" torque="-50" damagetype="slash" targetforce="10">
|
||||||
<StatusEffect type="OnUse" target="Character" HuskInfectionState="0.01"/>
|
<StatusEffect type="OnUse" target="Character" HuskInfectionState="0.01"/>
|
||||||
|
|||||||
@@ -17,13 +17,13 @@
|
|||||||
<collider height="100" radius="15"/>
|
<collider height="100" radius="15"/>
|
||||||
|
|
||||||
<!-- head -->
|
<!-- head -->
|
||||||
<limb id = "0" radius="13" mass = "6" type="Head" attackpriority="2" impacttolerance="5.0">
|
<limb id = "0" radius="13" mass = "6" type="Head" attackpriority="2">
|
||||||
<sprite texture="Content/Characters/Husk/DivingSuit.png" sourcerect="95,0,33,25" depth="0.04" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/Husk/DivingSuit.png" sourcerect="95,0,33,25" depth="0.04" origin="0.5,0.5"/>
|
||||||
</limb>
|
</limb>
|
||||||
|
|
||||||
|
|
||||||
<!-- spike/tentacle thingy -->
|
<!-- spike/tentacle thingy -->
|
||||||
<limb id = "13" width="10" height="30" mass = "6" attackpriority="2" impacttolerance="5.0" flip="true" pullpos="0.0,25.0">
|
<limb id = "13" width="10" height="30" mass = "6" attackpriority="2" flip="true" pullpos="0.0,25.0">
|
||||||
<sprite texture="Content/Characters/Husk/DivingSuit.png" sourcerect="110,76,18,52" depth="0.05" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/Husk/DivingSuit.png" sourcerect="110,76,18,52" depth="0.05" origin="0.5,0.5"/>
|
||||||
<attack range="70" duration="0.2" bleedingdamage="0.5" damage="10" stun="0.5" torque="-50" damagetype="slash" targetforce="10">
|
<attack range="70" duration="0.2" bleedingdamage="0.5" damage="10" stun="0.5" torque="-50" damagetype="slash" targetforce="10">
|
||||||
<StatusEffect type="OnUse" target="Character" HuskInfectionState="0.01" disabledeltatime="true"/>
|
<StatusEffect type="OnUse" target="Character" HuskInfectionState="0.01" disabledeltatime="true"/>
|
||||||
@@ -32,10 +32,10 @@
|
|||||||
</limb>
|
</limb>
|
||||||
|
|
||||||
<!-- body -->
|
<!-- body -->
|
||||||
<limb id = "1" radius="14" height="21" mass = "20" type="Torso" attackpriority="3" impacttolerance="10.0">
|
<limb id = "1" radius="14" height="21" mass = "20" type="Torso" attackpriority="3">
|
||||||
<sprite texture="Content/Characters/Husk/DivingSuit.png" limb="Torso" sourcerect="41,1,42,96" origin="0.5,0.55"/>
|
<sprite texture="Content/Characters/Husk/DivingSuit.png" limb="Torso" sourcerect="41,1,42,96" origin="0.5,0.55"/>
|
||||||
</limb>
|
</limb>
|
||||||
<limb id = "12" radius="13" mass = "20" type="Waist" impacttolerance="10.0">
|
<limb id = "12" radius="13" mass = "20" type="Waist">
|
||||||
<sprite texture="Content/Characters/Husk/DivingSuit.png" sourcerect="0,0,1,1" depth="0.045" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/Husk/DivingSuit.png" sourcerect="0,0,1,1" depth="0.045" origin="0.5,0.5"/>
|
||||||
</limb>
|
</limb>
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<collider radius ="230"/>
|
<collider radius ="230"/>
|
||||||
|
|
||||||
<!-- head -->
|
<!-- head -->
|
||||||
<limb id = "0" radius="230" height="500" type="Head" steerforce="1.0" flip="true" armorsector="0.0,180.0" armorvalue="100.0" impacttolerance="100">
|
<limb id = "0" radius="230" height="500" type="Head" steerforce="1.0" flip="true" armorsector="0.0,180.0" armorvalue="100.0">
|
||||||
<sprite texture="Content/Characters/Moloch/moloch.png" sourcerect="0,0,628,1024" depth="0.02" origin ="0.4,0.5"/>
|
<sprite texture="Content/Characters/Moloch/moloch.png" sourcerect="0,0,628,1024" depth="0.02" origin ="0.4,0.5"/>
|
||||||
<attack range="700" duration="0.05" damage="200" stun="5" force="20" damagetype="blunt" targetforce="100"/>
|
<attack range="700" duration="0.05" damage="200" stun="5" force="20" damagetype="blunt" targetforce="100"/>
|
||||||
</limb>
|
</limb>
|
||||||
|
|||||||
@@ -10,13 +10,13 @@
|
|||||||
<collider radius="50" height="320"/>
|
<collider radius="50" height="320"/>
|
||||||
|
|
||||||
<!-- head -->
|
<!-- head -->
|
||||||
<limb id = "0" radius="12" height="100" type="Head" steerforce="1.0" impacttolerance="50.0">
|
<limb id = "0" radius="12" height="100" type="Head" steerforce="1.0">
|
||||||
<sprite texture="Content/Characters/TigerThresher/tigerthresher.png" sourcerect="371,15,66,136" depth="0.02" origin ="0.5,0.5"/>
|
<sprite texture="Content/Characters/TigerThresher/tigerthresher.png" sourcerect="371,15,66,136" depth="0.02" origin ="0.5,0.5"/>
|
||||||
<damagedsprite texture="Content/Characters/TigerThresher/damagedtigerthresher.png" sourcerect="371,15,66,136" origin ="0.5,0.5"/>
|
<damagedsprite texture="Content/Characters/TigerThresher/damagedtigerthresher.png" sourcerect="371,15,66,136" origin ="0.5,0.5"/>
|
||||||
</limb>
|
</limb>
|
||||||
|
|
||||||
<!-- lower yaw -->
|
<!-- lower yaw -->
|
||||||
<limb id = "1" width="16" height="103" impacttolerance="50.0">
|
<limb id = "1" width="16" height="103">
|
||||||
<sprite texture="Content/Characters/TigerThresher/tigerthresher.png" sourcerect="391,169,28,110" depth="0.025" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/TigerThresher/tigerthresher.png" sourcerect="391,169,28,110" depth="0.025" origin="0.5,0.5"/>
|
||||||
<damagedsprite texture="Content/Characters/TigerThresher/damagedtigerthresher.png" sourcerect="391,169,28,110" origin="0.5,0.5"/>
|
<damagedsprite texture="Content/Characters/TigerThresher/damagedtigerthresher.png" sourcerect="391,169,28,110" origin="0.5,0.5"/>
|
||||||
<attack range="200" duration="0.5" damage="150" bleedingdamage="10" structuredamage="200" damagetype="slash" torque="80" targetforce="-50"/>
|
<attack range="200" duration="0.5" damage="150" bleedingdamage="10" structuredamage="200" damagetype="slash" torque="80" targetforce="-50"/>
|
||||||
|
|||||||
@@ -118,7 +118,7 @@
|
|||||||
<Item name="Fulgurium Bar"/>
|
<Item name="Fulgurium Bar"/>
|
||||||
</Deconstruct>
|
</Deconstruct>
|
||||||
|
|
||||||
<Sprite texture ="alientools.png" depth="0.5" sourcerect="0,0,95,50" origin="0.5,0.4"/>
|
<Sprite texture ="alientools.png" depth="0.55" sourcerect="0,0,95,50" origin="0.5,0.4"/>
|
||||||
|
|
||||||
<Body width="85" height="40" density="15"/>
|
<Body width="85" height="40" density="15"/>
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<Item name="Steel Bar"/>
|
<Item name="Steel Bar"/>
|
||||||
</Deconstruct>
|
</Deconstruct>
|
||||||
|
|
||||||
<Sprite texture ="Content/Items/Tools/tools.png" sourcerect="39,31,12,33" depth="0.5"/>
|
<Sprite texture ="Content/Items/Tools/tools.png" sourcerect="39,31,12,33" depth="0.55"/>
|
||||||
|
|
||||||
<Body width="12" height="33" density="5"/>
|
<Body width="12" height="33" density="5"/>
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
<Item name="Polycarbonate Bar"/>
|
<Item name="Polycarbonate Bar"/>
|
||||||
</Deconstruct>
|
</Deconstruct>
|
||||||
|
|
||||||
<Sprite texture ="DivingMask.png" depth="0.5"/>
|
<Sprite texture ="DivingMask.png" depth="0.55"/>
|
||||||
|
|
||||||
<Body radius="18" density="15"/>
|
<Body radius="18" density="15"/>
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@
|
|||||||
<Item name="Polycarbonate Bar"/>
|
<Item name="Polycarbonate Bar"/>
|
||||||
</Deconstruct>
|
</Deconstruct>
|
||||||
|
|
||||||
<Sprite texture ="DivingSuit.png" depth="0.5" sourcerect="22,98,59,32" origin="0.6,0.66"/>
|
<Sprite texture ="DivingSuit.png" depth="0.55" sourcerect="22,98,59,32" origin="0.6,0.66"/>
|
||||||
|
|
||||||
<Body width="55" height="30" density="15"/>
|
<Body width="55" height="30" density="15"/>
|
||||||
|
|
||||||
|
|||||||
@@ -102,6 +102,10 @@
|
|||||||
<fabricableitem name="Compound N" requireditems="Aluminium, Potassium, Sulphuric Acid" requiredtime="20">
|
<fabricableitem name="Compound N" requireditems="Aluminium, Potassium, Sulphuric Acid" requiredtime="20">
|
||||||
<RequiredSkill name="Medical" level="60"/>
|
<RequiredSkill name="Medical" level="60"/>
|
||||||
</fabricableitem>
|
</fabricableitem>
|
||||||
|
<fabricableitem name="Volatile Compound N" requireditems="Compound N, Flash Powder" requiredtime="20">
|
||||||
|
<RequiredSkill name="Medical" level="40"/>
|
||||||
|
</fabricableitem>
|
||||||
|
|
||||||
|
|
||||||
<fabricableitem name="Corrigodone" requireditems="Stabilozine, Chloral Hydrate" requiredtime="20">
|
<fabricableitem name="Corrigodone" requireditems="Stabilozine, Chloral Hydrate" requiredtime="20">
|
||||||
<RequiredSkill name="Medical" level="50"/>
|
<RequiredSkill name="Medical" level="50"/>
|
||||||
@@ -135,6 +139,10 @@
|
|||||||
<fabricableitem name="Calyxanide" requireditems="Velonaceps Calyx Eggs, Corrigodone" requiredtime="30">
|
<fabricableitem name="Calyxanide" requireditems="Velonaceps Calyx Eggs, Corrigodone" requiredtime="30">
|
||||||
<RequiredSkill name="Medical" level="60"/>
|
<RequiredSkill name="Medical" level="60"/>
|
||||||
</fabricableitem>
|
</fabricableitem>
|
||||||
|
|
||||||
|
<fabricableitem name="Liquid Oxygenite" requireditems="Stabilozine, Oxygenite Shard" requiredtime="30">
|
||||||
|
<RequiredSkill name="Medical" level="60"/>
|
||||||
|
</fabricableitem>
|
||||||
</Fabricator>
|
</Fabricator>
|
||||||
|
|
||||||
<ConnectionPanel selectkey="Action" canbeselected = "true">
|
<ConnectionPanel selectkey="Action" canbeselected = "true">
|
||||||
|
|||||||
@@ -438,6 +438,25 @@
|
|||||||
</Holdable>
|
</Holdable>
|
||||||
</Item>
|
</Item>
|
||||||
|
|
||||||
|
<Item
|
||||||
|
name="Liquid Oxygenite"
|
||||||
|
category="Material"
|
||||||
|
spritecolor="0.6,0.8,1.0,1.0"
|
||||||
|
Tags="smallitem,chem,medical"
|
||||||
|
pickdistance="150"
|
||||||
|
canuseonself="true"
|
||||||
|
description="A mildy toxic solution that slowly releases oxygen into the bloodstream when injected.">
|
||||||
|
|
||||||
|
<Sprite texture ="med.png" sourcerect="24,16,8,16" depth="0.6" />
|
||||||
|
|
||||||
|
<Body width="8" height="16" density="20"/>
|
||||||
|
|
||||||
|
<Holdable slots="Any,RightHand,LeftHand">
|
||||||
|
<StatusEffect type="OnUse" target="Character" Health="-0.1" Oxygen="10.0" duration="60">
|
||||||
|
<RequiredItem name="Medical Syringe" type="Container"/>
|
||||||
|
</StatusEffect>
|
||||||
|
</Holdable>
|
||||||
|
</Item>
|
||||||
</Items>
|
</Items>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
price="100"
|
price="100"
|
||||||
description="One of the most crucial tools on board the submarine. Also works underwater.">
|
description="One of the most crucial tools on board the submarine. Also works underwater.">
|
||||||
|
|
||||||
<Sprite texture ="tools.png" sourcerect="0,17,41,17" depth="0.5"/>
|
<Sprite texture ="tools.png" sourcerect="0,17,41,17" depth="0.55"/>
|
||||||
|
|
||||||
<!-- the item takes 10 seconds to break down in a deconstructor and turns into a polycarbonate bar and a steel bar -->
|
<!-- the item takes 10 seconds to break down in a deconstructor and turns into a polycarbonate bar and a steel bar -->
|
||||||
<Deconstruct time="10">
|
<Deconstruct time="10">
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
<Item name="Aluminium"/>
|
<Item name="Aluminium"/>
|
||||||
</Deconstruct>
|
</Deconstruct>
|
||||||
|
|
||||||
<Sprite texture ="tools.png" sourcerect="0,0,41,16" depth="0.5"/>
|
<Sprite texture ="tools.png" sourcerect="0,0,41,16" depth="0.55"/>
|
||||||
|
|
||||||
<Body width="41" height="16" density="40"/>
|
<Body width="41" height="16" density="40"/>
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
<Item name="Steel Bar"/>
|
<Item name="Steel Bar"/>
|
||||||
</Deconstruct>
|
</Deconstruct>
|
||||||
|
|
||||||
<Sprite texture ="tools.png" sourcerect="52,31,12,33" depth="0.5"/>
|
<Sprite texture ="tools.png" sourcerect="52,31,12,33" depth="0.55"/>
|
||||||
|
|
||||||
<Body width="12" height="33" density="5"/>
|
<Body width="12" height="33" density="5"/>
|
||||||
|
|
||||||
@@ -136,7 +136,7 @@
|
|||||||
<Item name="Steel Bar"/>
|
<Item name="Steel Bar"/>
|
||||||
</Deconstruct>
|
</Deconstruct>
|
||||||
|
|
||||||
<Sprite texture ="extinguisher.png" depth="0.5" sourcerect="0,0,34,64" origin="0.4,0.5"/>
|
<Sprite texture ="extinguisher.png" depth="0.55" sourcerect="0,0,34,64" origin="0.4,0.5"/>
|
||||||
|
|
||||||
<Body radius="10" height="45" density="5"/>
|
<Body radius="10" height="45" density="5"/>
|
||||||
|
|
||||||
@@ -159,7 +159,7 @@
|
|||||||
pickdistance="200"
|
pickdistance="200"
|
||||||
price="10">
|
price="10">
|
||||||
|
|
||||||
<Sprite texture ="tools.png" sourcerect="0,58,31,6" depth="0.5"/>
|
<Sprite texture ="tools.png" sourcerect="0,58,31,6" depth="0.55"/>
|
||||||
|
|
||||||
<Body width="31" height="6" density="50"/>
|
<Body width="31" height="6" density="50"/>
|
||||||
|
|
||||||
@@ -174,7 +174,7 @@
|
|||||||
pickdistance="200"
|
pickdistance="200"
|
||||||
price="10">
|
price="10">
|
||||||
|
|
||||||
<Sprite texture ="tools.png" sourcerect="0,50,26,7" depth="0.5"/>
|
<Sprite texture ="tools.png" sourcerect="0,50,26,7" depth="0.55"/>
|
||||||
|
|
||||||
<Body width="30" height="7" density="50"/>
|
<Body width="30" height="7" density="50"/>
|
||||||
|
|
||||||
@@ -191,7 +191,7 @@
|
|||||||
pickdistance="200"
|
pickdistance="200"
|
||||||
price="10">
|
price="10">
|
||||||
|
|
||||||
<Sprite texture ="tools.png" sourcerect="42,0,22,9" depth="0.5"/>
|
<Sprite texture ="tools.png" sourcerect="42,0,22,9" depth="0.55"/>
|
||||||
|
|
||||||
<Body width="31" height="6" density="40"/>
|
<Body width="31" height="6" density="40"/>
|
||||||
|
|
||||||
@@ -225,7 +225,7 @@
|
|||||||
<Item name="Polycarbonate Bar"/>
|
<Item name="Polycarbonate Bar"/>
|
||||||
</Deconstruct>
|
</Deconstruct>
|
||||||
|
|
||||||
<Sprite texture ="tools.png" sourcerect="0,36,27,11" depth="0.5"/>
|
<Sprite texture ="tools.png" sourcerect="0,36,27,11" depth="0.55"/>
|
||||||
|
|
||||||
<Body width="27" height="10" density="15"/>
|
<Body width="27" height="10" density="15"/>
|
||||||
|
|
||||||
@@ -259,7 +259,7 @@
|
|||||||
</Deconstruct>
|
</Deconstruct>
|
||||||
|
|
||||||
|
|
||||||
<Sprite texture ="tools.png" sourcerect="0,38,21,7" depth="0.5"/>
|
<Sprite texture ="tools.png" sourcerect="0,38,21,7" depth="0.55"/>
|
||||||
|
|
||||||
<Body width="21" height="7" density="12"/>
|
<Body width="21" height="7" density="12"/>
|
||||||
|
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
<Item name="Uranium Bar"/>
|
<Item name="Uranium Bar"/>
|
||||||
</Deconstruct>
|
</Deconstruct>
|
||||||
|
|
||||||
<Sprite texture="railgunetc.png" sourcerect="187,210,68,47" depth="0.5"/>
|
<Sprite texture="railgunetc.png" sourcerect="187,210,68,47" depth="0.55"/>
|
||||||
|
|
||||||
<Body width="68" height="47" density="30"/>
|
<Body width="68" height="47" density="30"/>
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
<Item name="Polycarbonate Bar"/>
|
<Item name="Polycarbonate Bar"/>
|
||||||
</Deconstruct>
|
</Deconstruct>
|
||||||
|
|
||||||
<Sprite texture="weapons.png" sourcerect="0,25,98,25" depth="0.5"/>
|
<Sprite texture="weapons.png" sourcerect="0,25,98,25" depth="0.55"/>
|
||||||
|
|
||||||
<Body width="90" height="30" density="50"/>
|
<Body width="90" height="30" density="50"/>
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
price="200"
|
price="200"
|
||||||
tags="smallitem,weapon">
|
tags="smallitem,weapon">
|
||||||
|
|
||||||
<Sprite texture="weapons.png" sourcerect="98,0,11,24" depth="0.5"/>
|
<Sprite texture="weapons.png" sourcerect="98,0,11,24" depth="0.55"/>
|
||||||
|
|
||||||
<Body width="11" height="24" density="30"/>
|
<Body width="11" height="24" density="30"/>
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
pickdistance="200"
|
pickdistance="200"
|
||||||
tags="smallitem,weapon">
|
tags="smallitem,weapon">
|
||||||
|
|
||||||
<Sprite texture="weapons.png" sourcerect="98,0,11,24" depth="0.5"/>
|
<Sprite texture="weapons.png" sourcerect="98,0,11,24" depth="0.55"/>
|
||||||
|
|
||||||
<Body width="11" height="24" density="30"/>
|
<Body width="11" height="24" density="30"/>
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
<Item name="Polycarbonate Bar"/>
|
<Item name="Polycarbonate Bar"/>
|
||||||
</Deconstruct>
|
</Deconstruct>
|
||||||
|
|
||||||
<Sprite texture="weapons.png" sourcerect="21,0,77,22" depth="0.5"/>
|
<Sprite texture="weapons.png" sourcerect="21,0,77,22" depth="0.55"/>
|
||||||
|
|
||||||
<Body width="90" height="30" density="30"/>
|
<Body width="90" height="30" density="30"/>
|
||||||
|
|
||||||
@@ -174,7 +174,7 @@
|
|||||||
tags="weapon,smallitem"
|
tags="weapon,smallitem"
|
||||||
description="HONK">
|
description="HONK">
|
||||||
|
|
||||||
<Sprite texture="Content/Items/Jobgear/clownshirt.png" sourcerect="32,50,32,14" depth="0.5"/>
|
<Sprite texture="Content/Items/Jobgear/clownshirt.png" sourcerect="32,50,32,14" depth="0.55"/>
|
||||||
|
|
||||||
<Body width="30" height="10" density="10"/>
|
<Body width="30" height="10" density="10"/>
|
||||||
|
|
||||||
|
|||||||
@@ -185,6 +185,11 @@ namespace Barotrauma
|
|||||||
new Vector2(pathSteering.CurrentPath.Nodes[i].DrawPosition.X, -pathSteering.CurrentPath.Nodes[i].DrawPosition.Y),
|
new Vector2(pathSteering.CurrentPath.Nodes[i].DrawPosition.X, -pathSteering.CurrentPath.Nodes[i].DrawPosition.Y),
|
||||||
new Vector2(pathSteering.CurrentPath.Nodes[i - 1].DrawPosition.X, -pathSteering.CurrentPath.Nodes[i - 1].DrawPosition.Y),
|
new Vector2(pathSteering.CurrentPath.Nodes[i - 1].DrawPosition.X, -pathSteering.CurrentPath.Nodes[i - 1].DrawPosition.Y),
|
||||||
Color.LightGreen);
|
Color.LightGreen);
|
||||||
|
|
||||||
|
spriteBatch.DrawString(GUI.SmallFont,
|
||||||
|
pathSteering.CurrentPath.Nodes[i].ID.ToString(),
|
||||||
|
new Vector2(pathSteering.CurrentPath.Nodes[i].DrawPosition.X, -pathSteering.CurrentPath.Nodes[i].DrawPosition.Y - 10),
|
||||||
|
Color.LightGreen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ namespace Barotrauma
|
|||||||
diff.Y = 0.0f;
|
diff.Y = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (diff == Vector2.Zero) return -host.Steering;
|
if (diff.Length() < 0.01) return -host.Steering;
|
||||||
|
|
||||||
return Vector2.Normalize(diff) * speed;
|
return Vector2.Normalize(diff) * speed;
|
||||||
}
|
}
|
||||||
@@ -258,6 +258,12 @@ namespace Barotrauma
|
|||||||
|
|
||||||
if (closestButton != null)
|
if (closestButton != null)
|
||||||
{
|
{
|
||||||
|
if (!closestButton.HasRequiredItems(character, false) && shouldBeOpen)
|
||||||
|
{
|
||||||
|
currentPath.Unreachable = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
closestButton.Item.Pick(character, false, true);
|
closestButton.Item.Pick(character, false, true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -172,7 +172,12 @@ namespace Barotrauma
|
|||||||
start, node.Waypoint.SimPosition, null,
|
start, node.Waypoint.SimPosition, null,
|
||||||
Physics.CollisionWall | Physics.CollisionLevel | Physics.CollisionStairs | Physics.CollisionPlatform);
|
Physics.CollisionWall | Physics.CollisionLevel | Physics.CollisionStairs | Physics.CollisionPlatform);
|
||||||
|
|
||||||
if (body != null && body.UserData is Structure && !((Structure)body.UserData).IsPlatform) continue;
|
if (body != null)
|
||||||
|
{
|
||||||
|
if (body.UserData is Structure && !((Structure)body.UserData).IsPlatform) continue;
|
||||||
|
if (body.UserData is Item && body.FixtureList[0].CollisionCategories.HasFlag(Physics.CollisionWall)) continue;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
closestDist = dist;
|
closestDist = dist;
|
||||||
|
|||||||
@@ -14,9 +14,6 @@ namespace Barotrauma
|
|||||||
|
|
||||||
protected float walkSpeed, swimSpeed;
|
protected float walkSpeed, swimSpeed;
|
||||||
|
|
||||||
//how large impacts the Character can take before being stunned
|
|
||||||
//protected float impactTolerance;
|
|
||||||
|
|
||||||
protected float stunTimer;
|
protected float stunTimer;
|
||||||
|
|
||||||
protected float walkPos;
|
protected float walkPos;
|
||||||
@@ -47,14 +44,7 @@ namespace Barotrauma
|
|||||||
walkSpeed = ToolBox.GetAttributeFloat(element, "walkspeed", 1.0f);
|
walkSpeed = ToolBox.GetAttributeFloat(element, "walkspeed", 1.0f);
|
||||||
swimSpeed = ToolBox.GetAttributeFloat(element, "swimspeed", 1.0f);
|
swimSpeed = ToolBox.GetAttributeFloat(element, "swimspeed", 1.0f);
|
||||||
|
|
||||||
//stepOffset = ToolBox.GetAttributeVector2(element, "stepoffset", Vector2.One);
|
|
||||||
//stepOffset = ConvertUnits.ToSimUnits(stepOffset);
|
|
||||||
|
|
||||||
//impactTolerance = ToolBox.GetAttributeFloat(element, "impacttolerance", 10.0f);
|
|
||||||
|
|
||||||
legTorque = ToolBox.GetAttributeFloat(element, "legtorque", 0.0f);
|
legTorque = ToolBox.GetAttributeFloat(element, "legtorque", 0.0f);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void UpdateAnim(float deltaTime) { }
|
public virtual void UpdateAnim(float deltaTime) { }
|
||||||
|
|||||||
@@ -224,6 +224,12 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public float ImpactTolerance
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
private set;
|
||||||
|
}
|
||||||
|
|
||||||
public float StrongestImpact
|
public float StrongestImpact
|
||||||
{
|
{
|
||||||
get { return strongestImpact; }
|
get { return strongestImpact; }
|
||||||
@@ -257,6 +263,8 @@ namespace Barotrauma
|
|||||||
torsoPosition = ConvertUnits.ToSimUnits(torsoPosition);
|
torsoPosition = ConvertUnits.ToSimUnits(torsoPosition);
|
||||||
torsoAngle = MathHelper.ToRadians(ToolBox.GetAttributeFloat(element, "torsoangle", 0.0f));
|
torsoAngle = MathHelper.ToRadians(ToolBox.GetAttributeFloat(element, "torsoangle", 0.0f));
|
||||||
|
|
||||||
|
ImpactTolerance = ToolBox.GetAttributeFloat(element, "impacttolerance", 50.0f);
|
||||||
|
|
||||||
CanEnterSubmarine = ToolBox.GetAttributeBool(element, "canentersubmarine", true);
|
CanEnterSubmarine = ToolBox.GetAttributeBool(element, "canentersubmarine", true);
|
||||||
|
|
||||||
foreach (XElement subElement in element.Elements())
|
foreach (XElement subElement in element.Elements())
|
||||||
@@ -471,11 +479,11 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
if (!character.IsRemotePlayer || GameMain.Server != null)
|
if (!character.IsRemotePlayer || GameMain.Server != null)
|
||||||
{
|
{
|
||||||
if (impact > 8.0f)
|
if (impact > ImpactTolerance)
|
||||||
{
|
{
|
||||||
character.AddDamage(CauseOfDeath.Damage, impact - 8.0f, null);
|
character.AddDamage(CauseOfDeath.Damage, impact - ImpactTolerance, null);
|
||||||
SoundPlayer.PlayDamageSound(DamageSoundType.LimbBlunt, strongestImpact, collider);
|
SoundPlayer.PlayDamageSound(DamageSoundType.LimbBlunt, strongestImpact, collider);
|
||||||
strongestImpact = Math.Max(strongestImpact, impact - 8.0f);
|
strongestImpact = Math.Max(strongestImpact, impact - ImpactTolerance);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -852,7 +860,6 @@ namespace Barotrauma
|
|||||||
//limb.body.ApplyLinearImpulse(impulse);
|
//limb.body.ApplyLinearImpulse(impulse);
|
||||||
int n = (int)((limb.Position.X - limbHull.Rect.X) / Hull.WaveWidth);
|
int n = (int)((limb.Position.X - limbHull.Rect.X) / Hull.WaveWidth);
|
||||||
limbHull.WaveVel[n] = Math.Min(impulse.Y * 1.0f, 5.0f);
|
limbHull.WaveVel[n] = Math.Min(impulse.Y * 1.0f, 5.0f);
|
||||||
StrongestImpact = ((impulse.Length() * 0.5f) - limb.impactTolerance);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -213,8 +213,6 @@ namespace Barotrauma
|
|||||||
body.CollidesWith = Physics.CollisionAll & ~Physics.CollisionCharacter & ~Physics.CollisionItem;
|
body.CollidesWith = Physics.CollisionAll & ~Physics.CollisionCharacter & ~Physics.CollisionItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
impactTolerance = ToolBox.GetAttributeFloat(element, "impacttolerance", 10.0f);
|
|
||||||
|
|
||||||
body.UserData = this;
|
body.UserData = this;
|
||||||
|
|
||||||
refJointIndex = -1;
|
refJointIndex = -1;
|
||||||
|
|||||||
@@ -57,11 +57,11 @@ namespace Barotrauma
|
|||||||
ToolBox.GetAttributeString(element, "description2", "")
|
ToolBox.GetAttributeString(element, "description2", "")
|
||||||
};
|
};
|
||||||
|
|
||||||
for (int i = 0; i < descriptions.Length; i++ )
|
for (int i = 0; i < descriptions.Length; i++)
|
||||||
{
|
{
|
||||||
for (int n = 0; n < 2;n++ )
|
for (int n = 0; n < 2; n++)
|
||||||
{
|
{
|
||||||
descriptions[i] = descriptions[i].Replace("[location" + (n + 1) + "]", Locations[n]);
|
descriptions[i] = descriptions[i].Replace("[location" + (n + 1) + "]", locations[n].Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,9 +137,6 @@ namespace Barotrauma
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Items.Components.Radar.StartMarker = Locations[0];
|
|
||||||
Items.Components.Radar.EndMarker = Locations[1];
|
|
||||||
|
|
||||||
subs = new Submarine[] { Submarine.MainSubs[0], Submarine.MainSubs[1] };
|
subs = new Submarine[] { Submarine.MainSubs[0], Submarine.MainSubs[1] };
|
||||||
subs[1].SetPosition(Level.Loaded.EndPosition - new Vector2(0.0f, 2000.0f));
|
subs[1].SetPosition(Level.Loaded.EndPosition - new Vector2(0.0f, 2000.0f));
|
||||||
subs[1].FlipX();
|
subs[1].FlipX();
|
||||||
|
|||||||
@@ -27,8 +27,6 @@ namespace Barotrauma
|
|||||||
|
|
||||||
private int reward;
|
private int reward;
|
||||||
|
|
||||||
protected string[] Locations = new string[2];
|
|
||||||
|
|
||||||
public string Name
|
public string Name
|
||||||
{
|
{
|
||||||
get { return name; }
|
get { return name; }
|
||||||
@@ -47,6 +45,7 @@ namespace Barotrauma
|
|||||||
public bool Completed
|
public bool Completed
|
||||||
{
|
{
|
||||||
get { return completed; }
|
get { return completed; }
|
||||||
|
set { completed = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual string RadarLabel
|
public virtual string RadarLabel
|
||||||
@@ -112,10 +111,8 @@ namespace Barotrauma
|
|||||||
messages.Add(ToolBox.GetAttributeString(subElement, "text", ""));
|
messages.Add(ToolBox.GetAttributeString(subElement, "text", ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for (int n = 0; n < 2; n++)
|
for (int n = 0; n < 2; n++)
|
||||||
{
|
{
|
||||||
Locations[n] = locations[n].Name;
|
|
||||||
description = description.Replace("[location" + (n + 1) + "]", locations[n].Name);
|
description = description.Replace("[location" + (n + 1) + "]", locations[n].Name);
|
||||||
|
|
||||||
successMessage = successMessage.Replace("[location" + (n + 1) + "]", locations[n].Name);
|
successMessage = successMessage.Replace("[location" + (n + 1) + "]", locations[n].Name);
|
||||||
@@ -227,7 +224,12 @@ namespace Barotrauma
|
|||||||
|
|
||||||
public virtual void Update(float deltaTime) { }
|
public virtual void Update(float deltaTime) { }
|
||||||
|
|
||||||
public virtual bool AssignTeamIDs(List<Networking.Client> clients,out int hostTeam) { clients.ForEach(client => { client.TeamID = 1; }); hostTeam = 1; return false; }
|
public virtual bool AssignTeamIDs(List<Networking.Client> clients, out int hostTeam)
|
||||||
|
{
|
||||||
|
clients.ForEach(c => c.TeamID = 1);
|
||||||
|
hostTeam = 1;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public void ShowMessage(int index)
|
public void ShowMessage(int index)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,15 +17,9 @@ namespace Barotrauma
|
|||||||
public MissionMode(GameModePreset preset, object param)
|
public MissionMode(GameModePreset preset, object param)
|
||||||
: base(preset, param)
|
: base(preset, param)
|
||||||
{
|
{
|
||||||
Location[] locations = new Location[2];
|
Location[] locations = { GameMain.GameSession.StartLocation, GameMain.GameSession.EndLocation };
|
||||||
|
|
||||||
MTRandom rand = new MTRandom(ToolBox.StringToInt(GameMain.NetLobbyScreen.LevelSeed));
|
MTRandom rand = new MTRandom(ToolBox.StringToInt(GameMain.NetLobbyScreen.LevelSeed));
|
||||||
|
|
||||||
for (int i = 0; i < 2; i++)
|
|
||||||
{
|
|
||||||
locations[i] = Location.CreateRandom(new Vector2((float)rand.NextDouble() * 10000.0f, (float)rand.NextDouble() * 10000.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
mission = Mission.LoadRandom(locations, rand, param as string);
|
mission = Mission.LoadRandom(locations, rand, param as string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -197,13 +197,13 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
else if (leavingSub.AtEndPosition)
|
else if (leavingSub.AtEndPosition)
|
||||||
{
|
{
|
||||||
endShiftButton.Text = "Enter " + Map.SelectedLocation.Name;
|
endShiftButton.Text = ToolBox.LimitString("Enter " + Map.SelectedLocation.Name, endShiftButton.Font, endShiftButton.Rect.Width - 5);
|
||||||
endShiftButton.UserData = leavingSub;
|
endShiftButton.UserData = leavingSub;
|
||||||
endShiftButton.Visible = true;
|
endShiftButton.Visible = true;
|
||||||
}
|
}
|
||||||
else if (leavingSub.AtStartPosition)
|
else if (leavingSub.AtStartPosition)
|
||||||
{
|
{
|
||||||
endShiftButton.Text = "Enter " + Map.CurrentLocation.Name;
|
endShiftButton.Text = ToolBox.LimitString("Enter " + Map.CurrentLocation.Name, endShiftButton.Font, endShiftButton.Rect.Width - 5);
|
||||||
endShiftButton.UserData = leavingSub;
|
endShiftButton.UserData = leavingSub;
|
||||||
endShiftButton.Visible = true;
|
endShiftButton.Visible = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ namespace Barotrauma
|
|||||||
|
|
||||||
public readonly GameMode gameMode;
|
public readonly GameMode gameMode;
|
||||||
|
|
||||||
|
//two locations used as the start and end in the MP mode
|
||||||
|
private Location[] dummyLocations;
|
||||||
|
|
||||||
private InfoFrameTab selectedTab;
|
private InfoFrameTab selectedTab;
|
||||||
private GUIButton infoButton;
|
private GUIButton infoButton;
|
||||||
private GUIFrame infoFrame;
|
private GUIFrame infoFrame;
|
||||||
@@ -51,6 +54,36 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Location StartLocation
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (Map != null) return Map.CurrentLocation;
|
||||||
|
|
||||||
|
if (dummyLocations==null)
|
||||||
|
{
|
||||||
|
CreateDummyLocations();
|
||||||
|
}
|
||||||
|
|
||||||
|
return dummyLocations[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Location EndLocation
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (Map != null) return Map.SelectedLocation;
|
||||||
|
|
||||||
|
if (dummyLocations == null)
|
||||||
|
{
|
||||||
|
CreateDummyLocations();
|
||||||
|
}
|
||||||
|
|
||||||
|
return dummyLocations[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public Submarine Submarine
|
public Submarine Submarine
|
||||||
{
|
{
|
||||||
get { return submarine; }
|
get { return submarine; }
|
||||||
@@ -81,12 +114,10 @@ namespace Barotrauma
|
|||||||
|
|
||||||
this.saveFile = saveFile;
|
this.saveFile = saveFile;
|
||||||
|
|
||||||
//guiRoot = new GUIFrame(new Rectangle(0,0,GameMain.GraphicsWidth,GameMain.GraphicsWidth), Color.Transparent);
|
|
||||||
|
|
||||||
infoButton = new GUIButton(new Rectangle(10, 10, 100, 20), "Info", GUI.Style, null);
|
infoButton = new GUIButton(new Rectangle(10, 10, 100, 20), "Info", GUI.Style, null);
|
||||||
infoButton.OnClicked = ToggleInfoFrame;
|
infoButton.OnClicked = ToggleInfoFrame;
|
||||||
|
|
||||||
if (gameModePreset!=null) gameMode = gameModePreset.Instantiate(missionType);
|
if (gameModePreset != null) gameMode = gameModePreset.Instantiate(missionType);
|
||||||
this.submarine = submarine;
|
this.submarine = submarine;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,6 +140,17 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void CreateDummyLocations()
|
||||||
|
{
|
||||||
|
dummyLocations = new Location[2];
|
||||||
|
|
||||||
|
MTRandom rand = new MTRandom(ToolBox.StringToInt(GameMain.NetLobbyScreen.LevelSeed));
|
||||||
|
for (int i = 0; i < 2; i++)
|
||||||
|
{
|
||||||
|
dummyLocations[i] = Location.CreateRandom(new Vector2((float)rand.NextDouble() * 10000.0f, (float)rand.NextDouble() * 10000.0f));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void StartShift(string levelSeed, bool loadSecondSub = true)
|
public void StartShift(string levelSeed, bool loadSecondSub = true)
|
||||||
{
|
{
|
||||||
Level level = Level.CreateRandom(levelSeed);
|
Level level = Level.CreateRandom(levelSeed);
|
||||||
@@ -166,8 +208,6 @@ namespace Barotrauma
|
|||||||
|
|
||||||
if (gameMode!=null) gameMode.Start();
|
if (gameMode!=null) gameMode.Start();
|
||||||
|
|
||||||
Items.Components.Radar.StartMarker = "Start";
|
|
||||||
Items.Components.Radar.EndMarker = "End";
|
|
||||||
if (gameMode.Mission != null) Mission.Start(Level.Loaded);
|
if (gameMode.Mission != null) Mission.Start(Level.Loaded);
|
||||||
|
|
||||||
TaskManager.StartShift(level);
|
TaskManager.StartShift(level);
|
||||||
|
|||||||
@@ -58,10 +58,9 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Submarine.MainSub != null) text = text.Replace("[sub]", Submarine.MainSub.Name);
|
if (Submarine.MainSub != null) text = text.Replace("[sub]", Submarine.MainSub.Name);
|
||||||
if (GameMain.GameSession != null && GameMain.GameSession.Map != null)
|
if (GameMain.GameSession != null && GameMain.GameSession.StartLocation != null)
|
||||||
{
|
{
|
||||||
if (GameMain.GameSession.Map.CurrentLocation!=null)
|
text = text.Replace("[location]", GameMain.GameSession.StartLocation.Name);
|
||||||
text = text.Replace("[location]", GameMain.GameSession.Map.CurrentLocation.Name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return text;
|
return text;
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
this.gameSession = gameSession;
|
this.gameSession = gameSession;
|
||||||
|
|
||||||
startLocation = gameSession.Map==null ? null : gameSession.Map.CurrentLocation;
|
startLocation = gameSession.StartLocation;
|
||||||
endLocation = gameSession.Map==null ? null : gameSession.Map.SelectedLocation;
|
endLocation = gameSession.EndLocation;
|
||||||
|
|
||||||
selectedMission = gameSession.Mission;
|
selectedMission = gameSession.Mission;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ namespace Barotrauma.Items.Components
|
|||||||
public Deconstructor(Item item, XElement element)
|
public Deconstructor(Item item, XElement element)
|
||||||
: base(item, element)
|
: base(item, element)
|
||||||
{
|
{
|
||||||
progressBar = new GUIProgressBar(new Rectangle(0,0,200,20), Color.Green, 0.0f, Alignment.BottomCenter, GuiFrame);
|
progressBar = new GUIProgressBar(new Rectangle(0,0,200,20), Color.Green, GUI.Style, 0.0f, Alignment.BottomCenter, GuiFrame);
|
||||||
|
|
||||||
activateButton = new GUIButton(new Rectangle(0, 0, 200, 20), "Deconstruct", Alignment.TopCenter, GUI.Style, GuiFrame);
|
activateButton = new GUIButton(new Rectangle(0, 0, 200, 20), "Deconstruct", Alignment.TopCenter, GUI.Style, GuiFrame);
|
||||||
activateButton.OnClicked = ToggleActive;
|
activateButton.OnClicked = ToggleActive;
|
||||||
|
|||||||
@@ -91,6 +91,10 @@ namespace Barotrauma.Items.Components
|
|||||||
private FabricableItem fabricatedItem;
|
private FabricableItem fabricatedItem;
|
||||||
private float timeUntilReady;
|
private float timeUntilReady;
|
||||||
|
|
||||||
|
//used for checking if contained items have changed
|
||||||
|
//(in which case we need to recheck which items can be fabricated)
|
||||||
|
private Item[] prevContainedItems;
|
||||||
|
|
||||||
private float lastNetworkUpdate;
|
private float lastNetworkUpdate;
|
||||||
|
|
||||||
public Fabricator(Item item, XElement element)
|
public Fabricator(Item item, XElement element)
|
||||||
@@ -110,7 +114,6 @@ namespace Barotrauma.Items.Components
|
|||||||
|
|
||||||
itemList = new GUIListBox(new Rectangle(0,0,GuiFrame.Rect.Width/2-20,0), GUI.Style, GuiFrame);
|
itemList = new GUIListBox(new Rectangle(0,0,GuiFrame.Rect.Width/2-20,0), GUI.Style, GuiFrame);
|
||||||
itemList.OnSelected = SelectItem;
|
itemList.OnSelected = SelectItem;
|
||||||
//structureList.CheckSelected = MapEntityPrefab.GetSelected;
|
|
||||||
|
|
||||||
foreach (FabricableItem fi in fabricableItems)
|
foreach (FabricableItem fi in fabricableItems)
|
||||||
{
|
{
|
||||||
@@ -131,6 +134,7 @@ namespace Barotrauma.Items.Components
|
|||||||
Color.Transparent, Color.White,
|
Color.Transparent, Color.White,
|
||||||
Alignment.Left, Alignment.Left,
|
Alignment.Left, Alignment.Left,
|
||||||
null, frame);
|
null, frame);
|
||||||
|
textBlock.ToolTip = fi.TargetItem.Description;
|
||||||
textBlock.Padding = new Vector4(5.0f, 0.0f, 5.0f, 0.0f);
|
textBlock.Padding = new Vector4(5.0f, 0.0f, 5.0f, 0.0f);
|
||||||
|
|
||||||
if (fi.TargetItem.sprite != null)
|
if (fi.TargetItem.sprite != null)
|
||||||
@@ -138,6 +142,7 @@ namespace Barotrauma.Items.Components
|
|||||||
GUIImage img = new GUIImage(new Rectangle(0, 0, 40, 40), fi.TargetItem.sprite, Alignment.Left, frame);
|
GUIImage img = new GUIImage(new Rectangle(0, 0, 40, 40), fi.TargetItem.sprite, Alignment.Left, frame);
|
||||||
img.Scale = Math.Min(Math.Min(40.0f / img.SourceRect.Width, 40.0f / img.SourceRect.Height), 1.0f);
|
img.Scale = Math.Min(Math.Min(40.0f / img.SourceRect.Width, 40.0f / img.SourceRect.Height), 1.0f);
|
||||||
img.Color = fi.TargetItem.SpriteColor;
|
img.Color = fi.TargetItem.SpriteColor;
|
||||||
|
img.ToolTip = fi.TargetItem.Description;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -151,7 +156,7 @@ namespace Barotrauma.Items.Components
|
|||||||
if (selectedItemFrame != null) GuiFrame.RemoveChild(selectedItemFrame);
|
if (selectedItemFrame != null) GuiFrame.RemoveChild(selectedItemFrame);
|
||||||
|
|
||||||
//int width = 200, height = 150;
|
//int width = 200, height = 150;
|
||||||
selectedItemFrame = new GUIFrame(new Rectangle(0, 0, (int)(GuiFrame.Rect.Width * 0.4f), 250), Color.Black * 0.8f, Alignment.CenterY | Alignment.Right, null, GuiFrame);
|
selectedItemFrame = new GUIFrame(new Rectangle(0, 0, (int)(GuiFrame.Rect.Width * 0.4f), 300), Color.Black * 0.8f, Alignment.CenterY | Alignment.Right, null, GuiFrame);
|
||||||
|
|
||||||
selectedItemFrame.Padding = new Vector4(10.0f, 10.0f, 10.0f, 10.0f);
|
selectedItemFrame.Padding = new Vector4(10.0f, 10.0f, 10.0f, 10.0f);
|
||||||
|
|
||||||
@@ -160,6 +165,8 @@ namespace Barotrauma.Items.Components
|
|||||||
|
|
||||||
if (targetItem.TargetItem.sprite != null)
|
if (targetItem.TargetItem.sprite != null)
|
||||||
{
|
{
|
||||||
|
int y = 0;
|
||||||
|
|
||||||
GUIImage img = new GUIImage(new Rectangle(10, 0, 40, 40), targetItem.TargetItem.sprite, Alignment.TopLeft, selectedItemFrame);
|
GUIImage img = new GUIImage(new Rectangle(10, 0, 40, 40), targetItem.TargetItem.sprite, Alignment.TopLeft, selectedItemFrame);
|
||||||
img.Scale = Math.Min(Math.Min(40.0f / img.SourceRect.Width, 40.0f / img.SourceRect.Height), 1.0f);
|
img.Scale = Math.Min(Math.Min(40.0f / img.SourceRect.Width, 40.0f / img.SourceRect.Height), 1.0f);
|
||||||
img.Color = targetItem.TargetItem.SpriteColor;
|
img.Color = targetItem.TargetItem.SpriteColor;
|
||||||
@@ -172,12 +179,24 @@ namespace Barotrauma.Items.Components
|
|||||||
Alignment.TopLeft, null,
|
Alignment.TopLeft, null,
|
||||||
selectedItemFrame, true);
|
selectedItemFrame, true);
|
||||||
|
|
||||||
|
y += 40;
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(targetItem.TargetItem.Description))
|
||||||
|
{
|
||||||
|
var description = new GUITextBlock(
|
||||||
|
new Rectangle(0, y, 0, 0),
|
||||||
|
targetItem.TargetItem.Description,
|
||||||
|
GUI.Style, Alignment.TopLeft, Alignment.TopLeft,
|
||||||
|
selectedItemFrame, true, GUI.SmallFont);
|
||||||
|
|
||||||
|
y += description.Rect.Height + 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
List<Skill> inadequateSkills = new List<Skill>();
|
List<Skill> inadequateSkills = new List<Skill>();
|
||||||
|
|
||||||
if (Character.Controlled != null)
|
if (Character.Controlled != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
inadequateSkills = targetItem.RequiredSkills.FindAll(skill => Character.Controlled.GetSkillLevel(skill.Name) < skill.Level);
|
inadequateSkills = targetItem.RequiredSkills.FindAll(skill => Character.Controlled.GetSkillLevel(skill.Name) < skill.Level);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -204,7 +223,7 @@ namespace Barotrauma.Items.Components
|
|||||||
}
|
}
|
||||||
|
|
||||||
new GUITextBlock(
|
new GUITextBlock(
|
||||||
new Rectangle(0, 50, 0, 25),
|
new Rectangle(0, y, 0, 25),
|
||||||
text,
|
text,
|
||||||
Color.Transparent, textColor,
|
Color.Transparent, textColor,
|
||||||
Alignment.TopLeft,
|
Alignment.TopLeft,
|
||||||
@@ -222,11 +241,13 @@ namespace Barotrauma.Items.Components
|
|||||||
|
|
||||||
public override bool Select(Character character)
|
public override bool Select(Character character)
|
||||||
{
|
{
|
||||||
|
CheckFabricableItems(character);
|
||||||
if (itemList.Selected != null)
|
if (itemList.Selected != null)
|
||||||
{
|
{
|
||||||
SelectItem(itemList.Selected, itemList.Selected.UserData);
|
SelectItem(itemList.Selected, itemList.Selected.UserData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return base.Select(character);
|
return base.Select(character);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -235,6 +256,30 @@ namespace Barotrauma.Items.Components
|
|||||||
return (picker != null);
|
return (picker != null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// check which of the items can be fabricated by the character
|
||||||
|
/// and update the text colors of the item list accordingly
|
||||||
|
/// </summary>
|
||||||
|
private void CheckFabricableItems(Character character)
|
||||||
|
{
|
||||||
|
foreach (GUIComponent child in itemList.children)
|
||||||
|
{
|
||||||
|
var itemPrefab = child.UserData as FabricableItem;
|
||||||
|
if (itemPrefab == null) continue;
|
||||||
|
|
||||||
|
bool canBeFabricated = CanBeFabricated(itemPrefab, character);
|
||||||
|
|
||||||
|
|
||||||
|
child.GetChild<GUITextBlock>().TextColor = Color.White * (canBeFabricated ? 1.0f : 0.5f);
|
||||||
|
child.GetChild<GUIImage>().Color = itemPrefab.TargetItem.SpriteColor * (canBeFabricated ? 1.0f : 0.5f);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var itemContainer = item.GetComponent<ItemContainer>();
|
||||||
|
prevContainedItems = new Item[itemContainer.Inventory.Items.Length];
|
||||||
|
itemContainer.Inventory.Items.CopyTo(prevContainedItems, 0);
|
||||||
|
}
|
||||||
|
|
||||||
private bool StartButtonClicked(GUIButton button, object obj)
|
private bool StartButtonClicked(GUIButton button, object obj)
|
||||||
{
|
{
|
||||||
if (fabricatedItem == null)
|
if (fabricatedItem == null)
|
||||||
@@ -344,6 +389,30 @@ namespace Barotrauma.Items.Components
|
|||||||
activateButton.Enabled = CanBeFabricated(targetItem, character);
|
activateButton.Enabled = CanBeFabricated(targetItem, character);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (character != null)
|
||||||
|
{
|
||||||
|
bool itemsChanged = false;
|
||||||
|
if (prevContainedItems == null)
|
||||||
|
{
|
||||||
|
itemsChanged = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var itemContainer = item.GetComponent<ItemContainer>();
|
||||||
|
for (int i = 0; i < itemContainer.Inventory.Items.Length; i++)
|
||||||
|
{
|
||||||
|
if (prevContainedItems[i] != itemContainer.Inventory.Items[i])
|
||||||
|
{
|
||||||
|
itemsChanged = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (itemsChanged) CheckFabricableItems(character);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
GuiFrame.Update((float)Timing.Step);
|
GuiFrame.Update((float)Timing.Step);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,9 +21,6 @@ namespace Barotrauma.Items.Components
|
|||||||
private List<RadarBlip> radarBlips;
|
private List<RadarBlip> radarBlips;
|
||||||
private float prevPingRadius;
|
private float prevPingRadius;
|
||||||
|
|
||||||
public static string StartMarker = "Start";
|
|
||||||
public static string EndMarker = "End";
|
|
||||||
|
|
||||||
[HasDefaultValue(10000.0f, false)]
|
[HasDefaultValue(10000.0f, false)]
|
||||||
public float Range
|
public float Range
|
||||||
{
|
{
|
||||||
@@ -265,11 +262,11 @@ namespace Barotrauma.Items.Components
|
|||||||
|
|
||||||
|
|
||||||
DrawMarker(spriteBatch,
|
DrawMarker(spriteBatch,
|
||||||
(GameMain.GameSession.Map == null) ? StartMarker : GameMain.GameSession.Map.CurrentLocation.Name,
|
GameMain.GameSession.StartLocation.Name,
|
||||||
(Level.Loaded.StartPosition - item.WorldPosition), displayScale, center, (rect.Width * 0.5f));
|
(Level.Loaded.StartPosition - item.WorldPosition), displayScale, center, (rect.Width * 0.5f));
|
||||||
|
|
||||||
DrawMarker(spriteBatch,
|
DrawMarker(spriteBatch,
|
||||||
(GameMain.GameSession.Map == null) ? EndMarker : GameMain.GameSession.Map.SelectedLocation.Name,
|
GameMain.GameSession.EndLocation.Name,
|
||||||
(Level.Loaded.EndPosition - item.WorldPosition), displayScale, center, (rect.Width * 0.5f));
|
(Level.Loaded.EndPosition - item.WorldPosition), displayScale, center, (rect.Width * 0.5f));
|
||||||
|
|
||||||
if (GameMain.GameSession.Mission != null)
|
if (GameMain.GameSession.Mission != null)
|
||||||
@@ -397,12 +394,15 @@ namespace Barotrauma.Items.Components
|
|||||||
|
|
||||||
if (dir.X < 0.0f) markerPos.X -= GUI.SmallFont.MeasureString(label).X+10;
|
if (dir.X < 0.0f) markerPos.X -= GUI.SmallFont.MeasureString(label).X+10;
|
||||||
|
|
||||||
GUI.DrawString(spriteBatch, new Vector2(markerPos.X + 10, markerPos.Y), label, Color.LightGreen * textAlpha, Color.Black * textAlpha*0.5f, 2, GUI.SmallFont);
|
string wrappedLabel = ToolBox.WrapText(label, 150, GUI.SmallFont);
|
||||||
|
|
||||||
GUI.DrawString(spriteBatch, new Vector2(markerPos.X + 10, markerPos.Y + 15), (int)(dist * Physics.DisplayToRealWorldRatio) + " m",
|
wrappedLabel += "\n"+((int)(dist * Physics.DisplayToRealWorldRatio) + " m");
|
||||||
Color.LightGreen * textAlpha,
|
|
||||||
Color.Black * textAlpha, 2, GUI.SmallFont);
|
|
||||||
|
|
||||||
|
GUI.DrawString(spriteBatch,
|
||||||
|
new Vector2(markerPos.X + 10, markerPos.Y),
|
||||||
|
wrappedLabel,
|
||||||
|
Color.LightGreen * textAlpha, Color.Black * textAlpha * 0.5f,
|
||||||
|
2, GUI.SmallFont);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void RemoveComponentSpecific()
|
protected override void RemoveComponentSpecific()
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ namespace Barotrauma.Items.Components
|
|||||||
private Vector2 targetVelocity;
|
private Vector2 targetVelocity;
|
||||||
|
|
||||||
private GUITickBox autopilotTickBox, maintainPosTickBox;
|
private GUITickBox autopilotTickBox, maintainPosTickBox;
|
||||||
|
private GUITickBox levelEndTickBox, levelStartTickBox;
|
||||||
|
|
||||||
private bool autoPilot;
|
private bool autoPilot;
|
||||||
|
|
||||||
@@ -47,21 +48,23 @@ namespace Barotrauma.Items.Components
|
|||||||
if (value == autoPilot) return;
|
if (value == autoPilot) return;
|
||||||
|
|
||||||
autoPilot = value;
|
autoPilot = value;
|
||||||
|
|
||||||
autopilotTickBox.Selected = value;
|
autopilotTickBox.Selected = value;
|
||||||
|
|
||||||
maintainPosTickBox.Enabled = autoPilot;
|
maintainPosTickBox.Enabled = autoPilot;
|
||||||
|
levelEndTickBox.Enabled = autoPilot;
|
||||||
|
levelStartTickBox.Enabled = autoPilot;
|
||||||
|
|
||||||
if (autoPilot)
|
if (autoPilot)
|
||||||
{
|
{
|
||||||
if (pathFinder==null) pathFinder = new PathFinder(WayPoint.WayPointList, false);
|
if (pathFinder == null) pathFinder = new PathFinder(WayPoint.WayPointList, false);
|
||||||
steeringPath = pathFinder.FindPath(
|
ToggleMaintainPosition(maintainPosTickBox);
|
||||||
ConvertUnits.ToSimUnits(item.WorldPosition),
|
|
||||||
TargetPosition == null ? ConvertUnits.ToSimUnits(Level.Loaded.EndPosition) : (Vector2)TargetPosition);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
maintainPosTickBox.Selected = false;
|
maintainPosTickBox.Selected = false;
|
||||||
|
levelEndTickBox.Selected = false;
|
||||||
|
levelStartTickBox.Selected = false;
|
||||||
|
|
||||||
posToMaintain = null;
|
posToMaintain = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -114,15 +117,28 @@ namespace Barotrauma.Items.Components
|
|||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
maintainPosTickBox = new GUITickBox(new Rectangle(0, 50, 20, 20), "Maintain position", Alignment.TopLeft, GuiFrame);
|
maintainPosTickBox = new GUITickBox(new Rectangle(5, 50, 15, 15), "Maintain position", Alignment.TopLeft, GUI.SmallFont, GuiFrame);
|
||||||
maintainPosTickBox.Enabled = false;
|
maintainPosTickBox.Enabled = false;
|
||||||
maintainPosTickBox.OnSelected = ToggleMaintainPosition;
|
maintainPosTickBox.OnSelected = ToggleMaintainPosition;
|
||||||
|
|
||||||
|
levelStartTickBox = new GUITickBox(
|
||||||
|
new Rectangle(5, 70, 15, 15),
|
||||||
|
GameMain.GameSession == null ? "" : ToolBox.LimitString(GameMain.GameSession.StartLocation.Name, 20),
|
||||||
|
Alignment.TopLeft, GUI.SmallFont, GuiFrame);
|
||||||
|
levelStartTickBox.Enabled = false;
|
||||||
|
levelStartTickBox.OnSelected = SelectDestination;
|
||||||
|
|
||||||
|
levelEndTickBox = new GUITickBox(
|
||||||
|
new Rectangle(5, 90, 15, 15),
|
||||||
|
GameMain.GameSession == null ? "" : ToolBox.LimitString(GameMain.GameSession.StartLocation.Name, 20),
|
||||||
|
Alignment.TopLeft, GUI.SmallFont, GuiFrame);
|
||||||
|
levelEndTickBox.Enabled = false;
|
||||||
|
levelEndTickBox.OnSelected = SelectDestination;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(float deltaTime, Camera cam)
|
public override void Update(float deltaTime, Camera cam)
|
||||||
{
|
{
|
||||||
//base.Update(deltaTime, cam);
|
|
||||||
|
|
||||||
if (valueChanged)
|
if (valueChanged)
|
||||||
{
|
{
|
||||||
networkUpdateTimer -= deltaTime;
|
networkUpdateTimer -= deltaTime;
|
||||||
@@ -331,6 +347,28 @@ namespace Barotrauma.Items.Components
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void UpdatePath()
|
||||||
|
{
|
||||||
|
Vector2 target;
|
||||||
|
if (TargetPosition != null)
|
||||||
|
{
|
||||||
|
target = (Vector2)TargetPosition;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (levelEndTickBox.Selected)
|
||||||
|
{
|
||||||
|
target = ConvertUnits.ToSimUnits(Level.Loaded.EndPosition);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
target = ConvertUnits.ToSimUnits(Level.Loaded.StartPosition);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
steeringPath = pathFinder.FindPath(ConvertUnits.ToSimUnits(item.WorldPosition), target);
|
||||||
|
}
|
||||||
|
|
||||||
private void SteerTowardsPosition(Vector2 worldPosition)
|
private void SteerTowardsPosition(Vector2 worldPosition)
|
||||||
{
|
{
|
||||||
float prediction = 10.0f;
|
float prediction = 10.0f;
|
||||||
@@ -345,7 +383,7 @@ namespace Barotrauma.Items.Components
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TargetVelocity = targetSpeed/5.0f;
|
TargetVelocity = targetSpeed / 5.0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -353,21 +391,42 @@ namespace Barotrauma.Items.Components
|
|||||||
{
|
{
|
||||||
valueChanged = true;
|
valueChanged = true;
|
||||||
|
|
||||||
if (tickBox.Selected)
|
levelStartTickBox.Selected = false;
|
||||||
{
|
levelEndTickBox.Selected = false;
|
||||||
if (item.Submarine == null)
|
|
||||||
{
|
if (item.Submarine == null)
|
||||||
posToMaintain = null;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
posToMaintain = item.Submarine.WorldPosition;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
posToMaintain = null;
|
posToMaintain = null;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
posToMaintain = item.Submarine.WorldPosition;
|
||||||
|
}
|
||||||
|
|
||||||
|
tickBox.Selected = true;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool SelectDestination(GUITickBox tickBox)
|
||||||
|
{
|
||||||
|
valueChanged = true;
|
||||||
|
|
||||||
|
if (tickBox == levelStartTickBox)
|
||||||
|
{
|
||||||
|
levelEndTickBox.Selected = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
levelStartTickBox.Selected = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
maintainPosTickBox.Selected = false;
|
||||||
|
posToMaintain = null;
|
||||||
|
|
||||||
|
UpdatePath();
|
||||||
|
|
||||||
|
tickBox.Selected = true;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -397,6 +456,16 @@ namespace Barotrauma.Items.Components
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
msg.Write(posToMaintain != null);
|
msg.Write(posToMaintain != null);
|
||||||
|
message.Write(posToMaintain != null);
|
||||||
|
if (posToMaintain != null)
|
||||||
|
{
|
||||||
|
message.Write(((Vector2)posToMaintain).X);
|
||||||
|
message.Write(((Vector2)posToMaintain).Y);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
message.Write(levelStartTickBox.Selected);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -420,6 +489,17 @@ namespace Barotrauma.Items.Components
|
|||||||
{
|
{
|
||||||
posToMaintain = null;
|
posToMaintain = null;
|
||||||
maintainPosTickBox.Selected = false;
|
maintainPosTickBox.Selected = false;
|
||||||
|
bool maintainPos = message.ReadBoolean();
|
||||||
|
if (maintainPos)
|
||||||
|
{
|
||||||
|
newPosToMaintain = new Vector2(
|
||||||
|
message.ReadFloat(),
|
||||||
|
message.ReadFloat());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
headingToStart = message.ReadBoolean();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -467,6 +547,22 @@ namespace Barotrauma.Items.Components
|
|||||||
maintainPosTickBox.Selected = false;
|
maintainPosTickBox.Selected = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
maintainPosTickBox.Selected = newPosToMaintain != null;
|
||||||
|
posToMaintain = newPosToMaintain;
|
||||||
|
|
||||||
|
if (posToMaintain == null && autoPilot)
|
||||||
|
{
|
||||||
|
levelStartTickBox.Selected = headingToStart;
|
||||||
|
levelEndTickBox.Selected = !headingToStart;
|
||||||
|
|
||||||
|
UpdatePath();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
levelStartTickBox.Selected = false;
|
||||||
|
levelEndTickBox.Selected = false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -126,21 +126,32 @@ namespace Barotrauma
|
|||||||
|
|
||||||
spriteBatch.End();
|
spriteBatch.End();
|
||||||
|
|
||||||
|
|
||||||
spriteBatch.Begin(SpriteSortMode.BackToFront,
|
spriteBatch.Begin(SpriteSortMode.BackToFront,
|
||||||
BlendState.Additive,
|
BlendState.Additive,
|
||||||
SamplerState.LinearWrap, DepthStencilState.Default, null, null,
|
SamplerState.LinearWrap, DepthStencilState.Default, null, null,
|
||||||
cam.Transform);
|
cam.Transform);
|
||||||
|
|
||||||
for (int i = 1; i < 2; i++)
|
for (int i = 1; i < 4; i++)
|
||||||
{
|
{
|
||||||
Vector2 offset = new Vector2(cam.WorldView.X, cam.WorldView.Y);
|
float scale = 1.0f - i * 0.2f;
|
||||||
|
|
||||||
dustParticles.SourceRect = new Rectangle((int)(offset.X), (int)(-offset.Y), (int)(1024), (int)(1024));
|
//alpha goes from 1.0 to 0.0 when scale is in the range of 0.2-0.1
|
||||||
|
float alpha = (cam.Zoom * scale) < 0.2f ? (cam.Zoom * scale - 0.1f) * 10.0f : 1.0f;
|
||||||
|
if (alpha <= 0.0f) continue;
|
||||||
|
|
||||||
dustParticles.DrawTiled(spriteBatch, new Vector2(cam.WorldView.X, -cam.WorldView.Y),
|
Vector2 offset = (new Vector2(cam.WorldViewCenter.X, cam.WorldViewCenter.Y) + dustOffset) * scale;
|
||||||
new Vector2(cam.WorldView.Width, cam.WorldView.Height),
|
Vector3 origin = new Vector3(cam.WorldView.Width, cam.WorldView.Height, 0.0f) * 0.5f;
|
||||||
Vector2.Zero, Color.White);
|
|
||||||
|
dustParticles.SourceRect = new Rectangle(
|
||||||
|
(int)((offset.X - origin.X + (i * 256)) / scale),
|
||||||
|
(int)((-offset.Y - origin.Y + (i * 256)) / scale),
|
||||||
|
(int)((cam.WorldView.Width) / scale),
|
||||||
|
(int)((cam.WorldView.Height) / scale));
|
||||||
|
|
||||||
|
spriteBatch.Draw(dustParticles.Texture,
|
||||||
|
new Vector2(cam.WorldViewCenter.X, -cam.WorldViewCenter.Y),
|
||||||
|
dustParticles.SourceRect, Color.White * alpha, 0.0f,
|
||||||
|
new Vector2(cam.WorldView.Width, cam.WorldView.Height) * 0.5f / scale, scale, SpriteEffects.None, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
spriteBatch.End();
|
spriteBatch.End();
|
||||||
|
|||||||
@@ -437,11 +437,11 @@ namespace Barotrauma
|
|||||||
WayPoint[] stairPoints = new WayPoint[2];
|
WayPoint[] stairPoints = new WayPoint[2];
|
||||||
|
|
||||||
stairPoints[0] = new WayPoint(
|
stairPoints[0] = new WayPoint(
|
||||||
new Vector2(stairs.Rect.X - 75.0f,
|
new Vector2(stairs.Rect.X - 32.0f,
|
||||||
stairs.Rect.Y - (stairs.StairDirection == Direction.Left ? 80 : stairs.Rect.Height) + heightFromFloor), SpawnType.Path, submarine);
|
stairs.Rect.Y - (stairs.StairDirection == Direction.Left ? 80 : stairs.Rect.Height) + heightFromFloor), SpawnType.Path, submarine);
|
||||||
|
|
||||||
stairPoints[1] = new WayPoint(
|
stairPoints[1] = new WayPoint(
|
||||||
new Vector2(stairs.Rect.Right + 75.0f,
|
new Vector2(stairs.Rect.Right + 32.0f,
|
||||||
stairs.Rect.Y - (stairs.StairDirection == Direction.Left ? stairs.Rect.Height : 80) + heightFromFloor), SpawnType.Path, submarine);
|
stairs.Rect.Y - (stairs.StairDirection == Direction.Left ? stairs.Rect.Height : 80) + heightFromFloor), SpawnType.Path, submarine);
|
||||||
|
|
||||||
for (int i = 0; i < 2; i++ )
|
for (int i = 0; i < 2; i++ )
|
||||||
@@ -550,9 +550,15 @@ namespace Barotrauma
|
|||||||
for (int dir = -1; dir <= 1; dir += 2)
|
for (int dir = -1; dir <= 1; dir += 2)
|
||||||
{
|
{
|
||||||
float tolerance = gap.IsRoomToRoom ? 50.0f : outSideWaypointInterval / 2.0f;
|
float tolerance = gap.IsRoomToRoom ? 50.0f : outSideWaypointInterval / 2.0f;
|
||||||
WayPoint closest = wayPoint.FindClosest(dir, true, new Vector2(-tolerance, tolerance));
|
|
||||||
if (closest == null) continue;
|
WayPoint closest = wayPoint.FindClosest(
|
||||||
wayPoint.ConnectTo(closest);
|
dir, true, new Vector2(-tolerance, tolerance),
|
||||||
|
gap.ConnectedDoor == null ? null : gap.ConnectedDoor.Body.FarseerBody);
|
||||||
|
|
||||||
|
if (closest != null)
|
||||||
|
{
|
||||||
|
wayPoint.ConnectTo(closest);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -582,7 +588,7 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private WayPoint FindClosest(int dir, bool horizontalSearch, Vector2 tolerance)
|
private WayPoint FindClosest(int dir, bool horizontalSearch, Vector2 tolerance, Body ignoredBody = null)
|
||||||
{
|
{
|
||||||
if (dir != -1 && dir != 1) return null;
|
if (dir != -1 && dir != 1) return null;
|
||||||
|
|
||||||
@@ -614,9 +620,9 @@ namespace Barotrauma
|
|||||||
if (closest == null || dist < closestDist)
|
if (closest == null || dist < closestDist)
|
||||||
{
|
{
|
||||||
var body = Submarine.CheckVisibility(SimPosition, wp.SimPosition, true);
|
var body = Submarine.CheckVisibility(SimPosition, wp.SimPosition, true);
|
||||||
if (body != null)
|
if (body != null && body != ignoredBody && !(body.UserData is Submarine))
|
||||||
{
|
{
|
||||||
if (body.UserData is Structure) continue;
|
if (body.UserData is Structure || body.FixtureList[0].CollisionCategories.HasFlag(Physics.CollisionWall)) continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
closestDist = dist;
|
closestDist = dist;
|
||||||
|
|||||||
@@ -975,6 +975,7 @@ namespace Barotrauma.Networking
|
|||||||
endMessage += TraitorManager.GetEndMessage();
|
endMessage += TraitorManager.GetEndMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Mission mission = GameMain.GameSession.Mission;
|
||||||
GameMain.GameSession.gameMode.End(endMessage);
|
GameMain.GameSession.gameMode.End(endMessage);
|
||||||
|
|
||||||
if (autoRestart) AutoRestartTimer = AutoRestartInterval;
|
if (autoRestart) AutoRestartTimer = AutoRestartInterval;
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ namespace Barotrauma
|
|||||||
public PhysicsBody(Body farseerBody)
|
public PhysicsBody(Body farseerBody)
|
||||||
{
|
{
|
||||||
body = farseerBody;
|
body = farseerBody;
|
||||||
body.UserData = this;
|
if (body.UserData == null) body.UserData = this;
|
||||||
|
|
||||||
LastSentPosition = body.Position;
|
LastSentPosition = body.Position;
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
Camera cam;
|
Camera cam;
|
||||||
|
|
||||||
|
Color waterColor = new Color(0.75f, 0.8f, 0.9f, 1.0f);
|
||||||
|
|
||||||
readonly RenderTarget2D renderTargetBackground;
|
readonly RenderTarget2D renderTargetBackground;
|
||||||
readonly RenderTarget2D renderTarget;
|
readonly RenderTarget2D renderTarget;
|
||||||
readonly RenderTarget2D renderTargetWater;
|
readonly RenderTarget2D renderTargetWater;
|
||||||
@@ -270,7 +272,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
spriteBatch.Begin(SpriteSortMode.Deferred,
|
spriteBatch.Begin(SpriteSortMode.Deferred,
|
||||||
BlendState.Opaque);
|
BlendState.Opaque);
|
||||||
spriteBatch.Draw(renderTarget, new Rectangle(0, 0, GameMain.GraphicsWidth, GameMain.GraphicsHeight), new Color(0.75f, 0.8f, 0.9f, 1.0f));
|
spriteBatch.Draw(renderTarget, new Rectangle(0, 0, GameMain.GraphicsWidth, GameMain.GraphicsHeight), waterColor);
|
||||||
spriteBatch.End();
|
spriteBatch.End();
|
||||||
|
|
||||||
#if LINUX
|
#if LINUX
|
||||||
@@ -406,7 +408,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
float r = Math.Min(CharacterHUD.damageOverlayTimer * 0.5f, 0.5f);
|
float r = Math.Min(CharacterHUD.damageOverlayTimer * 0.5f, 0.5f);
|
||||||
spriteBatch.Draw(renderTarget, new Rectangle(0, 0, GameMain.GraphicsWidth, GameMain.GraphicsHeight),
|
spriteBatch.Draw(renderTarget, new Rectangle(0, 0, GameMain.GraphicsWidth, GameMain.GraphicsHeight),
|
||||||
Color.Lerp(new Color(0.1f, 0.1f, 0.1f), Color.Red, r));
|
Color.Lerp(GameMain.LightManager.AmbientLight*0.5f, Color.Red, r));
|
||||||
|
|
||||||
spriteBatch.End();
|
spriteBatch.End();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -343,8 +343,6 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
if (maxWidth <= 0 || string.IsNullOrWhiteSpace(str)) return "";
|
if (maxWidth <= 0 || string.IsNullOrWhiteSpace(str)) return "";
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
|
|
||||||
float currWidth = font.MeasureString("...").X;
|
float currWidth = font.MeasureString("...").X;
|
||||||
for (int i = 0; i < str.Length; i++ )
|
for (int i = 0; i < str.Length; i++ )
|
||||||
{
|
{
|
||||||
@@ -352,7 +350,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
if (currWidth > maxWidth)
|
if (currWidth > maxWidth)
|
||||||
{
|
{
|
||||||
return str.Substring(0, i + 1) + "...";
|
return str.Substring(0, Math.Max(i - 2, 1)) + "...";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user