Cleans up the Examples in the repository
Changes:
- Listener moved to localhost and port 8081 when possible,
- Import-Module generate an exception if fails
- Cleanup
- Tested
- Each Sample code include a
.SYNOPSISand.DESCRIPTION - New autogenerate document page with all sample code under /docs/Getting-Started
- Pode.Build.ps1 automatically generate the sample code summary page
- New Pester test to check that any sample code includes
.SYNOPSISand.DESCRIPTIONand.NOTE
Header Example
<#
.SYNOPSIS
A sample PowerShell script to set up a Pode server and integrate with Redis for caching.
.DESCRIPTION
This script sets up a Pode server listening on port 8081 with Redis integration for caching.
It checks for the existence of the `redis-cli` command and sets up a Pode server with routes
that demonstrate caching with Redis.
.NOTES
Author: Pode Team
License: MIT License
#>
The suggestion in #6515 isn't really feasible: the domain index doesn't know about buildings partitioning off areas.
A simpler fix is to put impassible map props in these bad cells on a map-by-map basis.
This was discovered on http://resource.openra.net/maps/13001/ Not a fan of invisible walls and working it around on a map-by-map basis. As the distance to the MCV is small, maybe a real pathing check could be added prior to spawn without effecting performance too much.
We now have the building blocks to make this possible.
Pathfinder exposes a PathExistsForLocomotor method that currently checks only terrain, but we could introduce another one that checks for the (subset of) immovable actors that hierarchicalPathFindersBlockedByImmovableByLocomotor knows about.
https://github.com/OpenRA/OpenRA/blob/fe35c42eadcfd6fb7b05eb3df28207b7981b450b/OpenRA.Mods.Common/Traits/World/PathFinder.cs#L245-L259
Then we can generate some candidate locations (e.g. area around the MCV) and filter to only those with a reachable path, even taking the immovable actors into account. The check is quite cheap so could be applied to #6515 as well.