Skip to content

Commit

Permalink
Version 2.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
TeamSpen210 committed Jan 19, 2023
2 parents c34de08 + 47c2d96 commit bbb7100
Show file tree
Hide file tree
Showing 1,188 changed files with 42,017 additions and 1,916 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build-fgds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: FGD Build
on:
push:
branches: [ master, dev ]
paths:
- 'fgd/**'
pull_request:
branches: [ master, dev ]
paths:
- 'fgd/**'
workflow_dispatch:
# Allow triggering manually whenever it's useful.
jobs:
build-fgds:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: 'requirements.txt'
- name: Install srctools
run: python -m pip install -r requirements.txt
- name: FGD build and folder copy
run: bash ./build.sh all
- name: Artifact upload
uses: actions/upload-artifact@v2
with:
name: build-${{ github.sha }}
path: ./build/*.fgd
if-no-files-found: error
50 changes: 50 additions & 0 deletions .github/workflows/build-postcompiler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build Postcompiler
on:
schedule:
- cron: '14 9 * * TUE' # Run at 9:14 (7:14pm local) on Tuesday
create:
ref_type: 'tag'
workflow_dispatch:
# Allow triggering manually whenever it's useful.

jobs:
build-windows:
strategy:
fail-fast: false
matrix:
include:
# We want 3.8 because it works on Windows 7.
- artifact-name: 'win32'
python-version: '3.8.10'
arch: 'x86'
os: 'windows-latest'
- artifact-name: 'win64'
python-version: '3.11'
arch: 'x64'
os: 'windows-latest'
- artifact-name: 'linux64'
python-version: '3.11'
arch: 'x64'
os: 'ubuntu-latest'
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}-${{ matrix.arch }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.arch }}
cache: 'pip'
cache-dependency-path: 'requirements.txt'
- name: Install srctools
run: python -m pip install -r requirements.txt
- name: Freeze application
run: python -m PyInstaller --distpath ..\build\ -y ..\postcompiler.spec
working-directory: ./src/
- name: Artifact upload
uses: actions/upload-artifact@v2
with:
name: hammeraddons_${{ github.sha }}_${{ artifact-name }}
path: ./build/
if-no-files-found: error
45 changes: 0 additions & 45 deletions .github/workflows/build.yml

This file was deleted.

18 changes: 16 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,37 @@ Icon
*.vmx
*.log
*.prt
*.filelist.txt
*.bsp
*.cache

# Ignore BSPs, but only in some folders.
instances/**/*.bsp
examples/**/*.bsp

# Output of "compiled" FGDs
build/
build_tmp/

# Generated list of issues
db/reports/
# For now?
db/datamaps/

# Cache files
.mypy_cache/
__pycache__/

# Blender backup files
*.blend1

# These should never be committed.
srctools_paths.vdf
srctools_*_data.dmx

# This shouldn't be shipped, but it is useful to have to allow using studiomdl/vtex.
hammer/gameinfo.txt

# Autogenerated.
_version.py

# Ignore config in the examples folder.
examples/srctools.vdf
28 changes: 25 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,26 @@

--------------------

# Version 2.5.2
* Added new `srctools_paths.vdf` config, allowing specifying the base location for all paths in the main config.
This separation allows mod projects to synchronise the main config, while customising the new path config for installation locations on each computer.
* Fix `scriptlist` being used in pre-L4D2 branches.
* Fix an issue causing a single brush face in the map to be "missing" a triangle.
* Add some support for Portal 2 Educational Version and The Stanley Parable (via @Adrthegamedev).
* Clarify that Portal 2 uses `maps/map_name_particles.txt`.
* Ensure culled bases are replaced by their own bases (fixes `Item`, for example).
* Update to Mapbase 7.1, and add Entropy Zero 2 entities.
* Added icon for `npc_heli_avoidsphere`.
* Change propcombine/geocable to log just the number of culled models, not every single file.
* TF2 now has VScript support, updated FGDs to include the corresponding options.
* Added new blocklist/allowlist options to permit fine-grained control of which files get packed.
* A specific option was added to strip existing cubemap files from the map, if this is necessary to fix crashes while building cubemaps.
* Add transform to allow using `/n` in `game_text` messages to produce multiline ones.
* #167: Add `comp_player_input_helper`, an entity to trick Hammer into autocompleting player inputs.
* Transforms should now use `EntityDef.engine_def()`, not `ctx.fgd` to allow partially parsing the database.

--------------------

# Version 2.5.1
* Tweak `comp_prop_rope` and `comp_vactube_junction` "Group" descriptions to make it clear they're optional.
* Tweak `comp_vactube_junction` "Override" description to make it clear they're optional.
Expand Down Expand Up @@ -35,7 +55,8 @@

# Version 2.5.0
* Fix two issues causing produced BSPs to be potentially corrupt. If your maps are mysteriously crashing on load, this may fix the issue.
* Particle systems will now be detected and packed along with their dependencies. This needs configuration in the config file, since different games use different filenames.
* Particle systems will now be detected and packed along with their dependencies.
This needs configuration in the config file, since different games use different filenames.
* Optionally, the postcompiler can collapse and remove `func_instance_io_proxy` from maps entirely to save ents.
* Add comp_sequential_call: finds a sequence of entities (by distance or numeric suffix), then fires inputs delayed in order.
* Add `comp_flicker`: fires on/off and skin inputs repeatedly to simulate a flicker-on effect.
Expand All @@ -62,10 +83,11 @@
--------------------

# Version 2.2.0
* Add `comp_prop_rope`/`comp_prop_cable`: These allow generating 3D static prop versions of cables, like in Source 2. Place them down, choose a material, then connect them together like regular `move_rope`/`keyframe_rope`.
* Add `comp_prop_rope`/`comp_prop_cable`: These allow generating 3D static prop versions of cables, like in Source 2.
Place them down, choose a material, then connect them together like regular `move_rope`/`keyframe_rope`.
* The postcompiler is now able to properly handle pre-L4D entity outputs.
* Added "plugin" support to the compiler - directories can be specified which contain scripts to be run on the map in addition to the existing ones.
* Vactubes now have a "next junction" option for manually specifying the next location, and have a 45 degree curve variant.
* Vactubes now have a "next junction" option for manually specifying the next location, and have a 45 degree curve variant.
* Add a pile of new entity sprites by @lazyRares.
* Propcombine can now use a bundled copy of Crowbar to decompile models if the sources are not available.

Expand Down
49 changes: 26 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,31 @@
* New `comp_` entities. These are mainly intended for use in instances, allowing modifying entities outside of the instance to conform or doing normally impossible things like positioning things in the void.
Below are short explanations, see the "Help" display on the entity properties in Hammer for detailed functionality:

| Entity | Description |
|----------------------------------------------------|-------------|
`comp_flicker` | Fires on/off and skin inputs repeatedly to simulate a flicker-on effect. |
| `comp_choreo_sceneset` | Chains a set of choreographed scenes together. |
| `comp_entity_finder` | Finds the closest entity of a given type, then applies various transformations. Outputs from this entity will be moved to the found entity. Further keyvalues can be set manually with SmartEdit off. |
| `comp_entity_mover` | Shift an entity by a given amount. This is useful to place entities into the void, for example. |
| Entity | Description |
|----------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `comp_flicker` | Fires on/off and skin inputs repeatedly to simulate a flicker-on effect. |
| `comp_choreo_sceneset` | Chains a set of choreographed scenes together. |
| `comp_entity_finder` | Finds the closest entity of a given type, then applies various transformations. Outputs from this entity will be moved to the found entity. |
| `comp_entity_mover` | Shift an entity by a given amount. This is useful to place entities into the void, for example. |
| `comp_kv_setter` | Sets a keyvalue on an entity to a new value. This is useful to compute spawnflags, or to adjust keyvalues when the target entity's options can't be set to a fixup variable. |
| `comp_numeric_transition` | When triggered, animates a keyvalue/input over time with various options. |
| `comp_pack` | Explicitly identify resources to pack into the map, in addition to automatic detection. |
| `comp_pack_rename` | Pack a file into the BSP, under a different name than it starts with. |
| `comp_pack_replace_soundscript` | Replace a soundscript with a different one. |
| `comp_precache_model` | Force a specific model to load, for runtime switching. Duplicates will be removed. |
| `comp_precache_sound` | Force a specific sound to load, for runtime switching. Duplicates will be removed. More keyvalues can be added. |
| `comp_prop_cable`/`comp_prop_rope` | Generates 3D cables using a static prop. |
| `comp_prop_cable_dynamic`/`comp_prop_rope_dynamic` | Modifies the above to generate a dynamic prop, instead. |
| `comp_propcombine_set`/`comp_propcombine_volume` | Specifies a group of props that will be combined together, so they more efficiently render. |
| `comp_relay` | Simplified version of `logic_relay` which is able to be optimised away by the compiler. The various inputs and outputs are useful for bundling commands together, or using more appopriate verbs. Inputs only work if given directly from entities (or via instance redirection), not in-game or dynamically. All inputs/outputs may pass through any parameter, if no override is specified. |
| `comp_scriptvar_setter` | Assigns data or a group of data to a variable in an entity's VScript scope on spawn. To set an array, provide an index in the variable name in the form `varname[4]`. All the comp_scriptvars pointing to that variable will be collected into a single array literal, with holes filled by *null*. If the brackets are empty, these values will fill those holes and then append to the end in an arbitrary order. |
| `comp_sequential_call` | Finds a sequence of entities (by distance or numeric suffix), then fires inputs delayed in order. |
| `comp_vactube_end` | Marks the end point of a vactube. Objects reaching here will be cleaned up. |
| `comp_vactube_junction` | Marks a junction in a vactube, where they're forced to change direction. Scanner models near straight nodes will be detected automatically. |
| `comp_vactube_spline` | Generates a dynamic vactube model following a set of points. |
| `comp_vactube_object` | Registers objects that can appear in the tubing. |
| `comp_vactube_start` | Marks the start point of a vactube. This is where they spawn. |
| `comp_numeric_transition` | When triggered, animates a keyvalue/input over time with various options. |
| `comp_pack` | Explicitly identify resources to pack into the map, in addition to automatic detection. |
| `comp_pack_rename` | Pack a file into the BSP, under a different name than it starts with. |
| `comp_pack_replace_soundscript` | Replace a soundscript with a different one. |
| `comp_player_input_helper` | Fake entity that allows Hammer to autocomplete inputs fired at the special `!player` name (and other similar ones). |
| `comp_precache_model` | Force a specific model to load, for runtime switching. Duplicates will be removed. |
| `comp_precache_sound` | Force a specific sound to load, for runtime switching. Duplicates will be removed. More keyvalues can be added. |
| `comp_prop_cable`/`comp_prop_rope` | Generates 3D cables using a static prop. |
| `comp_prop_cable_dynamic`/`comp_prop_rope_dynamic` | Modifies the above to generate a dynamic prop, instead. |
| `comp_propcombine_set`/`comp_propcombine_volume` | Specifies a group of props that will be combined together, so they more efficiently render. |
| `comp_relay` | Simplified version of `logic_relay` which is able to be optimised away by the compiler. |
| `comp_scriptvar_setter` | Assigns data or a group of data to a variable in an entity's VScript scope on spawn. |
| `comp_sequential_call` | Finds a sequence of entities (by distance or numeric suffix), then fires inputs delayed in order. |
| `comp_vactube_end` | Marks the end point of a vactube. Objects reaching here will be cleaned up. |
| `comp_vactube_junction` | Marks a junction in a vactube, where they're forced to change direction. Scanner models near straight nodes will be detected automatically. |
| `comp_vactube_spline` | Generates a dynamic vactube model following a set of points. |
| `comp_vactube_object` | Registers objects that can appear in the tubing. |
| `comp_vactube_start` | Marks the start point of a vactube. This is where they spawn. |


## Installation
Expand All @@ -61,6 +62,7 @@ Below are short explanations, see the "Help" display on the entity properties in
* [The TF2 Ultimate Mapping Resource Pack][tf2]
* [ZPS: Supplemental Hammer Icons][zps]
* [ts2do's HL FGDs][ts2do]
* Parts of [Allison's Portal 1 FGD edits][p1fgd] have been integrated into the fgds.

[releases]: https://github.com/TeamSpen210/HammerAddons/releases
[installationwiki]: https://github.com/TeamSpen210/HammerAddons/wiki/Installation
Expand All @@ -69,3 +71,4 @@ Below are short explanations, see the "Help" display on the entity properties in
[tf2]: http://forums.tf2maps.net/showthread.php?t=4674
[ts2do]: http://halflife2.filefront.com/file/HalfLife_2_Upgraded_Base_FGDs;48139
[zps]: http://www.necrotalesgames.com/tools/index.php
[p1fgd]: https://cdn.discordapp.com/attachments/702167000574853242/917353063319212072/FGDs.zip
2 changes: 1 addition & 1 deletion build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ IF /I %game%==ALL (
SET tag=%1
IF DEFINED filename.%tag% (SET fname=!filename.%tag%!) ELSE (SET fname=%tag%)
echo Building FGD for %1 as "%fname%.fgd"...
py unify_fgd.py exp "%tag%" srctools -o "build/%fname%.fgd"
python src/hammeraddons/unify_fgd.py exp "%tag%" srctools -o "build/%fname%.fgd"
IF %ERRORLEVEL% NEQ 0 (echo Building FGD for %tag% has failed. Exitting. & EXIT)
EXIT /B

Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ copy_hammer_files() {

build_game() {
echo "Building FGD for $1..."
python3 unify_fgd.py exp $1 srctools -o "build/$1.fgd"
python3 src/hammeraddons/unify_fgd.py exp $1 srctools -o "build/$1.fgd"

if [ $? -ne 0 ]; then
echo "Building FGD for $1 has failed. Exitting." & exit 1
Expand Down
Loading

0 comments on commit bbb7100

Please sign in to comment.