diff --git a/data/quickfort/aliases-common.txt b/data/quickfort/aliases-common.txt index 509d1c4ed..d021a2f5f 100644 --- a/data/quickfort/aliases-common.txt +++ b/data/quickfort/aliases-common.txt @@ -16,7 +16,7 @@ # naming aliases ################################## -name: {Right} +name: {Empty} givename: !n{name}& namezone: ^i{givename}^q @@ -34,7 +34,7 @@ enter_sp_config_hauling: & quantum_enable: {enableanimals}{enablefood}{enablefurniture}{enablestone}{enableammo}{enablecoins}{enablebars}{enablegems}{enablefinishedgoods}{enableleather}{enablecloth}{enablewood}{enableweapons}{enablearmor}{enablesheet} quantum: {linksonly}{nocontainers}{quantum_enable}{givename} -stop_name: {Right} +stop_name: {Empty} route_enable: {quantum_enable}{enablecorpses}{enablerefuse} quantumstop: ^hrn{name}&sn{stop_name}&&xxx{route_enable enter_sp_config={enter_sp_config_hauling}}s{move}p^{move_back}^q quantumstopfromeast: {quantumstop move={Right} move_back={Left}} diff --git a/docs/guides/quickfort-alias-guide.rst b/docs/guides/quickfort-alias-guide.rst index b1f525eba..7cd8e26c1 100644 --- a/docs/guides/quickfort-alias-guide.rst +++ b/docs/guides/quickfort-alias-guide.rst @@ -135,6 +135,12 @@ useful for blueprints:: Space Tab +There is also one pseudo-keycode that quickfort recognizes:: + + Empty + +which has an empty expansion. It is primarily useful for defining blank default values for `Sub-aliases`_. + Repetitions ~~~~~~~~~~~ @@ -194,7 +200,8 @@ main drawbridge:: {givename name="Front Gate"} The value that you give the sub-alias ``name`` will be used when the -``givename`` alias is expanded. Without sub-aliases, we'd have to define ``givename`` like this:: +``givename`` alias is expanded. Without sub-aliases, we'd have to define +``givename`` like this:: givenameprefix: !n givenamesuffix: & @@ -219,7 +226,14 @@ enable furniture for some specific stockpile like this:: {quantum quantum_enable={enablefurniture}} -If an alias uses a sub-alias in its expansion, but the sub-alias is not defined when the alias is used, quickfort will halt the ``#query`` blueprint with an error. If you want your aliases to work regardless of whether sub-aliases are defined, then you must define them with default values like ``quantum_enable`` above. +If an alias uses a sub-alias in its expansion, but the sub-alias is not defined +when the alias is used, quickfort will halt the ``#query`` blueprint with an +error. If you want your aliases to work regardless of whether sub-aliases are +defined, then you must define them with default values like ``quantum_enable`` +above. If a default value should be blank, like the ``name`` sub-alias used by +the ``givename`` alias above, define it with the ``{Empty}`` pesudo-keycode:: + + name: {Empty} Sub-aliases must be in one of the following formats::