Item/structure sprites flip by default
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
linkable="true"
|
linkable="true"
|
||||||
pickdistance ="150">
|
pickdistance ="150">
|
||||||
|
|
||||||
<Sprite texture ="cabinets.png" depth="0.84" sourcerect="0,0,48,64"/>
|
<Sprite texture ="cabinets.png" depth="0.84" sourcerect="0,0,48,64" canflipx="false"/>
|
||||||
|
|
||||||
<ItemContainer capacity="20" canbeselected="true" hideitems="true">
|
<ItemContainer capacity="20" canbeselected="true" hideitems="true">
|
||||||
<Containable name="chem"/>
|
<Containable name="chem"/>
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
linkable="true"
|
linkable="true"
|
||||||
pickdistance ="150">
|
pickdistance ="150">
|
||||||
|
|
||||||
<Sprite texture ="cabinets.png" depth="0.84" sourcerect="0,64,48,64"/>
|
<Sprite texture ="cabinets.png" depth="0.84" sourcerect="0,64,48,64" canflipx="false"/>
|
||||||
|
|
||||||
<ItemContainer capacity="20" canbeselected="true" hideitems="true">
|
<ItemContainer capacity="20" canbeselected="true" hideitems="true">
|
||||||
<Containable name="chem"/>
|
<Containable name="chem"/>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
pickdistance="150"
|
pickdistance="150"
|
||||||
description="Serves as a hub for power distribution and relaying signals between devices.">
|
description="Serves as a hub for power distribution and relaying signals between devices.">
|
||||||
|
|
||||||
<Sprite texture ="junctionbox.png" depth="0.8"/>
|
<Sprite texture="junctionbox.png" depth="0.8" canflipx="false"/>
|
||||||
|
|
||||||
<fixrequirement name="Electrical repairs">
|
<fixrequirement name="Electrical repairs">
|
||||||
<skill name="Electrical Engineering" level="40"/>
|
<skill name="Electrical Engineering" level="40"/>
|
||||||
|
|||||||
@@ -29,39 +29,39 @@
|
|||||||
</smallverticalback2>
|
</smallverticalback2>
|
||||||
|
|
||||||
<engineeringLabel width="153" height="16">
|
<engineeringLabel width="153" height="16">
|
||||||
<sprite texture="Content/Map/structures2.png" sourcerect="0,426,153,16" depth ="0.99"/>
|
<sprite texture="Content/Map/structures2.png" sourcerect="0,426,153,16" depth="0.99" canflipx="false"/>
|
||||||
</engineeringLabel>
|
</engineeringLabel>
|
||||||
|
|
||||||
<commandLabel width="128" height="16">
|
<commandLabel width="128" height="16">
|
||||||
<sprite texture="Content/Map/structures2.png" sourcerect="0,443,128,16" depth ="0.99"/>
|
<sprite texture="Content/Map/structures2.png" sourcerect="0,443,128,16" depth="0.99" canflipx="false"/>
|
||||||
</commandLabel>
|
</commandLabel>
|
||||||
|
|
||||||
<airlockLabel width = "99" height ="16">
|
<airlockLabel width = "99" height ="16">
|
||||||
<sprite texture="Content/Map/structures2.png" sourcerect="0,460,199,16" depth ="0.99"/>
|
<sprite texture="Content/Map/structures2.png" sourcerect="0,460,199,16" depth="0.99" canflipx="false"/>
|
||||||
</airlockLabel>
|
</airlockLabel>
|
||||||
|
|
||||||
<cabinsLabel width="83" height="16">
|
<cabinsLabel width="83" height="16">
|
||||||
<sprite texture="Content/Map/structures2.png" sourcerect="0,477,83,16" depth ="0.99"/>
|
<sprite texture="Content/Map/structures2.png" sourcerect="0,477,83,16" depth="0.99" canflipx="false"/>
|
||||||
</cabinsLabel>
|
</cabinsLabel>
|
||||||
|
|
||||||
<medicalLabel width="110" height="16">
|
<medicalLabel width="110" height="16">
|
||||||
<sprite texture="Content/Map/structures2.png" sourcerect="0,494,110,16" depth="0.99"/>
|
<sprite texture="Content/Map/structures2.png" sourcerect="0,494,110,16" depth="0.99" canflipx="false"/>
|
||||||
</medicalLabel>
|
</medicalLabel>
|
||||||
|
|
||||||
<arrowUp width="16" height="16">
|
<arrowUp width="16" height="16">
|
||||||
<sprite texture="Content/Map/structures2.png" sourcerect="129,460,16,16" depth ="0.99" canflipx="true"/>
|
<sprite texture="Content/Map/structures2.png" sourcerect="129,460,16,16" depth ="0.99"/>
|
||||||
</arrowUp>
|
</arrowUp>
|
||||||
|
|
||||||
<arrowDown width="16" height="16">
|
<arrowDown width="16" height="16">
|
||||||
<sprite texture="Content/Map/structures2.png" sourcerect="146,460,16,16" depth ="0.99" canflipx="true"/>
|
<sprite texture="Content/Map/structures2.png" sourcerect="146,460,16,16" depth ="0.99"/>
|
||||||
</arrowDown>
|
</arrowDown>
|
||||||
|
|
||||||
<arrowLeft width="16" height="16">
|
<arrowLeft width="16" height="16">
|
||||||
<sprite texture="Content/Map/structures2.png" sourcerect="129,477,16,16" depth ="0.99" canflipx="true"/>
|
<sprite texture="Content/Map/structures2.png" sourcerect="129,477,16,16" depth ="0.99"/>
|
||||||
</arrowLeft>
|
</arrowLeft>
|
||||||
|
|
||||||
<arrowRight width="16" height="16">
|
<arrowRight width="16" height="16">
|
||||||
<sprite texture="Content/Map/structures2.png" sourcerect="146,477,16,16" depth ="0.99" canflipx="true"/>
|
<sprite texture="Content/Map/structures2.png" sourcerect="146,477,16,16" depth ="0.99"/>
|
||||||
</arrowRight>
|
</arrowRight>
|
||||||
|
|
||||||
<leftwall description="A vertical wall with collision detection"
|
<leftwall description="A vertical wall with collision detection"
|
||||||
@@ -170,19 +170,19 @@
|
|||||||
</PipesBackground>
|
</PipesBackground>
|
||||||
|
|
||||||
<SlopeForward width="16" height="16" resizehorizontal="true" resizevertical="true">
|
<SlopeForward width="16" height="16" resizehorizontal="true" resizevertical="true">
|
||||||
<sprite texture="Content/Map/structures2.png" sourcerect="0,0,224,64" depth = "0.95" canflipx="true"/>
|
<sprite texture="Content/Map/structures2.png" sourcerect="0,0,224,64" depth = "0.95" />
|
||||||
</SlopeForward>
|
</SlopeForward>
|
||||||
|
|
||||||
<SlopeBack width="16" height="16" resizehorizontal="true" resizevertical="true">
|
<SlopeBack width="16" height="16" resizehorizontal="true" resizevertical="true">
|
||||||
<sprite texture="Content/Map/structures2.png" sourcerect="0,64,224,64" depth = "0.95" canflipx="true"/>
|
<sprite texture="Content/Map/structures2.png" sourcerect="0,64,224,64" depth = "0.95" />
|
||||||
</SlopeBack>
|
</SlopeBack>
|
||||||
|
|
||||||
<stairsright width="256" height="320" stairdirection="Right">
|
<stairsright width="256" height="320" stairdirection="Right">
|
||||||
<sprite texture="Content/Map/structures2.png" sourcerect="256,193,256,319" depth = "0.1" canflipx="true"/>
|
<sprite texture="Content/Map/structures2.png" sourcerect="256,193,256,319" depth = "0.1" />
|
||||||
</stairsright>
|
</stairsright>
|
||||||
|
|
||||||
<stairsleft width="256" height="320" stairdirection="Left">
|
<stairsleft width="256" height="320" stairdirection="Left">
|
||||||
<sprite texture="Content/Map/structures2.png" sourcerect="256,193,256,319" fliphorizontal="true" depth = "0.1" canflipx="true"/>
|
<sprite texture="Content/Map/structures2.png" sourcerect="256,193,256,319" fliphorizontal="true" depth = "0.1" />
|
||||||
</stairsleft>
|
</stairsleft>
|
||||||
|
|
||||||
<bunk width="173" height="129">
|
<bunk width="173" height="129">
|
||||||
|
|||||||
@@ -288,8 +288,7 @@ namespace Barotrauma
|
|||||||
spriteFolder = Path.GetDirectoryName(filePath);
|
spriteFolder = Path.GetDirectoryName(filePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ToolBox.GetAttributeBool(subElement, "canflipx", false))
|
canSpriteFlipX = ToolBox.GetAttributeBool(subElement, "canflipx", true);
|
||||||
canSpriteFlipX = true;
|
|
||||||
|
|
||||||
sprite = new Sprite(subElement, spriteFolder);
|
sprite = new Sprite(subElement, spriteFolder);
|
||||||
size = sprite.size;
|
size = sprite.size;
|
||||||
|
|||||||
@@ -113,8 +113,8 @@ namespace Barotrauma
|
|||||||
sp.sprite.effects = SpriteEffects.FlipHorizontally;
|
sp.sprite.effects = SpriteEffects.FlipHorizontally;
|
||||||
if (ToolBox.GetAttributeBool(subElement, "flipvertical", false))
|
if (ToolBox.GetAttributeBool(subElement, "flipvertical", false))
|
||||||
sp.sprite.effects = SpriteEffects.FlipVertically;
|
sp.sprite.effects = SpriteEffects.FlipVertically;
|
||||||
if (ToolBox.GetAttributeBool(subElement, "canflipx", false))
|
|
||||||
sp.canSpriteFlipX = true;
|
sp.canSpriteFlipX = ToolBox.GetAttributeBool(subElement, "canflipx", true);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "backgroundsprite":
|
case "backgroundsprite":
|
||||||
|
|||||||
Reference in New Issue
Block a user