~starkingdoms/starkingdoms

1b6e187ca6976ae79401ad49cdd01891f53f2fd4 — TerraMaster85 5 months ago a2850eb
Chassis -> housing
A crates/unified/assets/config/parts/housing.part.toml => crates/unified/assets/config/parts/housing.part.toml +30 -0
@@ 0,0 1,30 @@
[part]
name = "Housing"
sprite_connected = "textures/housing.png"
sprite_disconnected = "textures/housing.png"

[physics]
width = 50
height = 50
mass = 50

[[joints]]
id = "Top"
target = { translation = [ 0.0, 50.0, 0.0 ], rotation = 0.0 }
snap = { translation = [ 0.0, 25.0, 0.0 ], rotation = 0.0 }


[[joints]]
id = "Right"
target = { translation = [ 50.0, 0.0, 0.0 ], rotation = -90.0 }
snap = { translation = [ 25.0, 0.0, 0.0 ], rotation = 0.0 }

[[joints]]
id = "Bottom"
target = { translation = [ 0.0, -50.0, 0.0 ], rotation = -180.0 }
snap = { translation = [ 0.0, -25.0, 0.0 ], rotation = 0.0 }

[[joints]]
id = "Left"
target = { translation = [ -50.0, 0.0, 0.0 ], rotation = -270.0 }
snap = { translation = [ -25.0, 0.0, 0.0 ], rotation = 0.0 }

A crates/unified/assets/textures/housing.png => crates/unified/assets/textures/housing.png +0 -0
A crates/unified/assets/vector_textures/housing.svg => crates/unified/assets/vector_textures/housing.svg +371 -0
@@ 0,0 1,371 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->

<svg
   width="512"
   height="512"
   viewBox="0 0 135.46666 135.46667"
   version="1.1"
   id="svg5"
   inkscape:export-filename="/home/tm85/prj/stk_sprites/hub_off.png"
   inkscape:export-xdpi="96.000008"
   inkscape:export-ydpi="96.000008"
   inkscape:version="1.4.2 (ebf0e94, 2025-05-08)"
   sodipodi:docname="housing.svg"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:svg="http://www.w3.org/2000/svg">
  <sodipodi:namedview
     id="namedview7"
     pagecolor="#ffffff"
     bordercolor="#666666"
     borderopacity="1.0"
     inkscape:pageshadow="2"
     inkscape:pageopacity="0.0"
     inkscape:pagecheckerboard="0"
     inkscape:document-units="mm"
     showgrid="false"
     units="px"
     width="512px"
     showguides="true"
     inkscape:snap-object-midpoints="true"
     inkscape:snap-global="true"
     inkscape:guide-bbox="true"
     inkscape:zoom="0.7071068007461895"
     inkscape:cx="307.5914413077041"
     inkscape:cy="270.8218897031051"
     inkscape:window-width="1272"
     inkscape:window-height="704"
     inkscape:window-x="1281"
     inkscape:window-y="729"
     inkscape:window-maximized="1"
     inkscape:current-layer="layer1"
     inkscape:showpageshadow="0"
     inkscape:deskcolor="#505050" />
  <defs
     id="defs2">
    <inkscape:path-effect
       effect="fillet_chamfer"
       id="path-effect1118"
       is_visible="true"
       lpeversion="1"
       satellites_param="F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1"
       unit="px"
       method="auto"
       mode="F"
       radius="8"
       chamfer_steps="1"
       flexible="false"
       use_knot_distance="true"
       apply_no_radius="true"
       apply_with_radius="true"
       only_selected="false"
       hide_knots="false"
       nodesatellites_param="F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1" />
    <inkscape:path-effect
       effect="fillet_chamfer"
       id="path-effect1114"
       is_visible="true"
       lpeversion="1"
       satellites_param="F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1"
       unit="px"
       method="auto"
       mode="F"
       radius="8"
       chamfer_steps="1"
       flexible="false"
       use_knot_distance="true"
       apply_no_radius="true"
       apply_with_radius="true"
       only_selected="false"
       hide_knots="false"
       nodesatellites_param="F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1" />
    <inkscape:path-effect
       effect="fillet_chamfer"
       id="path-effect1078"
       is_visible="true"
       lpeversion="1"
       satellites_param="F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1"
       unit="px"
       method="auto"
       mode="F"
       radius="8"
       chamfer_steps="1"
       flexible="false"
       use_knot_distance="true"
       apply_no_radius="true"
       apply_with_radius="true"
       only_selected="false"
       hide_knots="false"
       nodesatellites_param="F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1" />
    <inkscape:path-effect
       effect="fillet_chamfer"
       id="path-effect1049"
       is_visible="true"
       lpeversion="1"
       satellites_param="F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1"
       unit="px"
       method="auto"
       mode="F"
       radius="8"
       chamfer_steps="1"
       flexible="false"
       use_knot_distance="true"
       apply_no_radius="true"
       apply_with_radius="true"
       only_selected="false"
       hide_knots="false"
       nodesatellites_param="F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1" />
    <inkscape:path-effect
       effect="fillet_chamfer"
       id="path-effect1019"
       is_visible="true"
       lpeversion="1"
       satellites_param="F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1"
       unit="px"
       method="auto"
       mode="F"
       radius="8"
       chamfer_steps="1"
       flexible="false"
       use_knot_distance="true"
       apply_no_radius="true"
       apply_with_radius="true"
       only_selected="false"
       hide_knots="false"
       nodesatellites_param="F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1" />
    <inkscape:path-effect
       effect="fillet_chamfer"
       id="path-effect1015"
       is_visible="true"
       lpeversion="1"
       satellites_param="F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1"
       unit="px"
       method="auto"
       mode="F"
       radius="8"
       chamfer_steps="1"
       flexible="false"
       use_knot_distance="true"
       apply_no_radius="true"
       apply_with_radius="true"
       only_selected="false"
       hide_knots="false"
       nodesatellites_param="F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1" />
    <inkscape:path-effect
       effect="fillet_chamfer"
       id="path-effect17083"
       is_visible="true"
       lpeversion="1"
       satellites_param="F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1"
       unit="px"
       method="auto"
       mode="F"
       radius="8"
       chamfer_steps="1"
       flexible="false"
       use_knot_distance="true"
       apply_no_radius="true"
       apply_with_radius="true"
       only_selected="false"
       hide_knots="false"
       nodesatellites_param="F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1" />
    <inkscape:path-effect
       effect="fillet_chamfer"
       id="path-effect16803"
       is_visible="true"
       lpeversion="1"
       satellites_param="F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1"
       unit="px"
       method="auto"
       mode="F"
       radius="8"
       chamfer_steps="1"
       flexible="false"
       use_knot_distance="true"
       apply_no_radius="true"
       apply_with_radius="true"
       only_selected="false"
       hide_knots="false"
       nodesatellites_param="F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1" />
    <inkscape:path-effect
       effect="fillet_chamfer"
       id="path-effect15774"
       is_visible="true"
       lpeversion="1"
       satellites_param="F,0,0,1,0,4.2333333,0,1 @ F,0,0,1,0,4.2333333,0,1 @ F,0,0,1,0,4.2333333,0,1 @ F,0,0,1,0,4.2333333,0,1"
       unit="px"
       method="auto"
       mode="F"
       radius="16"
       chamfer_steps="1"
       flexible="false"
       use_knot_distance="true"
       apply_no_radius="true"
       apply_with_radius="true"
       only_selected="false"
       hide_knots="false"
       nodesatellites_param="F,0,0,1,0,4.2333333,0,1 @ F,0,0,1,0,4.2333333,0,1 @ F,0,0,1,0,4.2333333,0,1 @ F,0,0,1,0,4.2333333,0,1" />
    <inkscape:path-effect
       effect="fillet_chamfer"
       id="path-effect15612"
       is_visible="true"
       lpeversion="1"
       satellites_param="F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1"
       unit="px"
       method="auto"
       mode="F"
       radius="16"
       chamfer_steps="1"
       flexible="false"
       use_knot_distance="true"
       apply_no_radius="true"
       apply_with_radius="true"
       only_selected="false"
       hide_knots="false"
       nodesatellites_param="F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1" />
    <inkscape:path-effect
       effect="fillet_chamfer"
       id="path-effect15006"
       is_visible="true"
       lpeversion="1"
       satellites_param="F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,2.1166667,0,1"
       unit="px"
       method="auto"
       mode="F"
       radius="16"
       chamfer_steps="1"
       flexible="false"
       use_knot_distance="true"
       apply_no_radius="true"
       apply_with_radius="true"
       only_selected="false"
       hide_knots="false"
       nodesatellites_param="F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,2.1166667,0,1 @ F,0,0,1,0,2.1166667,0,1" />
    <inkscape:path-effect
       effect="fillet_chamfer"
       id="path-effect12397"
       is_visible="true"
       lpeversion="1"
       satellites_param="F,0,0,1,0,2.6458333,0,5 @ F,0,0,1,0,2.6458333,0,5 @ F,0,0,1,0,2.6458333,0,5 | F,0,0,1,0,2.6458333,0,5 @ F,0,0,1,0,2.6458333,0,5 @ F,0,0,1,0,2.6458333,0,5"
       unit="px"
       method="auto"
       mode="F"
       radius="10"
       chamfer_steps="5"
       flexible="false"
       use_knot_distance="true"
       apply_no_radius="true"
       apply_with_radius="true"
       only_selected="false"
       hide_knots="false"
       nodesatellites_param="F,0,0,1,0,2.6458333,0,5 @ F,0,0,1,0,2.6458333,0,5 @ F,0,0,1,0,2.6458333,0,5 | F,0,0,1,0,2.6458333,0,5 @ F,0,0,1,0,2.6458333,0,5 @ F,0,0,1,0,2.6458333,0,5" />
    <inkscape:path-effect
       effect="fillet_chamfer"
       id="path-effect12289"
       is_visible="true"
       lpeversion="1"
       satellites_param="C,0,0,1,0,2.6458333,0,5 @ C,0,0,1,0,2.6458333,0,5 @ C,0,0,1,0,2.6458333,0,5 | C,0,0,1,0,2.6458333,0,5 @ C,0,0,1,0,2.6458333,0,5 @ C,0,0,1,0,2.6458333,0,5"
       unit="px"
       method="auto"
       mode="F"
       radius="10"
       chamfer_steps="5"
       flexible="false"
       use_knot_distance="true"
       apply_no_radius="true"
       apply_with_radius="true"
       only_selected="false"
       hide_knots="false"
       nodesatellites_param="C,0,0,1,0,2.6458333,0,5 @ C,0,0,1,0,2.6458333,0,5 @ C,0,0,1,0,2.6458333,0,5 | C,0,0,1,0,2.6458333,0,5 @ C,0,0,1,0,2.6458333,0,5 @ C,0,0,1,0,2.6458333,0,5" />
    <inkscape:path-effect
       effect="fillet_chamfer"
       id="path-effect12074"
       is_visible="true"
       lpeversion="1"
       satellites_param="F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1"
       unit="px"
       method="auto"
       mode="F"
       radius="0"
       chamfer_steps="1"
       flexible="false"
       use_knot_distance="true"
       apply_no_radius="true"
       apply_with_radius="true"
       only_selected="false"
       hide_knots="false"
       nodesatellites_param="F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1" />
  </defs>
  <g
     inkscape:groupmode="layer"
     id="layer2"
     inkscape:label="Thrusters"
     style="display:inline" />
  <g
     inkscape:label="Body"
     inkscape:groupmode="layer"
     id="layer1"
     style="display:inline">
    <rect
       style="fill:#5d5d5d;stroke-width:3;stroke-linecap:round;fill-opacity:1"
       id="rect1"
       width="110.066650390625"
       height="110.0666732788086"
       x="12.7000150680542"
       y="12.69999980926514" />
    <path
       id="rect55"
       style="fill:#888888;fill-opacity:1;stroke-width:0.264583"
       d="M 33.866667 0 C 15.104534 0 0 15.104534 0 33.866667 L 0 101.6 C 0 120.36213 15.104534 135.46667 33.866667 135.46667 L 101.6 135.46667 C 120.36213 135.46667 135.46667 120.36213 135.46667 101.6 L 135.46667 33.866667 C 135.46667 15.104534 120.36213 0 101.6 0 L 33.866667 0 z M 33.866667 12.7 L 101.6 12.7 C 113.32633 12.7 122.76667 22.140334 122.76667 33.866667 L 122.76667 101.6 C 122.76667 113.32633 113.32633 122.76667 101.6 122.76667 L 33.866667 122.76667 C 22.140334 122.76667 12.7 113.32633 12.7 101.6 L 12.7 33.866667 C 12.7 22.140334 22.140334 12.7 33.866667 12.7 z " />
    <path
       id="rect16402"
       style="fill:#444444;stroke-width:0.0200972"
       d="m 44.45,127 h 2.116666 a 2.1166667,2.1166667 45 0 1 2.116667,2.11667 l 0,6.35 h -6.35 v -6.35 A 2.1166667,2.1166667 135 0 1 44.45,127 Z"
       inkscape:path-effect="#path-effect16803"
       inkscape:original-d="m 42.333333,127 h 6.35 v 8.46667 h -6.35 z" />
    <path
       id="rect16402-0"
       style="display:inline;fill:#444444;stroke-width:0.0200972"
       d="m 88.9,127 h 2.116666 a 2.1166667,2.1166667 45 0 1 2.116667,2.11667 v 6.35 h -6.35 v -6.35 A 2.1166667,2.1166667 135 0 1 88.9,127 Z"
       inkscape:path-effect="#path-effect17083"
       inkscape:original-d="m 86.783333,127 h 6.35 v 8.46667 h -6.35 z" />
    <path
       id="rect16402-3"
       style="display:inline;fill:#444444;stroke-width:0.0200972"
       d="m 44.45,8.46667 h 2.116666 A 2.1166667,2.1166667 135 0 0 48.683333,6.3500033 V 0 h -6.35 V 6.3500033 A 2.1166667,2.1166667 45 0 0 44.45,8.46667 Z"
       inkscape:path-effect="#path-effect1015"
       inkscape:original-d="m 42.333333,8.46667 h 6.35 V 0 h -6.35 z" />
    <path
       id="rect16402-3-7"
       style="display:inline;fill:#444444;stroke-width:0.0200972"
       d="m 8.46668,46.5666673 v -2.11666759999999 a 2.116666699999998,2.116666699999998 45.00000000000005 0 0 -2.116666699999999,-2.1166667 H 0 V 48.683334 H 6.350013300000001 A 2.116666699999998,2.116666699999998 135 0 0 8.46668,46.5666673 Z"
       inkscape:path-effect="#path-effect1049"
       inkscape:original-d="M 8.46668,48.683334 V 42.333333 H 0 v 6.350001 z" />
    <path
       id="rect16402-3-7-5"
       style="display:inline;fill:#444444;stroke-width:0.0200972"
       d="M 8.46668,91.016667 V 88.9 A 2.1166667,2.1166667 45 0 0 6.3500133,86.783333 H 0 v 6.350001 H 6.3500133 A 2.1166667,2.1166667 135 0 0 8.46668,91.016667 Z"
       inkscape:path-effect="#path-effect1078"
       inkscape:original-d="M 8.46668,93.133334 V 86.783333 H 0 v 6.350001 z" />
    <path
       id="rect16402-3-7-3"
       style="display:inline;fill:#444444;stroke-width:0.0200972"
       d="M 127,46.566667 127,44.45 a 2.1166667,2.1166667 135 0 1 2.11667,-2.116667 h 6.35001 v 6.350001 h -6.35001 A 2.1166667,2.1166667 45 0 1 127,46.566667 Z"
       inkscape:path-effect="#path-effect1114"
       inkscape:original-d="m 127,48.683334 v -6.350001 h 8.46668 v 6.350001 z" />
    <path
       id="rect16402-3-7-5-5"
       style="display:inline;fill:#444444;stroke-width:0.0200972"
       d="M 127,91.016667 V 88.9 a 2.1166667,2.1166667 135 0 1 2.11667,-2.116667 h 6.35001 v 6.350001 l -6.35001,0 A 2.1166667,2.1166667 45 0 1 127,91.016667 Z"
       inkscape:path-effect="#path-effect1118"
       inkscape:original-d="m 127,93.133334 v -6.350001 h 8.46668 v 6.350001 z" />
    <path
       id="rect16402-0-6"
       style="display:inline;fill:#444444;stroke-width:0.0200972"
       d="m 88.9,8.46667 h 2.116666 A 2.1166667,2.1166667 135 0 0 93.133333,6.3500033 V 0 h -6.35 V 6.3500033 A 2.1166667,2.1166667 45 0 0 88.9,8.46667 Z"
       inkscape:path-effect="#path-effect1019"
       inkscape:original-d="m 86.783333,8.46667 h 6.35 V 0 h -6.35 z" />
  </g>
</svg>

M crates/unified/src/server/earth_parts.rs => crates/unified/src/server/earth_parts.rs +1 -1
@@ 48,7 48,7 @@ fn spawn_parts_on_earth(

    commands
        .spawn(SpawnPartRequest(
            asset_server.load("config/parts/chassis.part.toml"),
            asset_server.load("config/parts/housing.part.toml"),
        ))
        .insert(new_transform);
}