Classes

Concepts

Libraries

advertisement »

ambientSounds »

bitser »

contentPoints »

eventBoxText »

factValidity »

frameBuffer »

officeBuildingInserter »

priorityRenderer »

randomEvents »

scaling »

spritesheetParser »

statusIcons »

test3 »

util »

Objects

canPerformAction

Description

Returns whether the action of this ID can be performed.

Arguments

1 string id

the ID of the action.

Returns

1 bool

whether the action can be performed

Example

interactionRestrictor:restrictAction("myActionName")

-- returns false now

interactionRestrictor:canPerformAction("myActionName")

if not interactionRestrictor:canPerformAction("myActionName") then
  print("this action can not be performed as it is restricted!")
else
  print("this action can be performed")
end