midspace / Space-Engineers-Admin-script-mod

Modding script for Space Engineers with dozens of Admin commands for creating game scenarios or supporting servers.
44 stars 13 forks source link

/repair #79

Open midspace opened 9 years ago

midspace commented 9 years ago

repair ships.

midspace commented 9 years ago

I've been having some trouble with this one. When the deformation is removed, it causes deformation in other areas, damaging the ship again.

Spcemarine commented 9 years ago

How are you applying this? I heard that dealing negative damage could be used for repairing blocks.

midspace commented 9 years ago

I'm regenerating the entire grid like /scaleup. I ran out of time tonight to upload it.

Spcemarine commented 9 years ago

I don't really like that method because it will destroy the voxel support if voxel support is enabled. E.g. we cannot disable/enable DestructibleBlocks for a station if it is inside of an asteroid because it will start colliding with the asteroid when the grid is regenerated.

midspace commented 9 years ago

The problem I was having up above, was with the LargeShipRedQS1, which has airtight hangar doors. The airtight hangar doors would deform the cubes in the surrounding area when regenerating the grid.

I haven't been able to get this working with negative damage either. There are a few parts to this. Negate the accumulated damage back to the same level of construction. Un-deform the deformed cubes. Make sure any other elements, like particle effects, damage sounds, and the construction/damage progress bar is up to date.

Spcemarine commented 9 years ago

Both ways the same issue with the airtight doors occures? And is there any difference if the doors are open/closed?

midspace commented 9 years ago

At the moment, I've only been able to get that far with the checked in code. The doors are closed in the prefab. It shouldn't matter if the doors are open or closed.