Compare commits

...

10 Commits

Author SHA1 Message Date
texmex
8d6e778f5f
Support default and MCL2 2017-12-08 16:53:50 +01:00
texmex
528ed328fb
Check for MCL2 first 2017-12-08 16:53:20 +01:00
texmex
35a6532484
MineClone 2 support 2017-12-08 16:51:08 +01:00
texmex
79763ec7b5
In reality it depends on default 2017-12-07 14:02:08 +01:00
tacotexmex
71ce3097c5 Don't depend on default 2017-08-09 14:35:56 +02:00
tacotexmex
8d6db74006 License to LGPL2.1 2017-08-03 23:34:24 +02:00
texmex
9ed7b1eb11 Merge pull request #1 from paly2/multiplayer_fix
Fix a sneak bug when using more than one sling at a time
2017-07-28 00:30:22 +02:00
tacotexmex
d75592b3c1 Crop screenshot 2017-07-09 18:16:10 +02:00
upsilon
97d966f55c
Fix a sneak bug when using more than one sling at a time 2017-07-09 10:59:39 +02:00
tacotexmex
e4d54fa05a Sound license 2017-07-08 23:31:13 +02:00
5 changed files with 495 additions and 652 deletions

1124
LICENSE

File diff suppressed because it is too large Load Diff

View File

@ -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")

View File

@ -1,3 +1,4 @@
default
default?
mcl_core?
throwing
mobs?

View File

@ -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 = {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 452 KiB

After

Width:  |  Height:  |  Size: 386 KiB