diff --git a/LUA_API.rst b/LUA_API.rst index 49e205235..a7dab21b0 100644 --- a/LUA_API.rst +++ b/LUA_API.rst @@ -880,6 +880,15 @@ Units module Retrieves the profession name for the given race/caste using raws. +* ``dfhack.units.getProfessionColor(unit[,ignore_noble])`` + + Retrieves the color associated with the profession, using noble assignments + or raws. The ``ignore_noble`` boolean disables the use of noble positions. + +* ``dfhack.units.getCasteProfessionColor(race,caste,prof_id)`` + + Retrieves the profession color for the given race/caste using raws. + Items module ------------ @@ -1032,6 +1041,11 @@ Burrows module Buildings module ---------------- +* ``dfhack.buildings.setOwner(item,unit)`` + + Replaces the owner of the building. If unit is *nil*, removes ownership. + Returns *false* in case of error. + * ``dfhack.buildings.getSize(building)`` Returns *width, height, centerx, centery*. diff --git a/Lua API.html b/Lua API.html index 15f1d89cb..b9f09cf96 100644 --- a/Lua API.html +++ b/Lua API.html @@ -1113,6 +1113,13 @@ or raws. The ignore_noble boolean disables the
  • dfhack.units.getCasteProfessionName(race,caste,prof_id[,plural])

    Retrieves the profession name for the given race/caste using raws.

  • +
  • dfhack.units.getProfessionColor(unit[,ignore_noble])

    +

    Retrieves the color associated with the profession, using noble assignments +or raws. The ignore_noble boolean disables the use of noble positions.

    +
  • +
  • dfhack.units.getCasteProfessionColor(race,caste,prof_id)

    +

    Retrieves the profession color for the given race/caste using raws.

    +
  • @@ -1237,6 +1244,10 @@ burrows, or the presence of invaders.

    Buildings module