Skip to content

Vanilla DecalRegistry

coloursofnoise edited this page Oct 17, 2022 · 1 revision

Vanilla Decals are assigned their properties in code, when the Decal is added to the Scene.

// Decal.Added
case "generic/grass_a":
case "generic/grass_b":
case "generic/grass_c":
case "generic/grass_d":
	MakeBanner(2f, 2f, 1, 0.05f, easeDown: false, -2f);
	break;
case "0-prologue/house":
	CreateSmoke(new Vector2(36f, -28f), inbg: true);
	break;
case "1-forsakencity/rags":
case "1-forsakencity/ragsb":
case "3-resort/curtain_side_a":
case "3-resort/curtain_side_d":
	MakeBanner(2f, 3.5f, 2, 0.05f, easeDown: true);
	break;
case "3-resort/roofcenter":
case "3-resort/roofcenter_b":
case "3-resort/roofcenter_c":
case "3-resort/roofcenter_d":
	MakeSolid(-8f, -4f, 16f, 8f, 14, blockWaterfalls: true);
	break;
case "3-resort/roofedge":
case "3-resort/roofedge_b":
case "3-resort/roofedge_c":
case "3-resort/roofedge_d":
	MakeSolid((!(scale.X < 0f)) ? (-8) : 0, -4f, 8f, 8f, 14, blockWaterfalls: true);
	break;
case "3-resort/bridgecolumntop":
	MakeSolid(-8f, -8f, 16f, 8f, 8, blockWaterfalls: true);
	MakeSolid(-5f, 0f, 10f, 8f, 8, blockWaterfalls: true);
	break;
case "3-resort/bridgecolumn":
	MakeSolid(-5f, -8f, 10f, 16f, 8, blockWaterfalls: true);
	break;
case "3-resort/vent":
	CreateSmoke(Vector2.Zero, inbg: false);
	break;
case "3-resort/brokenelevator":
	MakeSolid(-16f, -20f, 32f, 48f, 22, blockWaterfalls: true);
	break;
case "4-cliffside/bridge_a":
	MakeSolid(-24f, 0f, 48f, 8f, 8, base.Depth != 9000);
	break;
case "4-cliffside/flower_a":
case "4-cliffside/flower_b":
case "4-cliffside/flower_c":
case "4-cliffside/flower_d":
	MakeBanner(2f, 2f, 1, 0.05f, easeDown: false, 2f, onlyIfWindy: true);
	break;
case "5-temple/bg_mirror_a":
case "5-temple/bg_mirror_b":
case "5-temple/bg_mirror_shard_a":
case "5-temple/bg_mirror_shard_b":
case "5-temple/bg_mirror_shard_c":
case "5-temple/bg_mirror_shard_d":
case "5-temple/bg_mirror_shard_e":
case "5-temple/bg_mirror_shard_f":
case "5-temple/bg_mirror_shard_g":
case "5-temple/bg_mirror_shard_h":
case "5-temple/bg_mirror_shard_i":
case "5-temple/bg_mirror_shard_j":
case "5-temple/bg_mirror_shard_k":
case "5-temple/bg_mirror_shard_group_a":
case "5-temple/bg_mirror_shard_group_a_b":
case "5-temple/bg_mirror_shard_group_a_c":
case "5-temple/bg_mirror_shard_group_b":
case "5-temple/bg_mirror_shard_group_c":
case "5-temple/bg_mirror_shard_group_d":
case "5-temple/bg_mirror_shard_group_e":
	scale.Y = 1f;
	MakeMirror(text, keepOffsetsClose: false);
	break;
case "5-temple/bg_mirror_c":
case "5-temple/statue_d":
	MakeMirror(text, keepOffsetsClose: true);
	break;
case "5-temple-dark/mosaic_b":
	Add(new BloomPoint(new Vector2(0f, 5f), 0.75f, 16f));
	break;
case "6-reflection/crystal_reflection":
	MakeMirrorSpecialCase(text, new Vector2(-12f, 2f));
	break;
case "7-summit/cloud_a":
case "7-summit/cloud_b":
case "7-summit/cloud_bb":
case "7-summit/cloud_bc":
case "7-summit/cloud_bd":
case "7-summit/cloud_c":
case "7-summit/cloud_cb":
case "7-summit/cloud_cc":
case "7-summit/cloud_cd":
case "7-summit/cloud_ce":
case "7-summit/cloud_d":
case "7-summit/cloud_db":
case "7-summit/cloud_dc":
case "7-summit/cloud_dd":
case "7-summit/cloud_e":
case "7-summit/cloud_f":
case "7-summit/cloud_g":
case "7-summit/cloud_h":
case "7-summit/cloud_j":
case "7-summit/cloud_i":
	base.Depth = -13001;
	MakeParallax(0.1f);
	scale *= 1.15f;
	break;
case "7-summit/summitflag":
	Add(new SoundSource("event:/env/local/07_summit/flag_flap"));
	break;
case "9-core/ball_a":
	Add(image = new CoreSwapImage(textures[0], GFX.Game["decals/9-core/ball_a_ice"]));
	break;
case "9-core/ball_a_ice":
	Add(image = new CoreSwapImage(GFX.Game["decals/9-core/ball_a"], textures[0]));
	break;
case "9-core/rock_e":
	Add(image = new CoreSwapImage(textures[0], GFX.Game["decals/9-core/rock_e_ice"]));
	break;
case "9-core/rock_e_ice":
	Add(image = new CoreSwapImage(GFX.Game["decals/9-core/rock_e"], textures[0]));
	break;
case "9-core/heart_bevel_a":
case "9-core/heart_bevel_b":
case "9-core/heart_bevel_c":
case "9-core/heart_bevel_d":
	scale.Y = 1f;
	scale.X = 1f;
	break;
case "10-farewell/creature_a":
case "10-farewell/creature_b":
case "10-farewell/creature_c":
case "10-farewell/creature_d":
case "10-farewell/creature_e":
case "10-farewell/creature_f":
	base.Depth = 10001;
	MakeParallax(-0.1f);
	MakeFloaty();
	break;
case "10-farewell/coral_":
case "10-farewell/coral_a":
case "10-farewell/coral_b":
case "10-farewell/coral_c":
case "10-farewell/coral_d":
	MakeScaredAnimation();
	break;
case "10-farewell/clouds/cloud_a":
case "10-farewell/clouds/cloud_b":
case "10-farewell/clouds/cloud_bb":
case "10-farewell/clouds/cloud_bc":
case "10-farewell/clouds/cloud_bd":
case "10-farewell/clouds/cloud_c":
case "10-farewell/clouds/cloud_cb":
case "10-farewell/clouds/cloud_cc":
case "10-farewell/clouds/cloud_cd":
case "10-farewell/clouds/cloud_ce":
case "10-farewell/clouds/cloud_d":
case "10-farewell/clouds/cloud_db":
case "10-farewell/clouds/cloud_dc":
case "10-farewell/clouds/cloud_dd":
case "10-farewell/clouds/cloud_e":
case "10-farewell/clouds/cloud_f":
case "10-farewell/clouds/cloud_g":
case "10-farewell/clouds/cloud_h":
case "10-farewell/clouds/cloud_j":
case "10-farewell/clouds/cloud_i":
	base.Depth = -13001;
	MakeParallax(0.1f);
	scale *= 1.15f;
	break;
case "10-farewell/glitch_a_":
case "10-farewell/glitch_b_":
case "10-farewell/glitch_c":
	frame = Calc.Random.NextFloat(textures.Count);
	break;
case "10-farewell/cliffside":
case "10-farewell/car":
case "10-farewell/bed":
case "10-farewell/floating house":
case "10-farewell/heart_a":
case "10-farewell/heart_b":
case "10-farewell/reflection":
case "10-farewell/tower":
case "10-farewell/temple":
case "10-farewell/giantcassete":
	base.Depth = 10001;
	MakeParallax(-0.15f);
	MakeFloaty();
	break;
case "10-farewell/finalflag":
	AnimationSpeed = 6f;
	Add(image = new FinalFlagDecalImage());
	break;
}

Additionally, any decals with crack in the name that are present within the bounds of a RumbleTrigger will be made invisible, and only appear when the RumbleTrigger is activated.

// Decal.Added
if (Name.Contains("crack"))
{
	IsCrack = true;
}

// RumbleTrigger.Awake
foreach (Decal item in scene.Entities.FindAll<Decal>())
{
	if (item.IsCrack && (!constrainHeight || (item.Y >= top && item.Y <= bottom)) && item.X >= left && item.X <= right)
	{
		item.Visible = false;
		decals.Add(item);
	}
}

// RumbleTrigger.RumbleRoutine
foreach (Decal decal in decals)
{
	decal.Visible = true;
}
Clone this wiki locally