Deprecated: str_replace(): Passing null to parameter #1 ($search) of type array|string is deprecated in /var/www/vhosts/gamedevstudiogame.com/httpdocs/classes/client.php on line 124

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /var/www/vhosts/gamedevstudiogame.com/httpdocs/classes/client.php on line 124
Game dev studio

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