Merge pull request #7220 from obrakmann/d2k-worm-option-and-maps

Add worms to d2k maps and add lobby option to disable them
This commit is contained in:
Matthias Mailänder
2014-12-31 13:03:37 +01:00
35 changed files with 708 additions and 19 deletions

View File

@@ -60,6 +60,7 @@ namespace OpenRA
{
public bool? Cheats;
public bool? Crates;
public bool? Creeps;
public bool? Fog;
public bool? Shroud;
public bool? AllyBuildRadius;
@@ -76,6 +77,8 @@ namespace OpenRA
settings.AllowCheats = Cheats.Value;
if (Crates.HasValue)
settings.Crates = Crates.Value;
if (Creeps.HasValue)
settings.Creeps = Creeps.Value;
if (Fog.HasValue)
settings.Fog = Fog.Value;
if (Shroud.HasValue)

View File

@@ -180,6 +180,7 @@ namespace OpenRA.Network
public bool Dedicated;
public string Difficulty;
public bool Crates = true;
public bool Creeps = true;
public bool Shroud = true;
public bool Fog = true;
public bool AllyBuildRadius = true;

View File

@@ -32,6 +32,7 @@ namespace OpenRA.Mods.Cnc.Traits
public void Killed(Actor self, AttackInfo e)
{
if (!self.World.LobbyInfo.GlobalSettings.Creeps) return;
if (e.Warhead == null || e.Warhead.DeathType != spawnViceroidInfo.DeathType) return;
if (self.World.SharedRandom.Next(100) > spawnViceroidInfo.Probability) return;

View File

@@ -523,6 +523,29 @@ namespace OpenRA.Mods.Common.Server
return true;
}
},
{ "creeps",
s =>
{
if (!client.IsAdmin)
{
server.SendOrderTo(conn, "Message", "Only the host can set that option.");
return true;
}
if (server.Map.Options.Creeps.HasValue)
{
server.SendOrderTo(conn, "Message", "Map has disabled Creeps spawning configuration.");
return true;
}
bool.TryParse(s, out server.LobbyInfo.GlobalSettings.Creeps);
server.SyncLobbyGlobalSettings();
server.SendMessage("{0} {1} Creeps spawning."
.F(client.Name, server.LobbyInfo.GlobalSettings.Creeps ? "enabled" : "disabled"));
return true;
}
},
{ "allybuildradius",
s =>
{

View File

@@ -40,6 +40,9 @@ namespace OpenRA.Mods.Common.Server
if (server.LobbyInfo.GlobalSettings.Crates != defaults.Crates)
server.SendOrderTo(conn, "Message", "Crates Appear: {0}".F(server.LobbyInfo.GlobalSettings.Crates));
if (server.LobbyInfo.GlobalSettings.Creeps != defaults.Creeps)
server.SendOrderTo(conn, "Message", "Creeps Spawn: {0}".F(server.LobbyInfo.GlobalSettings.Creeps));
if (server.LobbyInfo.GlobalSettings.AllyBuildRadius != defaults.AllyBuildRadius)
server.SendOrderTo(conn, "Message", "Build off Ally ConYards: {0}".F(server.LobbyInfo.GlobalSettings.AllyBuildRadius));

View File

@@ -56,7 +56,8 @@ namespace OpenRA.Mods.D2k.Traits
public void Tick(Actor self)
{
// TODO: Add a lobby option to disable worms just like crates
if (!self.World.LobbyInfo.GlobalSettings.Creeps)
return;
// TODO: It would be even better to stop
if (!spawnPoints.Value.Any())

View File

@@ -335,6 +335,15 @@ namespace OpenRA.Mods.RA.Widgets.Logic
"crates {0}".F(!orderManager.LobbyInfo.GlobalSettings.Crates)));
}
var creeps = optionsBin.GetOrNull<CheckboxWidget>("CREEPS_CHECKBOX");
if (creeps != null)
{
creeps.IsChecked = () => orderManager.LobbyInfo.GlobalSettings.Creeps;
creeps.IsDisabled = () => Map.Status != MapStatus.Available || Map.Map.Options.Creeps.HasValue || configurationDisabled();
creeps.OnClick = () => orderManager.IssueOrder(Order.Command(
"creeps {0}".F(!orderManager.LobbyInfo.GlobalSettings.Creeps)));
}
var allybuildradius = optionsBin.GetOrNull<CheckboxWidget>("ALLYBUILDRADIUS_CHECKBOX");
if (allybuildradius != null)
{

View File

@@ -27,6 +27,7 @@ Videos:
Options:
Crates: False
Creeps: False
Fog: True
Shroud: True
AllyBuildRadius: False
@@ -461,8 +462,6 @@ Rules:
GenericVisibility: Enemy
ShowOwnerRow: false
^Infantry:
SpawnViceroid:
Probability: 0
Tooltip:
GenericVisibility: Enemy
ShowOwnerRow: false

View File

@@ -25,6 +25,7 @@ Videos:
Options:
Crates: False
Creeps: False
Fog: True
Shroud: True
AllyBuildRadius: False
@@ -764,8 +765,6 @@ Rules:
GenericVisibility: Enemy
ShowOwnerRow: false
^Infantry:
SpawnViceroid:
Probability: 0
Tooltip:
GenericVisibility: Enemy
ShowOwnerRow: false

View File

@@ -26,6 +26,7 @@ Videos:
Options:
Crates: False
Creeps: False
Fog: True
Shroud: True
AllyBuildRadius: False
@@ -756,8 +757,6 @@ Rules:
GenericVisibility: Enemy
ShowOwnerRow: false
^Infantry:
SpawnViceroid:
Probability: 0
Tooltip:
GenericVisibility: Enemy
ShowOwnerRow: false

View File

@@ -26,8 +26,8 @@ Videos:
GameLost: gameover.vqa
Options:
Cheats: False
Crates: False
Creeps: False
Fog: True
Shroud: True
AllyBuildRadius: False
@@ -581,8 +581,6 @@ Rules:
GenericVisibility: Enemy
ShowOwnerRow: false
^Infantry:
SpawnViceroid:
Probability: 0
Tooltip:
GenericVisibility: Enemy
ShowOwnerRow: false

View File

@@ -27,6 +27,7 @@ Videos:
Options:
Crates: False
Creeps: False
Fog: True
Shroud: True
AllyBuildRadius: False
@@ -636,8 +637,6 @@ Rules:
GenericVisibility: Enemy
ShowOwnerRow: false
^Infantry:
SpawnViceroid:
Probability: 0
Tooltip:
GenericVisibility: Enemy
ShowOwnerRow: false

View File

@@ -27,6 +27,7 @@ Videos:
Options:
Crates: False
Creeps: False
Fog: True
Shroud: True
AllyBuildRadius: False
@@ -900,8 +901,6 @@ Rules:
GenericVisibility: Enemy
ShowOwnerRow: false
^Infantry:
SpawnViceroid:
Probability: 0
Tooltip:
GenericVisibility: Enemy
ShowOwnerRow: false

View File

@@ -25,6 +25,7 @@ Videos:
Options:
Crates: False
Creeps: False
Fog: True
Shroud: True
AllyBuildRadius: False

View File

@@ -26,6 +26,7 @@ Videos:
Options:
Crates: False
Creeps: False
Fog: True
Shroud: True
AllyBuildRadius: False
@@ -555,8 +556,6 @@ Rules:
GenericVisibility: Enemy
ShowOwnerRow: false
^Infantry:
SpawnViceroid:
Probability: 0
Tooltip:
GenericVisibility: Enemy
ShowOwnerRow: false

View File

@@ -26,6 +26,7 @@ Videos:
Options:
Crates: False
Creeps: False
Fog: True
Shroud: True
AllyBuildRadius: False
@@ -596,8 +597,6 @@ Rules:
GenericVisibility: Enemy
ShowOwnerRow: false
^Helicopter:
SpawnViceroid:
Probability: 0
Tooltip:
GenericVisibility: Enemy
ShowOwnerRow: false

View File

@@ -0,0 +1,271 @@
Background@KICK_CLIENT_DIALOG:
X: 20
Y: 67
Width: 535
Height: 235
Logic: KickClientLogic
Background: dialog3
Children:
Label@TITLE:
X: 0
Y: 40
Width: PARENT_RIGHT
Height: 25
Font: Bold
Align: Center
Label@TEXTA:
X: 0
Y: 67
Width: PARENT_RIGHT
Height: 25
Font: Regular
Align: Center
Text: You may also apply a temporary ban, preventing
Label@TEXTB:
X: 0
Y: 85
Width: PARENT_RIGHT
Height: 25
Font: Regular
Align: Center
Text: them from joining for the remainder of this game.
Checkbox@PREVENT_REJOINING_CHECKBOX:
X: (PARENT_RIGHT - WIDTH)/2
Y: 120
Width: 150
Height: 20
Text: Temporarily Ban
Button@OK_BUTTON:
X: (PARENT_RIGHT - WIDTH)/2 + 75
Y: 155
Width: 120
Height: 25
Text: Kick
Font: Bold
Button@CANCEL_BUTTON:
X: (PARENT_RIGHT - WIDTH)/2 - 75
Y: 155
Width: 120
Height: 25
Text: Cancel
Font: Bold
Background@KICK_SPECTATORS_DIALOG:
X: 20
Y: 67
Width: 535
Height: 235
Logic: KickSpectatorsLogic
Background: dialog3
Children:
Label@TITLE:
X: 0
Y: 40
Width: PARENT_RIGHT
Height: 25
Font: Bold
Align: Center
Text: Kick Spectators
Label@TEXT:
X: 0
Y: 85
Width: PARENT_RIGHT
Height: 25
Font: Regular
Align: Center
Button@OK_BUTTON:
X: (PARENT_RIGHT - WIDTH)/2 + 75
Y: 155
Width: 120
Height: 25
Text: Ok
Font: Bold
Button@CANCEL_BUTTON:
X: (PARENT_RIGHT - WIDTH)/2 - 75
Y: 155
Width: 120
Height: 25
Text: Cancel
Font: Bold
Background@LOBBY_OPTIONS_BIN:
X: 20
Y: 67
Width: 593
Height: 235
Background: dialog3
Children:
Label@TITLE:
X: 0
Y: 5
Width: PARENT_RIGHT
Height: 25
Font: Bold
Align: Center
Text: Map Options
Container:
X: 30
Y: 50
Width: PARENT_RIGHT-60
Height: PARENT_BOTTOM-75
Children:
Checkbox@SHROUD_CHECKBOX:
Width: 140
Height: 20
Text: Shroud
Checkbox@FOG_CHECKBOX:
Y: 35
Width: 140
Height: 20
Text: Fog of War
Checkbox@SHORTGAME_CHECKBOX:
X: 150
Width: 140
Height: 20
Text: Short Game
Checkbox@CRATES_CHECKBOX:
X: 150
Y: 35
Width: 140
Height: 20
Text: Crates
Checkbox@ALLYBUILDRADIUS_CHECKBOX:
X: 290
Width: 140
Height: 20
Text: Build off Allies' ConYards
Checkbox@FRAGILEALLIANCES_CHECKBOX:
X: 290
Y: 35
Width: 140
Height: 20
Text: Diplomacy Changes
Checkbox@CREEPS_CHECKBOX:
Y: 70
Width: 140
Height: 20
Text: Worms
Checkbox@ALLOWCHEATS_CHECKBOX:
X: 150
Y: 70
Width: 140
Height: 20
Text: Debug Menu
Label@STARTINGCASH_DESC:
Y: 110
Width: 80
Height: 25
Text: Starting Cash:
Align: Right
DropDownButton@STARTINGCASH_DROPDOWNBUTTON:
X: 85
Y: 110
Width: 130
Height: 25
Font: Regular
Text: $5000
Label@STARTINGUNITS_DESC:
X: PARENT_RIGHT - WIDTH - 145
Y: 110
Width: 120
Height: 25
Text: Starting Units:
Align: Right
DropDownButton@STARTINGUNITS_DROPDOWNBUTTON:
X: PARENT_RIGHT - WIDTH
Y: 110
Width: 140
Height: 25
Font: Regular
Label@DIFFICULTY_DESC:
X: PARENT_RIGHT - WIDTH - 145
Y: 150
Width: 120
Height: 25
Text: Mission Difficulty:
Align: Right
DropDownButton@DIFFICULTY_DROPDOWNBUTTON:
X: PARENT_RIGHT - WIDTH
Y: 150
Width: 140
Height: 25
Font: Regular
DropDownButton@TECHLEVEL_DROPDOWNBUTTON:
X: 85
Y: 150
Width: 130
Height: 25
Font: Regular
Text: 10
Label@TECHLEVEL_DESC:
Y: 150
Width: 80
Height: 25
Text: Tech Level:
Align: Right
Background@FORCE_START_DIALOG:
X: 20
Y: 67
Width: 593
Height: 235
Background: dialog3
Children:
Label@TITLE:
X: 0
Y: 40
Width: PARENT_RIGHT
Height: 25
Font: Bold
Align: Center
Text: Start Game?
Label@TEXTA:
X: 0
Y: 67
Width: PARENT_RIGHT
Height: 25
Font: Regular
Align: Center
Text: One or more players are not yet ready.
Label@TEXTB:
X: 0
Y: 85
Width: PARENT_RIGHT
Height: 25
Font: Regular
Align: Center
Text: Are you sure that you want to force start the game?
Container@KICK_WARNING:
Width: PARENT_RIGHT
Children:
Label@KICK_WARNING_A:
X: 0
Y: 106
Width: PARENT_RIGHT
Height: 25
Font: Bold
Align: Center
Text: One or more clients are missing the selected
Label@KICK_WARNING_B:
X: 0
Y: 123
Width: PARENT_RIGHT
Height: 25
Font: Bold
Align: Center
Text: map, and will be kicked from the server.
Button@OK_BUTTON:
X: (PARENT_RIGHT - WIDTH)/2 + 75
Y: 155
Width: 120
Height: 25
Text: Start
Font: Bold
Button@CANCEL_BUTTON:
X: (PARENT_RIGHT - WIDTH)/2 - 75
Y: 155
Width: 120
Height: 25
Text: Cancel
Font: Bold

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
mods/d2k/maps/kanly.oramap Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,107 @@
MapFormat: 7
RequiresMod: d2k
Title: Mount Idaho
Author: Westwood Studios
Tileset: ARRAKIS
MapSize: 80,80
Bounds: 8,8,64,64
Visibility: Lobby
Type: Conquest
Videos:
Options:
Players:
PlayerReference@Neutral:
Name: Neutral
OwnsWorld: True
NonCombatant: True
Race: atreides
PlayerReference@Multi0:
Name: Multi0
Playable: True
Race: Random
Enemies: Creeps
PlayerReference@Multi1:
Name: Multi1
Playable: True
Race: Random
Enemies: Creeps
PlayerReference@Creeps:
Name: Creeps
NonCombatant: True
Race: atreides
Enemies: Multi0, Multi1
Actors:
Actor0: spicebloom
Location: 48,12
Owner: Neutral
Actor1: spicebloom
Location: 44,26
Owner: Neutral
Actor2: spicebloom
Location: 63,26
Owner: Neutral
Actor3: spicebloom
Location: 14,36
Owner: Neutral
Actor4: spicebloom
Location: 68,31
Owner: Neutral
Actor5: spicebloom
Location: 33,53
Owner: Neutral
Actor6: spicebloom
Location: 35,60
Owner: Neutral
Actor7: spicebloom
Location: 45,40
Owner: Neutral
Actor8: mpspawn
Location: 17,15
Owner: Neutral
Actor9: mpspawn
Location: 57,66
Owner: Neutral
Actor10: wormspawner
Location: 42,47
Owner: Creeps
Actor11: wormspawner
Location: 40,38
Owner: Creeps
Actor12: wormspawner
Location: 8,71
Owner: Creeps
Actor13: wormspawner
Location: 71,13
Owner: Creeps
Smudges:
Rules:
World:
WormManager:
Minimum: 1
Maximum: 2
Sequences:
VoxelSequences:
Weapons:
Voices:
Notifications:
Translations:

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,174 @@
MapFormat: 7
RequiresMod: d2k
Title: Oasis Conquest
Description: 2v2v2 or FFA
Author: Janitor
Tileset: ARRAKIS
MapSize: 128,128
Bounds: 16,16,96,96
Visibility: Lobby
Type: Conquest
Videos:
Options:
Players:
PlayerReference@Neutral:
Name: Neutral
OwnsWorld: True
NonCombatant: True
Race: atreides
PlayerReference@Multi0:
Name: Multi0
Playable: True
Race: Random
Enemies: Creeps
PlayerReference@Multi1:
Name: Multi1
Playable: True
Race: Random
Enemies: Creeps
PlayerReference@Multi2:
Name: Multi2
Playable: True
Race: Random
Enemies: Creeps
PlayerReference@Multi3:
Name: Multi3
Playable: True
Race: Random
Enemies: Creeps
PlayerReference@Multi4:
Name: Multi4
Playable: True
Race: Random
Enemies: Creeps
PlayerReference@Multi5:
Name: Multi5
Playable: True
Race: Random
Enemies: Creeps
PlayerReference@Creeps:
Name: Creeps
NonCombatant: True
Race: atreides
Enemies: Multi0, Multi1, Multi2, Multi3, Multi4, Multi5
Actors:
Actor0: mpspawn
Location: 60,37
Owner: Neutral
Actor1: spicebloom
Location: 34,98
Owner: Neutral
Actor3: spicebloom
Location: 19,73
Owner: Neutral
Actor2: spicebloom
Location: 48,109
Owner: Neutral
Actor4: mpspawn
Location: 47,42
Owner: Neutral
Actor5: mpspawn
Location: 88,67
Owner: Neutral
Actor14: spicebloom
Location: 56,62
Owner: Neutral
Actor10: spicebloom
Location: 86,24
Owner: Neutral
Actor11: spicebloom
Location: 100,104
Owner: Neutral
Actor6: spicebloom
Location: 28,35
Owner: Neutral
Actor7: spicebloom
Location: 40,26
Owner: Neutral
Actor8: spicebloom
Location: 59,22
Owner: Neutral
Actor12: spicebloom
Location: 103,51
Owner: Neutral
Actor13: spicebloom
Location: 106,70
Owner: Neutral
Actor9: spicebloom
Location: 105,84
Owner: Neutral
Actor15: spicebloom
Location: 63,57
Owner: Neutral
Actor16: spicebloom
Location: 64,68
Owner: Neutral
Actor17: spicebloom
Location: 27,87
Owner: Neutral
Actor18: mpspawn
Location: 51,90
Owner: Neutral
Actor19: mpspawn
Location: 42,80
Owner: Neutral
Actor21: mpspawn
Location: 89,81
Owner: Neutral
Actor20: wormspawner
Location: 16,16
Owner: Creeps
Actor22: wormspawner
Location: 111,16
Owner: Creeps
Actor23: wormspawner
Location: 111,111
Owner: Creeps
Actor24: wormspawner
Location: 16,111
Owner: Creeps
Actor26: wormspawner
Location: 72,111
Owner: Creeps
Actor27: wormspawner
Location: 111,46
Owner: Creeps
Actor28: wormspawner
Location: 78,16
Owner: Creeps
Actor30: wormspawner
Location: 16,81
Owner: Creeps
Smudges:
Rules:
World:
WormManager:
Minimum: 3
Maximum: 6
Sequences:
VoxelSequences:
Weapons:
Voices:
Notifications:
Translations:

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,104 @@
MapFormat: 7
RequiresMod: d2k
Title: Pasty Mesa
Author: Westwood Studios
Tileset: ARRAKIS
MapSize: 56,56
Bounds: 4,4,48,48
Visibility: Lobby
Type: Conquest
Videos:
Options:
Players:
PlayerReference@Neutral:
Name: Neutral
OwnsWorld: True
NonCombatant: True
Race: atreides
PlayerReference@Multi0:
Name: Multi0
Playable: True
Race: Random
Enemies: Creeps
PlayerReference@Multi1:
Name: Multi1
Playable: True
Race: Random
Enemies: Creeps
PlayerReference@Creeps:
Name: Creeps
NonCombatant: True
Race: atreides
Enemies: Multi0, Multi1
Actors:
Actor2: spicebloom
Location: 7,18
Owner: Neutral
Actor4: spicebloom
Location: 27,6
Owner: Neutral
Actor8: spicebloom
Location: 34,38
Owner: Neutral
Actor5: spicebloom
Location: 49,26
Owner: Neutral
Actor1: mpspawn
Location: 18,34
Owner: Neutral
Actor0: mpspawn
Location: 45,12
Owner: Neutral
Actor6: spicebloom
Location: 6,42
Owner: Neutral
Actor7: spicebloom
Location: 25,49
Owner: Neutral
Actor3: spicebloom
Location: 30,15
Owner: Neutral
Actor9: wormspawner
Location: 36,51
Owner: Creeps
Actor10: wormspawner
Location: 4,51
Owner: Creeps
Actor11: wormspawner
Location: 21,4
Owner: Creeps
Actor12: wormspawner
Location: 4,4
Owner: Creeps
Smudges:
Rules:
World:
WormManager:
Minimum: 1
Maximum: 2
Sequences:
VoxelSequences:
Weapons:
Voices:
Notifications:
Translations:

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -80,7 +80,7 @@ ChromeLayout:
./mods/ra/chrome/lobby.yaml
./mods/ra/chrome/lobby-mappreview.yaml
./mods/d2k/chrome/lobby-playerbin.yaml
./mods/ra/chrome/lobby-dialogs.yaml
./mods/d2k/chrome/lobby-dialogs.yaml
./mods/d2k/chrome/color-picker.yaml
./mods/ra/chrome/map-chooser.yaml
./mods/ra/chrome/create-server.yaml