Skip to content

Commit 87eab61

Browse files
committed
Add scale attribute for the decal registry (CANADIAN's grandmaster map)
1 parent d24fe54 commit 87eab61

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

SpringCollab2020Module.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using Celeste.Mod.SpringCollab2020.Entities;
22
using Celeste.Mod.SpringCollab2020.Triggers;
3+
using Microsoft.Xna.Framework;
34
using System;
45

56
namespace Celeste.Mod.SpringCollab2020 {
@@ -33,7 +34,18 @@ public override void Load() {
3334
StrawberryIgnoringLighting.Load();
3435
SeekerCustomColors.Load();
3536
CameraCatchupSpeedTrigger.Load();
36-
ColorGradeFadeTrigger.Load();
37+
ColorGradeFadeTrigger.Load();
38+
39+
DecalRegistry.AddPropertyHandler("scale", (decal, attrs) => {
40+
Vector2 scale = decal.Scale;
41+
if (attrs["multiply"] != null) {
42+
scale *= float.Parse(attrs["multiply"].Value);
43+
}
44+
if (attrs["divide"] != null) {
45+
scale /= float.Parse(attrs["divide"].Value);
46+
}
47+
decal.Scale = scale;
48+
});
3749
}
3850

3951
public override void LoadContent(bool firstLoad) {

0 commit comments

Comments
 (0)