Compare commits
10 Commits
3c7a2082dd
...
8d6e778f5f
Author | SHA1 | Date | |
---|---|---|---|
|
8d6e778f5f | ||
|
528ed328fb | ||
|
35a6532484 | ||
|
79763ec7b5 | ||
|
71ce3097c5 | ||
|
8d6db74006 | ||
|
9ed7b1eb11 | ||
|
d75592b3c1 | ||
|
97d966f55c | ||
|
e4d54fa05a |
@ -1,5 +1,5 @@
|
||||
# Sling
|
||||
License: LGPLv3/CC BY-SA 3.0
|
||||
License: LGPLv2.1/CC BY-SA 3.0. Sounds derivates from [speedygonzo](https://freesound.org/people/speedygonzo/sounds/257654/).
|
||||
|
||||
![Screenshot](https://github.com/tacotexmex/sling/raw/master/screenshot.png "Screenshot")
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
default
|
||||
default?
|
||||
mcl_core?
|
||||
throwing
|
||||
mobs?
|
||||
|
18
init.lua
18
init.lua
@ -17,7 +17,7 @@ throwing.register_bow("sling:sling", {
|
||||
end
|
||||
end,
|
||||
spawn_arrow_entity = function(pos, arrow, player)
|
||||
local obj = minetest.add_entity(pos, "sling:sling_entity")
|
||||
local obj = minetest.add_entity(pos, "sling:sling_entity", tostring(sling_sneak))
|
||||
obj:set_properties{
|
||||
textures = {arrow},
|
||||
}
|
||||
@ -32,8 +32,11 @@ minetest.register_entity("sling:sling_entity", throwing.make_arrow_def{
|
||||
target = throwing.target_node,
|
||||
on_hit_sound = "",
|
||||
on_throw_sound = "",
|
||||
on_activate = function(self, staticdata)
|
||||
self.sneak = staticdata == "true"
|
||||
end,
|
||||
on_hit = function(self, pos, last_pos, node, object, hitter, data)
|
||||
if sling_sneak == true then
|
||||
if self.sneak then
|
||||
data.itemstack:set_count(1)
|
||||
end
|
||||
minetest.spawn_item(
|
||||
@ -50,7 +53,16 @@ minetest.register_entity("sling:sling_entity", throwing.make_arrow_def{
|
||||
end
|
||||
})
|
||||
|
||||
if mobs ~= nil and mobs.mod == "redo" then
|
||||
if minetest.get_modpath("mcl_core") ~= nil then
|
||||
minetest.register_craft({
|
||||
output = "sling:sling",
|
||||
recipe = {
|
||||
{"mcl_mobitems:string", "", "mcl_mobitems:string"},
|
||||
{"mcl_mobitems:string", "", "mcl_mobitems:string"},
|
||||
{"mcl_mobitems:string", "mcl_mobitems:leather", "mcl_mobitems:string"}
|
||||
}
|
||||
})
|
||||
elseif mobs ~= nil and mobs.mod == "redo" then
|
||||
minetest.register_craft({
|
||||
output = "sling:sling",
|
||||
recipe = {
|
||||
|
BIN
screenshot.png
BIN
screenshot.png
Binary file not shown.
Before Width: | Height: | Size: 452 KiB After Width: | Height: | Size: 386 KiB |
Loading…
x
Reference in New Issue
Block a user