add Give Exploration devmode option
This commit is contained in:
@@ -87,6 +87,12 @@ namespace OpenRA.Traits
|
|||||||
Game.Settings.Debug.ShowCollisions ^= true;
|
Game.Settings.Debug.ShowCollisions ^= true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "DevGiveExploration":
|
||||||
|
{
|
||||||
|
if (self.World.LocalPlayer == self.Owner)
|
||||||
|
self.World.WorldActor.Trait<Shroud>().ExploreAll(self.World);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,6 +94,12 @@ namespace OpenRA.Widgets.Delegates
|
|||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
devmodeBG.GetWidget<ButtonWidget>("GIVE_EXPLORATION").OnMouseUp = mi =>
|
||||||
|
{
|
||||||
|
Game.IssueOrder(new Order("DevGiveExploration", Game.world.LocalPlayer.PlayerActor));
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
devModeButton.IsVisible = () => { return Game.LobbyInfo.GlobalSettings.AllowCheats; };
|
devModeButton.IsVisible = () => { return Game.LobbyInfo.GlobalSettings.AllowCheats; };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -264,6 +264,13 @@ Container@ROOT:
|
|||||||
Width:PARENT_RIGHT - 30
|
Width:PARENT_RIGHT - 30
|
||||||
Height:20
|
Height:20
|
||||||
Text:Build Everything
|
Text:Build Everything
|
||||||
|
Button@GIVE_EXPLORATION
|
||||||
|
Id:GIVE_EXPLORATION
|
||||||
|
X:30
|
||||||
|
Y:260
|
||||||
|
Width:200
|
||||||
|
Height:20
|
||||||
|
Text: Give Exploration
|
||||||
Background@FMVPLAYER:
|
Background@FMVPLAYER:
|
||||||
Id:FMVPLAYER
|
Id:FMVPLAYER
|
||||||
Width:WINDOW_RIGHT
|
Width:WINDOW_RIGHT
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ Container@INGAME_ROOT:
|
|||||||
X:(WINDOW_RIGHT - WIDTH)/2
|
X:(WINDOW_RIGHT - WIDTH)/2
|
||||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||||
Width:350
|
Width:350
|
||||||
Height:300
|
Height:330
|
||||||
Visible:false
|
Visible:false
|
||||||
Children:
|
Children:
|
||||||
Label@LABEL_TITLE:
|
Label@LABEL_TITLE:
|
||||||
@@ -271,3 +271,10 @@ Container@INGAME_ROOT:
|
|||||||
Width:PARENT_RIGHT - 30
|
Width:PARENT_RIGHT - 30
|
||||||
Height:20
|
Height:20
|
||||||
Text:Build Everything
|
Text:Build Everything
|
||||||
|
Button@GIVE_EXPLORATION
|
||||||
|
Id:GIVE_EXPLORATION
|
||||||
|
X:30
|
||||||
|
Y:260
|
||||||
|
Width:200
|
||||||
|
Height:20
|
||||||
|
Text: Give Exploration
|
||||||
Reference in New Issue
Block a user