Remove 'yes' and 'no' in favor of 'true' and 'false'

This commit is contained in:
abcdefg30
2019-10-07 15:16:04 +02:00
committed by reaperrr
parent c4f48ad521
commit 55c3f313b1
21 changed files with 53 additions and 61 deletions

View File

@@ -415,7 +415,13 @@ namespace OpenRA
}
}
else if (fieldType == typeof(bool))
return ParseYesNo(value, fieldType, fieldName);
{
bool result;
if (bool.TryParse(value.ToLowerInvariant(), out result))
return result;
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(int2[]))
{
if (value != null)
@@ -592,20 +598,6 @@ namespace OpenRA
return null;
}
static object ParseYesNo(string p, Type fieldType, string field)
{
if (string.IsNullOrEmpty(p))
return InvalidValueAction(p, fieldType, field);
p = p.ToLowerInvariant();
if (p == "yes") return true;
if (p == "true") return true;
if (p == "no") return false;
if (p == "false") return false;
return InvalidValueAction(p, fieldType, field);
}
public sealed class FieldLoadInfo
{
public readonly FieldInfo Field;

View File

@@ -26,7 +26,7 @@ Container@SKIRMISH_STATS:
Height: 20
Font: Bold
Text: Destroy all opposition!
Disabled: yes
Disabled: true
TextColorDisabled: FFFFFF
Container@STATS_HEADERS:
X: 17

View File

@@ -167,7 +167,7 @@ MoneyCrate:
Inherits: ^Crate
GiveCashCrateAction:
Amount: 500
UseCashTick: yes
UseCashTick: true
airstrike.proxy:
AirstrikePower:

View File

@@ -160,7 +160,7 @@ MoneyCrate:
Inherits: ^Crate
GiveCashCrateAction:
Amount: 2000
UseCashTick: yes
UseCashTick: true
NUKEOUT.IN:
Inherits: NUKE

View File

@@ -193,7 +193,7 @@ MoneyCrate:
Inherits: ^Crate
GiveCashCrateAction:
Amount: 2000
UseCashTick: yes
UseCashTick: true
NUKEOUT.IN:
Inherits: NUKE

View File

@@ -308,7 +308,7 @@
OwnerLostAction:
Action: Kill
AppearsOnRadar:
UseLocation: yes
UseLocation: true
Targetable@GROUND:
TargetTypes: Ground, Vehicle
RequiresCondition: !airborne
@@ -648,7 +648,7 @@
OwnerLostAction:
Action: Kill
AppearsOnRadar:
UseLocation: yes
UseLocation: true
HiddenUnderFog:
Type: GroundPosition
AlwaysVisibleStances: None
@@ -727,7 +727,7 @@
EmptyWeapon: BuildingExplode
CaptureNotification:
Notification: BuildingCaptured
NewOwnerVoice: no
NewOwnerVoice: false
ActorLostNotification:
Notification: BuildingLost
ShakeOnDeath:
@@ -1062,7 +1062,7 @@
Damage: 100
Interval: 6
Targetable:
RequiresForceFire: yes
RequiresForceFire: true
TargetTypes: Ground, Husk
CaptureManager:
Capturable:
@@ -1112,7 +1112,7 @@
Name: Bridge
ShowOwnerRow: false
Targetable:
RequiresForceFire: yes
RequiresForceFire: true
TargetTypes: Ground, Water
Health:
HP: 60000

View File

@@ -9,7 +9,7 @@ CRATE:
GiveCashCrateAction:
Amount: 1000
SelectionShares: 20
UseCashTick: yes
UseCashTick: true
RevealMapCrateAction:
SelectionShares: 1
Sequence: reveal-map

View File

@@ -272,7 +272,7 @@ SILO:
RevealsShroud:
Range: 4c0
WithBuildingBib:
HasMinibib: Yes
HasMinibib: true
-WithSpriteBody:
WithResourceLevelSpriteBody:
Sequence: stages
@@ -688,7 +688,7 @@ FIX:
RevealsShroud:
Range: 5c0
WithBuildingBib:
HasMinibib: Yes
HasMinibib: true
WithResupplyAnimation:
RequiresCondition: !build-incomplete
Reservable:
@@ -857,7 +857,7 @@ GUN:
RevealsShroud:
Range: 6c0
WithBuildingBib:
HasMinibib: Yes
HasMinibib: true
Turreted:
TurnSpeed: 12
InitialFacing: 56
@@ -958,7 +958,7 @@ OBLI:
RevealsShroud:
Range: 8c0
WithBuildingBib:
HasMinibib: Yes
HasMinibib: true
-WithSpriteBody:
WithChargeSpriteBody:
Sequence: active
@@ -1003,7 +1003,7 @@ GTWR:
RevealsShroud:
Range: 7c0
WithBuildingBib:
HasMinibib: Yes
HasMinibib: true
Armament:
Weapon: HighV
LocalOffset: 256,0,256
@@ -1046,7 +1046,7 @@ ATWR:
RevealsShroud:
Range: 8c0
WithBuildingBib:
HasMinibib: Yes
HasMinibib: true
Turreted:
TurnSpeed: 255
Offset: 128,128,384

View File

@@ -56,7 +56,7 @@ HOSP:
SpawnActorOnDeath:
Actor: HOSP.Husk
WithBuildingBib:
HasMinibib: Yes
HasMinibib: true
ProvidesPrerequisite@buildingname:
HOSP.Husk:
@@ -69,7 +69,7 @@ HOSP.Husk:
Tooltip:
Name: Hospital (Destroyed)
WithBuildingBib:
HasMinibib: Yes
HasMinibib: true
BIO:
Inherits: ^TechBuilding
@@ -139,6 +139,6 @@ MISS:
Valued:
Cost: 2000
WithBuildingBib:
HasMinibib: Yes
HasMinibib: true
WithMakeAnimation:
ProvidesPrerequisite@buildingname:

View File

@@ -145,7 +145,7 @@ Background@ASSETBROWSER_PANEL:
ImageCollection: music
ImageName: play
Button@BUTTON_PAUSE:
Visible: no
Visible: false
X: 35
Y: 0
Width: 25

View File

@@ -26,7 +26,7 @@ Container@SKIRMISH_STATS:
Height: 20
Font: Bold
Text: Destroy all opposition!
Disabled: yes
Disabled: true
TextColorDisabled: FFFFFF
Container@STATS_HEADERS:
X: 22

View File

@@ -26,7 +26,7 @@ Container@SKIRMISH_STATS:
Height: 20
Font: Bold
Text: Destroy all opposition!
Disabled: yes
Disabled: true
TextColorDisabled: FFFFFF
Container@STATS_HEADERS:
X: 22

View File

@@ -87,7 +87,7 @@ DevBullet:
Projectile: Bullet
Speed: 192
Blockable: false
Shadow: yes
Shadow: true
LaunchAngle: 62
Inaccuracy: 768
ContrailLength: 20

View File

@@ -85,7 +85,7 @@ Player:
SelectTargetSound: slcttgt1.aud
BeginChargeSound: chrochr1.aud
EndChargeSound: chrordy1.aud
KillCargo: yes
KillCargo: true
Range: 3
GrantExternalConditionPower@IRONCURTAIN:
Icon: invuln

View File

@@ -69,4 +69,4 @@ Player:
Locked: True
Visible: False
LobbyPrerequisiteCheckbox@GLOBALFACTUNDEPLOY:
Visible: False
Visible: False

View File

@@ -28,7 +28,7 @@ SovietPlatoonUnits:
MINV:
Mine:
AvoidFriendly: yes
AvoidFriendly: true
CAMERA:
RevealsShroud:

View File

@@ -138,7 +138,7 @@ HOSP:
RevealsShroud:
Range: 4c0
WithBuildingBib:
HasMinibib: Yes
HasMinibib: true
WithDeathAnimation:
DeathSequence: dead
UseDeathTypeSuffix: false
@@ -531,7 +531,7 @@ BR2:
BR3:
Inherits: ^Bridge
Bridge:
Long: yes
Long: true
ShorePieces: br1,br2
Template: 241
DamagedTemplate: 242

View File

@@ -252,7 +252,7 @@ FIXF:
Armor:
Type: Wood
WithBuildingBib:
HasMinibib: Yes
HasMinibib: true
RenderSprites:
Image: FIX
Valued:
@@ -352,7 +352,7 @@ PDOF:
RenderSprites:
Image: PDOX
WithBuildingBib:
HasMinibib: Yes
HasMinibib: true
Valued:
Cost: 150
Health:

View File

@@ -415,7 +415,7 @@ CTFLAG:
Tooltip:
Name: Flag
WithBuildingBib:
HasMinibib: Yes
HasMinibib: true
-HitShape:
-Health:
-Explodes:

View File

@@ -92,7 +92,7 @@ GAP:
RevealsShroud@GAPGEN:
Range: 5c0
WithBuildingBib:
HasMinibib: Yes
HasMinibib: true
CreatesShroud:
Range: 6c0
RequiresCondition: !disabled
@@ -422,7 +422,7 @@ IRON:
Range: 5c0
RequiresCondition: !disabled
WithBuildingBib:
HasMinibib: Yes
HasMinibib: true
GrantExternalConditionPower@IRONCURTAIN:
PauseOnCondition: disabled
Icon: invuln
@@ -478,7 +478,7 @@ PDOX:
Range: 5c0
RequiresCondition: !disabled
WithBuildingBib:
HasMinibib: Yes
HasMinibib: true
ProvidesPrerequisite@germany:
Factions: germany
Prerequisite: pdox.germany
@@ -498,7 +498,7 @@ PDOX:
BeginChargeSpeechNotification: ChronosphereCharging
EndChargeSpeechNotification: ChronosphereReady
Duration: 400
KillCargo: yes
KillCargo: true
DisplayRadarPing: True
SupportPowerPaletteOrder: 20
ChronoshiftPower@advancedchronoshift:
@@ -514,7 +514,7 @@ PDOX:
BeginChargeSpeechNotification: ChronosphereCharging
EndChargeSpeechNotification: ChronosphereReady
Duration: 400
KillCargo: yes
KillCargo: true
DisplayRadarPing: True
Range: 2
SupportPowerPaletteOrder: 30
@@ -552,7 +552,7 @@ TSLA:
RevealsShroud@GAPGEN:
Range: 6c0
WithBuildingBib:
HasMinibib: Yes
HasMinibib: true
WithTeslaChargeAnimation:
Armament:
Weapon: TeslaZap
@@ -597,7 +597,7 @@ AGUN:
RevealsShroud@GAPGEN:
Range: 5c0
WithBuildingBib:
HasMinibib: Yes
HasMinibib: true
Turreted:
TurnSpeed: 15
InitialFacing: 224
@@ -692,7 +692,7 @@ PBOX:
RevealsShroud@GAPGEN:
Range: 5c0
WithBuildingBib:
HasMinibib: Yes
HasMinibib: true
Turreted:
TurnSpeed: 255
-QuantizeFacingsFromSequence:
@@ -797,7 +797,7 @@ GUN:
RevealsShroud@GAPGEN:
Range: 5c0
WithBuildingBib:
HasMinibib: Yes
HasMinibib: true
Turreted:
TurnSpeed: 12
InitialFacing: 56
@@ -840,7 +840,7 @@ FTUR:
RevealsShroud@GAPGEN:
Range: 5c0
WithBuildingBib:
HasMinibib: Yes
HasMinibib: true
Turreted:
TurnSpeed: 255
Offset: 0,0,112
@@ -894,7 +894,7 @@ SAM:
RevealsShroud@GAPGEN:
Range: 5c0
WithBuildingBib:
HasMinibib: Yes
HasMinibib: true
Turreted:
TurnSpeed: 30
InitialFacing: 0
@@ -949,7 +949,7 @@ ATEK:
GpsPower:
PauseOnCondition: disabled
Icon: gps
OneShot: yes
OneShot: true
ChargeInterval: 12000
Description: GPS Satellite
LongDesc: Reveals map terrain and provides tactical\ninformation. Requires power and active radar.
@@ -1293,7 +1293,7 @@ SILO:
Types: ThiefInfiltrate
Notification: CreditsStolen
WithBuildingBib:
HasMinibib: Yes
HasMinibib: true
-WithSpriteBody:
WithResourceLevelSpriteBody:
Sequence: stages
@@ -1957,7 +1957,7 @@ FIX:
FinishRepairingNotification: UnitRepaired
PlayerExperience: 15
WithBuildingBib:
HasMinibib: Yes
HasMinibib: true
WithResupplyAnimation:
RequiresCondition: !build-incomplete
Power:

View File

@@ -733,7 +733,7 @@ DTRK:
KillsSelf:
RequiresCondition: invulnerability || triggered
Chronoshiftable:
ExplodeInstead: yes
ExplodeInstead: true
CTNK:
Inherits: ^Vehicle