Skip to content

Commit

Permalink
fix lua syntax error and whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
warmist committed Apr 5, 2024
1 parent 9c9e81d commit 313469b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/building-hacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ static void enable_hooks(bool enable)
INTERPOSE_HOOK(work_hook,getPowerInfo).apply(enable);
INTERPOSE_HOOK(work_hook,getMachineInfo).apply(enable);
INTERPOSE_HOOK(work_hook,isPowerSource).apply(enable);

INTERPOSE_HOOK(work_hook,canConnectToMachine).apply(enable);
INTERPOSE_HOOK(work_hook,isUnpowered).apply(enable);
INTERPOSE_HOOK(work_hook,canBeRoomSubset).apply(enable);
Expand Down
3 changes: 1 addition & 2 deletions plugins/lua/building-hacks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ local function onUpdateLocal(workshop)
end
end
local function findCustomWorkshop(name_or_id)
if type(name_or_id)="string" then
if type(name_or_id) == "string" then
local raws=df.global.world.raws.buildings.all
for k,v in ipairs(raws) do
if v.code==name_or_id then
Expand All @@ -53,7 +53,6 @@ local function findCustomWorkshop(name_or_id)
else
error("Expected string or integer id for workshop definition")
end

end
local function registerUpdateAction(shopId,callback)
_registeredStuff[shopId]=callback
Expand Down

0 comments on commit 313469b

Please sign in to comment.