Barotrauma
Barotrauma copied to clipboard
[Modding] Prefab attached="true" in sub's interior is attaching item to world instead to sub's walls
Disclaimers
- [X] I have searched the issue tracker to check if the issue has already been reported.
- [X] My issue happened while using mods.
What happened?
item with <Holdable attachable="true" attached="true"/> spawned in-game(not subeditor) attaches to world and dont checks if it spawns in interior of submarine. Same problem with items without <Body/>.
Status Effect too cant attach items to a wall but can toggle that state (item still have physic body).
Reproduction steps
with attached="true". just spawn tro console
<Item name="attached item on spawn"" identifier="bigballs" category="Machine,Misc" Tags="bigitem" maxstacksize="2" maxstacksizecharacterinventory="1" cargocontaineridentifier="metalcrate" description="" scale="0.5" impactsoundtag="impact_metal_light" isshootable="true" GrabWhenSelected="true">
<InventoryIcon texture="Content/Items/InventoryIconAtlas.png" sourcerect="384,388,64,57" origin="0.5,0.5" />
<Sprite texture="Content/Items/Electricity/signalcomp.png" depth="0.8" sourcerect="64,160,32,32" origin="0.5,0.5" canflipx="false" />
<Body width="28" height="26" density="15" />
<Holdable aimpos="65,-10" handle1="0,0" attachable="true" attached="true" />
</Item>
with status effect. just spawn tro console
<Item name="always when dropped attached item"" identifier="dick" category="Machine,Misc" Tags="bigitem" maxstacksize="2" maxstacksizecharacterinventory="1" cargocontaineridentifier="metalcrate" description="" scale="0.5" impactsoundtag="impact_metal_light" isshootable="true" GrabWhenSelected="true">
<InventoryIcon texture="Content/Items/InventoryIconAtlas.png" sourcerect="384,388,64,57" origin="0.5,0.5" />
<Sprite texture="Content/Items/Electricity/signalcomp.png" depth="0.8" sourcerect="64,160,32,32" origin="0.5,0.5" canflipx="false" />
<Body width="28" height="26" density="15" />
<Holdable aimpos="65,-10" handle1="0,0" attachable="true" >
<StatusEffect type="Always" target="This" attached="true"/>
</Holdable>
</Item>
without physic body. spawn tro console
<Item name="always attached item"" identifier="penis" category="Machine,Misc" Tags="bigitem" maxstacksize="2" maxstacksizecharacterinventory="1" cargocontaineridentifier="metalcrate" description="" scale="0.5" impactsoundtag="impact_metal_light" isshootable="true" GrabWhenSelected="true">
<InventoryIcon texture="Content/Items/InventoryIconAtlas.png" sourcerect="384,388,64,57" origin="0.5,0.5" />
<Sprite texture="Content/Items/Electricity/signalcomp.png" depth="0.8" sourcerect="64,160,32,32" origin="0.5,0.5" canflipx="false" />
<Holdable aimpos="65,-10" handle1="0,0" attachable="true" />
</Item>
Bug prevalence
Happens every time I play
Single player or multiplayer?
Happens in both single player and multiplayer
Version
v1.2.7.0 (Winter Update hotfix)
Which operating system did you encounter this bug on?
Windows