Lighting improvements: lightmap is drawn over all structures and blurred, flashlight item, OnContained statuseffects are also applied when the item is contained in a characterinventory

This commit is contained in:
Regalis
2016-05-07 09:13:23 +03:00
parent ef05650c01
commit d5f6fff2c2
14 changed files with 384 additions and 129 deletions
+54 -1
View File
@@ -191,7 +191,7 @@
pickdistance="200"
price="10">
<Sprite texture ="tools.png" sourcerect="0,37,22,9" depth="0.5"/>
<Sprite texture ="tools.png" sourcerect="42,0,22,9" depth="0.5"/>
<Body width="31" height="6" density="40"/>
@@ -213,4 +213,57 @@
</ItemContainer>
</Item>
<Item
name="Flashlight"
category="Equipment"
Tags="smallitem"
pickdistance="200"
price="10">
<Deconstruct time="15">
<Item name="Copper Bar"/>
<Item name="Polycarbonate Bar"/>
</Deconstruct>
<Sprite texture ="tools.png" sourcerect="0,36,27,11" depth="0.5"/>
<Body width="27" height="10" density="15"/>
<Holdable slots="Any,RightHand,LeftHand" aimpos="100,0" handle1="0,0">
<StatusEffect type="OnActive" target="Contained" Condition="-0.2"/>
</Holdable>
<LightComponent LightColor="1.0,1.0,1.0,1.0" Flicker="0.1" range="800" powerconsumption="10" IsOn="true">
<LightTexture texture="Content/Lights/lightcone.png" origin="0.0, 0.5" size="2.0,1.0"/>
</LightComponent>
<ItemContainer capacity="1" hideitems="true">
<Containable name="Battery Cell">
<StatusEffect type="OnContaining" target="This" Voltage="1.0" setvalue="true"/>
</Containable>
</ItemContainer>
</Item>
<Item
name="Flare"
category="Equipment"
pickdistance="150"
price="5"
tags="smallitem">
<Sprite texture ="tools.png" sourcerect="0,37,22,9" depth="0.5"/>
<Body width="11" height="24" density="30"/>
<Throwable slots="Any,RightHand,LeftHand" holdpos="0,0" handle1="0,0" throwforce="4.0" aimpos="35,-10">
</Throwable>
<LightComponent LightColor="1.0,0.0,0.0,1.0" Flicker="0.5" range="600" IsOn="false">
<StatusEffect type="OnActive" target="This" Condition="-0.5"/>
<StatusEffect type="OnUse" target="This" IsOn="true"/>
</LightComponent>
</Item>
</Items>