new world: rapid refining

qteditor^2
Maikel de Vries 2016-08-07 14:19:31 +02:00
parent cb8086cff7
commit 809172e74c
27 changed files with 780 additions and 5 deletions

View File

@ -2,7 +2,7 @@
Icon=34
Title=AcidRift
Version=6,0
Difficulty=70
Difficulty=80
[Definitions]
Definition1=Objects.ocd

View File

@ -2,7 +2,7 @@
Icon=36
Title=Chine
Version=6,0
Difficulty=50
Difficulty=60
[Definitions]
Definition1=Objects.ocd

View File

@ -2,7 +2,7 @@ Flooded Veins
You stumble upon an abandoned settlement beneath the Forest of Orgos in your quest for more gold. Legends tell a story of even more valuable materials named gems which may be found here. Might this abandoned settlement be a failed attempt to find these gems? Set up an expedition to explore the flooded caves around and to discover possible gem veins.
Goal: Sell gems
Goal: Sell gems.
Hints:
- The flooded caves may be drained using pumps, you can get rid off the excess water where you entered the cave.

View File

@ -2,7 +2,7 @@
Title=GemGrabbers
Icon=35
Version=6,0
Difficulty=80
Difficulty=90
[Definitions]
Definition1=Objects.ocd

View File

@ -2,7 +2,7 @@
Icon=23
Title=Krakatoa
Version=6,0
Difficulty=60
Difficulty=70
[Definitions]
Definition1=Objects.ocd

View File

@ -0,0 +1,9 @@
Rasches Raffinieren
An apparently infinite oil well is hidden deep inside a cave. Connect the well to the refinery drain outside of the cave using pumps and supply the refinery.
Ziel: Pumpe Öl.
Tipps:
- Do not set oil on fire, it will burn for a long time.
- You can connect multiple pipes to the refinery drain.

View File

@ -0,0 +1,9 @@
Rapid Refining
An apparently infinite oil well is hidden deep inside a cave. Connect the well to the refinery drain outside of the cave using pumps and supply the refinery.
Goal: Pump oil.
Hints:
- Do not set oil on fire, it will burn for a long time.
- You can connect multiple pipes to the refinery drain.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -0,0 +1,237 @@
/**
Rapid Refining
Use the oil from an underground well to power your settlement.
@author Maikel
*/
#include Library_Map
// Called be the engine: draw the complete map here.
protected func InitializeMap(proplist map)
{
// Map settings.
var overground_wdt = 40;
var overground_hgt = 20;
// Retrieve the settings according to the MapSize setting.
var map_size;
if (SCENPAR_MapSize == 1)
map_size = [250, 150];
if (SCENPAR_MapSize == 2)
map_size = [275, 150];
if (SCENPAR_MapSize == 3)
map_size = [300, 150];
// Set the map size.
map->Resize(map_size[0], map_size[1]);
// The overground area is in the top left corner, the underground are thereby the remainder.
var underground = {Algo = MAPALGO_Not, Op = {Algo = MAPALGO_Rect, X = 0, Y = 0, Wdt = overground_wdt, Hgt = overground_hgt}};
Draw("Earth", underground);
// Draw materials in the underground area and then overlay the rest of the map.
DrawMaterial("Earth-earth_root", underground, 2, 12);
DrawMaterial("Earth-earth_spongy", underground, 2, 12);
DrawMaterial("Granite", underground, 3, 6);
DrawMaterial("Tunnel", underground, 5, 8);
DrawMaterial("Rock-rock", underground, 3, 4);
DrawMaterial("Rock", underground, 3, 4);
DrawMaterial("Ore", underground, 6, 6);
DrawMaterial("Firestone", underground, 5, 4);
DrawMaterial("Coal", underground, 6, 4);
// Draw some underground water lakes.
var underground_water = {Algo = MAPALGO_And, Op = [underground, {Algo = MAPALGO_Rect, X = 0, Y = map.Hgt / 2, Wdt = map.Wdt - 20, Hgt = map.Hgt / 2}]};
DrawMaterial("Water", underground_water, [4, 10], 6);
// The entrance border is out of granite.
var entrance_border = {Algo = MAPALGO_Border, Left = 3, Op = underground};
entrance_border = {Algo = MAPALGO_Or, Op = [entrance_border, {Algo = MAPALGO_Turbulence, Iterations = 2, Amplitude = [6, 8], Scale = [6, 8], Seed = Random(65536), Op = entrance_border}]};
DrawRock(entrance_border);
// The entrance floor is out of earth and brick.
var entrance_floor = {Algo = MAPALGO_Border, Top = 3, Op = underground};
Draw("Brick", entrance_floor);
var entrance_floor_earth = {Algo = MAPALGO_Border, Top = 2, Op = underground};
var entrance_floor_earth = {Algo = MAPALGO_And, Op = [entrance_floor_earth, {Algo = MAPALGO_Rect, X = 4, Y = 0, Wdt = 17, Hgt = map.Hgt}]};
Draw("Earth", entrance_floor_earth);
// There are borders on the full underground area of the map.
var wdt = 3;
var underground_border = {Algo = MAPALGO_Not, Op = {Algo = MAPALGO_Rect, X = wdt, Y = wdt, Wdt = map.Wdt - 2 * wdt, Hgt = map.Hgt - 2 * wdt}};
underground_border = {Algo = MAPALGO_And, Op = [underground_border, underground]};
underground_border = {Algo = MAPALGO_Or, Op = [underground_border, {Algo = MAPALGO_Turbulence, Iterations = 4, Amplitude = 16, Scale = 12, Seed = Random(65536), Op = underground_border}]};
underground_border = {Algo = MAPALGO_And, Op = [underground_border, underground, {Algo = MAPALGO_Not, Op = entrance_floor}]};
DrawRock(underground_border);
// Draw a tunnel to the oil well.
DrawMainTunnel(map, overground_wdt, overground_hgt);
// Some slabs of granite/rock which block the path to the oil.
DrawRockSlabs(map);
// There is a smaller oil field below the entrance.
DrawOilLakes(map);
// The main oil well is in the bottom right of the map.
DrawOilWell(map, underground_border);
// A large water lake at the bottom of the map.
DrawWaterLake(map, underground_border);
// Some liquid veins above the oil well.
DrawLiquidVeins(map, underground_border);
// Fix liquid borders.
FixLiquidBorders();
// Return true to tell the engine a map has been successfully created.
return true;
}
public func DrawMainTunnel(proplist map, int overground_wdt, int overground_hgt)
{
var sx = overground_wdt;
var sy = overground_hgt - 3;
var ex = map.Wdt - 20;
var ey = map.Hgt - 30;
var nr_steps = 10;
var tunnel_x = [], tunnel_y = [];
for (var index = 0; index <= nr_steps; index++)
{
var dev = 4 * Min(index, nr_steps - index);
tunnel_x[index] = sx + (ex - sx) * index / nr_steps + RandomX(-dev, dev);
tunnel_y[index] = sy + (ey - sy) * index / nr_steps + RandomX(-dev, dev);
}
// Draw main tunnel.
var tunnel = {Algo = MAPALGO_Polygon, X = tunnel_x, Y = tunnel_y, Wdt = 3, Empty = true, Open = true};
tunnel = {Algo = MAPALGO_Or, Op = [tunnel, {Algo = MAPALGO_Turbulence, Iterations = 2, Amplitude = [6, 8], Scale = [6, 8], Seed = Random(65536), Op = tunnel}]};
Draw("Tunnel", tunnel);
// Draw branches.
for (var index = 2; index <= nr_steps - 2; index++)
{
var x = tunnel_x[index];
var y = tunnel_y[index];
var to_x = x + RandomX(-5, 5);
var to_y = y + (2 * Random(2) - 1) * RandomX(16, 22);
var tunnel_branch = {Algo = MAPALGO_Polygon, X = [x, to_x], Y = [y, to_y], Wdt = 2, Empty = true, Open = true};
tunnel_branch = {Algo = MAPALGO_Turbulence, Iterations = 4, Amplitude = 12, Scale = 8, Seed = Random(65536), Op = tunnel_branch};
Draw("Tunnel", tunnel_branch);
}
return;
}
public func DrawRockSlabs(proplist map)
{
var slabs = {Algo = MAPALGO_Lines, X = 6, Y = 1, Distance = 32};
slabs = {Algo = MAPALGO_And, Op = [slabs, {Algo = MAPALGO_RndChecker, Ratio = 75, Seed = Random(65536)}]};
slabs = {Algo = MAPALGO_Turbulence, Iterations = 2, Amplitude = [6, 8], Scale = [6, 8], Seed = Random(65536), Op = slabs};
slabs = {Algo = MAPALGO_And, Op = [slabs, {Algo = MAPALGO_Rect, X = map.Wdt / 3, Y = 0, Wdt = 2 * map.Wdt / 3, Hgt = map.Hgt}]};
DrawRock(slabs);
return;
}
public func DrawWaterLake(proplist map, proplist underground_border)
{
var lake_height = 20;
var lake_width = 80;
var tunnel_height = 6;
underground_border = {Algo = MAPALGO_And, Op = [underground_border, {Algo = MAPALGO_Not, Op = {Algo = MAPALGO_Rect, X = 0, Y = map.Hgt - lake_height - 2, Wdt = lake_width, Hgt = 6}}]};
var tunnel = {Algo = MAPALGO_Rect, X = 0, Y = map.Hgt - lake_height - tunnel_height, Wdt = lake_width, Hgt = tunnel_height};
tunnel = {Algo = MAPALGO_Or, Op = [tunnel, {Algo = MAPALGO_Turbulence, Iterations = 4, Amplitude = 16, Scale = 8, Seed = Random(65536), Op = tunnel}]};
tunnel = {Algo = MAPALGO_And, Op = [tunnel, {Algo = MAPALGO_Not, Op = underground_border}]};
Draw("Tunnel", tunnel);
var lake = {Algo = MAPALGO_Rect, X = 0, Y = map.Hgt - lake_height, Wdt = lake_width, Hgt = lake_height};
lake = {Algo = MAPALGO_And, Op = [lake, {Algo = MAPALGO_Not, Op = underground_border}]};
Draw("Water:Water", lake);
var lake_floor = {Algo = MAPALGO_Border, Bottom = 2, Op = lake};
Draw("Sand", lake_floor);
var lake_boundary = {Algo = MAPALGO_Rect, X = lake_width - 1, Y = map.Hgt - lake_height, Wdt = 2, Hgt = lake_height};
lake_boundary = {Algo = MAPALGO_Or, Op = [lake_boundary, {Algo = MAPALGO_Turbulence, Iterations = 3, Amplitude = 12, Scale = 12, Seed = Random(65536), Op = lake_boundary}]};
Draw("Everrock", lake_boundary);
var lake_boundary_rock = {Algo = MAPALGO_Border, Wdt = -2, Op = lake_boundary};
DrawRock(lake_boundary_rock);
return;
}
public func DrawOilLakes(proplist map)
{
for (var cnt = 0; cnt < 3; cnt++)
{
var oil_lake_x = RandomX(map.Wdt / 10, 3 * map.Wdt / 10);
var oil_lake_y = RandomX(2 * map.Hgt / 7, 5 * map.Hgt / 7);
var oil_lake = {Algo = MAPALGO_Rect, X = oil_lake_x, Y = oil_lake_y, Wdt = 13, Hgt = 15};
oil_lake = {Algo = MAPALGO_Turbulence, Iterations = 4, Amplitude = 10, Scale = 10, Seed = Random(65536), Op = oil_lake};
var oil_lake_filled = {Algo = MAPALGO_And, Op = [oil_lake, {Algo = MAPALGO_Rect, X = 0, Y = oil_lake_y - 3, Wdt = map.Wdt, Hgt = map.Hgt}]};
Draw("Tunnel", oil_lake);
Draw("Oil", oil_lake_filled);
var oil_lake_border = {Algo = MAPALGO_Border, Left = 2, Right = 2, Bottom = 3, Top = 1, Op = oil_lake};
DrawRock(oil_lake_border);
}
return;
}
public func DrawOilWell(proplist map, proplist underground_border)
{
var oil_field = {Algo = MAPALGO_Polygon,
X = [map.Wdt, map.Wdt - 16, map.Wdt - 14, map.Wdt - 10, map.Wdt - 17, map.Wdt - 22, map.Wdt - 22, map.Wdt - 27, map.Wdt - 29],
Y = [map.Hgt - 5, map.Hgt - 5, map.Hgt - 12, map.Hgt - 18, map.Hgt - 23, map.Hgt - 20, map.Hgt - 12, map.Hgt - 12, map.Hgt - 16],
Wdt = 3, Empty = true, Open = true};
var oil_field_oil = {Algo = MAPALGO_And, Op = [oil_field, {Algo = MAPALGO_Rect, X = 0, Y = map.Hgt - 8, Wdt = map.Wdt, Hgt = 8}]};
var oil_field_water = {Algo = MAPALGO_And, Op = [oil_field, {Algo = MAPALGO_Rect, X = 0, Y = 0, Wdt = map.Wdt, Hgt = map.Hgt - 8}]};
Draw("Oil:Oil", oil_field_oil);
Draw("Water", oil_field_water);
var oil_field_border = {Algo = MAPALGO_Border, Left = -3, Right = -3, Top = -3, Bottom = -5, Op = oil_field};
Draw("Everrock", oil_field_border);
var oil_field_entrance = {Algo = MAPALGO_Rect, X = map.Wdt - 31, Y = map.Hgt - 22, Wdt = 5, Hgt = 5};
Draw("Tunnel", oil_field_entrance);
return;
}
public func DrawLiquidVeins(proplist map, proplist underground_border)
{
// Draw some gold as a source of wealth.
var gold = {Algo = MAPALGO_Rect, X = map.Wdt - 60, Y = 10, Wdt = 50, Hgt = 36};
gold = {Algo = MAPALGO_And, Op = [gold, {Algo = MAPALGO_Turbulence, Iterations = 4, Amplitude = 12, Scale = 12, Seed = Random(65536), Op = gold}]};
DrawMaterial("Gold", gold, 4, 30);
// Draw the veins.
var vein_material = "Water";
if (SCENPAR_Difficulty == 2)
vein_material = "Acid";
if (SCENPAR_Difficulty == 3)
vein_material = "DuroLava";
var vein_area = {Algo = MAPALGO_Polygon, X = [map.Wdt - 96, map.Wdt, map.Wdt, map.Wdt - 44], Y = [0, 0, 108, 82]};
vein_area = {Algo = MAPALGO_And, Op = [vein_area, {Algo = MAPALGO_Not, Op = underground_border}]};
var veins = {Algo = MAPALGO_Or, Op = [
{Algo = MAPALGO_Lines, X = 2, Y = -1, Distance = 12},
{Algo = MAPALGO_Lines, X = 2, Y = 1, Distance = 12},
{Algo = MAPALGO_Lines, X = 0, Y = 1, Distance = 16}
]};
veins = {Algo = MAPALGO_And, Op = [veins, vein_area]};
veins = {Algo = MAPALGO_Turbulence, Iterations = 4, Amplitude = 12, Scale = 12, Seed = Random(65536), Op = veins};
Draw(vein_material, veins);
return;
}
/*-- Helper Functions --*/
public func DrawRock(proplist layer)
{
Draw("Granite", layer);
DrawMaterial("Rock-rock", layer, 4, 18);
DrawMaterial("Rock", layer, 4, 18);
return;
}

View File

@ -0,0 +1,47 @@
[ParameterDef]
Name=$Difficulty$
Description=$DescDifficulty$
ID=Difficulty
Default=1
LeagueValue=3
[Options]
[Option]
Name=$DiffNormal$
Description=$DescDiffNormal$
Value=1
[Option]
Name=$DiffHard$
Description=$DescDiffHard$
Value=2
[Option]
Name=$DiffInsane$
Description=$DescDiffInsane$
Value=3
[ParameterDef]
Name=$MapSize$
Description=$DescMapSize$
ID=MapSize
Default=1
LeagueValue=1
[Options]
[Option]
Name=$MapSmall$
Description=$DescMapSmall$
Value=1
[Option]
Name=$MapAverage$
Description=$DescMapAverage$
Value=2
[Option]
Name=$MapLarge$
Description=$DescMapLarge$
Value=3

View File

@ -0,0 +1,14 @@
[DefCore]
id=RefineryDrain
Version=6,0
Category=C4D_Structure
Width=16
Height=32
Offset=-8,-16
Vertices=4
VertexX=-8,-8,8,8
VertexY=-2,15,-2,15
VertexCNAT=5,9,6,10
VertexFriction=50,50,100,100
Construction=1
Mass=10

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

@ -0,0 +1,94 @@
/**
Refinery Drain
Oil must be pumped into this structure to be processed further.
@author Maikel
*/
#include Library_Structure
#include Library_Ownable
#include Library_Tank
/*-- Pipeline --*/
public func IsLiquidContainerForMaterial(string liquid)
{
return WildcardMatch("Oil", liquid);
}
public func QueryConnectPipe(object pipe)
{
if (pipe->IsDrainPipe() || pipe->IsNeutralPipe())
{
return false;
}
else
{
pipe->Report("$MsgPipeProhibited$");
return true;
}
}
public func OnPipeConnect(object pipe, string specific_pipe_state)
{
SetNeutralPipe(pipe);
pipe->Report("$MsgConnectedPipe$");
}
/*-- Interaction Interface --*/
public func GetOilAmount()
{
var oil = FindObject(Find_ID(Oil), Find_Container(this));
if (oil)
return oil->GetStackCount() / 1000;
return 0;
}
public func HasInteractionMenu() { return true; }
public func GetInteractionMenus(object clonk)
{
var menus = _inherited() ?? [];
var oil_menu =
{
title = "$MsgOilOverview$",
entries_callback = this.GetOilDisplayMenuEntries,
callback_hover = "OnOilDisplayHover",
callback_target = this,
BackgroundColor = RGB(0, 50, 50),
Priority = 20
};
PushBack(menus, oil_menu);
return menus;
}
public func GetOilDisplayMenuEntries(object clonk)
{
return
[{
symbol = Oil,
extra_data = "oil",
custom = {
Style = GUI_FitChildren | GUI_TextVCenter | GUI_TextLeft,
Bottom = "1.1em",
BackgroundColor = {Std = 0, OnHover = 0x50ff0000},
Priority = 1,
Text = Format("$MsgOilPumped$", GetOilAmount())
}
}];
}
public func OnOilDisplayHover(id symbol, string extra_data, desc_menu_target, menu_id)
{
GuiUpdateText(Format("$MsgOilDescription$", GetOilAmount()), menu_id, 1, desc_menu_target);
return;
}
/*-- Properties --*/
local Name = "$Name$";
local Description = "$Description$";

View File

@ -0,0 +1,9 @@
Name=Raffinerie Drain
Description=Attach the drain pipe of a pump to this structure to pump oil into the refinery. Multiple pipes can be connected to the refinery drain.
MsgOilOverview=Oil Overview
MsgOilPumped=Oil amount: %d {{Oil}}.
MsgOilDescription=Currently %d {{Oil}} has been transferred into the refinery.
MsgConnectedPipe=Rohr angeschlossen.
MsgPipeProhibited=Zuflussrohre können nicht an den Raffinerie angeschlossen werden.

View File

@ -0,0 +1,9 @@
Name=Refinery Drain
Description=Attach the drain pipe of a pump to this structure to pump oil into the refinery. Multiple pipes can be connected to the refinery drain.
MsgOilOverview=Oil Overview
MsgOilPumped=Oil amount: %d {{Oil}}.
MsgOilDescription=Currently %d {{Oil}} has been transferred into the refinery.
MsgConnectedPipe=Connected pipe.
MsgPipeProhibited=Source pipes cannot be connected to the foundry.

View File

@ -0,0 +1,5 @@
[DefCore]
id=Goal_Refinery
Version=6,0
Category=C4D_StaticBack|C4D_Goal
Picture=0,0,128,128

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,49 @@
/**
Refinery Goal
A certain amount of oil has to be pumped into the refinery drain.
@author Maikel
*/
#include Library_Goal
local goal_amount;
protected func Initialize()
{
goal_amount = 0;
return _inherited(...);
}
public func SetGoalAmount(int amount)
{
goal_amount = amount;
return;
}
private func GetPumpedAmount()
{
var refinery_drain = FindObject(Find_ID(RefineryDrain));
if (!refinery_drain)
return 0;
return refinery_drain->GetOilAmount();
}
public func IsFulfilled()
{
return GetPumpedAmount() >= goal_amount;
}
public func GetDescription(int plr)
{
if (IsFulfilled())
return "$DescriptionCompleted$";
return Format("$Description$", GetPumpedAmount(), goal_amount);
}
/*-- Proplist --*/
local Name = "$Name$";
local Description = "$Description$";

View File

@ -0,0 +1,3 @@
Name=Raffinerie
Description=You have currently pumped %d {{Oil}} into the refinery drain out of the %d {{Oil}} needed to fulfill this goal.
DescriptionCompleted=Congratulations! You have pumped enough oil into the refinery drain.

View File

@ -0,0 +1,3 @@
Name=Refinery
Description=You have currently pumped %d {{Oil}} into the refinery drain out of the %d {{Oil}} needed to fulfill this goal.
DescriptionCompleted=Congratulations! You have pumped enough oil into the refinery drain.

View File

@ -0,0 +1,31 @@
[Head]
Title=RapidRefining
Icon=24
Version=6,0
Difficulty=50
[Definitions]
Definition1=Objects.ocd
[Player1]
Crew=Clonk=2
[Player2]
Crew=Clonk=2
[Player3]
Crew=Clonk=2
[Player4]
Crew=Clonk=2
[Landscape]
Sky=Clouds1
TopOpen=0
BottomOpen=0
[Weather]
Climate=0
YearSpeed=0
Wind=0,50,-50,50

View File

@ -0,0 +1,207 @@
/**
Rapid Refining
Use the oil from an underground well to power your settlement.
@author Maikel
*/
// Whether the intro has been initialized.
static intro_init;
// Whether the first players has been initialized.
static first_plr_init;
protected func Initialize()
{
// Show wealth in HUD.
GUI_Controller->ShowWealth();
// Rules: team account and buying at flagpole.
CreateObject(Rule_TeamAccount);
CreateObject(Rule_BuyAtFlagpole);
// Goal: pump oil into refinery drain.
var goal = CreateObject(Goal_Refinery);
var amount = 400;
if (SCENPAR_Difficulty == 2)
amount = 800;
else if (SCENPAR_Difficulty == 3)
amount = 1600;
goal->SetGoalAmount(amount);
// Initialize different parts of the scenario.
InitEnvironment(SCENPAR_Difficulty);
InitVegetation(SCENPAR_MapSize);
InitAnimals(SCENPAR_MapSize, SCENPAR_Difficulty);
return;
}
protected func OnGoalsFulfilled()
{
// Give the remaining players their achievement.
GainScenarioAchievement("Done", BoundBy(SCENPAR_Difficulty, 1, 3));
return false;
}
/*-- Player Initialization --*/
protected func InitializePlayer(int plr)
{
// Harsh zoom range.
SetPlayerZoomByViewRange(plr, 400, nil, PLRZOOM_Direct | PLRZOOM_LimitMax);
SetPlayerViewLock(plr, true);
SetFoW(false, plr);
// First player inits the base.
if (!first_plr_init)
{
InitBase(plr, 4 - SCENPAR_Difficulty);
first_plr_init = true;
// Give only the first joined player some wealth.
SetWealth(plr, 150 - 50 * SCENPAR_Difficulty);
}
// Position and materials for the crew.
var crew;
for (var i = 0; crew = GetCrew(plr, i); ++i)
{
crew->SetPosition(20 + Random(32), 160 - 10);
crew->CreateContents(Shovel);
}
// Give the player basic and pumping knowledge.
GivePlayerBasicKnowledge(plr);
GivePlayerPumpingKnowledge(plr);
GivePlayerWeaponryKnowledge(plr);
GivePlayerAdvancedKnowledge(plr);
GivePlayerFarmingKnowledge(plr);
RemovePlayerSpecificKnowledge(plr, [WindGenerator]);
// Give the player the elementary base materials.
GivePlayerElementaryBaseMaterial(plr);
GivePlayerToolsBaseMaterial(plr);
// Initialize the intro sequence if not yet started.
if (!intro_init)
{
//StartSequence("Intro", 0);
intro_init = true;
}
return;
}
private func InitBase(int owner, int amount)
{
var y = 160;
// The basic settlement: flagpole, wind generator, chest.
CreateObjectAbove(Flagpole, 184, y, owner);
var chest = CreateObjectAbove(Chest, 202, y, owner);
chest->CreateContents(Hammer, 2);
chest->CreateContents(Axe, 2);
CreateObjectAbove(WindGenerator, 222, y, owner);
// Two pumps connected to the refinery drain.
var refinery_exit = CreateObjectAbove(RefineryDrain, 8, y, owner);
var pump1 = CreateObjectAbove(Pump, 250, y, owner);
var pump2 = CreateObjectAbove(Pump, 284, y, owner);
var pipe1 = pump1->CreateObject(Pipe);
pipe1->ConnectPipeTo(pump1);
pipe1 = pump1->CreateObject(Pipe, 8);
pipe1->ConnectPipeTo(pump1);
pipe1->ConnectPipeTo(refinery_exit);
var pipe2 = pump2->CreateObject(Pipe, 8);
pipe2->ConnectPipeTo(pump2);
pipe2 = pump2->CreateObject(Pipe, -8);
pipe2->ConnectPipeTo(pump2);
// Additional material in the chest.
if (amount >= 2)
{
chest->CreateContents(Wood, 12);
chest->CreateContents(Metal, 8);
chest->CreateContents(Dynamite, 4);
if (amount >= 3)
{
chest->CreateContents(Wood, 12);
chest->CreateContents(Metal, 8);
chest->CreateContents(Loam, 4);
chest->CreateContents(Pickaxe, 2);
chest->CreateContents(Bread, 4);
}
}
return;
}
/*-- Scenario Initialization --*/
private func InitEnvironment(int difficulty)
{
// Sky has some parallax.
SetSkyParallax(1, 20, 20);
// Some earthquakes if difficulty prescribes it.
if (difficulty >= 2)
Earthquake->SetChance(4 * (difficulty - 1));
return;
}
private func InitVegetation(int map_size)
{
var wdt = LandscapeWidth();
var hgt = LandscapeHeight();
// Some plants and trees on the outside.
Tree_Deciduous->Place(16, Shape->Rectangle(0, 0, 240, 160));
Tree_Coniferous2->Place(2, Shape->Rectangle(0, 0, 240, 160));
Cotton->Place(4, Shape->Rectangle(0, 0, 240, 160));
SproutBerryBush->Place(2, Shape->Rectangle(0, 0, 240, 160));
Grass->Place(100);
// Some plants and in the caves.
LargeCaveMushroom->Place(40 + 6 * map_size, nil, {terraform = false});
Fern->Place(40 + 6 * map_size);
Mushroom->Place(40 + 6 * map_size);
Branch->Place(20 + 3 * map_size);
// Some objects in the earth.
PlaceObjects(Rock, 40 + 10 * map_size + Random(5),"Earth");
PlaceObjects(Firestone, 40 + 10 * map_size + Random(5), "Earth");
PlaceObjects(Loam, 40 + 10 * map_size + Random(5), "Earth");
// Underwater plants.
var place_rect = Shape->Rectangle(0, 2 * hgt / 3, wdt / 4, hgt / 3);
Seaweed->Place(12, place_rect);
Coral->Place(8, place_rect);
// Place some diamonds in the hard to reach location.
Diamond->Place(20, Shape->Rectangle(5 * wdt / 6, 0, wdt / 6, hgt / 4));
return;
}
private func InitAnimals(int map_size, int difficulty)
{
var wdt = LandscapeWidth();
var hgt = LandscapeHeight();
// Some butterflies as atmosphere.
for (var i = 0; i < 8; i++)
PlaceAnimal(Butterfly);
// Some wipfs underground.
Wipf->Place(10);
// Place some fishes and piranhas as difficulty prescribes it.
var place_rect = Shape->Rectangle(0, 2 * hgt / 3, wdt / 4, hgt / 3);
var fish_count = 15;
Fish->Place(fish_count * (3 - difficulty), place_rect);
Piranha->Place(fish_count * (difficulty - 1), place_rect);
// Bats on higher difficulty.
if (difficulty >= 2)
Bat->Place((difficulty - 1) * 12, Shape->Rectangle(2 * wdt / 3, 0, wdt / 3, hgt));
return;
}

View File

@ -0,0 +1,19 @@
# Scenario parameters: difficulty
Difficulty=Schwierigkeit
DescDifficulty=Setzt die Schwierigkeit dieser Runde.
DiffNormal=Normal
DescDiffNormal=Die Schwierigkeit dieser Runde ist normal.
DiffHard=Schwer
DescDiffHard=Die Schwierigkeit dieser Runde ist schwer.
DiffInsane=Irrsinnig
DescDiffInsane=Die Schwierigkeit dieser Runde ist irrsinnig.
# Scenario parameters: map size
MapSize=Kartengröße
DescMapSize=Setzt die Kartengröße dieser Runde.
MapSmall=Klein
DescMapSmall=Die Karte dieser Runde wird klein sein
MapAverage=Durchschnittlich
DescMapAverage=Die Karte dieser Runde wird durchschnittlich sein.
MapLarge=Groß
DescMapLarge=Die Karte dieser Runde wird groß sein.

View File

@ -0,0 +1,19 @@
# Scenario parameters: difficulty
Difficulty=Difficulty
DescDifficulty=Sets this round's difficulty.
DiffNormal=Normal
DescDiffNormal=This round's difficulty will be set to normal.
DiffHard=Hard
DescDiffHard=This round's difficulty will be set to hard.
DiffInsane=Insane
DescDiffInsane=This round's difficulty will be set to insane.
# Scenario parameters: map size
MapSize=Map size
DescMapSize=Sets this round's map size.
MapSmall=Small
DescMapSmall=This round's map will be small.
MapAverage=Average
DescMapAverage=This round's map will be average.
MapLarge=Large
DescMapLarge=This round's map will be large.

View File

@ -0,0 +1,9 @@
// Maximum pipe length depends on difficulty.
#appendto PipeLine
public func Definition(proplist def)
{
def.PipeMaxLength = def.PipeMaxLength * (12 - 2 * SCENPAR_Difficulty) / 10;
return;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

View File

@ -0,0 +1,2 @@
DE:Rasches Raffinieren
US:Rapid Refining