Skip to content

Commit

Permalink
Apply initial pre-commit config
Browse files Browse the repository at this point in the history
  • Loading branch information
lethosor committed Apr 6, 2022
1 parent 67f36b8 commit 1a0228d
Show file tree
Hide file tree
Showing 47 changed files with 21 additions and 53 deletions.
1 change: 0 additions & 1 deletion deathcause.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,3 @@ def display_death_unit(u)
}
end
end

1 change: 0 additions & 1 deletion devel/annc-monitor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,3 @@ function eventful.onReport.annc_monitor(id)
log(annc.text, color)
end
end

Empty file modified devel/luacov.lua
100755 → 100644
Empty file.
Empty file modified devel/make-dt.pl
100644 → 100755
Empty file.
1 change: 0 additions & 1 deletion devel/prepare-save.lua
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,3 @@ dfhack.persistent.save{
-- Save

dfhack.run_script('quicksave')

1 change: 0 additions & 1 deletion devel/print-args2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ print("print-args")
for _,arg in ipairs(args) do
print("'"..arg.."'")
end

2 changes: 1 addition & 1 deletion devel/query.lua
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ Usage examples::
Disables printing. Might be useful if you are debugging
this script. Or to see if a query will crash (faster) but
not sure what else you could use it for.
``-debug <value>``
Enables debug log lines equal to or less than the value provided.
Expand Down
1 change: 0 additions & 1 deletion devel/watch-minecarts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,3 @@ if cmd == 'start' then
elseif cmd == 'stop' then
dfhack.timeout_active(timeout_id, nil)
end

8 changes: 4 additions & 4 deletions do-job-now.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ local function getUnitName(unit)
if language_name.has_name then
return dfhack.df2console(dfhack.TranslateName( language_name ))
end

-- animals
return dfhack.units.getProfessionName(unit)
end
Expand Down Expand Up @@ -114,7 +114,7 @@ end

local function doPlantJobNow(plant)
--print('This will attempt to make a job with a plant a top priority')

for _link, job in utils.listpairs(df.global.world.jobs.list) do
if plant.pos.x == job.pos.x
and plant.pos.y == job.pos.y
Expand All @@ -124,7 +124,7 @@ local function doPlantJobNow(plant)
return
end
end

print("Couldn't find any job involving this plant.")
end

Expand All @@ -137,7 +137,7 @@ local function doWorkOrderJobsNow(order)
cnt = cnt + 1
end
end

if cnt > 0 then
print("Found " .. cnt .. " jobs for this work order.")
else
Expand Down
1 change: 0 additions & 1 deletion emigration.lua
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,3 @@ end
if dfhack.isMapLoaded() then
dfhack.onStateChange.loadEmigration(SC_MAP_LOADED)
end

1 change: 0 additions & 1 deletion fix/blood-del.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,3 @@ for x,y in pairs(df.global.world.entities.all) do
k=k+1
end
end

6 changes: 3 additions & 3 deletions fix/drop-webs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ function drop_webs(all_webs)
if not dfhack.isMapLoaded() then
qerror("Error: Map not loaded!")
end

local count = 0
for i, item in ipairs(df.global.world.items.other.ANY_WEBS) do
if item.flags.on_ground and not item.flags.in_job then
local valid_tile = all_webs or (dfhack.maps.getTileType(item.pos) == df.tiletype.OpenSpace)

if valid_tile then
local proj = dfhack.items.makeProjectile(item)
proj.flags.no_impact_destroy = true
Expand All @@ -44,7 +44,7 @@ end
function main(...)
local validArgs = utils.invert({"all"})
local args = utils.processArgs({...}, validArgs)

drop_webs(args.all)
end

Expand Down
2 changes: 1 addition & 1 deletion gui/color-schemes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -801,4 +801,4 @@ screen:addviews {
}
screen:populateList()
screen:togglePreview(false)
screen:show()
screen:show()
1 change: 0 additions & 1 deletion gui/dfstatus.lua
Original file line number Diff line number Diff line change
Expand Up @@ -225,4 +225,3 @@ else
scr:dismiss()
scr = nil
end

1 change: 0 additions & 1 deletion gui/gm-editor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -601,4 +601,3 @@ if #args~=0 then
else
show_editor(getTargetFromScreens())
end

2 changes: 1 addition & 1 deletion gui/hack-wish.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ gui/hack-wish
=============
An alias for `gui/create-item`. Deprecated.
]====]
]====]
1 change: 0 additions & 1 deletion gui/unit-info-viewer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -781,4 +781,3 @@ if dfhack.gui.getCurFocus() ~= 'dfhack/lua/'..UnitInfoViewer.focus_path then
kan_viewscreen:show()
end
end

2 changes: 1 addition & 1 deletion internal/gm-unit/editor_attributes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,4 @@ function Editor_Attrs:remove_rust(attr)
attr.soft_demotion =0;
attr.rust_counter=0;
attr.demotion_counter=0;
end
end
2 changes: 1 addition & 1 deletion internal/gm-unit/editor_beliefs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,4 @@ function Editor_Beliefs:init(args)
}

self:updateChoices()
end
end
2 changes: 1 addition & 1 deletion internal/gm-unit/editor_body.lua
Original file line number Diff line number Diff line change
Expand Up @@ -249,4 +249,4 @@ function Editor_Body:init(args)
}

self:updateChoices()
end
end
2 changes: 1 addition & 1 deletion internal/gm-unit/editor_civilization.lua
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,4 @@ function Editor_Civ:init( args )
}
},
}
end
end
2 changes: 1 addition & 1 deletion internal/gm-unit/editor_colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,4 @@ function Editor_Colors:init(args)
}

self:updateChoices()
end
end
2 changes: 1 addition & 1 deletion internal/gm-unit/editor_counters.lua
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ function Editor_Counters:init( args )
},
}
self:update_counters()
end
end
2 changes: 1 addition & 1 deletion internal/gm-unit/editor_orientation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ function Editor_Orientation:init(args)
}

self:updateChoices()
end
end
2 changes: 1 addition & 1 deletion internal/gm-unit/editor_personality.lua
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ function Editor_Personality:init(args)
}

self:updateChoices()
end
end
2 changes: 1 addition & 1 deletion internal/gm-unit/editor_skills.lua
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,4 @@ end

function Editor_Skills:remove_rust(skill)
--TODO
end
end
2 changes: 1 addition & 1 deletion internal/gm-unit/editor_wounds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,4 @@ function Editor_Wounds:init( args )
},
}
self:update_wounds()
end
end
1 change: 0 additions & 1 deletion internal/quickfort/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,3 @@ end
function do_undo()
log('cannot undo blueprints for mode: config')
end

1 change: 0 additions & 1 deletion internal/quickfort/transform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,3 @@ function make_transform_fn_from_name(name)
qerror('invalid transformation name: '..name)
end
end

1 change: 0 additions & 1 deletion lever.rb
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,3 @@ def lever_list
EOS

end

2 changes: 1 addition & 1 deletion light-aquifers-only.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function lightaqonly (arg)
end
end
end

else
for i = 0, df.global.world.world_data.world_width - 1 do
for k = 0, df.global.world.world_data.world_height - 1 do
Expand Down
1 change: 0 additions & 1 deletion modtools/add-syndrome.lua
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,3 @@ if args.skipImmunities then
else
syndromeUtil.infectWithSyndromeIfValidTarget(targ,syndrome,resetPolicy)
end

1 change: 0 additions & 1 deletion modtools/anonymous-script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ end

--we don't care about the result even if they return something for some reason: we just want to ensure its side-effects happen and print appropriate error messages
dfhack.safecall(f,table.unpack(args,2))

1 change: 0 additions & 1 deletion modtools/equip-item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,3 @@ local mode = args.mode
mode = df.unit_inventory_item.T_mode[mode] --luacheck: retype

equipItem(unit, item, partId, mode)

1 change: 0 additions & 1 deletion modtools/force.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,3 @@ if civ then
end

df.global.timed_events:insert('#', timedEvent)

1 change: 0 additions & 1 deletion modtools/invader-item-destroyer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -184,4 +184,3 @@ if args.entity then
end
entities[args.entity] = true
end

1 change: 0 additions & 1 deletion modtools/outside-only.lua
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,3 @@ end
registeredBuildings[args.building] = buildingType[args['type']]

checkBuildings()

2 changes: 0 additions & 2 deletions modtools/projectile-trigger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,3 @@ if not materialTriggers[args.material] then
materialTriggers[args.material] = {}
end
table.insert(materialTriggers[args.material], args)


2 changes: 0 additions & 2 deletions modtools/random-trigger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -196,5 +196,3 @@ outcome.weight = weight
outcome.command = args.command
outcomeList.outcomes = outcomeList.outcomes or {}
table.insert(outcomeList.outcomes, outcome)


1 change: 0 additions & 1 deletion modtools/reaction-product-trigger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,3 @@ end

productHooks[args.reactionName] = productHooks[args.reactionName] or {}
table.insert(productHooks[args.reactionName], args)

2 changes: 0 additions & 2 deletions modtools/reaction-trigger-transition.lua
Original file line number Diff line number Diff line change
Expand Up @@ -132,5 +132,3 @@ file:flush()
io.close(file)
--io.output()
print('transition information written to reaction-trigger-transition.txt')


1 change: 0 additions & 1 deletion modtools/reaction-trigger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -263,4 +263,3 @@ if args.syndrome and not findSyndrome(args.syndrome) then
end

table.insert(reactionHooks[args.reactionName], args)

1 change: 0 additions & 1 deletion modtools/set-need.lua
Original file line number Diff line number Diff line change
Expand Up @@ -609,4 +609,3 @@ end
if not dfhack_flags.module then
main(...)
end

1 change: 0 additions & 1 deletion modtools/spawn-flow.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,3 @@ if not pos.x or not pos.y or not pos.z then
end

dfhack.maps.spawnFlow(pos, flowType, mat_type, mat_index, flowSize)

1 change: 0 additions & 1 deletion modtools/transform-unit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,3 @@ if args.duration and args.duration ~= 'forever' then
end
end)
end

1 change: 0 additions & 1 deletion startdwarf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@
addr = df.get_global_address('start_dwarf_count')
raise 'patch address not available' if addr == 0
df.memory_patch(addr, [nr].pack('L'))

1 change: 0 additions & 1 deletion tame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,3 @@ if selected ~= nil then
else
qerror("select a valid unit")
end

0 comments on commit 1a0228d

Please sign in to comment.