move global defaults to a trait (half done)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -302,6 +302,7 @@
|
||||
<Compile Include="Traits\Activities\Wait.cs" />
|
||||
<Compile Include="Traits\CrateAction.cs" />
|
||||
<Compile Include="Effects\CrateEffect.cs" />
|
||||
<Compile Include="Traits\Defaults\GlobalDefaults.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
|
||||
@@ -337,4 +338,7 @@
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<ItemGroup>
|
||||
<Folder Include="Traits\Defaults\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
94
OpenRA.Game/Traits/Defaults/GlobalDefaults.cs
Normal file
94
OpenRA.Game/Traits/Defaults/GlobalDefaults.cs
Normal file
@@ -0,0 +1,94 @@
|
||||
|
||||
using System;
|
||||
|
||||
namespace OpenRA.Traits.Defaults
|
||||
{
|
||||
class GlobalDefaultsInfo : ITraitInfo
|
||||
{
|
||||
/* Special Weapons */
|
||||
public readonly float GapRegenInterval =0;
|
||||
public readonly int BadgerBombCount = 1;
|
||||
|
||||
/* Chrono Side Effects */
|
||||
public readonly float QuakeChance = 0;
|
||||
public readonly float QuakeDamage = 0; /* percent */
|
||||
public readonly float VortexChance = 0;
|
||||
public readonly int VortexDamage = 0;
|
||||
public readonly int VortexRange = 0;
|
||||
public readonly int VortexSpeed = 0;
|
||||
|
||||
/* Repair & Refit */
|
||||
public readonly float RefundPercent = 0;
|
||||
public readonly float ReloadRate = 0;
|
||||
public readonly float RepairPercent = 0;
|
||||
public readonly float RepairRate = 0;
|
||||
public readonly int RepairStep = 0;
|
||||
public readonly float URepairPercent = 0;
|
||||
public readonly int URepairStep = 0;
|
||||
|
||||
/* Combat & Damage */
|
||||
public readonly float TurboBoost = 1.5f;
|
||||
public readonly float BallisticScatter = 0;
|
||||
public readonly float ExpSpread = 0;
|
||||
public readonly int FireSupress = 0;
|
||||
public readonly float HomingScatter = 0;
|
||||
public readonly int MaxDamage = 0;
|
||||
public readonly int MinDamage = 0;
|
||||
public readonly bool OreExplosive = false;
|
||||
public readonly bool PlayerAutoCrush = false;
|
||||
public readonly bool PlayerReturnFire = false;
|
||||
public readonly bool PlayerScatter = false;
|
||||
public readonly bool TreeTargeting = false;
|
||||
public readonly int Incoming = 0;
|
||||
|
||||
/* Income & Production */
|
||||
public readonly float BuildSpeed = 0;
|
||||
public readonly float BuildupTime = 0;
|
||||
public readonly float OreTruckRate = 0;
|
||||
public readonly bool SeparateAircraft = true;
|
||||
public readonly float SurvivorRate = 0;
|
||||
|
||||
/* Audo/Visual Map Controls */
|
||||
public readonly bool AllyReveal = true;
|
||||
public readonly float ConditionRed = 0;
|
||||
public readonly float ConditionYellow = 0;
|
||||
public readonly int DropZoneRadius = 0;
|
||||
public readonly bool EnemyHealth = true;
|
||||
public readonly int Gravity = 0;
|
||||
public readonly float IdleActionFrequency = 0;
|
||||
public readonly float MessageDelay = 0;
|
||||
public readonly float MovieTime = 0;
|
||||
public readonly bool NamedCivilians = false;
|
||||
public readonly float SavourDelay = 0;
|
||||
|
||||
public readonly int SpeakDelay = 0;
|
||||
public readonly int TimerWarning = 0;
|
||||
public readonly bool FlashLowPower = false;
|
||||
|
||||
/* Computer & Movement Controls */
|
||||
public readonly bool CurleyShuffle = false;
|
||||
public readonly float BaseBias = 0;
|
||||
public readonly float BaseDefenseDelay = 0;
|
||||
public readonly float CloseEnough = 0;
|
||||
public readonly int DamageDelay = 0;
|
||||
public readonly int GameSpeeBias = 0;
|
||||
public readonly int LZScanRadius = 0;
|
||||
public readonly bool MineAware = false;
|
||||
public readonly float Stray = 0;
|
||||
public readonly float SubmergeDelay = 0;
|
||||
public readonly float SuspendDelay = 0;
|
||||
public readonly int SuspendPriority = 0;
|
||||
public readonly float TeamDelay = 0;
|
||||
|
||||
public object Create(Actor self) { return new GlobalDefaults(self); }
|
||||
}
|
||||
|
||||
public class GlobalDefaults
|
||||
{
|
||||
Actor self;
|
||||
public GlobalDefaults (Actor self)
|
||||
{
|
||||
this.self = self;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
#region Copyright & License Information
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford.
|
||||
* This file is part of OpenRA.
|
||||
@@ -29,6 +29,7 @@ namespace OpenRA.Traits
|
||||
{
|
||||
public class ShroudInfo : ITraitInfo
|
||||
{
|
||||
public readonly int ShroudRate = 0;
|
||||
public object Create(Actor self) { return new Shroud(self, this); }
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#region Copyright & License Information
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford.
|
||||
* This file is part of OpenRA.
|
||||
@@ -24,10 +24,20 @@ using OpenRA.Traits.Activities;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
class C4DemolitionInfo : StatelessTraitInfo<C4Demolition> { }
|
||||
class C4DemolitionInfo : ITraitInfo
|
||||
{
|
||||
public readonly float C4Delay = 0;
|
||||
public object Create(Actor self) { return new C4Demolition(self); }
|
||||
}
|
||||
|
||||
class C4Demolition : IIssueOrder, IResolveOrder
|
||||
{
|
||||
Actor self;
|
||||
public C4Demolition(Actor self)
|
||||
{
|
||||
this.self = self;
|
||||
}
|
||||
|
||||
public Order IssueOrder(Actor self, int2 xy, MouseInput mi, Actor underCursor)
|
||||
{
|
||||
if (mi.Button != MouseButton.Right) return null;
|
||||
|
||||
@@ -63,6 +63,69 @@ Player:
|
||||
GivenAuto: no
|
||||
OneShot: yes
|
||||
|
||||
Defaults:
|
||||
GlobalDefaults:
|
||||
GapRegenInterval: .1
|
||||
BadgerBombCount: 1
|
||||
QuakeChance: 20%
|
||||
QuakeDamage: 33%
|
||||
VortexChance: 20%
|
||||
VortexDamage: 200
|
||||
VortexRange: 10
|
||||
VortexSpeed: 10
|
||||
RefundPercent: 50%
|
||||
ReloadRate: .04
|
||||
RepairPercent: 20%
|
||||
RepairRate: .016
|
||||
RepairStep: 7
|
||||
URepairPercent: 20%
|
||||
URepairStep: 10
|
||||
TurboBoost: 1.5
|
||||
BallisticScatter: 1.0
|
||||
ExpSpread: .3
|
||||
FireSupress: 1
|
||||
HomingScatter: 2.0
|
||||
MaxDamage: 1000
|
||||
MinDamage: 1
|
||||
OreExplosive: no
|
||||
PlayerAutoCrush: no
|
||||
PlayerReturnFire: no
|
||||
PlayerScatter: no
|
||||
TreeTargeting: no
|
||||
Incoming: 10
|
||||
BuildSpeed: .4
|
||||
BuildupTime: .06
|
||||
OreTruckRate: 1
|
||||
SeparateAircraft: no
|
||||
SurvivorRate: .4
|
||||
AllyReveal: yes
|
||||
ConditionRed: 25%
|
||||
ConditionYellow: 50%
|
||||
DropZoneRadius: 4
|
||||
EnemyHealth: yes
|
||||
Gravity: 3
|
||||
IdleActionFrequency: .1
|
||||
MessageDelay: .6
|
||||
MovieTime: .06
|
||||
NamedCivilians: no
|
||||
SavourDelay: .03
|
||||
SpeakDelay: 2
|
||||
TimerWarning: 2
|
||||
FlashLowPower: yes
|
||||
CurleyShuffle: no
|
||||
BaseBias: 2
|
||||
BaseDefenseDelay: .25
|
||||
CloseEnough: 2.75
|
||||
DamageDelay: 1
|
||||
GameSpeeBias: 1
|
||||
LZScanRadius: 16
|
||||
MineAware: yes
|
||||
Stray: 2.0
|
||||
SubmergeDelay: .02
|
||||
SuspendDelay: 2
|
||||
SuspendPriority: 20
|
||||
TeamDelay: .6
|
||||
|
||||
World:
|
||||
ScreenShaker:
|
||||
WaterPaletteRotation:
|
||||
@@ -269,6 +332,7 @@ World:
|
||||
SpatialBins:
|
||||
BinSize: 4
|
||||
Shroud:
|
||||
ShroudRate: 4
|
||||
|
||||
MGG:
|
||||
GeneratesGap:
|
||||
@@ -2570,6 +2634,7 @@ E7:
|
||||
Sight: 6
|
||||
Speed: 5
|
||||
C4Demolition:
|
||||
C4Delay: .03
|
||||
AttackBase:
|
||||
PrimaryWeapon: Colt45
|
||||
SecondaryWeapon: Colt45
|
||||
|
||||
Reference in New Issue
Block a user