race specific notifications/mcv-crate
This commit is contained in:
43
OpenRA.Mods.D2k/BuildingCaptureNotification.cs
Normal file
43
OpenRA.Mods.D2k/BuildingCaptureNotification.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2012 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see COPYING.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
class CaptureNotificationInfo : ITraitInfo
|
||||
{
|
||||
public readonly string Race = null;
|
||||
public readonly string Notification = null;
|
||||
|
||||
public object Create(ActorInitializer init) { return new CaptureNotification(this); }
|
||||
}
|
||||
|
||||
class CaptureNotification : INotifyCapture
|
||||
{
|
||||
CaptureNotificationInfo Info;
|
||||
public CaptureNotification(CaptureNotificationInfo info)
|
||||
{
|
||||
Info = info;
|
||||
}
|
||||
|
||||
public void OnCapture (Actor self, Actor captor, Player oldOwner, Player newOwner)
|
||||
{
|
||||
if (captor.World.LocalPlayer != captor.Owner)
|
||||
return;
|
||||
|
||||
if (Info.Race != null && Info.Race != newOwner.Country.Race)
|
||||
return;
|
||||
|
||||
Sound.PlayToPlayer(captor.World.LocalPlayer, Info.Notification);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
<Compile Include="Widgets\Logic\D2kExtractGameFilesLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\D2kInstallFromCDLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\D2kDownloadPackagesLogic.cs" />
|
||||
<Compile Include="BuildingCaptureNotification.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
@@ -91,7 +92,4 @@ cd "$(SolutionDir)"</PostBuildEvent>
|
||||
<Name>OpenRA.Mods.RA</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Render\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -14,6 +14,7 @@ namespace OpenRA.Mods.RA
|
||||
{
|
||||
class ActorLostNotificationInfo : ITraitInfo
|
||||
{
|
||||
public readonly string Race = null;
|
||||
public readonly string Notification = null;
|
||||
public readonly bool NotifyAll = false;
|
||||
|
||||
@@ -31,6 +32,8 @@ namespace OpenRA.Mods.RA
|
||||
public void Killed(Actor self, AttackInfo e)
|
||||
{
|
||||
var player = (Info.NotifyAll) ? self.World.LocalPlayer : self.Owner;
|
||||
if (Info.Race != null && Info.Race != self.Owner.Country.Race)
|
||||
return;
|
||||
Sound.PlayToPlayer(player, Info.Notification);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,8 @@ namespace OpenRA.Mods.RA
|
||||
public string WinNotification = null;
|
||||
public string LoseNotification = null;
|
||||
public int NotificationDelay = 1500; // Milliseconds
|
||||
public readonly string Race = null;
|
||||
|
||||
public object Create(ActorInitializer init) { return new ConquestVictoryConditions(this); }
|
||||
}
|
||||
|
||||
@@ -53,6 +55,7 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
public void Lose(Actor self)
|
||||
{
|
||||
if (Info.Race != null && Info.Race != self.Owner.Country.Race) return;
|
||||
if (self.Owner.WinState == WinState.Lost) return;
|
||||
self.Owner.WinState = WinState.Lost;
|
||||
|
||||
@@ -74,6 +77,7 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
public void Win(Actor self)
|
||||
{
|
||||
if (Info.Race != null && Info.Race != self.Owner.Country.Race) return;
|
||||
if (self.Owner.WinState == WinState.Won) return;
|
||||
self.Owner.WinState = WinState.Won;
|
||||
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
# construction yard crane animations missing
|
||||
# welding animation (factories) missing
|
||||
# chimney animation (refinery) missing
|
||||
# harvester unload and harvest animation missing
|
||||
# harvest animation missing
|
||||
# harvester unload animation ugly
|
||||
# add more spice tiles and make them fit
|
||||
# add game logic for concrete plates (use terrain overlay from bridges/ressources)
|
||||
# allow placing turrets on walls
|
||||
@@ -14,8 +15,7 @@
|
||||
# ornithocopter should flap (might need new RenderOrni code for proper animation)
|
||||
# R8 converter needs infantry frame resorter
|
||||
# add grenade thrower
|
||||
# add sandworm (behave like a moving anti-vehicle mine)
|
||||
# add thumper which deploys and really attracts sandworms
|
||||
# make sandworm behave like a moving anti-vehicle mine
|
||||
# add neutral buildings: emperor palace, fremen siech, smugglers factory
|
||||
# add deathhand missile (nuke)
|
||||
# maybe add ornithocopter strikes (they are currently directly contrallable units with non-reloading machine guns as in Dune II)
|
||||
@@ -33,7 +33,6 @@
|
||||
# black spots on buildings should be fading team colors
|
||||
# gamefile extraction (setup/setup.z) from CD fails
|
||||
# support patch 1.06 gamefiles: DATA.R8 has more frames and currently fails to extract, also featuring new terrain with white houses and new unit: grenade thrower
|
||||
# mouse cursor has no transparency and is a little pixelish
|
||||
# infantry-only areas (Rough) do not show the dark-green mouse cursor
|
||||
# put TilesetBuilder.Export into OpenRA.Utility to call the functions directly when extracting game-files (instead of opening a GUI)
|
||||
# replace RA sounds by Dune 2000 ones
|
||||
@@ -23,9 +23,15 @@
|
||||
GainsExperience:
|
||||
GivesExperience:
|
||||
DrawLineToTarget:
|
||||
#TODO: not race specific
|
||||
ActorLostNotification:
|
||||
ActorLostNotification@Atreides:
|
||||
Race: atreides
|
||||
Notification: AI_ULOST.AUD
|
||||
ActorLostNotification@Harkonnen:
|
||||
Race: harkonnen
|
||||
Notification: HI_ULOST.AUD
|
||||
ActorLostNotification@Ordos:
|
||||
Race: ordos
|
||||
Notification: OI_ULOST.AUD
|
||||
ProximityCaptor:
|
||||
Types:Vehicle
|
||||
GivesBounty:
|
||||
@@ -58,8 +64,15 @@
|
||||
GainsExperience:
|
||||
GivesExperience:
|
||||
DrawLineToTarget:
|
||||
ActorLostNotification:
|
||||
ActorLostNotification@Atreides:
|
||||
Race: atreides
|
||||
Notification: AI_ULOST.AUD
|
||||
ActorLostNotification@Harkonnen:
|
||||
Race: harkonnen
|
||||
Notification: HI_ULOST.AUD
|
||||
ActorLostNotification@Ordos:
|
||||
Race: ordos
|
||||
Notification: OI_ULOST.AUD
|
||||
ProximityCaptor:
|
||||
Types:Tank
|
||||
GivesBounty:
|
||||
@@ -101,8 +114,15 @@
|
||||
GainsExperience:
|
||||
GivesExperience:
|
||||
DrawLineToTarget:
|
||||
ActorLostNotification:
|
||||
ActorLostNotification@Atreides:
|
||||
Race: atreides
|
||||
Notification: AI_ULOST.AUD
|
||||
ActorLostNotification@Harkonnen:
|
||||
Race: harkonnen
|
||||
Notification: HI_ULOST.AUD
|
||||
ActorLostNotification@Ordos:
|
||||
Race: ordos
|
||||
Notification: OI_ULOST.AUD
|
||||
ProximityCaptor:
|
||||
Types:Infantry
|
||||
GivesBounty:
|
||||
@@ -122,8 +142,15 @@
|
||||
GainsExperience:
|
||||
GivesExperience:
|
||||
DrawLineToTarget:
|
||||
ActorLostNotification:
|
||||
ActorLostNotification@Atreides:
|
||||
Race: atreides
|
||||
Notification: AI_ULOST.AUD
|
||||
ActorLostNotification@Harkonnen:
|
||||
Race: harkonnen
|
||||
Notification: HI_ULOST.AUD
|
||||
ActorLostNotification@Ordos:
|
||||
Race: ordos
|
||||
Notification: OI_ULOST.AUD
|
||||
DebugAircraftFacing:
|
||||
DebugAircraftSubPxX:
|
||||
DebugAircraftSubPxY:
|
||||
@@ -159,7 +186,7 @@
|
||||
WithBuildingExplosion:
|
||||
RepairableBuilding:
|
||||
EmitInfantryOnSell:
|
||||
ActorTypes: rifle,rifle,rifle,rifle,rifle,rifle
|
||||
ActorTypes: rifle,rifle,rifle,bazooka,bazooka,engineer
|
||||
MustBeDestroyed:
|
||||
GivesExperience:
|
||||
# FrozenUnderFog:
|
||||
@@ -172,9 +199,15 @@
|
||||
CaptureNotification@Ordos:
|
||||
Race: ordos
|
||||
Notification: OI_CAPT.AUD
|
||||
#TODO: not Race-specific
|
||||
ActorLostNotification:
|
||||
ActorLostNotification@Atreides:
|
||||
Race: atreides
|
||||
Notification: AI_BLOST.AUD
|
||||
ActorLostNotification@Harkonnen:
|
||||
Race: harkonnen
|
||||
Notification: HI_BLOST.AUD
|
||||
ActorLostNotification@Ordos:
|
||||
Race: ordos
|
||||
Notification: OI_BLOST.AUD
|
||||
EditorAppearance:
|
||||
RelativeToTopLeft: yes
|
||||
ShakeOnDeath:
|
||||
|
||||
@@ -48,9 +48,18 @@ Player:
|
||||
BlockedAudio: AI_NROOM.AUD
|
||||
PlaceBuilding:
|
||||
SupportPowerManager:
|
||||
ConquestVictoryConditions:
|
||||
WinNotification:AI_MWIN.AUD
|
||||
LoseNotification:AI_MFAIL.AUD
|
||||
ConquestVictoryConditions@Atreides:
|
||||
Race: atreides
|
||||
WinNotification: AI_MWIN.AUD
|
||||
LoseNotification: AI_MFAIL.AUD
|
||||
ConquestVictoryConditions@Harkonnen:
|
||||
Race: harkonnen
|
||||
WinNotification: HI_MWIN.AUD
|
||||
LoseNotification: HI_MFAIL.AUD
|
||||
ConquestVictoryConditions@Ordos:
|
||||
Race: ordos
|
||||
WinNotification: OI_MWIN.AUD
|
||||
LoseNotification: OI_MFAIL.AUD
|
||||
PowerManager:
|
||||
AllyRepair:
|
||||
PlayerResources:
|
||||
@@ -246,17 +255,60 @@ CRATE:
|
||||
RevealMapCrateAction:
|
||||
SelectionShares: 1
|
||||
Effect: reveal-map
|
||||
#TODO: Currently only gives you an Atreides MCV
|
||||
GiveMcvCrateAction:
|
||||
GiveMcvCrateAction@Atreides:
|
||||
SelectionShares: 2
|
||||
NoBaseSelectionShares: 9001
|
||||
Unit: mcva
|
||||
GiveUnitCrateAction@trike:
|
||||
GiveMcvCrateAction@Harkonnen:
|
||||
SelectionShares: 2
|
||||
NoBaseSelectionShares: 9001
|
||||
Unit: mcvh
|
||||
GiveMcvCrateAction@Ordos:
|
||||
SelectionShares: 2
|
||||
NoBaseSelectionShares: 9001
|
||||
Unit: mcvo
|
||||
GiveUnitCrateAction@Trike:
|
||||
SelectionShares: 7
|
||||
Unit: trike
|
||||
GiveUnitCrateAction@quad:
|
||||
GiveUnitCrateAction@Quad:
|
||||
SelectionShares: 6
|
||||
Unit: quad
|
||||
GiveUnitCrateAction@Raider:
|
||||
SelectionShares: 6
|
||||
Unit: raider
|
||||
GiveUnitCrateAction@SiegeTank:
|
||||
SelectionShares: 6
|
||||
Unit: siegetank
|
||||
GiveUnitCrateAction@MissileTank:
|
||||
SelectionShares: 6
|
||||
Unit: missiletank
|
||||
GiveUnitCrateAction@CombatA:
|
||||
SelectionShares: 5
|
||||
Unit: combata
|
||||
GiveUnitCrateAction@CombatH:
|
||||
SelectionShares: 5
|
||||
Unit: combath
|
||||
GiveUnitCrateAction@CombatO:
|
||||
SelectionShares: 5
|
||||
Unit: combato
|
||||
GiveUnitCrateAction@Fremen:
|
||||
SelectionShares: 4
|
||||
Unit: fremen
|
||||
GiveUnitCrateAction@Sardaukar:
|
||||
SelectionShares: 4
|
||||
Unit: sardaukar
|
||||
GiveUnitCrateAction@Saboteur:
|
||||
SelectionShares: 4
|
||||
Unit: saboteur
|
||||
GiveUnitCrateAction@SonicTank:
|
||||
SelectionShares: 3
|
||||
Unit: sonictank
|
||||
GiveUnitCrateAction@Devast:
|
||||
SelectionShares: 3
|
||||
Unit: devast
|
||||
GiveUnitCrateAction@deviatortank:
|
||||
SelectionShares: 3
|
||||
Unit: deviatortank
|
||||
RenderSimple:
|
||||
BelowUnits:
|
||||
ProximityCaptor:
|
||||
|
||||
Reference in New Issue
Block a user