sumghai / MedPod

Advanced regenerative medical beds for RimWorld
Other
14 stars 15 forks source link

Placing a vanilla 'Sleeping spot' over the 'empty' area of a MedPod deletes the MedPod. #8

Closed CodePanter closed 4 years ago

CodePanter commented 4 years ago

A few minutes ago while playing, I wanted to try and sandwich a vanilla Sleeping Spot in the 'empty' area on either side of the MedPod (the 2 empty looking tiles on either side of the MedPod) and this made the entire MedPod disappear, and deleting the sleeping spot did not seem to bring it back.

sumghai commented 4 years ago

This is working as intended - buildings aren't supposed to overlap each other.

The MedPod has an in-game footprint of 3x3 cells, and the two 2x1 cell empty rectangles on either side of the MedPod bed are meant as clearance for the moving gantry arm, so nothing should be built there. This is also why Doctors will not tend/feed/operate on patients using MedPods.

CodePanter commented 3 years ago

I'm sorry if I was unclear, but placing the sleeping spot in the 2x1 did not make my colonists deconstruct the medpod, the actual medpod disappeared. There was no warning, and there were no dropped resources. I'm fairly certain the medpod disappearing as a result of building something else that (accidentally) overlaps with the medpod is at least not considered expected behavior, as this is a very expensive machine to lose in such a way. I made a gif of it here: https://i.imgur.com/wnoPxkg.gif

sumghai commented 3 years ago

A sleeping spot requires no resources to build, and so is instantly constructed when placed, destroying anything that it overlaps.

Quite simply, you shouldn't be trying to building stuff on top of MedPods, including the side clearance areas.

CodePanter commented 3 years ago

I see what you mean, but after a bit of testing, this 'instantly destroying anything it overlaps' only goes for beds (including vanilla beds, and the medpod). I don't know why, but with all other furniture I tested (walls, doors, lamps, heaters and research benches), hovering a sleeping spot over an existing structure will turn the outline red, preventing you from placing it. With beds it stays green, and clicking it does as you describe. This behavior only happens with regular, animal and double sleeping spots, not with marriage spots, party spots and some non vanilla 'spots'. I suppose this isn't a bug in your code, and is either a feature or a bug in the vanilla game, but I hadn't come across this until I used your mod.