REPENTOGON icon indicating copy to clipboard operation
REPENTOGON copied to clipboard

MC_POST_GRID_ENTITY_SPAWN doesn't seem to trigger for doors.

Open MrSoup678 opened this issue 1 year ago • 1 comments

	function mod:postDevilDealDoorSpawn(gridEnt)
		--only doors past this point.
		local gridEntDoor = gridEnt:ToDoor();
		print(gridEnt:GetType());
		--last check handles duality.
		if gridEntDoor ~= nil and gridEntDoor.TargetRoomType == RoomType.ROOM_DEVIL and TSIL.Doors.GetAngelRoomDoor()==nil then
			music:PitchSlide(0.5)
		end
		
		

	end
	mod:AddCallback(ModCallbacks.MC_POST_GRID_ENTITY_SPAWN,mod.postDevilDealDoorSpawn);

Print is for debugging, note that not a single one returns 16. Are they handled somewhere else?

MrSoup678 avatar Oct 15 '24 12:10 MrSoup678

This callback had to be manually patched into existing code, in a lot of different places. It seems like I missed this case because of it not behaving the same as other grid entity spawning functions.

namishere avatar Oct 18 '24 05:10 namishere