From ca71a66ea406fb74dfe6a683f59ee5a302d60599 Mon Sep 17 00:00:00 2001 From: TeamSpen210 Date: Fri, 13 Dec 2019 14:33:20 +1000 Subject: [PATCH 01/17] Disable some extra keyvalues which break dustmotes. --- fgd/bases/BModelParticleSpawner.fgd | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fgd/bases/BModelParticleSpawner.fgd b/fgd/bases/BModelParticleSpawner.fgd index 4d52a684d..cdffe129b 100644 --- a/fgd/bases/BModelParticleSpawner.fgd +++ b/fgd/bases/BModelParticleSpawner.fgd @@ -2,6 +2,13 @@ sphere(distmax) = BModelParticleSpawner [ + // These two values break dustmotes. + solid(choices) readonly: "Solid" : 0 : "This needs to be zero to allow this to not collide." = + [ + 0: "Non-solid" + ] + origin(origin) readonly: "Origin": "" : "If offset, this breaks." + startdisabled(boolean) : "Start Disabled" : 0 color(color255) : "Particle Color (R G B)" : "255 255 255" spawnrate(integer) : "Particle Per Second" : 40 : "Number of particles to spawn, per second." From 9e9f95d718f04318a861b9ece4629a788c304ede Mon Sep 17 00:00:00 2001 From: TeamSpen210 Date: Sun, 22 Dec 2019 11:18:15 +1000 Subject: [PATCH 02/17] Add verification check to ensure the FGD files don't overwrite each other --- unify_fgd.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/unify_fgd.py b/unify_fgd.py index 55fdb0923..db6fe4491 100644 --- a/unify_fgd.py +++ b/unify_fgd.py @@ -245,11 +245,25 @@ def load_database(dbase: Path, extra_loc: Path=None) -> FGD: with RawFileSystem(str(dbase)) as fsys: for file in dbase.rglob("*.fgd"): - fgd.parse_file( + # Use a temp FGD class, to allow us to verify no overwrites. + file_fgd = FGD() + file_fgd.parse_file( fsys, fsys[str(file.relative_to(dbase))], eval_bases=False, ) + for clsname, ent in file_fgd.entities.items(): + if clsname in fgd.entities: + raise ValueError( + f'Duplicate "{clsname}" class ' + f'in {file.relative_to(dbase)}!' + ) + fgd.entities[clsname] = ent + + for path, group in file_fgd.auto_visgroups.items(): + fgd.auto_visgroups.setdefault(path, set()).update(group) + fgd.mat_exclusions.update(file_fgd.mat_exclusions) + print('.', end='', flush=True) if extra_loc is not None: From 4b3bc93650bcc08159fbdbe1eeaf8f5f57c49e36 Mon Sep 17 00:00:00 2001 From: TeamSpen210 Date: Sun, 22 Dec 2019 11:19:49 +1000 Subject: [PATCH 03/17] Fix a bunch of duplicate classnames --- fgd/brush/func/func_null.fgd | 2 +- fgd/brush/func/func_tanklogic.fgd | 2 +- fgd/point/ai/ai_relationship_classify.fgd | 2 +- fgd/point/info/info_node_link_logic.fgd | 2 +- fgd/point/info/info_node_link_oneway.fgd | 2 +- fgd/point/prop/prop_weighted_cube.fgd | 1 + fgd/point/vehicle/vehicle_viewcontroller.fgd | 9 --------- fgd/point/vehicle_viewcontroller.fgd | 9 ++++----- 8 files changed, 10 insertions(+), 19 deletions(-) delete mode 100644 fgd/point/vehicle/vehicle_viewcontroller.fgd diff --git a/fgd/brush/func/func_null.fgd b/fgd/brush/func/func_null.fgd index 170d07242..0a1c7edc3 100644 --- a/fgd/brush/func/func_null.fgd +++ b/fgd/brush/func/func_null.fgd @@ -2,6 +2,6 @@ // However, it kills itself immediately so most are useless // TODO: might be useful to strip ones that can't function. @SolidClass base(BaseEntity) appliesto(Mbase) -= func_lod: "A brush entity that's immediately removed upon spawning. Useful for invisible brush lights." += func_null: "A brush entity that's immediately removed upon spawning. Useful for invisible brush lights." [ ] diff --git a/fgd/brush/func/func_tanklogic.fgd b/fgd/brush/func/func_tanklogic.fgd index 3a5b6e88e..1dc688554 100644 --- a/fgd/brush/func/func_tanklogic.fgd +++ b/fgd/brush/func/func_tanklogic.fgd @@ -1,6 +1,6 @@ @SolidClass base(BaseTank) appliesto(MBase) -= func_tank: "A special kind of turret designed to fire outputs instead of bullets, functioning solely through the I/O system." += func_tanklogic: "A special kind of turret designed to fire outputs instead of bullets, functioning solely through the I/O system." [ shootsound[MBase](sound) : "Shoot Sound" : "" : "Plays a specific sound each time this tank fires." diff --git a/fgd/point/ai/ai_relationship_classify.fgd b/fgd/point/ai/ai_relationship_classify.fgd index 399f7222e..b0c629e3c 100644 --- a/fgd/point/ai/ai_relationship_classify.fgd +++ b/fgd/point/ai/ai_relationship_classify.fgd @@ -2,7 +2,7 @@ appliesto(MBase) autovis(AI, AI Relationship) iconsprite("editor/ai_relationship.vmt") - sphere() = ai_relationship: "AI Relationship - Sets relationships between entire classify classes in the AI." + sphere() = ai_relationship_classify: "AI Relationship - Sets relationships between entire classify classes in the AI." [ subject[engine](integer) : "Subject(s)" : 0 subject(choices) : "Subject(s)" : 0 : "This is the NPC class whose disposition will change." = diff --git a/fgd/point/info/info_node_link_logic.fgd b/fgd/point/info/info_node_link_logic.fgd index c6745f837..0445060e0 100644 --- a/fgd/point/info/info_node_link_logic.fgd +++ b/fgd/point/info/info_node_link_logic.fgd @@ -1,7 +1,7 @@ @PointClass base(info_node_link) appliesto(MBase) color(220 180 0) iconsprite("editor/info_node_link.vmt") -= info_node_link_filtered : += info_node_link_logic: "A variant of info_node_link that fires outputs when a NPC tries to use it. " + "Otherwise functions identically to a regular info_node_link." [ diff --git a/fgd/point/info/info_node_link_oneway.fgd b/fgd/point/info/info_node_link_oneway.fgd index d1a2ed7d3..b38e0298d 100644 --- a/fgd/point/info/info_node_link_oneway.fgd +++ b/fgd/point/info/info_node_link_oneway.fgd @@ -1,7 +1,7 @@ @PointClass base(info_node_link) appliesto(MBase) color(220 180 0) iconsprite("editor/info_node_link.vmt") -= info_node_link_filtered : += info_node_link_oneway: "A variant of info_node_link that fires outputs when a NPC tries to use it. " + "Otherwise functions identically to a regular info_node_link." [ diff --git a/fgd/point/prop/prop_weighted_cube.fgd b/fgd/point/prop/prop_weighted_cube.fgd index 3a1102fca..60175e725 100644 --- a/fgd/point/prop/prop_weighted_cube.fgd +++ b/fgd/point/prop/prop_weighted_cube.fgd @@ -52,6 +52,7 @@ input EnableMotion(void) : "Allow physics simulation." input DisableMotion(void) : "Prevent Physics simulation, freezing the cube in place." input SetPaint(integer) : "Force the cube to be painted with 0 (Repulsion), 2 (Propulsion), or 4 (No) gel." + input Dissolve(void) : "Fizzles the cube, firing the OnFizzled output." input SilentDissolve(void) : "Kills the cube immediately and fires its OnFizzled output." input ExitDisabledState(void) : "Exits the disabled state of a reflective cube." diff --git a/fgd/point/vehicle/vehicle_viewcontroller.fgd b/fgd/point/vehicle/vehicle_viewcontroller.fgd deleted file mode 100644 index 063a9312e..000000000 --- a/fgd/point/vehicle/vehicle_viewcontroller.fgd +++ /dev/null @@ -1,9 +0,0 @@ -@PointClass base(BaseDriveableVehicle) - studioprop() -= vehicle_viewcontroller: "Vehicle hack to control player view" - [ - // Inputs - input ForcePlayerIn(string) : "Force the player into the vehicle. The animation to use can be specified in the parameter. " + - "Without a parameter, the player just teleports." - input ForcePlayerOut(void) : "Force the player out of the vehicle." - ] diff --git a/fgd/point/vehicle_viewcontroller.fgd b/fgd/point/vehicle_viewcontroller.fgd index 064adc333..063a9312e 100644 --- a/fgd/point/vehicle_viewcontroller.fgd +++ b/fgd/point/vehicle_viewcontroller.fgd @@ -1,10 +1,9 @@ - @PointClass base(BaseDriveableVehicle) - appliesto(ASW, EP1, EP2, HL2, P1, P2) - studioprop() = vehicle_viewcontroller: "Vehicle hack to control player view" + studioprop() += vehicle_viewcontroller: "Vehicle hack to control player view" [ - // Inputs - input ForcePlayerIn(string) : "Force the player into the vehicle. The animation to use can be specified in the parameter. Without a parameter, the player just teleports." + input ForcePlayerIn(string) : "Force the player into the vehicle. The animation to use can be specified in the parameter. " + + "Without a parameter, the player just teleports." input ForcePlayerOut(void) : "Force the player out of the vehicle." ] From 41af92a0e5c4db25671072d805090f1940b9e1bf Mon Sep 17 00:00:00 2001 From: TeamSpen210 Date: Sun, 22 Dec 2019 11:20:00 +1000 Subject: [PATCH 04/17] Fix invalid syntax in this material --- hammer/materials/editor/ts2do/logic_collision_pair.vmt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hammer/materials/editor/ts2do/logic_collision_pair.vmt b/hammer/materials/editor/ts2do/logic_collision_pair.vmt index 0d4b5a6ac..b79ceb07c 100644 --- a/hammer/materials/editor/ts2do/logic_collision_pair.vmt +++ b/hammer/materials/editor/ts2do/logic_collision_pair.vmt @@ -3,5 +3,5 @@ $spriteorientation "vp_parallel" $spriteorigin "[ 0.50 0.50 ]" $basetexture "editor/ts2do/logic_collision_pair" - $no_fullbright" 1 -} \ No newline at end of file + $no_fullbright 1 +} From f6caeb0e0cd05f68016d14a71e528de15cde8c0b Mon Sep 17 00:00:00 2001 From: TeamSpen210 Date: Sun, 22 Dec 2019 11:20:19 +1000 Subject: [PATCH 05/17] Add back rendermode to a bunch of fents --- fgd/point/env/env_lightglow.fgd | 2 +- fgd/point/env/env_sprite.fgd | 2 +- fgd/point/env/env_spritetrail.fgd | 2 +- fgd/point/env/env_steam.fgd | 2 +- fgd/point/env/env_sun.fgd | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fgd/point/env/env_lightglow.fgd b/fgd/point/env/env_lightglow.fgd index 946a16fcf..6f75e21dd 100644 --- a/fgd/point/env/env_lightglow.fgd +++ b/fgd/point/env/env_lightglow.fgd @@ -1,4 +1,4 @@ -@PointClass base(BaseEntityPoint) +@PointClass base(BaseEntityPoint, RenderFields) color(255 128 0) studio("models/editor/axis_helper_thick.mdl") iconsprite("editor/ficool2/env_lightglow.vmt") diff --git a/fgd/point/env/env_sprite.fgd b/fgd/point/env/env_sprite.fgd index 7b98aa52a..57933ee23 100644 --- a/fgd/point/env/env_sprite.fgd +++ b/fgd/point/env/env_sprite.fgd @@ -1,4 +1,4 @@ -@PointClass base(BaseEntityPoint, SystemLevelChoice) +@PointClass base(BaseEntityPoint, RenderFields, SystemLevelChoice) studio("models/editor/axis_helper.mdl") sprite() color(20 140 20) diff --git a/fgd/point/env/env_spritetrail.fgd b/fgd/point/env/env_spritetrail.fgd index fcdf73984..9b1c8c9d4 100644 --- a/fgd/point/env/env_spritetrail.fgd +++ b/fgd/point/env/env_spritetrail.fgd @@ -1,4 +1,4 @@ -@PointClass base(BaseEntityPoint) +@PointClass base(BaseEntityPoint, RenderFields) iconsprite("editor/env_spritetrail.vmt") sphere(startwidth) sphere(endwidth) diff --git a/fgd/point/env/env_steam.fgd b/fgd/point/env/env_steam.fgd index 3ee5a1964..9251b7d82 100644 --- a/fgd/point/env/env_steam.fgd +++ b/fgd/point/env/env_steam.fgd @@ -1,4 +1,4 @@ -@PointClass base(BaseEntityPoint) +@PointClass base(BaseEntityPoint, RenderFields) color(255 255 255) color(200 200 0) studio("models/editor/spot_cone.mdl") diff --git a/fgd/point/env/env_sun.fgd b/fgd/point/env/env_sun.fgd index 680af4e7f..ec9483c0e 100644 --- a/fgd/point/env/env_sun.fgd +++ b/fgd/point/env/env_sun.fgd @@ -1,4 +1,4 @@ -@PointClass base(BaseEntityPoint, SystemLevelChoice) +@PointClass base(BaseEntityPoint, RenderFields, SystemLevelChoice) color(255 0 0) color(200 0 0) iconsprite("editor/env_sun.vmt") From 5c246f45f7675d165ff1986428adc337928b0dc3 Mon Sep 17 00:00:00 2001 From: TeamSpen210 Date: Sun, 22 Dec 2019 11:20:52 +1000 Subject: [PATCH 06/17] Implement basic visgroup exporting logic --- unify_fgd.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/unify_fgd.py b/unify_fgd.py index db6fe4491..413d13ddb 100644 --- a/unify_fgd.py +++ b/unify_fgd.py @@ -290,6 +290,23 @@ def load_database(dbase: Path, extra_loc: Path=None) -> FGD: fgd.apply_bases() print('\nDone!') + + from pprint import pprint + # print('Auto Visgroups: ') + # pprint({k: len(v) for k, v in fgd.auto_visgroups.items()}) + + print('Entities without visgroups:') + vis_ents = {name.casefold() for ents in fgd.auto_visgroups.values() for name in ents} + vis_count = ent_count = 0 + for ent in fgd: + if ent.type is not EntityTypes.BASE: + ent_count += 1 + if ent.classname.casefold() not in vis_ents: + print(' - ' + ent.classname) + else: + vis_count += 1 + print(f'Visgroup count: {vis_count}/{ent_count} ({vis_count*100/ent_count:.2f}%) done!') + return fgd @@ -687,6 +704,18 @@ def action_export( else: # Helpers aren't inherited, so this isn't useful anymore. ent.helpers.clear() + + print('Culling visgroups...') + # Cull visgroups that no longer exist for us. + valid_ents = { + ent.classname.casefold() + for ent in fgd.entities.values() + if ent.type is not EntityTypes.BASE + } + for key, vis_ents in list(fgd.auto_visgroups.items()): # type: Tuple[str, str], Set[str] + vis_ents.intersection_update(valid_ents) + if not vis_ents: + del fgd.auto_visgroups[key] print('Exporting...') From cad1bcec9cc22821009391b2b2b2c064749f4655 Mon Sep 17 00:00:00 2001 From: TeamSpen210 Date: Sun, 22 Dec 2019 17:39:30 +1000 Subject: [PATCH 07/17] Add "invert" option to comp_kv_setter. --- fgd/point/comp/comp_kv_setter.fgd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fgd/point/comp/comp_kv_setter.fgd b/fgd/point/comp/comp_kv_setter.fgd index 1db2c080a..de648bb2f 100644 --- a/fgd/point/comp/comp_kv_setter.fgd +++ b/fgd/point/comp/comp_kv_setter.fgd @@ -18,6 +18,8 @@ kv_value_global(string) : "Value - String" : : "The value to apply." kv_value_local(target_destination) : "Value - Ent Name" : : "If set, use this fixed-up entity name." + invert(boolean) : "Invert Value" : 0 : "If enabled, invert the value so 0 and 1 are swapped." + // We need to provide "some" outputs to allow you to add some. // These exist on everything, at least. output OnUser1(void) : "Fired in response to FireUser1 input." From b9789e7a22eca21985769cec27999918d7e70820 Mon Sep 17 00:00:00 2001 From: TeamSpen210 Date: Sun, 22 Dec 2019 18:01:39 +1000 Subject: [PATCH 08/17] Rearrange move_rope and keyframe_rope helpers to give both all the abilities. @MoveClass and animator() is required to allow them to be the first in a chain. keyframe() automatically renames when copied. --- fgd/bases/RopeKeyFrame.fgd | 28 +++++++++++++++++++++++----- fgd/point/keyframe/keyframe_rope.fgd | 15 ++++++++++++--- fgd/point/move/move_rope.fgd | 22 ++++++++++++---------- 3 files changed, 47 insertions(+), 18 deletions(-) diff --git a/fgd/bases/RopeKeyFrame.fgd b/fgd/bases/RopeKeyFrame.fgd index 161ee84c6..9fc6ba53f 100644 --- a/fgd/bases/RopeKeyFrame.fgd +++ b/fgd/bases/RopeKeyFrame.fgd @@ -6,6 +6,8 @@ 1: "Auto Resize" : 0 ] + nextkey(target_destination) : "Next Rope" : : "Name of the next rope along this path." + slack(integer) : "Slack" : 25 : "How much extra length the rope has (by default it has the length between its two endpoints in the editor)." type(choices) : "Type" : "0" = [ @@ -17,11 +19,22 @@ subdiv(integer) : "Subdivision" : 2 : "Number of subdivisions between each rope segment. Maximum value is 8. Higher values make smoother ropes, but are slower to render." barbed(boolean) : "Barbed" : 0 : "Test effect that makes the rope look sharper and more barbed." - width(string) : "Width (1-64)" : "2" : "Width of the rope." - texturescale(string) : "Texture Scale" : "1" : "This changes the texture resolution. The default resolution is 4 pixels per inch. Larger values stretch the texture and smaller values scrunch it up." + width(float) : "Width (1-64)" : 2 : "Width of the rope." + texturescale(float) : "Texture Scale" : 1 : "This changes the texture resolution. The default resolution is 4 pixels per inch. Larger values stretch the texture and smaller values scrunch it up." collide(boolean) : "Collide with world" : 0 - dangling(boolean) : "Start Dangling" : 0 : "When set to Yes, the rope starts out detached from its target endpoint." - breakable(boolean) : "Breakable" : 0 : "When set to yes, the rope can be detached from either endpoint when shot." + + dangling(boolean) : "Start Dangling" : 0 + dangling(choices) : "Start Dangling" : 0 : "When set to Yes, the rope starts out detached from its target endpoint." = [ + 0 : "Start Attached" + 1 : "Start Dangling" + ] + + breakable(boolean) : "Breakable" : 0 + breakable(choices) : "Breakable" : 0 : "When set to yes, the rope can be detached from either endpoint when shot." = [ + 0 : "Indestructible" + 1 : "Breakable" + ] + ropematerial(material) : "Rope Material" : "cable/cable.vmt" : "The material to use when rendering the rope." usewind(choices) : "Wind" : "0" : "Is the rope affected by wind?" = @@ -31,10 +44,15 @@ ] usewind[engine](boolean): "Use Wind": 0 + // Useless remmnants of unused keyframe logic. + // We have to have these for Hammer to render ropes. + movespeed(integer) readonly: "Speed (unused)" : 64 + positioninterpolator(integer) readonly: "Position Interpolator" : 2 : "Curve Type. Currently only Rope is fully supported." + // Inputs input SetScrollSpeed(float) : "Set the speed at which the texture scrolls." - input SetForce(string) : "Apply a force instantaneously to the rope. The parameter should be a vector containing the force to be applied (X Y Z)." + input SetForce(vector) : "Apply a force instantaneously to the rope. The parameter should be a vector containing the force to be applied (X Y Z)." input Break(void) : "Break the rope, if it's marked to do so." // Outputs diff --git a/fgd/point/keyframe/keyframe_rope.fgd b/fgd/point/keyframe/keyframe_rope.fgd index 4b62d37e0..928712197 100644 --- a/fgd/point/keyframe/keyframe_rope.fgd +++ b/fgd/point/keyframe/keyframe_rope.fgd @@ -1,6 +1,15 @@ -@KeyframeClass base(BaseEntityPoint, KeyFrame, RopeKeyFrame) +// Valve originally had move_rope and keyframe_rope, intended in that order. +// Engine-wise they're exactly identical. +// So we want to combine the logic, but Hammer still thinks they're the same. +// It only detects @MoveClass, so we're alright not using @KeyFrameClass. +//@MoveClass and animator() is required to allow them to be the first in a chain. +// keyframe() automatically renames when copied. + +@MoveClass base(BaseEntityPoint, RopeKeyFrame) studio("models/editor/axis_helper_thick.mdl") - keyframe() -= keyframe_rope: "A node entity that marks a point in a rope. The first node in the rope should be a move_rope, followed by 1 or more keyframe_ropes." + animator() keyframe() += keyframe_rope: "A node entity that marks a point in a rope. " + + "Traditionally, one move_rope is used to start the chain and then is followed by one or more keyframe_rope entities. " + + "However they are freely interchangeable." [ ] diff --git a/fgd/point/move/move_rope.fgd b/fgd/point/move/move_rope.fgd index 4bd4112c7..d96cab5c8 100644 --- a/fgd/point/move/move_rope.fgd +++ b/fgd/point/move/move_rope.fgd @@ -1,13 +1,15 @@ -@MoveClass base(BaseEntityPoint, KeyFrame, RopeKeyFrame) +// Valve originally had move_rope and keyframe_rope, intended in that order. +// Engine-wise they're exactly identical. +// So we want to combine the logic, but Hammer still thinks they're the same. +// It only detects @MoveClass, so we're alright not using @KeyFrameClass. +//@MoveClass and animator() is required to allow them to be the first in a chain. +// keyframe() automatically renames when copied. + +@MoveClass base(BaseEntityPoint, RopeKeyFrame) studio("models/editor/axis_helper.mdl") - animator() -= move_rope: "The first node in set of nodes that are used to place ropes in the world. It should connect to 1 or more keyframe_rope entities." + animator() keyframe() += move_rope: "A node entity that marks a point in a rope. " + + "Traditionally, one move_rope is used to start the chain and then is followed by one or more keyframe_rope entities. " + + "However they are freely interchangeable." [ - positioninterpolator[engine](integer) : "Position Interpolator" : 2 - positioninterpolator(choices) : "Position Interpolator" : 2 : "Curve Type. Currently only type 2 (Rope) is fully supported." = - [ - 0: "Linear" - 1: "Catmull-Rom Spline" - 2: "Rope" - ] ] From 044c1b802d3c57d03d6bd84211046ac1577bf0b0 Mon Sep 17 00:00:00 2001 From: TeamSpen210 Date: Sat, 28 Dec 2019 09:52:47 +1000 Subject: [PATCH 09/17] Fix #28: Clawscanner shouldn't be present in all FGDs --- fgd/point/npc/npc_clawscanner.fgd | 1 + 1 file changed, 1 insertion(+) diff --git a/fgd/point/npc/npc_clawscanner.fgd b/fgd/point/npc/npc_clawscanner.fgd index 71c1415bf..2f86f2d95 100644 --- a/fgd/point/npc/npc_clawscanner.fgd +++ b/fgd/point/npc/npc_clawscanner.fgd @@ -1,4 +1,5 @@ @NpcClass base(npc_cscanner) + appliesto(EP1, EP2, HL2, P1, ASW) autovis(NPCs, Combine, Combine Claw Scannner) studio("models/shield_scanner.mdl") = npc_clawscanner: "Claw Scanner" From cb7e7ef0e1f4d989e2cd5d10d8043527d7d088fd Mon Sep 17 00:00:00 2001 From: TeamSpen210 Date: Sat, 28 Dec 2019 09:55:26 +1000 Subject: [PATCH 10/17] Fix #31: infra_loading_screen_control appliesto() --- fgd/point/infra/infra_loading_screen_control.fgd | 1 + 1 file changed, 1 insertion(+) diff --git a/fgd/point/infra/infra_loading_screen_control.fgd b/fgd/point/infra/infra_loading_screen_control.fgd index bb6ee095f..0947e73c0 100644 --- a/fgd/point/infra/infra_loading_screen_control.fgd +++ b/fgd/point/infra/infra_loading_screen_control.fgd @@ -1,4 +1,5 @@ @PointClass base(BaseEntityPoint) + appliesto(INFRA) iconsprite("editor/infra_loading_screen_control.vmt") autovis(Point Entities, Globals, Loading Screen) = infra_loading_screen_control: "Loading screen" From 5761198517eb2545d98af29dba8b11e62c0c6751 Mon Sep 17 00:00:00 2001 From: TeamSpen210 Date: Sat, 28 Dec 2019 09:58:02 +1000 Subject: [PATCH 11/17] Fix #29: Use correct sprite for logic_scene_list_manager --- fgd/point/logic/logic_scene_list_manager.fgd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fgd/point/logic/logic_scene_list_manager.fgd b/fgd/point/logic/logic_scene_list_manager.fgd index 161e26b55..b42f788d7 100644 --- a/fgd/point/logic/logic_scene_list_manager.fgd +++ b/fgd/point/logic/logic_scene_list_manager.fgd @@ -1,6 +1,6 @@ @PointClass base(BaseEntityPoint) color(0 0 255) - iconsprite("editor/choreo_manager.vmt") + iconsprite("editor/ficool2/logic_scene_list_manager.vmt") color(240 180 250) line(240 180 250, targetname, scene0) line(240 180 250, targetname, scene1) From 55a75fe264ca306a346510fb665b9f29d0c3e561 Mon Sep 17 00:00:00 2001 From: TeamSpen210 Date: Sat, 28 Dec 2019 09:59:41 +1000 Subject: [PATCH 12/17] Fix #30: Remove env_terrainmorph This was never used in released games. --- fgd/point/env/env_terrainmorph.fgd | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 fgd/point/env/env_terrainmorph.fgd diff --git a/fgd/point/env/env_terrainmorph.fgd b/fgd/point/env/env_terrainmorph.fgd deleted file mode 100644 index 0fc1848fb..000000000 --- a/fgd/point/env/env_terrainmorph.fgd +++ /dev/null @@ -1,19 +0,0 @@ - -@PointClass base(BaseEntityPoint) - appliesto(EP1, EP2, HL2, P1, P2) - size(-4 -4 -4, 4 4 4) - color(0 180 0) = env_terrainmorph: "Morphs terrain by pulling vertices along a normal.\n\nPlace this entity the desired distance from a terrain surface and set ANGLES to the normal along which you want to pull the surface's vertices. If you set the INSTANT spawnflag, the morph will take place instantly instead of over time.\n" - [ - startradius(integer) : "Start Radius" : 500 : "Radius of the effect when morphing begins. Only this value is usedif the effect is flagged to occur instantly." - goalradius(integer) : "Goal Radius" : 100 : "Radius of the effect at the end of morphing. The radius of this effect will change from Start Radius to Goal Radius over the duration of this effect. This value is ignored if the effect is flagged to occur instantly." - duration(integer) : "Duration" : 3 : "The morph will take place over this period of time (seconds). Ignored if flagged to occur instantly" - fraction(integer) : "Displacement Fraction" : 1 : "If set to 1, the terrain surface will be pulled exactly to this entity's position. If set to 0.5, the surface will be pulled exactly half way to this entity's position. If set to 2, the surface will be pulled to an imaginary point twice as far away as this entity. (Any Displacement Fraction greater than 1.0 will result in clipping. The surface cannot be pulled beyond This entity's position and any vertices attemping will clip to this entity's position. You may use this feature to create mesas.)" - spawnflags(flags) : "spawnflags" = - [ - 1: "Instant" : 0 - ] - - - // Inputs - input BeginMorph(void) : "Begin Morph" - ] From ce5c0bd94b72bc8217f23ad4d4fd19f6d7c58db6 Mon Sep 17 00:00:00 2001 From: TeamSpen210 Date: Sat, 28 Dec 2019 10:00:21 +1000 Subject: [PATCH 13/17] Fix some polyfills still being required on P1's Hammer. --- unify_fgd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unify_fgd.py b/unify_fgd.py index 413d13ddb..65bfa24a6 100644 --- a/unify_fgd.py +++ b/unify_fgd.py @@ -118,7 +118,7 @@ def deco(func: PolyfillFuncT) -> PolyfillFuncT: return deco -@_polyfill('until_p1') +@_polyfill('until_asw') def _polyfill_boolean(fgd: FGD): """Before Alien Swarm's Hammer, boolean was not available as a keyvalue type. @@ -148,7 +148,7 @@ def _polyfill_particlesystem(fgd: FGD): kv.type = ValueTypes.STRING -@_polyfill('until_p1') +@_polyfill('until_asw') def _polyfill_node_id(fgd: FGD): """Before Alien Swarm's Hammer, node_id was not available as a keyvalue type. From 4b9d6b00ded9f20f9d96c2ddff5b39f6188c069e Mon Sep 17 00:00:00 2001 From: TeamSpen210 Date: Mon, 30 Dec 2019 14:59:08 +1000 Subject: [PATCH 14/17] Fix #33: Remove extra model on vgui_movie_display --- fgd/point/vgui/vgui_movie_display.fgd | 1 - 1 file changed, 1 deletion(-) diff --git a/fgd/point/vgui/vgui_movie_display.fgd b/fgd/point/vgui/vgui_movie_display.fgd index 418ba3542..fcf7c5abe 100644 --- a/fgd/point/vgui/vgui_movie_display.fgd +++ b/fgd/point/vgui/vgui_movie_display.fgd @@ -1,6 +1,5 @@ @PointClass base(BaseEntityPoint) appliesto(since_ASW) - studioprop("models/editor/axis_helper_thick.mdl") color(200 200 0) studioprop("models/editor/vgui_arrows.mdl") sphere(width) From 327bf7d8f3b86174d7afe40bf52bf02fb6224dc1 Mon Sep 17 00:00:00 2001 From: TeamSpen210 Date: Mon, 30 Dec 2019 15:01:20 +1000 Subject: [PATCH 15/17] Fix #32: Missing light_evironment sprite --- fgd/point/light/light_environment.fgd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fgd/point/light/light_environment.fgd b/fgd/point/light/light_environment.fgd index 2464d806a..d5f7bd333 100644 --- a/fgd/point/light/light_environment.fgd +++ b/fgd/point/light/light_environment.fgd @@ -1,6 +1,6 @@ @PointClass base(Angles) autovis(Lights, Environment Light) - iconsprite("editor/ficool2/light_env.vmt") + iconsprite("editor/ficool2/light_environment.vmt") color(255 255 0) lightprop("models/editor/spot.mdl") autovis(Point Entities, Globals, Light Environment) From bb2a9006b8b9a41b434464160d8dce7badd9cda4 Mon Sep 17 00:00:00 2001 From: TeamSpen210 Date: Mon, 30 Dec 2019 15:07:29 +1000 Subject: [PATCH 16/17] Fix #36: Add correct information for portal_race_checkpoint --- fgd/point/portal_race_checkpoint.fgd | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fgd/point/portal_race_checkpoint.fgd b/fgd/point/portal_race_checkpoint.fgd index db4749c41..1aab40782 100644 --- a/fgd/point/portal_race_checkpoint.fgd +++ b/fgd/point/portal_race_checkpoint.fgd @@ -1,10 +1,8 @@ -@PointClass base(BaseEntityPoint) +@PointClass base(BaseEntityAnimating) appliesto(P2) - autovis(Point Entities, Globals, Challenge Mode End) - studioprop("models/props/stopwatch_finish_line.mdl") = portal_race_checkpoint: "Checkpoint for race maps." + studioprop("models/effects/cappoint_hologram.mdl") = portal_race_checkpoint: "Checkpoint for race maps. Wen touched, lights up briefly." [ - resettime(float) : "Reset Time" : 5.0 : "The time it takes for the checkpoint to reset after activation" - skin(integer) readonly: "" : 3 : "Ignore, needed to make the skin lit." + resettime(float) : "Reset Time" : 5.0 : "The time it takes for the checkpoint to reset after activation." // Inputs input Activate(void) : "Activates the checkpoint." From 4b6e22850fbbd45892323656cfa20e68833eda24 Mon Sep 17 00:00:00 2001 From: TeamSpen210 Date: Mon, 30 Dec 2019 15:27:44 +1000 Subject: [PATCH 17/17] Only add "BEE 2 EDIT FLAG" for Portal 2's FGD. --- unify_fgd.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unify_fgd.py b/unify_fgd.py index 65bfa24a6..296a56dd8 100644 --- a/unify_fgd.py +++ b/unify_fgd.py @@ -726,7 +726,8 @@ def action_export( with open(output_path, 'w') as txt_f: fgd.export(txt_f) # BEE2 compatibility, don't make it run. - txt_f.write('\n// BEE 2 EDIT FLAG = 0 \n') + if 'P2' in tags: + txt_f.write('\n// BEE 2 EDIT FLAG = 0 \n') def main(args: List[str]=None):