diff --git a/Assets/Base/ActivatedSensor.cs b/Assets/Base/ActivatedSensor.cs index 0ac0088d..bd98a7a5 100644 --- a/Assets/Base/ActivatedSensor.cs +++ b/Assets/Base/ActivatedSensor.cs @@ -7,6 +7,7 @@ public abstract class ActivatedSensor : Sensor public interface Filter { bool EntityMatches(EntityComponent entityComponent); + string ToString(GUIStringSet s); } public class EntityFilter : Filter @@ -27,12 +28,12 @@ public bool EntityMatches(EntityComponent entityComponent) return entityComponent.entity == entityRef.entity; // also matches clones } - public override string ToString() + public string ToString(GUIStringSet s) { Entity e = entityRef.entity; if (e == null) - return GUIPanel.StringSet.EntityRefNone; - return e.ToString(); + return s.EntityRefNone; + return e.ToString(s); } } @@ -105,7 +106,7 @@ public bool EntityMatches(EntityComponent entityComponent) return false; } - public override string ToString() => entityType.fullName; + public string ToString(GUIStringSet s) => entityType.displayName(s); } // for maps before version 10 @@ -127,8 +128,7 @@ public bool EntityMatches(EntityComponent entityComponent) return entityComponent.entity.tag == tag; } - public override string ToString() => - GUIPanel.StringSet.FilterWithTag(Entity.TagToString(tag)); + public string ToString(GUIStringSet s) => s.FilterWithTag(Entity.TagToString(tag)); } public class MultipleTagFilter : Filter @@ -149,12 +149,12 @@ public bool EntityMatches(EntityComponent entityComponent) return ((1 << entityComponent.entity.tag) & tagBits) != 0; } - public override string ToString() + public string ToString(GUIStringSet s) { if (tagBits == 0) - return GUIPanel.StringSet.FilterNothing; + return s.FilterNothing; else if (tagBits == 255) - return GUIPanel.StringSet.FilterAnything; + return s.AnythingName; string str = ""; int count = 0; for (byte i = 0; i < 8; i++) @@ -166,9 +166,9 @@ public override string ToString() } } if (count == 1) - return GUIPanel.StringSet.FilterWithTag(str); + return s.FilterWithTag(str); else - return GUIPanel.StringSet.FilterMultipleTags(str); + return s.FilterMultipleTags(str); } } diff --git a/Assets/Base/CustomTexture.cs b/Assets/Base/CustomTexture.cs index 450ec4a6..f702e5a1 100644 --- a/Assets/Base/CustomTexture.cs +++ b/Assets/Base/CustomTexture.cs @@ -7,6 +7,7 @@ public class CustomTexture : PropertiesObject public static PropertiesObjectType objectType = new PropertiesObjectType( "Custom Texture", typeof(CustomTexture)) { + displayName = s => s.CustomTextureName, description = s => s.CustomTextureDesc, iconName = "image", }; diff --git a/Assets/Base/Entity.cs b/Assets/Base/Entity.cs index 514bf01b..2d4f3c4b 100644 --- a/Assets/Base/Entity.cs +++ b/Assets/Base/Entity.cs @@ -48,7 +48,10 @@ public static IEnumerable JoinProperties( public class PropertiesObjectType { public static readonly PropertiesObjectType NONE = new PropertiesObjectType("None", null) - { iconName = "cancel" }; + { + displayName = s => s.NoneName, + iconName = "cancel", + }; // This name is used for identifying types and for error messages if a type is not recognized. // It is always in English (not localized) and can never change. @@ -59,6 +62,8 @@ public class PropertiesObjectType [XmlIgnore] public Func constructor; + [XmlIgnore] + public Localizer displayName; [XmlIgnore] public Localizer description = GUIStringSet.Empty; [XmlIgnore] @@ -81,6 +86,7 @@ public Texture icon public PropertiesObjectType() { constructor = DefaultConstructor; + displayName = DefaultDisplayName; } public PropertiesObjectType(string fullName, Type type) @@ -88,11 +94,13 @@ public PropertiesObjectType(string fullName, Type type) this.fullName = fullName; this.type = type; constructor = DefaultConstructor; + displayName = DefaultDisplayName; } public PropertiesObjectType(PropertiesObjectType baseType, Func newConstructor) { fullName = baseType.fullName; + displayName = baseType.displayName; description = baseType.description; longDescription = baseType.longDescription; iconName = baseType.iconName; @@ -100,6 +108,8 @@ public PropertiesObjectType(PropertiesObjectType baseType, Func fullName; + private PropertiesObject DefaultConstructor() { if (type == null) @@ -174,7 +184,10 @@ public abstract class Entity : PropertiesObject { public static PropertiesObjectType objectType = new PropertiesObjectType( "Anything", typeof(Entity)) - { iconName = "circle-outline" }; + { + displayName = s => s.AnythingName, + iconName = "circle-outline", + }; public EntityComponent component; public Sensor sensor; @@ -192,6 +205,8 @@ public static string TagToString(byte tag) } public override string ToString() => TagToString(tag) + " " + ObjectType.fullName; + public string ToString(GUIStringSet s) => + TagToString(tag) + " " + ObjectType.displayName(s); public virtual PropertiesObjectType ObjectType => objectType; diff --git a/Assets/Base/EntityReference.cs b/Assets/Base/EntityReference.cs index e81436b7..eb33b595 100644 --- a/Assets/Base/EntityReference.cs +++ b/Assets/Base/EntityReference.cs @@ -192,39 +192,39 @@ public bool MatchesDirection(Transform transform, Vector3 direction) return Vector3.Angle(targetDirection, direction) < 45; } - public override string ToString() + public string ToString(GUIStringSet s) { if (entityRef.entity != null) - return entityRef.entity.ToString(); + return entityRef.entity.ToString(s); else { - string dirStr = GUIPanel.StringSet.EntityRefNone; + string dirStr = s.EntityRefNone; switch (direction & ~LOCAL_BIT) { case WEST: - dirStr = GUIPanel.StringSet.West; + dirStr = s.West; break; case EAST: - dirStr = GUIPanel.StringSet.East; + dirStr = s.East; break; case DOWN: - dirStr = GUIPanel.StringSet.Down; + dirStr = s.Down; break; case UP: - dirStr = GUIPanel.StringSet.Up; + dirStr = s.Up; break; case SOUTH: - dirStr = GUIPanel.StringSet.South; + dirStr = s.South; break; case NORTH: - dirStr = GUIPanel.StringSet.North; + dirStr = s.North; break; case RANDOM: - dirStr = GUIPanel.StringSet.TargetRandom; + dirStr = s.TargetRandom; break; } if ((direction & LOCAL_BIT) != 0 && direction != NO_DIRECTION) - return GUIPanel.StringSet.TargetLocalDirection(dirStr); + return s.TargetLocalDirection(dirStr); else return dirStr; } diff --git a/Assets/Base/Object.cs b/Assets/Base/Object.cs index afb45933..26025507 100644 --- a/Assets/Base/Object.cs +++ b/Assets/Base/Object.cs @@ -6,6 +6,7 @@ public abstract class ObjectEntity : DynamicEntity public static new PropertiesObjectType objectType = new PropertiesObjectType( "Object", typeof(ObjectEntity)) { + displayName = s => s.ObjectName, description = s => s.ObjectDesc, iconName = "circle", }; diff --git a/Assets/Base/Substance.cs b/Assets/Base/Substance.cs index b182e760..0cc2cc6f 100644 --- a/Assets/Base/Substance.cs +++ b/Assets/Base/Substance.cs @@ -12,6 +12,7 @@ public class Substance : DynamicEntity public static new PropertiesObjectType objectType = new PropertiesObjectType( "Substance", typeof(Substance)) { + displayName = s => s.SubstanceName, description = s => s.SubstanceDesc, longDescription = s => s.SubstanceLongDesc, iconName = "cube-outline", diff --git a/Assets/Base/WorldProperties.cs b/Assets/Base/WorldProperties.cs index 6cb05e8b..c8c63858 100644 --- a/Assets/Base/WorldProperties.cs +++ b/Assets/Base/WorldProperties.cs @@ -15,6 +15,7 @@ public class WorldProperties : PropertiesObject public static PropertiesObjectType objectType = new PropertiesObjectType( "World", typeof(WorldProperties)) { + displayName = s => s.WorldName, description = s => s.WorldDesc, iconName = "earth", }; diff --git a/Assets/Behaviors/Carryable.cs b/Assets/Behaviors/Carryable.cs index 2121341c..5645a205 100644 --- a/Assets/Behaviors/Carryable.cs +++ b/Assets/Behaviors/Carryable.cs @@ -7,6 +7,7 @@ public class CarryableBehavior : GenericEntityBehavior s.CarryableName, description = s => s.CarryableDesc, longDescription = s => s.CarryableLongDesc, iconName = "coffee", diff --git a/Assets/Behaviors/CharacterComponent.cs b/Assets/Behaviors/CharacterComponent.cs index b1d23b30..356c9a4c 100644 --- a/Assets/Behaviors/CharacterComponent.cs +++ b/Assets/Behaviors/CharacterComponent.cs @@ -6,6 +6,7 @@ public class CharacterBehavior : BasePhysicsBehavior public static new BehaviorType objectType = new BehaviorType( "Character", typeof(CharacterBehavior)) { + displayName = s => s.CharacterName, description = s => s.CharacterDesc, longDescription = s => s.CharacterLongDesc, iconName = "human", diff --git a/Assets/Behaviors/Clone.cs b/Assets/Behaviors/Clone.cs index 217c2d11..604e5c4c 100644 --- a/Assets/Behaviors/Clone.cs +++ b/Assets/Behaviors/Clone.cs @@ -4,6 +4,7 @@ public class CloneBehavior : TeleportBehavior { public static new BehaviorType objectType = new BehaviorType("Clone", typeof(CloneBehavior)) { + displayName = s => s.CloneName, description = s => s.CloneDesc, longDescription = s => s.CloneLongDesc, iconName = "content-copy", diff --git a/Assets/Behaviors/Force.cs b/Assets/Behaviors/Force.cs index bc672116..5c5523ea 100644 --- a/Assets/Behaviors/Force.cs +++ b/Assets/Behaviors/Force.cs @@ -10,6 +10,7 @@ public enum ForceBehaviorMode public static new BehaviorType objectType = new BehaviorType("Force", typeof(ForceBehavior)) { + displayName = s => s.ForceName, description = s => s.ForceDesc, longDescription = s => s.ForceLongDesc, iconName = "rocket", diff --git a/Assets/Behaviors/HaloComponent.cs b/Assets/Behaviors/HaloComponent.cs index ea4c6d62..baa37532 100644 --- a/Assets/Behaviors/HaloComponent.cs +++ b/Assets/Behaviors/HaloComponent.cs @@ -6,6 +6,7 @@ public class HaloBehavior : GenericEntityBehavior { public static new BehaviorType objectType = new BehaviorType("Halo", typeof(HaloBehavior)) { + displayName = s => s.HaloName, description = s => s.HaloDesc, longDescription = s => s.HaloLongDesc, iconName = "blur", diff --git a/Assets/Behaviors/HurtHeal.cs b/Assets/Behaviors/HurtHeal.cs index a5d55f9e..af824181 100644 --- a/Assets/Behaviors/HurtHeal.cs +++ b/Assets/Behaviors/HurtHeal.cs @@ -6,6 +6,7 @@ public class HurtHealBehavior : GenericEntityBehavior s.HurtHealName, description = s => s.HurtHealDesc, longDescription = s => s.HurtHealLongDesc, iconName = "heart", diff --git a/Assets/Behaviors/Joystick.cs b/Assets/Behaviors/Joystick.cs index c7085679..c3326f07 100644 --- a/Assets/Behaviors/Joystick.cs +++ b/Assets/Behaviors/Joystick.cs @@ -10,6 +10,7 @@ public enum JoystickAlignment { HORIZONTAL, VERTICAL } public static new BehaviorType objectType = new BehaviorType( "Joystick", typeof(JoystickBehavior)) { + displayName = s => s.JoystickName, description = s => s.JoystickDesc, iconName = "joystick", rule = BehaviorType.AndRule( diff --git a/Assets/Behaviors/LightComponent.cs b/Assets/Behaviors/LightComponent.cs index 8696b0b0..a434d9d8 100644 --- a/Assets/Behaviors/LightComponent.cs +++ b/Assets/Behaviors/LightComponent.cs @@ -6,6 +6,7 @@ public class LightBehavior : GenericEntityBehavior s.LightName, description = s => s.LightDesc, longDescription = s => s.LightLongDesc, iconName = "lightbulb-on", diff --git a/Assets/Behaviors/LookAt.cs b/Assets/Behaviors/LookAt.cs index 5eeb43db..3272cb6e 100644 --- a/Assets/Behaviors/LookAt.cs +++ b/Assets/Behaviors/LookAt.cs @@ -5,6 +5,7 @@ public class LookAtBehavior : GenericEntityBehavior s.LookAtName, description = s => s.LookAtDesc, longDescription = s => s.LookAtLongDesc, iconName = "compass", diff --git a/Assets/Behaviors/Move.cs b/Assets/Behaviors/Move.cs index 621f8610..88c9b838 100644 --- a/Assets/Behaviors/Move.cs +++ b/Assets/Behaviors/Move.cs @@ -6,6 +6,7 @@ public class MoveBehavior : GenericEntityBehavior public static new BehaviorType objectType = new BehaviorType( "Move", typeof(MoveBehavior)) { + displayName = s => s.MoveName, description = s => s.MoveDesc, longDescription = s => s.MoveLongDesc, iconName = "arrow-right-bold-box-outline", diff --git a/Assets/Behaviors/MoveWith.cs b/Assets/Behaviors/MoveWith.cs index f62a34c8..653c1f19 100644 --- a/Assets/Behaviors/MoveWith.cs +++ b/Assets/Behaviors/MoveWith.cs @@ -6,6 +6,7 @@ public class MoveWithBehavior : GenericEntityBehavior s.MoveWithName, description = s => s.MoveWithDesc, longDescription = s => s.MoveWithLongDesc, iconName = "move-resize-variant", diff --git a/Assets/Behaviors/PhysicsComponent.cs b/Assets/Behaviors/PhysicsComponent.cs index 9b06cd90..0c6e7c17 100644 --- a/Assets/Behaviors/PhysicsComponent.cs +++ b/Assets/Behaviors/PhysicsComponent.cs @@ -12,6 +12,7 @@ public class PhysicsBehavior : BasePhysicsBehavior public static new BehaviorType objectType = new BehaviorType( "Physics", typeof(PhysicsBehavior)) { + displayName = s => s.PhysicsName, description = s => s.PhysicsDesc, longDescription = s => s.PhysicsLongDesc, iconName = "soccer", diff --git a/Assets/Behaviors/Reflector.cs b/Assets/Behaviors/Reflector.cs index b5634c58..73e2fbf0 100644 --- a/Assets/Behaviors/Reflector.cs +++ b/Assets/Behaviors/Reflector.cs @@ -8,6 +8,7 @@ public class ReflectorBehavior : GenericEntityBehavior s.ReflectorName, description = s => s.ReflectorDesc, longDescription = s => s.ReflectorLongDesc, iconName = "mirror", diff --git a/Assets/Behaviors/Scale.cs b/Assets/Behaviors/Scale.cs index 4178928a..542dcfe2 100644 --- a/Assets/Behaviors/Scale.cs +++ b/Assets/Behaviors/Scale.cs @@ -6,6 +6,7 @@ public class ScaleBehavior : GenericEntityBehavior s.ScaleName, description = s => s.ScaleDesc, longDescription = s => s.ScaleLongDesc, iconName = "resize", diff --git a/Assets/Behaviors/Score.cs b/Assets/Behaviors/Score.cs index f3a5474c..c7f77d79 100644 --- a/Assets/Behaviors/Score.cs +++ b/Assets/Behaviors/Score.cs @@ -4,6 +4,7 @@ public class ScoreBehavior : GenericEntityBehavior s.ScoreName, description = s => s.ScoreDesc, iconName = "counter" }; diff --git a/Assets/Behaviors/Solid.cs b/Assets/Behaviors/Solid.cs index 7089d737..1a59548d 100644 --- a/Assets/Behaviors/Solid.cs +++ b/Assets/Behaviors/Solid.cs @@ -4,6 +4,7 @@ public class SolidBehavior : GenericEntityBehavior s.SolidName, description = s => s.SolidDesc, iconName = "wall", rule = BehaviorType.AndRule( diff --git a/Assets/Behaviors/Sound.cs b/Assets/Behaviors/Sound.cs index 1ed12008..6812ceec 100644 --- a/Assets/Behaviors/Sound.cs +++ b/Assets/Behaviors/Sound.cs @@ -18,6 +18,7 @@ public class SoundBehavior : BaseSoundBehavior { public static new BehaviorType objectType = new BehaviorType("Sound", typeof(SoundBehavior)) { + displayName = s => s.SoundName, description = s => s.SoundDesc, longDescription = s => s.SoundLongDesc, iconName = "volume-high", diff --git a/Assets/Behaviors/Sound3D.cs b/Assets/Behaviors/Sound3D.cs index f8d50f5a..e722a6a8 100644 --- a/Assets/Behaviors/Sound3D.cs +++ b/Assets/Behaviors/Sound3D.cs @@ -11,6 +11,7 @@ public class Sound3DBehavior : BaseSoundBehavior public static new BehaviorType objectType = new BehaviorType( "3D Sound", typeof(Sound3DBehavior)) { + displayName = s => s.Sound3DName, description = s => s.Sound3DDesc, longDescription = s => s.Sound3DLongDesc, iconName = "headphones", diff --git a/Assets/Behaviors/Spin.cs b/Assets/Behaviors/Spin.cs index de8fd00b..6f87f28e 100644 --- a/Assets/Behaviors/Spin.cs +++ b/Assets/Behaviors/Spin.cs @@ -5,6 +5,7 @@ public class SpinBehavior : GenericEntityBehavior { public static new BehaviorType objectType = new BehaviorType("Spin", typeof(SpinBehavior)) { + displayName = s => s.SpinName, description = s => s.SpinDesc, longDescription = s => s.SpinLongDesc, iconName = "format-rotate-90", diff --git a/Assets/Behaviors/Teleport.cs b/Assets/Behaviors/Teleport.cs index d4fec97c..95b74faf 100644 --- a/Assets/Behaviors/Teleport.cs +++ b/Assets/Behaviors/Teleport.cs @@ -6,6 +6,7 @@ public class TeleportBehavior : GenericEntityBehavior s.TeleportName, description = s => s.TeleportDesc, longDescription = s => s.TeleportLongDesc, iconName = "send", diff --git a/Assets/Behaviors/Visible.cs b/Assets/Behaviors/Visible.cs index effc3249..d7dedf23 100644 --- a/Assets/Behaviors/Visible.cs +++ b/Assets/Behaviors/Visible.cs @@ -5,6 +5,7 @@ public class VisibleBehavior : GenericEntityBehavior s.VisibleName, description = s => s.VisibleDesc, iconName = "eye", rule = BehaviorType.AndRule( diff --git a/Assets/Behaviors/Water.cs b/Assets/Behaviors/Water.cs index 5061a0c4..4fc7e64d 100644 --- a/Assets/Behaviors/Water.cs +++ b/Assets/Behaviors/Water.cs @@ -4,6 +4,7 @@ public class WaterBehavior : GenericEntityBehavior s.WaterName, description = s => s.WaterDesc, longDescription = s => s.WaterLongDesc, iconName = "water", diff --git a/Assets/GameScripts.cs b/Assets/GameScripts.cs index 1f543054..de3eb2a9 100644 --- a/Assets/GameScripts.cs +++ b/Assets/GameScripts.cs @@ -15,8 +15,9 @@ public static PropertiesObjectType FindTypeWithName(PropertiesObjectType[] types { new PropertiesObjectType("Solid Substance", typeof(Substance)) { + displayName = s => s.SolidSubstanceName, description = s => s.SolidSubstanceDesc, - iconName = "wall", + iconName = SolidBehavior.objectType.iconName, constructor = () => { Substance substance = new Substance(); substance.behaviors.Add(new VisibleBehavior()); @@ -26,8 +27,9 @@ public static PropertiesObjectType FindTypeWithName(PropertiesObjectType[] types }, new PropertiesObjectType("Water", typeof(Substance)) { + displayName = WaterBehavior.objectType.displayName, description = s => s.WaterSubstanceDesc, - iconName = "water", + iconName = WaterBehavior.objectType.iconName, constructor = () => { Substance substance = new Substance(); substance.behaviors.Add(new VisibleBehavior()); @@ -39,8 +41,9 @@ public static PropertiesObjectType FindTypeWithName(PropertiesObjectType[] types }, new PropertiesObjectType("Trigger", typeof(Substance)) { + displayName = s => s.TriggerName, description = s => s.TriggerDesc, - iconName = "vector-combine", + iconName = TouchSensor.objectType.iconName, constructor = () => { Substance substance = new Substance(); substance.sensor = new TouchSensor(); @@ -52,6 +55,7 @@ public static PropertiesObjectType FindTypeWithName(PropertiesObjectType[] types }, new PropertiesObjectType("Glass", typeof(Substance)) { + displayName = s => s.GlassName, description = s => s.GlassDesc, iconName = "window-closed-variant", constructor = () => { @@ -205,6 +209,7 @@ public static string[] BehaviorTabNames(GUIStringSet s) => }), new PropertiesObjectType("Empty", typeof(BallObject)) { + displayName = s => s.EmptyName, description = s => s.EmptyDesc, iconName = "scan-helper", constructor = () => { @@ -218,8 +223,9 @@ public static string[] BehaviorTabNames(GUIStringSet s) => }, new PropertiesObjectType("Light", typeof(BallObject)) { + displayName = LightBehavior.objectType.displayName, description = s => s.LightObjectDesc, - iconName = "lightbulb-on", + iconName = LightBehavior.objectType.iconName, constructor = () => { var ball = new BallObject(); ball.paint.material = null; @@ -233,8 +239,9 @@ public static string[] BehaviorTabNames(GUIStringSet s) => }, new PropertiesObjectType("Reflector", typeof(BallObject)) { + displayName = ReflectorBehavior.objectType.displayName, description = ReflectorBehavior.objectType.description, - iconName = "mirror", + iconName = ReflectorBehavior.objectType.iconName, constructor = () => { var ball = new BallObject(); ball.paint.material = ResourcesDirectory.InstantiateMaterial( diff --git a/Assets/Objects/Ball.cs b/Assets/Objects/Ball.cs index aa33c314..db2621c9 100644 --- a/Assets/Objects/Ball.cs +++ b/Assets/Objects/Ball.cs @@ -6,6 +6,7 @@ public class BallObject : ObjectEntity public static new PropertiesObjectType objectType = new PropertiesObjectType( "Ball", typeof(BallObject)) { + displayName = s => s.BallName, description = s => s.BallDesc, longDescription = s => s.BallLongDesc, iconName = "circle-outline", diff --git a/Assets/Objects/Player.cs b/Assets/Objects/Player.cs index a55a3fae..e44c4ad3 100644 --- a/Assets/Objects/Player.cs +++ b/Assets/Objects/Player.cs @@ -6,6 +6,7 @@ public class PlayerObject : ObjectEntity public static new PropertiesObjectType objectType = new PropertiesObjectType( "Player", typeof(PlayerObject)) { + displayName = s => s.PlayerName, description = s => s.PlayerDesc, iconName = "human-greeting", }; diff --git a/Assets/Sensors/CheckScore.cs b/Assets/Sensors/CheckScore.cs index e59af2be..42685409 100644 --- a/Assets/Sensors/CheckScore.cs +++ b/Assets/Sensors/CheckScore.cs @@ -5,6 +5,7 @@ public class CheckScoreSensor : GenericSensor s.CheckScoreName, description = s => s.CheckScoreDesc, iconName = "code-greater-than-or-equal", }; diff --git a/Assets/Sensors/Delay.cs b/Assets/Sensors/Delay.cs index 228064d6..debb28b3 100644 --- a/Assets/Sensors/Delay.cs +++ b/Assets/Sensors/Delay.cs @@ -6,6 +6,7 @@ public class DelaySensor : GenericSensor public static new PropertiesObjectType objectType = new PropertiesObjectType( "Delay", typeof(DelaySensor)) { + displayName = s => s.DelayName, description = s => s.DelayDesc, longDescription = s => s.DelayLongDesc, iconName = "timer", diff --git a/Assets/Sensors/InCamera.cs b/Assets/Sensors/InCamera.cs index 0460c3ad..12cc9ce0 100644 --- a/Assets/Sensors/InCamera.cs +++ b/Assets/Sensors/InCamera.cs @@ -6,6 +6,7 @@ public class InCameraSensor : GenericSensor public static new PropertiesObjectType objectType = new PropertiesObjectType( "In Camera", typeof(InCameraSensor)) { + displayName = s => s.InCameraName, description = s => s.InCameraDesc, longDescription = s => s.InCameraLongDesc, iconName = "eye", diff --git a/Assets/Sensors/InRange.cs b/Assets/Sensors/InRange.cs index 6aaeeb0a..d675852a 100644 --- a/Assets/Sensors/InRange.cs +++ b/Assets/Sensors/InRange.cs @@ -7,6 +7,7 @@ public class InRangeSensor : BaseTouchSensor public static new PropertiesObjectType objectType = new PropertiesObjectType( "In Range", typeof(InRangeSensor)) { + displayName = s => s.InRangeName, description = s => s.InRangeDesc, longDescription = s => s.InRangeLongDesc, iconName = "radar", diff --git a/Assets/Sensors/InputThreshold.cs b/Assets/Sensors/InputThreshold.cs index 4a46ca54..08fdab28 100644 --- a/Assets/Sensors/InputThreshold.cs +++ b/Assets/Sensors/InputThreshold.cs @@ -7,6 +7,7 @@ public class InputThresholdSensor : GenericSensor s.ThresholdName, description = s => s.ThresholdDesc, longDescription = s => s.ThresholdLongDesc, iconName = "altimeter", @@ -79,7 +80,7 @@ private void InputsGUI(Property property) GUI.color = baseColor * EntityReferencePropertyManager.GetColor(); GUILayout.BeginVertical(GUI.skin.box); GUI.color = baseColor; - GUILayout.Label(EntityReferencePropertyManager.GetName() + " "); + GUILayout.Label(EntityReferencePropertyManager.GetName(GUIPanel.StringSet) + " "); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); diff --git a/Assets/Sensors/MotionSensor.cs b/Assets/Sensors/MotionSensor.cs index cbb4d7f6..0f6c0d79 100644 --- a/Assets/Sensors/MotionSensor.cs +++ b/Assets/Sensors/MotionSensor.cs @@ -6,6 +6,7 @@ public class MotionSensor : GenericSensor public static new PropertiesObjectType objectType = new PropertiesObjectType( "Motion", typeof(MotionSensor)) { + displayName = s => s.MotionName, description = s => s.MotionDesc, longDescription = s => s.MotionLongDesc, iconName = "speedometer", diff --git a/Assets/Sensors/Pulse.cs b/Assets/Sensors/Pulse.cs index 932937bc..fed046a6 100644 --- a/Assets/Sensors/Pulse.cs +++ b/Assets/Sensors/Pulse.cs @@ -6,6 +6,7 @@ public class PulseSensor : GenericSensor public static new PropertiesObjectType objectType = new PropertiesObjectType( "Pulse", typeof(PulseSensor)) { + displayName = s => s.PulseName, description = s => s.PulseDesc, longDescription = s => s.PulseLongDesc, iconName = "pulse", diff --git a/Assets/Sensors/RandomPulse.cs b/Assets/Sensors/RandomPulse.cs index 3ed32332..2ea919ba 100644 --- a/Assets/Sensors/RandomPulse.cs +++ b/Assets/Sensors/RandomPulse.cs @@ -6,6 +6,7 @@ public class RandomPulseSensor : GenericSensor s.RandomPulseName, description = s => s.RandomPulseDesc, longDescription = s => s.RandomPulseLongDesc, iconName = "progress-question", diff --git a/Assets/Sensors/Tap.cs b/Assets/Sensors/Tap.cs index f5161c45..70c53464 100644 --- a/Assets/Sensors/Tap.cs +++ b/Assets/Sensors/Tap.cs @@ -5,6 +5,7 @@ public class TapSensor : GenericSensor public static new PropertiesObjectType objectType = new PropertiesObjectType( "Tap", typeof(TapSensor)) { + displayName = s => s.TapName, description = s => s.TapDesc, longDescription = s => s.TapLongDesc, iconName = "gesture-tap", diff --git a/Assets/Sensors/Toggle.cs b/Assets/Sensors/Toggle.cs index 5eb5b0c6..12a6a759 100644 --- a/Assets/Sensors/Toggle.cs +++ b/Assets/Sensors/Toggle.cs @@ -5,6 +5,7 @@ public class ToggleSensor : GenericSensor public static new PropertiesObjectType objectType = new PropertiesObjectType( "Toggle", typeof(ToggleSensor)) { + displayName = s => s.ToggleName, description = s => s.ToggleDesc, longDescription = s => s.ToggleLongDesc, iconName = "toggle-switch", diff --git a/Assets/Sensors/Touch.cs b/Assets/Sensors/Touch.cs index 0df4f2c8..859b8126 100644 --- a/Assets/Sensors/Touch.cs +++ b/Assets/Sensors/Touch.cs @@ -12,6 +12,7 @@ public class TouchSensor : BaseTouchSensor public static new PropertiesObjectType objectType = new PropertiesObjectType( "Touch", typeof(TouchSensor)) { + displayName = s => s.TouchName, description = s => s.TouchDesc, longDescription = s => s.TouchLongDesc, iconName = "vector-combine", diff --git a/Assets/VoxelEditor/GUI/ActionBarGUI.cs b/Assets/VoxelEditor/GUI/ActionBarGUI.cs index 696a9af8..4b4f813e 100644 --- a/Assets/VoxelEditor/GUI/ActionBarGUI.cs +++ b/Assets/VoxelEditor/GUI/ActionBarGUI.cs @@ -103,7 +103,7 @@ protected void EditGUI(string message = null) picker.title = StringSet.CreateObjectTitle; picker.categories = new PropertiesObjectType[][] { GameScripts.entityTemplates, GameScripts.objectTemplates }; - picker.categoryNames = new string[] { StringSet.Substance, StringSet.Object }; + picker.categoryNames = new string[] { StringSet.SubstanceName, StringSet.ObjectName }; picker.handler = (PropertiesObjectType type) => { if (typeof(Substance).IsAssignableFrom(type.type)) diff --git a/Assets/VoxelEditor/GUI/DataImportGUI.cs b/Assets/VoxelEditor/GUI/DataImportGUI.cs index 836b8240..768e5da0 100644 --- a/Assets/VoxelEditor/GUI/DataImportGUI.cs +++ b/Assets/VoxelEditor/GUI/DataImportGUI.cs @@ -132,7 +132,7 @@ public override void WindowGUI() if (errorMessage != null) ActionBarGUI.ActionBarLabel(errorMessage); else - ActionBarGUI.ActionBarLabel(StringSet.NoDataInWorld(type.ToString())); + ActionBarGUI.ActionBarLabel(StringSet.NoDataInWorld(type.ToString())); // TODO: localize GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); } diff --git a/Assets/VoxelEditor/GUI/EntityReferencePropertyManager.cs b/Assets/VoxelEditor/GUI/EntityReferencePropertyManager.cs index b7660916..9f55237f 100644 --- a/Assets/VoxelEditor/GUI/EntityReferencePropertyManager.cs +++ b/Assets/VoxelEditor/GUI/EntityReferencePropertyManager.cs @@ -108,17 +108,17 @@ public static Color GetColor() private static Color ColorI(int i) => Color.HSVToRGB((i * .618f) % 1.0f, 0.8f, 1.0f); - public static string GetName() + public static string GetName(GUIStringSet s) { Entity entity = targetEntities[currentTargetEntityI]; if (entity == null) - return GUIPanel.StringSet.EntityRefNone; + return s.EntityRefNone; else if (entity == currentEntity) - return GUIPanel.StringSet.EntityRefSelf; + return s.EntityRefSelf; else if (entity == behaviorTarget) - return GUIPanel.StringSet.EntityRefTarget; + return s.EntityRefTarget; else - return entity.ToString(); + return entity.ToString(s); } void Awake() diff --git a/Assets/VoxelEditor/GUI/FilterGUI.cs b/Assets/VoxelEditor/GUI/FilterGUI.cs index bb7c1241..939c0807 100644 --- a/Assets/VoxelEditor/GUI/FilterGUI.cs +++ b/Assets/VoxelEditor/GUI/FilterGUI.cs @@ -60,7 +60,7 @@ public override void WindowGUI() }; Destroy(this); } - if (GUILayout.Button(GUIUtils.MenuContent(StringSet.FilterAnything, IconSet.objectType), + if (GUILayout.Button(GUIUtils.MenuContent(StringSet.AnythingName, IconSet.objectType), OverflowMenuGUI.buttonStyle.Value)) { handler(new ActivatedSensor.EntityTypeFilter(Entity.objectType)); diff --git a/Assets/VoxelEditor/GUI/Properties.cs b/Assets/VoxelEditor/GUI/Properties.cs index 8b398d0b..3a833d34 100644 --- a/Assets/VoxelEditor/GUI/Properties.cs +++ b/Assets/VoxelEditor/GUI/Properties.cs @@ -270,7 +270,7 @@ public static void BehaviorTarget(Property property) // only temporarily, so the name won't be "Target": EntityReferencePropertyManager.SetBehaviorTarget(null); EntityReferencePropertyManager.Next(behaviorTarget); - text = EntityReferencePropertyManager.GetName(); + text = EntityReferencePropertyManager.GetName(StringSet); EntityReferencePropertyManager.SetBehaviorTarget(behaviorTarget); // put it back } else @@ -339,7 +339,7 @@ public static void _EntityReferenceCustom(Property property, bool allowNull, str { EntityReferencePropertyManager.Next(reference.entity); GUI.color = baseColor * EntityReferencePropertyManager.GetColor(); - valueString = EntityReferencePropertyManager.GetName(); + valueString = EntityReferencePropertyManager.GetName(StringSet); } GUILayout.BeginHorizontal(); @@ -370,7 +370,7 @@ public static void _EntityReferenceCustom(Property property, bool allowNull, str public static void Filter(Property property) { var filter = (ActivatedSensor.Filter)property.value; - string filterString = filter.ToString(); + string filterString = filter.ToString(StringSet); Color baseColor = GUI.color; ActivatedSensor.EntityFilter entityFilter = filter as ActivatedSensor.EntityFilter; @@ -381,7 +381,7 @@ public static void Filter(Property property) { EntityReferencePropertyManager.Next(e); GUI.color = baseColor * EntityReferencePropertyManager.GetColor(); - filterString = EntityReferencePropertyManager.GetName(); + filterString = EntityReferencePropertyManager.GetName(StringSet); } } @@ -492,14 +492,14 @@ public static void _TargetCustom(Property property, bool allowRandom = true) { var target = (Target)property.value; - string targetString = target.ToString(); + string targetString = target.ToString(StringSet); Color baseColor = GUI.color; if (target.entityRef.entity != null) { EntityReferencePropertyManager.Next(target.entityRef.entity); GUI.color = baseColor * EntityReferencePropertyManager.GetColor(); - targetString = EntityReferencePropertyManager.GetName(); + targetString = EntityReferencePropertyManager.GetName(StringSet); } GUILayout.BeginHorizontal(); @@ -547,7 +547,7 @@ public static void TargetStatic(Property property) public static void TargetFacing(Property property) { var target = (Target)property.value; - string targetString = target.ToString(); + string targetString = target.ToString(StringSet); if (target.entityRef.entity == null && target.direction == global::Target.NO_DIRECTION) targetString = StringSet.Camera; @@ -576,7 +576,7 @@ public static void TargetFacing(Property property) public static void TargetDirectionFilter(Property property) { var target = (Target)property.value; - string targetString = target.ToString(); + string targetString = target.ToString(StringSet); if (target.entityRef.entity == null && target.direction == global::Target.NO_DIRECTION) targetString = StringSet.TargetAny; diff --git a/Assets/VoxelEditor/GUI/PropertiesGUI.cs b/Assets/VoxelEditor/GUI/PropertiesGUI.cs index 02b122c9..3713a2f4 100644 --- a/Assets/VoxelEditor/GUI/PropertiesGUI.cs +++ b/Assets/VoxelEditor/GUI/PropertiesGUI.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using UnityEngine; @@ -474,11 +474,11 @@ private void PropertiesObjectGUI(PropertiesObject obj, if (noName != null) title = noName; else - title = StringSet.NoGeneric; + title = StringSet.NoneName; } else { - title = obj.ObjectType.fullName; + title = obj.ObjectType.displayName(StringSet); if (nameFmt != null) title = nameFmt(title); if (obj.Properties().Any()) @@ -614,7 +614,7 @@ public override void WindowGUI() if (targetEntityIsActivator) targetButtonText = StringSet.TargetEntity(StringSet.EntityActivators); else if (targetEntity != null) - targetButtonText = StringSet.TargetEntity(targetEntity.ToString()); + targetButtonText = StringSet.TargetEntity(targetEntity.ToString(StringSet)); TutorialGUI.TutorialHighlight("behavior target"); if (GUIUtils.HighlightedButton(targetButtonText)) { diff --git a/Assets/VoxelEditor/GUI/TypeInfoGUI.cs b/Assets/VoxelEditor/GUI/TypeInfoGUI.cs index 74e5d916..c86443bf 100644 --- a/Assets/VoxelEditor/GUI/TypeInfoGUI.cs +++ b/Assets/VoxelEditor/GUI/TypeInfoGUI.cs @@ -14,7 +14,7 @@ public override void WindowGUI() GUILayout.Label(type.icon, GUILayout.ExpandWidth(false)); GUILayout.BeginVertical(); GUILayout.BeginHorizontal(); - GUILayout.Label(type.fullName, StyleSet.labelTitle); + GUILayout.Label(type.displayName(StringSet), StyleSet.labelTitle); if (GUILayout.Button(StringSet.Done, GUILayout.ExpandWidth(false))) Destroy(this); GUILayout.EndHorizontal(); diff --git a/Assets/VoxelEditor/GUI/TypePickerGUI.cs b/Assets/VoxelEditor/GUI/TypePickerGUI.cs index b31c99ba..dfc3489e 100644 --- a/Assets/VoxelEditor/GUI/TypePickerGUI.cs +++ b/Assets/VoxelEditor/GUI/TypePickerGUI.cs @@ -54,7 +54,7 @@ public override void WindowGUI() GUILayout.Label(item.icon, GUILayout.ExpandWidth(false)); GUILayout.BeginVertical(); GUILayout.BeginHorizontal(); - GUILayout.Label(item.fullName, StyleSet.labelTitle); + GUILayout.Label(item.displayName(StringSet), StyleSet.labelTitle); var longDesc = item.longDescription(StringSet); if (longDesc != "" && GUILayout.Button(IconSet.helpCircle, helpIconStyle.Value, GUILayout.ExpandWidth(false))) diff --git a/Assets/VoxelEditor/GUI/localization/GUIStringSet.cs b/Assets/VoxelEditor/GUI/localization/GUIStringSet.cs index ec75524e..a4528dcc 100644 --- a/Assets/VoxelEditor/GUI/localization/GUIStringSet.cs +++ b/Assets/VoxelEditor/GUI/localization/GUIStringSet.cs @@ -148,10 +148,6 @@ public virtual string PickObjectCount(int count) => $"{count} objects selected"; // Categories - public virtual string Substance => - "Substance"; - public virtual string Object => - "Object"; public virtual string SensorsDetect => "Detect"; public virtual string SensorsLogic => @@ -198,8 +194,6 @@ public virtual string NoDataInWorld(string type) => "Active behavior"; public virtual string FilterActiveBehaviorTitle => "Filter by active behavior"; - public virtual string FilterAnything => - "Anything"; public virtual string FilterNothing => "Nothing"; public virtual string FilterWithTag(string tag) => @@ -294,8 +288,6 @@ public virtual string BehaviorName(string name) => $"{name} Behavior"; public virtual string NoSensor => "No Sensor"; - public virtual string NoGeneric => - "None"; public virtual string TargetEntity(string name) => $"Target: {name}"; public virtual string EntityActivators => // plural! @@ -552,72 +544,110 @@ public virtual string DemoWorldName(string name) => public virtual string PropRelativeTo => "Relative to"; - // Object descriptions + // Object names/descriptions + public virtual string NoneName => + "None"; + public virtual string AnythingName => + "Anything"; + public virtual string ObjectName => + "Object"; public virtual string ObjectDesc => "An object not made of blocks"; + public virtual string SubstanceName => + "Substance"; public virtual string SubstanceDesc => "An entity made of blocks"; public virtual string SubstanceLongDesc => "The Pivot point is used as the center of rotation/scaling, and as a target point for other behaviors."; + public virtual string WorldName => + "World"; public virtual string WorldDesc => "Properties that affect the entire world"; + public virtual string CustomTextureName => + "Custom Texture"; public virtual string CustomTextureDesc => "A custom texture image for materials or overlays"; + public virtual string BallName => + "Ball"; public virtual string BallDesc => "A sphere which can be painted"; public virtual string BallLongDesc => "Use the Paint button to change color/material"; + public virtual string PlayerName => + "Player"; public virtual string PlayerDesc => "The character you control in the game"; // Sensors + public virtual string CheckScoreName => + "Check Score"; public virtual string CheckScoreDesc => "Active when score is at or above/below a threshold"; + public virtual string DelayName => + "Delay"; public virtual string DelayDesc => "Add delay to input turning on or off"; public virtual string DelayLongDesc => @"If the Input has been on for longer than the On time, sensor will turn on. If the Input has been off for longer than the Off time, sensor will turn off. If the Input cycles on/off faster than the on/off time, nothing happens. Activators: the activators of the Input, added and removed with a delay"; + public virtual string InCameraName => + "In Camera"; public virtual string InCameraDesc => "Active when player looking at object"; public virtual string InCameraLongDesc => @"Turns on as long as the player is looking in the direction of the object, even if it is obscured. Does not turn on if object doesn't have Visible behavior. Activator: the player"; + public virtual string ThresholdName => + "Threshold"; public virtual string ThresholdDesc => "Active when some number of other objects are active"; public virtual string ThresholdLongDesc => @"Adds up the values of all the Inputs. If an Input is on and set to +1, this adds 1 to the total. If an Input is on and set to -1, this subtracts 1 from the total. The sensor turns on if the total is at or above the Threshold. Activators: the combined activators of all Positive inputs minus the activators of Negative inputs"; + public virtual string InRangeName => + "In Range"; public virtual string InRangeDesc => "Detect objects within some distance"; public virtual string InRangeLongDesc => "Activators: all objects in range"; + public virtual string MotionName => + "Motion"; public virtual string MotionDesc => "Detect moving above some velocity"; public virtual string MotionLongDesc => "Turns on when the object is both moving faster than the Minimum velocity in the given direction, and rotating about any axis faster than the Minimum angular velocity (degrees per second)."; + public virtual string PulseName => + "Pulse"; public virtual string PulseDesc => "Turn on and off continuously"; public virtual string PulseLongDesc => "Input is optional. When connected, it controls whether the pulse is active. When the Input turns off, the pulse completes a full cycle then stops."; + public virtual string RandomPulseName => + "Rand. Pulse"; public virtual string RandomPulseDesc => "Turn on and off in a random pattern"; public virtual string RandomPulseLongDesc => "Alternates on/off using random times selected within the ranges. Useful for unpredictable behavior, flickering lights, etc."; + public virtual string TapName => + "Tap"; public virtual string TapDesc => "Detect player tapping the object"; public virtual string TapLongDesc => @"Object has to be Solid to detect a tap, but it doesn't have to be Visible. Activator: the player"; + public virtual string ToggleName => + "Toggle"; public virtual string ToggleDesc => "One input to turn on, one input to turn off, otherwise hold"; public virtual string ToggleLongDesc => @"If both inputs turn on simultaneously, the sensor toggles between on/off. Activators: the activators of the On input, frozen when it is first turned on"; + public virtual string TouchName => + "Touch"; public virtual string TouchDesc => "Active when touching another object"; public virtual string TouchLongDesc => @@ -629,18 +659,24 @@ public virtual string DemoWorldName(string name) => BUG: Two objects which both have Solid behaviors but not Physics behaviors, will not detect a collision."; // Behaviors + public virtual string CarryableName => + "Carryable"; public virtual string CarryableDesc => "Allow player to pick up / drop / throw"; public virtual string CarryableLongDesc => @"Tap to pick up the object, tap again to throw. Increasing the Throw angle causes the object to be thrown with an arc. Requires Physics"; + public virtual string CharacterName => + "Character"; public virtual string CharacterDesc => "Apply gravity but keep upright"; public virtual string CharacterLongDesc => @"This is an alternative to the Physics behavior. Objects will have gravity but will not be able to tip over. When used with the Move behavior, objects will fall to the ground instead of floating. Density affects the mass of the object, proportional to its volume."; + public virtual string CloneName => + "Clone"; public virtual string CloneDesc => "Create a copy of the object"; public virtual string CloneLongDesc => // based on TeleportLongDesc @@ -648,6 +684,8 @@ public virtual string DemoWorldName(string name) => • To: Target location for clone • Relative to: Optional origin location. If specified, the clone will be displaced from the original object by the difference between the target and origin."; + public virtual string ForceName => + "Force"; public virtual string ForceDesc => "Apply instant or continuous force"; public virtual string ForceLongDesc => @@ -657,22 +695,32 @@ public virtual string DemoWorldName(string name) => • Continuous mode will cause the force to be continuously applied while the behavior is active. • Ignore mass scales the force to compensate for the mass of the object. • Stop object first will stop any existing motion before applying the force."; + public virtual string HaloName => + "Halo"; public virtual string HaloDesc => "Glowing effect"; public virtual string HaloLongDesc => "Halo appears at the Pivot point of substances"; + public virtual string HurtHealName => + "Hurt/Heal"; public virtual string HurtHealDesc => "Lose/gain health; below 0, object dies"; public virtual string HurtHealLongDesc => @"• Amount: Change in health. Positive heals, negative hurts. • Rate: Seconds between successive hurt/heals. 0 means health will only change once when behavior is activated. • Keep within: Health will only change if it's within this range, and will never go outside this range."; + public virtual string JoystickName => + "Joystick"; public virtual string JoystickDesc => "Control motion with the joystick"; + public virtual string LightName => + "Light"; public virtual string LightDesc => "Light source at the center of object"; public virtual string LightLongDesc => "Light originates from the Pivot point of substances"; + public virtual string LookAtName => + "Look At"; public virtual string LookAtDesc => "Point in a direction or towards object"; public virtual string LookAtLongDesc => @@ -681,20 +729,28 @@ public virtual string DemoWorldName(string name) => • Yaw enables left-right rotation. • Pitch enables up-down rotation. Both can be used at once. Substances will rotate around their Pivot point."; + public virtual string MoveName => + "Move"; public virtual string MoveDesc => "Move in a direction or toward object"; public virtual string MoveLongDesc => @"When used with Solid and Physics behaviors, object will not be able to pass through other objects. When used with Solid and Character behaviors, object will additionally be affected by gravity. Increase the Density of the Physics/Character behavior to increase the object's pushing strength."; + public virtual string MoveWithName => + "Move With"; public virtual string MoveWithDesc => "Follow the motion of another object"; public virtual string MoveWithLongDesc => "BUG: This behavior will block Move behaviors from working."; + public virtual string PhysicsName => + "Physics"; public virtual string PhysicsDesc => "Move according to laws of physics"; public virtual string PhysicsLongDesc => "Density affects the mass of the object, proportional to its volume."; + public virtual string ReflectorName => + "Reflector"; public virtual string ReflectorDesc => "Add more realistic reflections to area"; public virtual string ReflectorLongDesc => @@ -702,14 +758,22 @@ public virtual string DemoWorldName(string name) => • Surfaces within Range distance are affected • Intensity controls the brightness of the reflections • When Real-time is checked, reflections will update continuously (expensive!)"; + public virtual string ScaleName => + "Scale"; public virtual string ScaleDesc => "Change size along each axis"; public virtual string ScaleLongDesc => "Substances are scaled around their Pivot point. For physics objects, mass will not change."; + public virtual string ScoreName => + "Score"; public virtual string ScoreDesc => "Add or subtract from player's score"; + public virtual string SolidName => + "Solid"; public virtual string SolidDesc => "Block and collide with other objects"; + public virtual string SoundName => + "Sound"; public virtual string SoundDesc => "Play a sound"; public virtual string SoundLongDesc => @@ -717,6 +781,8 @@ public virtual string DemoWorldName(string name) => • In Background mode the sound is always playing, but muted when the behavior is inactive. Supported formats: MP3, WAV, OGG, AIF, XM, IT"; + public virtual string Sound3DName => + "3D Sound"; public virtual string Sound3DDesc => "Play a sound in 3D space"; public virtual string Sound3DLongDesc => @@ -725,31 +791,47 @@ public virtual string DemoWorldName(string name) => • Fade distance: Sound will fade with distance within this range -- past the maximum distance it becomes inaudible. See Sound behavior for additional documentation."; + public virtual string SpinName => + "Spin"; public virtual string SpinDesc => "Rotate continuously"; public virtual string SpinLongDesc => @"Speed is in degrees per second. Axis specifies the axis of rotation. Substances will rotate around their Pivot point."; + public virtual string TeleportName => + "Teleport"; public virtual string TeleportDesc => "Instantly teleport to another location"; public virtual string TeleportLongDesc => @"• To: Target location to teleport • Relative to: Optional origin location. If specified, instead of going directly to the target, the object will be displaced by the difference between the target and origin."; + public virtual string VisibleName => + "Visible"; public virtual string VisibleDesc => "Object is visible in the game"; + public virtual string WaterName => + "Water"; public virtual string WaterDesc => "Simulate buoyancy physics"; public virtual string WaterLongDesc => "Water should not be Solid and should not have Physics. This behavior controls only the physics of water, not appearance."; // Templates + public virtual string SolidSubstanceName => + "Solid Substance"; public virtual string SolidSubstanceDesc => "A block that is solid and opaque by default"; public virtual string WaterSubstanceDesc => "A block of water that you can swim in"; + public virtual string TriggerName => + "Trigger"; public virtual string TriggerDesc => "Invisible, non-solid block with a touch sensor"; + public virtual string GlassName => + "Glass"; public virtual string GlassDesc => "Solid block of glass"; + public virtual string EmptyName => + "Empty"; public virtual string EmptyDesc => "Invisible ball object"; public virtual string LightObjectDesc => diff --git a/Assets/VoxelEditor/GUI/localization/PortugueseStrings.cs b/Assets/VoxelEditor/GUI/localization/PortugueseStrings.cs index 4e393bc0..5db482ba 100644 --- a/Assets/VoxelEditor/GUI/localization/PortugueseStrings.cs +++ b/Assets/VoxelEditor/GUI/localization/PortugueseStrings.cs @@ -129,10 +129,6 @@ public override string WorldDeleteConfirm(string name) => public override string PickObjectCount(int count) => $"{count} objetos selecionados"; - public override string Substance => - "Substância"; - public override string Object => - "Objeto"; public override string SensorsDetect => "Deteco"; public override string SensorsLogic => @@ -176,8 +172,6 @@ public override string NoDataInWorld(string type) => "Comportamento"; // shortened for space public override string FilterActiveBehaviorTitle => "Filtrar por comportamento ativo"; - public override string FilterAnything => - "Qualquer"; public override string FilterNothing => "Nada"; public override string FilterWithTag(string tag) => @@ -268,8 +262,6 @@ public override string BehaviorName(string name) => $"{name}"; // removed for space public override string NoSensor => "Sem Sensor"; - public override string NoGeneric => - "Nada"; public override string TargetEntity(string name) => $"Alvo: {name}"; public override string EntityActivators => @@ -520,8 +512,16 @@ public override string DemoWorldName(string name) => public override string PropRelativeTo => "Relativo a"; + public override string NoneName => + "Nada"; + public override string AnythingName => + "Qualquer"; + public override string ObjectName => + "Objeto"; public override string ObjectDesc => "Um objeto não feito de blocos"; + public override string SubstanceName => + "Substância"; public override string SubstanceDesc => "Uma entidade feita de blocos"; public override string SubstanceLongDesc =>