|
|
@ -18,6 +18,16 @@ MechanismOverlay.ATTRS{
|
|
|
|
frame={w=57, h=13},
|
|
|
|
frame={w=57, h=13},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local function get_label()
|
|
|
|
|
|
|
|
local bld = dfhack.gui.getSelectedBuilding(true)
|
|
|
|
|
|
|
|
if bld and bld:getType() == df.building_type.Trap and
|
|
|
|
|
|
|
|
bld:getSubtype() == df.trap_type.PressurePlate
|
|
|
|
|
|
|
|
then
|
|
|
|
|
|
|
|
return 'Plate:'
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
return 'Lever:'
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function MechanismOverlay:init()
|
|
|
|
function MechanismOverlay:init()
|
|
|
|
self:addviews{
|
|
|
|
self:addviews{
|
|
|
|
widgets.BannerPanel{
|
|
|
|
widgets.BannerPanel{
|
|
|
@ -31,7 +41,7 @@ function MechanismOverlay:init()
|
|
|
|
view_id='safety_lever',
|
|
|
|
view_id='safety_lever',
|
|
|
|
frame={t=0, l=20, w=15},
|
|
|
|
frame={t=0, l=20, w=15},
|
|
|
|
key='CUSTOM_G',
|
|
|
|
key='CUSTOM_G',
|
|
|
|
label='Lever:',
|
|
|
|
label=get_label,
|
|
|
|
options={
|
|
|
|
options={
|
|
|
|
{label='Any', value=0},
|
|
|
|
{label='Any', value=0},
|
|
|
|
{label='Magma', value=2, pen=COLOR_RED},
|
|
|
|
{label='Magma', value=2, pen=COLOR_RED},
|
|
|
|