# Standard library of aliases for quickfort query mode blueprints.
#
# Please DO NOT EDIT this file directly. It will get overwritten when DFHack
# is updated. Instead, custom aliases should be added to
#   dfhack-config/quickfort/aliases.txt
# Custom alias definitions will take precedence over aliases in this file.
#
# Please see
#   https://docs.dfhack.org/en/latest/docs/guides/quickfort-alias-guide.html
# or
#   hack/docs/docs/guides/quickfort-alias-guide.html
# in your DF installation directory for alias syntax documentation and
# documentation for the aliases in this file.

##################################
# naming aliases
##################################

name:     {Empty}
givename: !n{name}&
namezone: ^i{givename}^q


##################################
# quantum stockpile aliases
##################################

# Allows the standard stockpile config aliases to also be used to configure
# hauling routes.
enter_sp_config: {enter_sp_config_default}
enter_sp_config_default: s
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: {Empty}
route_enable: {quantum_enable}{enablecorpses}{enablerefuse}
sp_link: s{move}p{move_back}
sp_links: {sp_link}
quantumstop: ^hrn{name}&sn{stop_name}&&xxx{route_enable enter_sp_config={enter_sp_config_hauling}}{sp_links}^^q
quantumstopfromeast: {quantumstop move={Right} move_back={Left}}
quantumstopfromsouth: {quantumstop move={Down} move_back={Up}}
quantumstopfromwest: {quantumstop move={Left} move_back={Right}}
quantumstopfromnorth: {quantumstop move={Up} move_back={Down}}


##################################
# farm plots
##################################

growlastcropall: a/&b/&c/&d/&
growfirstcropall: a&b&c&d&


########################################
# stockpile utility aliases
########################################

linksonly: a
maxbins: V
maxbarrels: R
nobins: C
nobarrels: E
nocontainers: {nobins}{nobarrels}

give: g{move}&
give2up: {give move={Up 2}}
give2down: {give move={Down 2}}
give2left: {give move={Left 2}}
give2right: {give move={Right 2}}
give10up: {give move={Up 10}}
give10down: {give move={Down 10}}
give10left: {give move={Left 10}}
give10right: {give move={Right 10}}

togglesequence: &{Down}
togglesequence2: &{Down 2}

masterworkonly: {prefix}{Right}{Up 2}f{Right}{Up 2}&^
artifactonly:   {prefix}{Right}{Up 2}f{Right}{Up}&^

togglemasterwork: {prefix}{Right}{Up 2}{Right}{Up 2}&^
toggleartifact:   {prefix}{Right}{Up 2}{Right}{Up}&^


##################################
# animal stockpile adjustments
##################################

animalsprefix:  {enter_sp_config}
enableanimals:  {animalsprefix}e^
disableanimals: {animalsprefix}d^

cages: {animalsprefix}bu^
traps: {animalsprefix}bj^

forbidcages: {animalsprefix}u^
forbidtraps: {animalsprefix}j^

permitcages: {forbidcages}
permittraps: {forbidtraps}


##################################
# food stockpile adjustments
##################################

foodprefix:  {enter_sp_config}{Down}
enablefood:  {foodprefix}e^
disablefood: {foodprefix}d^

preparedfood:   {foodprefix}bu^
unpreparedfish: {foodprefix}b{Right}{Down 2}p^
plants:         {foodprefix}b{Right}{Down 4}p^
booze:          {foodprefix}b{Right}{Down 5}p{Down}p^
seeds:          {foodprefix}b{Right}{Down 9}p^
dye:            {foodprefix}b{Right}{Down 11}{Right}{Down 28}{togglesequence 4}^
tallow:         {foodprefix}b{Right}{Down 13}{Right}stallow&p^
miscliquid:     {foodprefix}b{Right}{Down 18}p^
wax:            {foodprefix}b{Right}{Down 15}{Right}{Down 6}&^

forbidpreparedfood:   {foodprefix}u^
forbidunpreparedfish: {foodprefix}{Right}{Down 2}f^
forbidplants:         {foodprefix}{Right}{Down 4}f^
forbidbooze:          {foodprefix}{Right}{Down 5}f{Down}f^
forbidseeds:          {foodprefix}{Right}{Down 9}f^
forbiddye:            {foodprefix}{Right}{Down 11}{Right}{Down 28}{togglesequence 4}^
forbidtallow:         {foodprefix}{Right}{Down 13}{Right}stallow&f^
forbidmiscliquid:     {foodprefix}{Right}{Down 18}f^
forbidwax:            {foodprefix}{Right}{Down 15}{Right}{Down 6}&^

permitpreparedfood:   {forbidpreparedfood}
permitunpreparedfish: {foodprefix}{Right}{Down 2}p^
permitplants:         {foodprefix}{Right}{Down 4}p^
permitbooze:          {foodprefix}{Right}{Down 5}p{Down}p^
permitseeds:          {foodprefix}{Right}{Down 9}p^
permitdye:            {forbiddye}
permittallow:         {foodprefix}{Right}{Down 13}{Right}stallow&p^
permitmiscliquid:     {foodprefix}{Right}{Down 18}p^
permitwax:            {forbidwax}

# the next two aliases are for compatibility with previous implementations of
# Quickfort and are not documented.
# enables everything but seeds
noseeds: {disablefood}{enablefood}{forbidseeds}
# enables all food except for the types listed above
food: {noseeds}{forbidpreparedfood}{forbidunpreparedfish}{forbidplants}{forbidbooze}{forbiddye}{forbidtallow}{forbidmiscliquid}


##################################
# furniture stockpile adjustments
##################################

furnitureprefix:  {enter_sp_config}{Down 2}
enablefurniture:  {furnitureprefix}e^
disablefurniture: {furnitureprefix}d^

pots:    {furnitureprefix}de{Right}f{Right}{Up 5}&^
bags:    {furnitureprefix}de{Right}f{Right}{Up 10}&{Left}{Down}f{Down}f{Down}f{Right}{Down}&{Down 6}&{Down}&{Down 6}&^
buckets: {furnitureprefix}de{Right}f{Right}{Up 12}&^
sand:    {furnitureprefix}de{Right}f{Right}{Up}&^

forbidpots:    {furnitureprefix}{Right 2}{Up 5}&^
forbidbuckets: {furnitureprefix}{Right 2}{Up 12}&^
forbidsand:    {furnitureprefix}{Right 2}{Up}&^

permitpots:    {forbidpots}
permitbuckets: {forbidbuckets}
permitsand:    {forbidsand}

masterworkfurniture: {masterworkonly prefix={furnitureprefix}}
artifactfurniture:   {artifactonly prefix={furnitureprefix}}

forbidmasterworkfurniture: {togglemasterwork prefix={furnitureprefix}}
forbidartifactfurniture:   {toggleartifact prefix={furnitureprefix}}

permitmasterworkfurniture: {togglemasterwork prefix={furnitureprefix}}
permitartifactfurniture:   {toggleartifact prefix={furnitureprefix}}


###########################################
# corpses and refuse stockpile adjustments
###########################################

corpsesprefix:  {enter_sp_config}{Down 3}
enablecorpses:  {corpsesprefix}e^
disablecorpses: {corpsesprefix}d{Up}d^

refuseprefix:  {enter_sp_config}{Down 4}
enablerefuse:  {refuseprefix}e^
disablerefuse: {refuseprefix}d^

corpses:     {refuseprefix}b{Right}{Down}p^
rawhides:    {refuseprefix}b{Right 2}{Down}&^
tannedhides: {refuseprefix}b{Right 2}{Down 53}&^
skulls:      {refuseprefix}b{Right}{Down 3}p^
bones:       {refuseprefix}b{Right}{Down 4}p^
shells:      {refuseprefix}b{Right}{Down 5}p^
teeth:       {refuseprefix}b{Right}{Down 6}p^
horns:       {refuseprefix}b{Right}{Down 7}p^
hair:        {refuseprefix}b{Right}{Down 8}p^
craftrefuse: {skulls}{permitbones}{permitshells}{permitteeth}{permithorns}{permithair}

forbidcorpses:     {refuseprefix}{Right}{Down}f^
forbidrawhides:    {refuseprefix}{Right 2}{Down}&^
forbidtannedhides: {refuseprefix}{Right 2}{Down 53}&^
forbidskulls:      {refuseprefix}{Right}{Down 3}f^
forbidbones:       {refuseprefix}{Right}{Down 4}f^
forbidshells:      {refuseprefix}{Right}{Down 5}f^
forbidteeth:       {refuseprefix}{Right}{Down 6}f^
forbidhorns:       {refuseprefix}{Right}{Down 7}f^
forbidhair:        {refuseprefix}{Right}{Down 8}f^
forbidcraftrefuse: {forbidskulls}{forbidbones}{forbidshells}{forbidteeth}{forbidhorns}{forbidhair}

permitcorpses:     {refuseprefix}{Right}{Down}p^
permitrawhides:    {forbidrawhides}
permittannedhides: {forbidtannedhides}
permitskulls:      {refuseprefix}{Right}{Down 3}p^
permitbones:       {refuseprefix}{Right}{Down 4}p^
permitshells:      {refuseprefix}{Right}{Down 5}p^
permitteeth:       {refuseprefix}{Right}{Down 6}p^
permithorns:       {refuseprefix}{Right}{Down 7}p^
permithair:        {refuseprefix}{Right}{Down 8}p^
permitcraftrefuse: {permitskulls}{permitbones}{permitshells}{permitteeth}{permithorns}{permithair}


##################################
# stone stockpile adjustments
##################################

stoneprefix:  {enter_sp_config}{Down 5}
enablestone:  {stoneprefix}e^
disablestone: {stoneprefix}d^

metal:         {stoneprefix}b{Right}p^
iron:          {stoneprefix}b{Right}{Right}&{Down}&{Down 13}&^
economic:      {stoneprefix}b{Right}{Down}p^
flux:          {stoneprefix}b{Right}{Down}{Right}{togglesequence 4}{Down 4}&^
plaster:       {stoneprefix}b{Right}{Down}{Right}{Down 6}&{Down 3}{togglesequence 3}^
coalproducing: {stoneprefix}b{Right}{Down}{Right}{Down 4}{togglesequence 2}^
otherstone:    {stoneprefix}b{Right}{Down 2}p^
bauxite:       {stoneprefix}b{Right}{Down 2}{Right}{Down 42}&^
clay:          {stoneprefix}b{Right}{Down 3}p^

forbidmetal:         {stoneprefix}{Right}f^
forbidiron:          {stoneprefix}{Right}{Right}&{Down}&{Down 13}&^
forbideconomic:      {stoneprefix}{Right}{Down}f^
forbidflux:          {stoneprefix}{Right}{Down}{Right}{togglesequence 4}{Down 4}&^
forbidplaster:       {stoneprefix}{Right}{Down}{Right}{Down 6}&{Down 3}{togglesequence 3}^
forbidcoalproducing: {stoneprefix}{Right}{Down}{Right}{Down 4}{togglesequence 2}^
forbidotherstone:    {stoneprefix}{Right}{Down 2}f^
forbidbauxite:       {stoneprefix}{Right}{Down 2}{Right}{Down 42}&^
forbidclay:          {stoneprefix}{Right}{Down 3}f^

permitmetal:         {stoneprefix}{Right}p^
permitiron:          {forbidiron}
permiteconomic:      {stoneprefix}{Right}{Down}p^
permitflux:          {forbidflux}
permitplaster:       {forbidplaster}
permitcoalproducing: {forbidcoalproducing}
permitotherstone:    {stoneprefix}{Right}{Down 2}p^
permitbauxite:       {forbidbauxite}
permitclay:          {stoneprefix}{Right}{Down 3}p^


##################################
# ammo stockpile adjustments
##################################

ammoprefix:  {enter_sp_config}{Down 6}
enableammo:  {ammoprefix}e^
disableammo: {ammoprefix}d^

bolts: {ammoprefix}a{Right 2}f&^

forbidmetalbolts:  {ammoprefix}{Right}{Down}f^
forbidwoodenbolts: {ammoprefix}{Right}{Down 2}{Right}&^
forbidbonebolts:   {ammoprefix}{Right}{Down 2}{Right}{Down}&^

masterworkammo: {masterworkonly prefix={ammoprefix}}
artifactammo:   {artifactonly prefix={ammoprefix}}

forbidmasterworkammo: {togglemasterwork prefix={ammoprefix}}
forbidartifactammo:   {toggleartifact prefix={ammoprefix}}

permitmasterworkammo: {togglemasterwork prefix={ammoprefix}}
permitartifactammo:   {toggleartifact prefix={ammoprefix}}


##################################
# bar stockpile adjustments
##################################

barsprefix:  {enter_sp_config}{Down 8}
enablebars:  {barsprefix}e^
disablebars: {barsprefix}d^

bars:        {barsprefix}b{Right}p{Down}p^
metalbars:   {barsprefix}b{Right}p^
ironbars:    {barsprefix}b{Right 2}&^
steelbars:   {barsprefix}b{Right 2}{Down 8}&^
pigironbars: {barsprefix}b{Right 2}{Down 9}&^
otherbars:   {barsprefix}b{Right}{Down}p^
coal:        {barsprefix}b{Right}{Down}{Right}&^
potash:      {barsprefix}b{Right}{Down}{Right}{Down}&^
ash:         {barsprefix}b{Right}{Down}{Right}{Down 2}&^
pearlash:    {barsprefix}b{Right}{Down}{Right}{Down 3}&^
soap:        {barsprefix}b{Right}{Down}{Right}{Down 4}&^
blocks:      {barsprefix}b{Down 2}p{Down}p{Down}p^

forbidbars:        {barsprefix}{Right}f{Down}f^
forbidmetalbars:   {barsprefix}{Right}f^
forbidironbars:    {barsprefix}{Right 2}&^
forbidsteelbars:   {barsprefix}{Right 2}{Down 8}&^
forbidpigironbars: {barsprefix}{Right 2}{Down 9}&^
forbidotherbars:   {barsprefix}{Right}{Down}f^
forbidcoal:        {barsprefix}{Right}{Down}{Right}&^
forbidpotash:      {barsprefix}{Right}{Down}{Right}{Down}&^
forbidash:         {barsprefix}{Right}{Down}{Right}{Down 2}&^
forbidpearlash:    {barsprefix}{Right}{Down}{Right}{Down 3}&^
forbidsoap:        {barsprefix}{Right}{Down}{Right}{Down 4}&^
forbidblocks:      {barsprefix}{Down 2}f{Down}f{Down}f^


##################################
# gem stockpile adjustments
##################################

gemsprefix:  {enter_sp_config}{Down 9}
enablegems:  {gemsprefix}e^
disablegems: {gemsprefix}d^

roughgems:  {gemsprefix}b{Right}p^
roughglass: {gemsprefix}b{Right}{Down}p^
cutgems:    {gemsprefix}b{Right}{Down 2}p^
cutglass:   {gemsprefix}b{Right}{Down 3}p^
cutstone:   {gemsprefix}b{Right}{Down 4}p^

forbidroughgems:  {gemsprefix}{Right}f^
forbidroughglass: {gemsprefix}{Right}{Down}f^
forbidcutgems:    {gemsprefix}{Right}{Down 2}f^
forbidcutglass:   {gemsprefix}{Right}{Down 3}f^
forbidcutstone:   {gemsprefix}{Right}{Down 4}f^


#######################################
# finished goods stockpile adjustments
#######################################

finishedgoodsprefix:  {enter_sp_config}{Down 10}
enablefinishedgoods:  {finishedgoodsprefix}e^
disablefinishedgoods: {finishedgoodsprefix}d^

crafts:  {finishedgoodsprefix}{Right}f{Right}{Down 9}{togglesequence 9}^
goblets: {finishedgoodsprefix}{Right}f{Right}{Down 2}&^
jugs:    {finishedgoodsprefix}{Right}f{Right}{Up 2}&{Left}{Down 2}f{Down}f{Down}f^

forbidcrafts:  {finishedgoodsprefix}{Right 2}{Down 9}{togglesequence 9}^
forbidgoblets: {finishedgoodsprefix}{Right 2}{Down 2}&^

permitcrafts:  {forbidcrafts}
permitgoblets: {forbidgoblets}

masterworkfinishedgoods: {masterworkonly prefix={finishedgoodsprefix}}
artifactfinishedgoods:   {artifactonly prefix={finishedgoodsprefix}}

forbidmasterworkfinishedgoods: {togglemasterwork prefix={finishedgoodsprefix}}
forbidartifactfinishedgoods:   {toggleartifact prefix={finishedgoodsprefix}}

permitmasterworkfinishedgoods: {togglemasterwork prefix={finishedgoodsprefix}}
permitartifactfinishedgoods:   {toggleartifact prefix={finishedgoodsprefix}}


##################################
# cloth
##################################

clothprefix:  {enter_sp_config}{Down 12}
enablecloth:  {clothprefix}e^
disablecloth: {clothprefix}d^

thread:           {clothprefix}b{Right}p{Down}p{Down}p^
adamantinethread: {clothprefix}b{Right}{Down 3}p^
cloth:            {clothprefix}b{Right}{Down 4}p{Down}p{Down}p^
adamantinecloth:  {clothprefix}b{Right}{Up}p^


##################################
# weapon stockpile adjustments
##################################

weaponsprefix:  {enter_sp_config}{Down 14}
enableweapons:  {weaponsprefix}e^
disableweapons: {weaponsprefix}d^

metalweapons:  {forbidtrapcomponents}{forbidstoneweapons}{forbidotherweapons}
ironweapons:   {metalweapons}{forbidmetalweapons}{permitironweapons}
bronzeweapons: {metalweapons}{forbidmetalweapons}{permitbronzeweapons}
copperweapons: {metalweapons}{forbidmetalweapons}{permitcopperweapons}
steelweapons:  {metalweapons}{forbidmetalweapons}{permitsteelweapons}

forbidweapons:        {weaponsprefix}{Right}f^
forbidtrapcomponents: {weaponsprefix}{Right}{Down}f^
forbidmetalweapons:   {weaponsprefix}{Right}{Down 2}f^
forbidstoneweapons:   {weaponsprefix}{Right}{Down 3}f^
forbidotherweapons:   {weaponsprefix}{Right}{Down 4}f^
forbidironweapons:    {weaponsprefix}{Right}{Down 2}{Right}&^
forbidbronzeweapons:  {weaponsprefix}{Right}{Down 2}{Right}{Down 6}&^
forbidcopperweapons:  {weaponsprefix}{Right}{Down 2}{Right}{Down 3}&^
forbidsteelweapons:   {weaponsprefix}{Right}{Down 2}{Right}{Down 8}&^

permitweapons:        {weaponsprefix}{Right}p^
permittrapcomponents: {weaponsprefix}{Right}{Down}p^
permitmetalweapons:   {weaponsprefix}{Right}{Down 2}p^
permitstoneweapons:   {weaponsprefix}{Right}{Down 3}p^
permitotherweapons:   {weaponsprefix}{Right}{Down 4}p^
permitironweapons:    {forbidironweapons}
permitbronzeweapons:  {forbidbronzeweapons}
permitcopperweapons:  {forbidcopperweapons}
permitsteelweapons:   {forbidsteelweapons}

masterworkweapons: {masterworkonly prefix={weaponsprefix}}
artifactweapons:   {artifactonly prefix={weaponsprefix}}

forbidmasterworkweapons: {togglemasterwork prefix={weaponsprefix}}
forbidartifactweapons:   {toggleartifact prefix={weaponsprefix}}

permitmasterworkweapons: {togglemasterwork prefix={weaponsprefix}}
permitartifactweapons:   {toggleartifact prefix={weaponsprefix}}


##################################
# armor stockpile adjustments
##################################

armorprefix:  {enter_sp_config}{Down 15}
enablearmor:  {armorprefix}e^
disablearmor: {armorprefix}d^

metalarmor:  {forbidotherarmor}
otherarmor:  {forbidmetalarmor}
ironarmor:   {metalarmor}{forbidmetalarmor}{permitironarmor}
bronzearmor: {metalarmor}{forbidmetalarmor}{permitbronzearmor}
copperarmor: {metalarmor}{forbidmetalarmor}{permitcopperarmor}
steelarmor:  {metalarmor}{forbidmetalarmor}{permitsteelarmor}

forbidmetalarmor:  {armorprefix}{Right}{Down 6}f^
forbidotherarmor:  {armorprefix}{Right}{Down 7}f^
forbidironarmor:   {armorprefix}{Right}{Down 6}{Right}&^
forbidbronzearmor: {armorprefix}{Right}{Down 6}{Right}{Down 6}&^
forbidcopperarmor: {armorprefix}{Right}{Down 6}{Right}{Down 3}&^
forbidsteelarmor:  {armorprefix}{Right}{Down 6}{Right}{Down 8}&^

permitmetalarmor:   {armorprefix}{Right}{Down 6}p^
permitotherarmor:   {armorprefix}{Right}{Down 7}p^
permitironarmor:    {forbidironarmor}
permitbronzearmor:  {forbidbronzearmor}
permitcopperarmor:  {forbidcopperarmor}
permitsteelarmor:   {forbidsteelarmor}

masterworkarmor: {masterworkonly prefix={armorprefix}}
artifactarmor:   {artifactonly prefix={armorprefix}}

forbidmasterworkarmor: {togglemasterwork prefix={armorprefix}}
forbidartifactarmor:   {toggleartifact prefix={armorprefix}}

permitmasterworkarmor: {togglemasterwork prefix={armorprefix}}
permitartifactarmor:   {toggleartifact prefix={armorprefix}}


##################################
# others
##################################

coinsprefix:  {enter_sp_config}{Down 7}
enablecoins:  {coinsprefix}e^
disablecoins: {coinsprefix}d^

leatherprefix:  {enter_sp_config}{Down 11}
enableleather:  {leatherprefix}e^
disableleather: {leatherprefix}d^

woodprefix:  {enter_sp_config}{Down 13}
enablewood:  {woodprefix}e^
disablewood: {woodprefix}d^

sheetprefix:  {enter_sp_config}{Down 16}
enablesheet:  {sheetprefix}e^
disablesheet: {sheetprefix}d^
