Skip to content

Commit

Permalink
Add setting for electric fence damage (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasrudin authored and SmallJoker committed Aug 26, 2019
1 parent eb1fa09 commit 8e236eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ This mod provides pre-fabricated concrete nodes to your Minetest world.

![Screenshot](https://raw.githubusercontent.com/minetest-mods/prefab/master/screenshot.png)

## Settings

* `prefab.electric_fence_damage` damage of the electric fence, defaults to 30 (instakill)

## Dependencies

This mod depends on:
Expand All @@ -13,4 +17,4 @@ This mod depends on:

## License

The license is CC-BY-SA for everything.
The license is CC-BY-SA for everything.
2 changes: 1 addition & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ print("Prefab Loaded!")

local creative = minetest.setting_getbool("creative_mode")

local damage = 30
local damage = tonumber(minetest.settings:get("prefab.electric_fence_damage")) or 30
if creative then damage = 0 end

minetest.register_node("prefab:concrete", {
Expand Down

0 comments on commit 8e236eb

Please sign in to comment.