summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMittendrein Markus <maxmitti@gmx.net>2016-03-04 21:27:02 +0100
committerMittendrein Markus <maxmitti@gmx.net>2016-03-04 21:27:12 +0100
commit1642ec65eaf83b8c1a6b1ea44d65331475fd3bf2 (patch)
treeb46e2f61f6a223e8c2c54536da324f502a99b948
parent2fa1ef2fe4dcd5c47d1ccca68d1dba79399ea2c6 (diff)
downloadtempelschubsen-1642ec65eaf83b8c1a6b1ea44d65331475fd3bf2.tar.gz
tempelschubsen-1642ec65eaf83b8c1a6b1ea44d65331475fd3bf2.zip
Move some mode-specific stuff into the modes' scripts
-rw-r--r--TemplePushing.c4s/Misc.c4d/FestiveClonks.c4d/Script.c2
-rw-r--r--TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Script.c29
-rw-r--r--TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/StringTblDE.txt7
-rw-r--r--TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/StringTblUS.txt7
-rw-r--r--TemplePushing.c4s/Modes.c4d/ApocalypticPushing.c4d/Script.c15
-rw-r--r--TemplePushing.c4s/Modes.c4d/ApocalypticPushing.c4d/StringTblDE.txt1
-rw-r--r--TemplePushing.c4s/Modes.c4d/ApocalypticPushing.c4d/StringTblUS.txt1
-rw-r--r--TemplePushing.c4s/Modes.c4d/ClassicPushing.c4d/Script.c6
-rw-r--r--TemplePushing.c4s/Modes.c4d/ClassicPushing.c4d/StringTblDE.txt1
-rw-r--r--TemplePushing.c4s/Modes.c4d/ClassicPushing.c4d/StringTblUS.txt1
-rw-r--r--TemplePushing.c4s/Modes.c4d/FestivePushing.c4d/Script.c15
-rw-r--r--TemplePushing.c4s/Modes.c4d/FestivePushing.c4d/StringTblDE.txt1
-rw-r--r--TemplePushing.c4s/Modes.c4d/FestivePushing.c4d/StringTblUS.txt1
-rw-r--r--TemplePushing.c4s/Modes.c4d/MagicalPushing.c4d/Script.c8
-rw-r--r--TemplePushing.c4s/Modes.c4d/MagicalPushing.c4d/StringTblDE.txt1
-rw-r--r--TemplePushing.c4s/Modes.c4d/MagicalPushing.c4d/StringTblUS.txt1
-rw-r--r--TemplePushing.c4s/Modes.c4d/MedievalPushing.c4d/Script.c8
-rw-r--r--TemplePushing.c4s/Modes.c4d/MedievalPushing.c4d/StringTblDE.txt1
-rw-r--r--TemplePushing.c4s/Modes.c4d/MedievalPushing.c4d/StringTblUS.txt1
-rw-r--r--TemplePushing.c4s/Script.c77
-rw-r--r--TemplePushing.c4s/Sections.c4d/SectClassic.c4d/Script.c6
-rw-r--r--TemplePushing.c4s/Sections.c4d/SectCloudTemple.c4d/Script.c4
-rw-r--r--TemplePushing.c4s/Sections.c4d/SectLiquidTemple.c4d/Script.c4
23 files changed, 93 insertions, 105 deletions
diff --git a/TemplePushing.c4s/Misc.c4d/FestiveClonks.c4d/Script.c b/TemplePushing.c4s/Misc.c4d/FestiveClonks.c4d/Script.c
index 656a32b..845a57d 100644
--- a/TemplePushing.c4s/Misc.c4d/FestiveClonks.c4d/Script.c
+++ b/TemplePushing.c4s/Misc.c4d/FestiveClonks.c4d/Script.c
@@ -4,7 +4,7 @@
#appendto CLNK
func Construction () {
- if (mode == MODE_Festive)
+ if (mode && mode->GetID() == MODE_Festive)
{
if(GetID() == CLNK) SetGraphics(0, this, FSVC);
return (_inherited (...));
diff --git a/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Script.c b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Script.c
index bd26a3e..a453b2f 100644
--- a/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Script.c
+++ b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Script.c
@@ -28,12 +28,12 @@ protected func Initialize()
}
section = Sections[0];
- Modes = [
- [MODE_Classic, "$ModeClassic$", CLSC],
- [MODE_Magic, "$ModeMagic$", MLPG],
- [MODE_Knightly, "$ModeKnightly$", MKNI],
- [MODE_Apocalyptic, "$ModeApocalyptic$", APCE],
- [MODE_Festive, "$ModeFestive$", FSTV]];
+ Modes = [];
+ for (var i = 0, def; def = GetDefinition(i, C4D_StaticBack); ++i)
+ {
+ if (DefinitionCall(def, "ModeName")) Modes[GetLength(Modes)] = def;
+ }
+ mode = Modes[0];
}
private func ShowSetup()
@@ -82,8 +82,8 @@ private func ShowModeMenu()
var menuItemIndex = 0;
for (var m in Modes)
{
- clonk->AddMenuItem(m[1], Format("SelectMode(%d)", m[0]), m[2]);
- CheckPreselect(!selectRandomMode && m[0] == mode, menuItemIndex++);
+ clonk->AddMenuItem(m->ModeName(), Format("SelectMode(%i)", m), m);
+ CheckPreselect(!selectRandomMode && m == mode, menuItemIndex++);
}
clonk->AddMenuItem("$Random$", "SelectRandomMode()", SRND);
@@ -91,7 +91,7 @@ private func ShowModeMenu()
clonk->AddMenuItem("$Back$", "ShowSectionMenu()", SBCK);
}
-private func SelectMode(int selectedMode)
+private func SelectMode(id selectedMode)
{
selectRandomMode = false;
mode = selectedMode;
@@ -196,7 +196,7 @@ private func SetupDone()
{
// Apply random selection
if (selectRandomSection) section = Sections[Random(GetLength(Sections))];
- if (selectRandomMode) mode = Modes[Random(GetLength(Modes))][0];
+ if (selectRandomMode) mode = Modes[Random(GetLength(Modes))];
selectRandomSection = selectRandomMode = false;
// Show final setup message and start the game
ShowMessage();
@@ -260,14 +260,7 @@ private func GetMessage()
}
else
{
- for (var m in Modes)
- {
- if (m[0] == mode)
- {
- msgMode = Format("$Mode$: {{%i}} %s", m[2], m[1]);
- break;
- }
- }
+ msgMode = Format("$Mode$: {{%i}} %s", mode, mode->ModeName());
}
var msgWinScore;
diff --git a/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/StringTblDE.txt b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/StringTblDE.txt
index ffe51b6..1212c01 100644
--- a/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/StringTblDE.txt
+++ b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/StringTblDE.txt
@@ -1,8 +1,3 @@
-ModeClassic=<c e6b800>Klassisch</c>
-ModeMagic=<c 4700b2>Magisch</c>
-ModeKnightly=<c 99ff66>Mittelalterlich</c>
-ModeApocalyptic=<c b20000>Apokalyptisch</c>
-ModeFestive=<c f0ffff>Winterlich</c>
Back=Zurück
Done=Fertig
Relaunches=Relaunches
@@ -12,4 +7,4 @@ Mode=Modus
Enabled=Aktiviert
Disabled=Deaktiviert
Ambience=Ambiente
-Random=Zufällig \ No newline at end of file
+Random=Zufällig
diff --git a/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/StringTblUS.txt b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/StringTblUS.txt
index 07240dd..f689af1 100644
--- a/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/StringTblUS.txt
+++ b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/StringTblUS.txt
@@ -1,8 +1,3 @@
-ModeClassic=<c e6b800>Classic</c>
-ModeMagic=<c 4700b2>Magical</c>
-ModeKnightly=<c 99ff66>Medieval</c>
-ModeApocalyptic=<c b20000>Apocalyptical</c>
-ModeFestive=<c f0ffff>Winterly</c>
Back=Back
Done=Done
Relaunches=Relaunches
@@ -12,4 +7,4 @@ Mode=Mode
Enabled=Enabled
Disabled=Disabled
Ambience=Ambience
-Random=Random \ No newline at end of file
+Random=Random
diff --git a/TemplePushing.c4s/Modes.c4d/ApocalypticPushing.c4d/Script.c b/TemplePushing.c4s/Modes.c4d/ApocalypticPushing.c4d/Script.c
index 508577a..e026efa 100644
--- a/TemplePushing.c4s/Modes.c4d/ApocalypticPushing.c4d/Script.c
+++ b/TemplePushing.c4s/Modes.c4d/ApocalypticPushing.c4d/Script.c
@@ -2,4 +2,19 @@
#strict 2
+static const MODE_Apocalyptic = APCE;
+
protected func Activate(int player) { MessageWindow(GetDesc(), player); }
+
+func Initialize()
+{
+ AddEffect("CreateTeraFlints", 0, 20, 90);
+ AddEffect("ShakeScreen", 0, 20, 50);
+ AddEffect("Bottom", 0, 20, 2);
+ AddEffect("SkyAdjust", 0, 20, 1);
+}
+
+func ModeName() { return "$ModeName$"; }
+func NoSpawnpoints() { return true; }
+func NoCorpses() { return true; }
+func AmbienceSounds() { return [["ExtremeAmbience.ogg", 75]]; }
diff --git a/TemplePushing.c4s/Modes.c4d/ApocalypticPushing.c4d/StringTblDE.txt b/TemplePushing.c4s/Modes.c4d/ApocalypticPushing.c4d/StringTblDE.txt
new file mode 100644
index 0000000..ce5069d
--- /dev/null
+++ b/TemplePushing.c4s/Modes.c4d/ApocalypticPushing.c4d/StringTblDE.txt
@@ -0,0 +1 @@
+ModeName=<c b20000>Apokalyptisch</c>
diff --git a/TemplePushing.c4s/Modes.c4d/ApocalypticPushing.c4d/StringTblUS.txt b/TemplePushing.c4s/Modes.c4d/ApocalypticPushing.c4d/StringTblUS.txt
new file mode 100644
index 0000000..78690e2
--- /dev/null
+++ b/TemplePushing.c4s/Modes.c4d/ApocalypticPushing.c4d/StringTblUS.txt
@@ -0,0 +1 @@
+ModeName=<c b20000>Apocalyptical</c>
diff --git a/TemplePushing.c4s/Modes.c4d/ClassicPushing.c4d/Script.c b/TemplePushing.c4s/Modes.c4d/ClassicPushing.c4d/Script.c
index e7b98b4..36389f0 100644
--- a/TemplePushing.c4s/Modes.c4d/ClassicPushing.c4d/Script.c
+++ b/TemplePushing.c4s/Modes.c4d/ClassicPushing.c4d/Script.c
@@ -2,4 +2,10 @@
#strict 2
+static const MODE_Classic = CLSC;
+
protected func Activate(int player) { MessageWindow(GetDesc(), player); }
+
+func ModeName() { return "$ModeName$"; }
+func SpawnpointDefinitions() { return [[ROCK, 5], [SCRL, 5], [FLNT, 4], [SFLN, 9], [STFN, 3], [EFLN, 5], [FBMP, 4]]; }
+func SpawnpointInterval() { return 800; }
diff --git a/TemplePushing.c4s/Modes.c4d/ClassicPushing.c4d/StringTblDE.txt b/TemplePushing.c4s/Modes.c4d/ClassicPushing.c4d/StringTblDE.txt
new file mode 100644
index 0000000..f5b0eaa
--- /dev/null
+++ b/TemplePushing.c4s/Modes.c4d/ClassicPushing.c4d/StringTblDE.txt
@@ -0,0 +1 @@
+ModeName=<c e6b800>Klassisch</c>
diff --git a/TemplePushing.c4s/Modes.c4d/ClassicPushing.c4d/StringTblUS.txt b/TemplePushing.c4s/Modes.c4d/ClassicPushing.c4d/StringTblUS.txt
new file mode 100644
index 0000000..ec1c0b3
--- /dev/null
+++ b/TemplePushing.c4s/Modes.c4d/ClassicPushing.c4d/StringTblUS.txt
@@ -0,0 +1 @@
+ModeName=<c e6b800>Classic</c>
diff --git a/TemplePushing.c4s/Modes.c4d/FestivePushing.c4d/Script.c b/TemplePushing.c4s/Modes.c4d/FestivePushing.c4d/Script.c
index db6da20..cea0302 100644
--- a/TemplePushing.c4s/Modes.c4d/FestivePushing.c4d/Script.c
+++ b/TemplePushing.c4s/Modes.c4d/FestivePushing.c4d/Script.c
@@ -2,4 +2,19 @@
#strict 2
+static const MODE_Festive = FSTV;
+
protected func Activate(int player) { MessageWindow(GetDesc(), player); }
+
+func Initialize()
+{
+ if (ambienceEnabled) CreateObject(SNOR, 0, 0, NO_OWNER);
+ SetSkyAdjust(RGB(189, 189, 255));
+ SetGamma(RGB(0, 0, 50), RGB(100, 100, 128), RGB(200, 200, 255));
+ SetScrollSpells([MICS, ABLA, MFWV, MLGT, MGPL, ICNL, AFST, MDFL, MGCY, MATT]);
+}
+
+func ModeName() { return "$ModeName$"; }
+func SpawnpointDefinitions() { return [[TSWB, 7], [SCRL, 5], [ICE1, 3]]; }
+func SpawnpointInterval() { return 600; }
+func AmbienceSounds() { return [["FestiveAmbience.ogg", 25]]; }
diff --git a/TemplePushing.c4s/Modes.c4d/FestivePushing.c4d/StringTblDE.txt b/TemplePushing.c4s/Modes.c4d/FestivePushing.c4d/StringTblDE.txt
new file mode 100644
index 0000000..1afa2ce
--- /dev/null
+++ b/TemplePushing.c4s/Modes.c4d/FestivePushing.c4d/StringTblDE.txt
@@ -0,0 +1 @@
+ModeName=<c f0ffff>Winterlich</c>
diff --git a/TemplePushing.c4s/Modes.c4d/FestivePushing.c4d/StringTblUS.txt b/TemplePushing.c4s/Modes.c4d/FestivePushing.c4d/StringTblUS.txt
new file mode 100644
index 0000000..1f9bcd4
--- /dev/null
+++ b/TemplePushing.c4s/Modes.c4d/FestivePushing.c4d/StringTblUS.txt
@@ -0,0 +1 @@
+ModeName=<c f0ffff>Winterly</c>
diff --git a/TemplePushing.c4s/Modes.c4d/MagicalPushing.c4d/Script.c b/TemplePushing.c4s/Modes.c4d/MagicalPushing.c4d/Script.c
index 3b6d66b..a174e28 100644
--- a/TemplePushing.c4s/Modes.c4d/MagicalPushing.c4d/Script.c
+++ b/TemplePushing.c4s/Modes.c4d/MagicalPushing.c4d/Script.c
@@ -2,4 +2,12 @@
#strict 2
+static const MODE_Magic = MLPG;
+
protected func Activate(int player) { MessageWindow(GetDesc(), player); }
+
+func ModeName() { return "$ModeName$"; }
+func SpawnpointDefinitions() { return IIf(suddendeathEnabled, [[SCRL, 19]], [[TSWB, 7], [SCRL, 5], [ICE1, 3]]); }
+func SpawnpointInterval() { return 750; }
+
+func Gamma() { return [RGB(5, 5, 10), RGB(80, 80, 150), RGB(200, 200, 255)]; }
diff --git a/TemplePushing.c4s/Modes.c4d/MagicalPushing.c4d/StringTblDE.txt b/TemplePushing.c4s/Modes.c4d/MagicalPushing.c4d/StringTblDE.txt
new file mode 100644
index 0000000..0cabcb1
--- /dev/null
+++ b/TemplePushing.c4s/Modes.c4d/MagicalPushing.c4d/StringTblDE.txt
@@ -0,0 +1 @@
+ModeName=<c 4700b2>Magisch</c>
diff --git a/TemplePushing.c4s/Modes.c4d/MagicalPushing.c4d/StringTblUS.txt b/TemplePushing.c4s/Modes.c4d/MagicalPushing.c4d/StringTblUS.txt
new file mode 100644
index 0000000..d3509b1
--- /dev/null
+++ b/TemplePushing.c4s/Modes.c4d/MagicalPushing.c4d/StringTblUS.txt
@@ -0,0 +1 @@
+ModeName=<c 4700b2>Magical</c>
diff --git a/TemplePushing.c4s/Modes.c4d/MedievalPushing.c4d/Script.c b/TemplePushing.c4s/Modes.c4d/MedievalPushing.c4d/Script.c
index 8f9e261..0d3258b 100644
--- a/TemplePushing.c4s/Modes.c4d/MedievalPushing.c4d/Script.c
+++ b/TemplePushing.c4s/Modes.c4d/MedievalPushing.c4d/Script.c
@@ -2,4 +2,12 @@
#strict 2
+static const MODE_Knightly = MKNI;
+
protected func Activate(int player) { MessageWindow(GetDesc(), player); }
+
+func ModeName() { return "$ModeName$"; }
+func SpawnpointDefinitions() { return [[SFLN, 3], [EFLN,3], [SWOR, 5], [AXE1, 5], [SPER, 2], [ARWP, 5], [SCRL, 5], [FARP, 3]]; }
+func SpawnpointInterval() { return 800; }
+
+//TODO: Ambience, Festive Clonks
diff --git a/TemplePushing.c4s/Modes.c4d/MedievalPushing.c4d/StringTblDE.txt b/TemplePushing.c4s/Modes.c4d/MedievalPushing.c4d/StringTblDE.txt
new file mode 100644
index 0000000..6d7cd7f
--- /dev/null
+++ b/TemplePushing.c4s/Modes.c4d/MedievalPushing.c4d/StringTblDE.txt
@@ -0,0 +1 @@
+ModeName=<c 99ff66>Mittelalterlich</c>
diff --git a/TemplePushing.c4s/Modes.c4d/MedievalPushing.c4d/StringTblUS.txt b/TemplePushing.c4s/Modes.c4d/MedievalPushing.c4d/StringTblUS.txt
new file mode 100644
index 0000000..98e4216
--- /dev/null
+++ b/TemplePushing.c4s/Modes.c4d/MedievalPushing.c4d/StringTblUS.txt
@@ -0,0 +1 @@
+ModeName=<c 99ff66>Medieval</c>
diff --git a/TemplePushing.c4s/Script.c b/TemplePushing.c4s/Script.c
index 81de435..0022e8a 100644
--- a/TemplePushing.c4s/Script.c
+++ b/TemplePushing.c4s/Script.c
@@ -2,8 +2,6 @@
#strict 2
-static const MODE_Classic = 0, MODE_Magic = 1, MODE_Festive = 2, MODE_Apocalyptic = 3, MODE_Knightly = 4;
-
static const SBRD_FirstRow = 0;
static const SBRD_TeamSortCol = -3, SBRD_SortCol = -2, SBRD_NameCol = -1, SBRD_RelaunchesCol = 0, SBRD_ScoreCol = 1;
static const SORT_SORTCOL_Team = 0, SORT_SORTCOL_Player = 1, SORT_SORTCOL_Leaver = 2;
@@ -25,6 +23,7 @@ static suddendeathEnabled;
static loadingSection;
static eliminatedPlayers;
static gameStartMessage, countdown, gameStarted, gameOver;
+static ambienceSounds;
func Initialize()
{
@@ -192,56 +191,24 @@ func Script0()
LoadScenarioSection(DefinitionCall(sectionID, "SectionName"));
loadingSection = false;
section = CreateObject(sectionID, 0, 0, NO_OWNER);
+ ambienceSounds = mode->~AmbienceSounds() || section->~SectionAmbienceSounds() || [];
+ mode = CreateObject(mode, 0, 0, NO_OWNER);
+
+
+ if (mode->~Gamma()) SetGamma(mode->Gamma());
// Create spawnpoints
- if (mode != MODE_Apocalyptic)
+ if (!mode->~NoSpawnpoints())
{
var spawnPointSpawner = CreateObject(SPSR, 0, 0, NO_OWNER);
spawnPointSpawner->SetLocations(section->SpawnpointLocations());
- if (mode == MODE_Classic)
- {
- spawnPointSpawner->SetDefinitions([[ROCK, 5], [SCRL, 5], [FLNT, 4], [SFLN, 9], [STFN, 3], [EFLN, 5], [FBMP, 4]]);
- spawnPointSpawner->SetSpawnInterval(800);
- }
- if (mode == MODE_Festive)
- {
- spawnPointSpawner->SetDefinitions([[TSWB, 7], [SCRL, 5], [ICE1, 3]]);
- spawnPointSpawner->SetSpawnInterval(600);
- }
- if (mode == MODE_Knightly)
- {
- spawnPointSpawner->SetDefinitions([[SFLN, 3], [EFLN,3], [SWOR, 5], [AXE1, 5], [SPER, 2], [ARWP, 5], [SCRL, 5], [FARP, 3]]);
- spawnPointSpawner->SetSpawnInterval(800);
- }
- if (mode == MODE_Magic)
- {
- if (suddendeathEnabled) spawnPointSpawner->SetDefinitions([[SCRL, 19]]);
- else spawnPointSpawner->SetDefinitions([[SCRL, 19], [GBLT, 1]]);
- spawnPointSpawner->SetSpawnInterval(750);
- spawnPointSpawner->SetSpawnpointGamma(RGB(5, 5, 10), RGB(80, 80, 150), RGB(200, 200, 255));
- }
+ spawnPointSpawner->SetDefinitions(mode->SpawnpointDefinitions());
+ spawnPointSpawner->SetSpawnInterval(mode->SpawnpointInterval());
+
spawnPointSpawner->CreateSpawnPoints();
}
- // Effects for apocalypse mode
- if (mode == MODE_Apocalyptic)
- {
- AddEffect("CreateTeraFlints", 0, 20, 90);
- AddEffect("ShakeScreen", 0, 20, 50);
- AddEffect("Bottom", 0, 20, 2);
- AddEffect("SkyAdjust", 0, 20, 1);
- }
-
- // Effects for festive mode
- if (mode == MODE_Festive)
- {
- if (ambienceEnabled) CreateObject(SNOR, 0, 0, NO_OWNER);
- SetSkyAdjust(RGB(189, 189, 255));
- SetGamma(RGB(0, 0, 50), RGB(100, 100, 128), RGB(200, 200, 255));
- SetScrollSpells([MICS, ABLA, MFWV, MLGT, MGPL, ICNL, AFST, MDFL, MGCY, MATT]);
- }
-
// Create melee goal
CreateObject(MELE, 0, 0, NO_OWNER);
@@ -252,24 +219,6 @@ func Script0()
if (rotateInJumpEnabled) CreateObject(RIJP, 0, 0, NO_OWNER);
CreateObject(OFDR, 0, 0, NO_OWNER);
- // Create mode objects
- if (mode == MODE_Magic)
- {
- CreateObject(MLPG, 0, 0, NO_OWNER);
- }
- if (mode == MODE_Festive)
- {
- CreateObject(FSTV, 0, 0, NO_OWNER);
- }
- if (mode == MODE_Knightly)
- {
- CreateObject(MKNI, 0, 0, NO_OWNER);
- }
- if (mode == MODE_Apocalyptic)
- {
- CreateObject(APCE, 0, 0, NO_OWNER);
- }
-
SetScoreboardData(SBRD_Caption, SBRD_NameCol, " "); // Make sure the name column gets created first
// Deathmatch?
@@ -486,7 +435,7 @@ global func StartGameOverEffect()
global func FxGameOverStart(object pTarget, int iEffectNumber)
{
- EffectVar(0, pTarget, iEffectNumber) = section->SectionAmbienceSounds();
+ EffectVar(0, pTarget, iEffectNumber) = ambienceSounds;
}
global func FxGameOverTimer(object pTarget, int iEffectNumber, int iEffectTime)
@@ -599,7 +548,7 @@ func LaunchClonk(int player, object clonk, bool relaunch)
}
// No corpses in apocalypse mode
- if (mode == MODE_Apocalyptic) clonk->LocalN("removeOnDeath") = true;
+ if (mode->~NoCorpses()) clonk->LocalN("removeOnDeath") = true;
// Enable rotation in jump for the clonk if allowed by rule
if (FindObject(RIJP)) clonk->LocalN("rotateInJump") = true;
@@ -705,7 +654,7 @@ global func WantsAmbienceSounds(int player)
func DoAmbienceSounds(int player)
{
- for (var sound in section->SectionAmbienceSounds())
+ for (var sound in ambienceSounds)
{
Sound(sound[0], true, 0, sound[1], player + 1, WantsAmbienceSounds(player) * 2 - 1);
}
diff --git a/TemplePushing.c4s/Sections.c4d/SectClassic.c4d/Script.c b/TemplePushing.c4s/Sections.c4d/SectClassic.c4d/Script.c
index bead84f..7699859 100644
--- a/TemplePushing.c4s/Sections.c4d/SectClassic.c4d/Script.c
+++ b/TemplePushing.c4s/Sections.c4d/SectClassic.c4d/Script.c
@@ -57,7 +57,5 @@ protected func Initialize()
public func SectionAmbienceSounds()
{
- if (mode == MODE_Festive) return [["FestiveAmbience.ogg", 25]];
- else if (mode == MODE_Apocalyptic) return [["ExtremeAmbience.ogg", 75]];
- else return [["Ambience.ogg", 50], ["Rain.ogg", 75]];
-} \ No newline at end of file
+ return [["Ambience.ogg", 50], ["Rain.ogg", 75]];
+}
diff --git a/TemplePushing.c4s/Sections.c4d/SectCloudTemple.c4d/Script.c b/TemplePushing.c4s/Sections.c4d/SectCloudTemple.c4d/Script.c
index 5818969..6aae5d7 100644
--- a/TemplePushing.c4s/Sections.c4d/SectCloudTemple.c4d/Script.c
+++ b/TemplePushing.c4s/Sections.c4d/SectCloudTemple.c4d/Script.c
@@ -61,7 +61,5 @@ protected func Initialize()
public func SectionAmbienceSounds()
{
- if (mode == MODE_Festive) return [["FestiveAmbience.ogg", 25]];
- else if (mode == MODE_Apocalyptic) return [["ExtremeAmbience.ogg", 75]];
- else return [["CloudAmbience.ogg", 50]];
+ return [["CloudAmbience.ogg", 50]];
}
diff --git a/TemplePushing.c4s/Sections.c4d/SectLiquidTemple.c4d/Script.c b/TemplePushing.c4s/Sections.c4d/SectLiquidTemple.c4d/Script.c
index a169b11..248785b 100644
--- a/TemplePushing.c4s/Sections.c4d/SectLiquidTemple.c4d/Script.c
+++ b/TemplePushing.c4s/Sections.c4d/SectLiquidTemple.c4d/Script.c
@@ -37,7 +37,5 @@
public func SectionAmbienceSounds()
{
- if (mode == MODE_Festive) return [["FestiveAmbience.ogg", 25]];
- else if (mode == MODE_Apocalyptic) return [["ExtremeAmbience.ogg", 75]];
- else return [["LiquidAmbience.ogg", 50], ["Rain.ogg", 10]];
+ return [["LiquidAmbience.ogg", 50], ["Rain.ogg", 10]];
}