12.8 KB
minetest-mod-throwing version 1.1-1~jan+unchanged1 (unchanged) vs.
minetest-mod-throwing version 1.1+git20200510.4c50e6b-1~jan+nus1 (fresh-snapshots)
12.7 KB
minetest-mod-throwing_1.1-1~jan+unchanged1_all.deb vs.
minetest-mod-throwing_1.1+git20200510.4c50e6b-1~jan+nus1_all.deb
452 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2020-04-02·15:48:12.000000·debian-binary1 -rw-r--r--···0········0········0········4·2020-04-02·15:48:12.000000·debian-binary
2 -rw-r--r--···0········0········0······772·2020-04-02·15:48:12.000000·control.tar.xz2 -rw-r--r--···0········0········0······788·2020-04-02·15:48:12.000000·control.tar.xz
3 -rw-r--r--···0········0········0·····7636·2020-04-02·15:48:12.000000·data.tar.xz3 -rw-r--r--···0········0········0·····7724·2020-04-02·15:48:12.000000·data.tar.xz
876 B
control.tar.xz
848 B
control.tar
411 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2020-04-02·15:48:12.000000·./1 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2020-04-02·15:48:12.000000·./
2 -rw-r--r--···0·root·········(0)·root·········(0)······571·2020-04-02·15:48:12.000000·./control2 -rw-r--r--···0·root·········(0)·root·········(0)······585·2020-04-02·15:48:12.000000·./control
3 -rw-r--r--···0·root·········(0)·root·········(0)······417·2020-04-02·15:48:12.000000·./md5sums3 -rw-r--r--···0·root·········(0)·root·········(0)······417·2020-04-02·15:48:12.000000·./md5sums
367 B
./control
    
Offset 1, 9 lines modifiedOffset 1, 9 lines modified
1 Package:·minetest-mod-throwing1 Package:·minetest-mod-throwing
2 Version:·1.1-1~jan+unchanged12 Version:·1.1+git20200510.4c50e6b-1~jan+nus1
3 Architecture:·all3 Architecture:·all
4 Maintainer:·Debian·Games·Team·<pkg-games-devel@lists.alioth.debian.org>4 Maintainer:·Debian·Games·Team·<pkg-games-devel@lists.alioth.debian.org>
5 Installed-Size:·305 Installed-Size:·30
6 Depends:·minetest·|·minetest-server6 Depends:·minetest·|·minetest-server
7 Suggests:·minetest-mod-throwing-arrows7 Suggests:·minetest-mod-throwing-arrows
8 Section:·games8 Section:·games
9 Priority:·optional9 Priority:·optional
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
11.3 KB
data.tar.xz
11.2 KB
data.tar
2.2 KB
file list
    
Offset 1, 14 lines modifiedOffset 1, 14 lines modified
1 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2020-04-02·15:48:12.000000·./1 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2020-04-02·15:48:12.000000·./
2 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2020-04-02·15:48:12.000000·./usr/2 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2020-04-02·15:48:12.000000·./usr/
3 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2020-04-02·15:48:12.000000·./usr/share/3 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2020-04-02·15:48:12.000000·./usr/share/
4 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2020-04-02·15:48:12.000000·./usr/share/doc/4 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2020-04-02·15:48:12.000000·./usr/share/doc/
5 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2020-04-02·15:48:12.000000·./usr/share/doc/minetest-mod-throwing/5 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2020-04-02·15:48:12.000000·./usr/share/doc/minetest-mod-throwing/
6 -rw-r--r--···0·root·········(0)·root·········(0)·····2836·2020-04-02·15:17:31.000000·./usr/share/doc/minetest-mod-throwing/README.md.gz6 -rw-r--r--···0·root·········(0)·root·········(0)·····2894·2020-04-02·15:48:12.000000·./usr/share/doc/minetest-mod-throwing/README.md.gz
7 -rw-r--r--···0·root·········(0)·root·········(0)······347·2020-04-02·15:48:12.000000·./usr/share/doc/minetest-mod-throwing/changelog.Debian.gz7 -rw-r--r--···0·root·········(0)·root·········(0)······376·2020-04-02·15:48:12.000000·./usr/share/doc/minetest-mod-throwing/changelog.Debian.gz
8 -rw-r--r--···0·root·········(0)·root·········(0)······415·2020-04-02·15:48:12.000000·./usr/share/doc/minetest-mod-throwing/copyright8 -rw-r--r--···0·root·········(0)·root·········(0)······415·2020-04-02·15:48:12.000000·./usr/share/doc/minetest-mod-throwing/copyright
9 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2020-04-02·15:48:12.000000·./usr/share/games/9 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2020-04-02·15:48:12.000000·./usr/share/games/
10 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2020-04-02·15:48:12.000000·./usr/share/games/minetest/10 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2020-04-02·15:48:12.000000·./usr/share/games/minetest/
11 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2020-04-02·15:48:12.000000·./usr/share/games/minetest/mods/11 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2020-04-02·15:48:12.000000·./usr/share/games/minetest/mods/
12 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2020-04-02·15:48:12.000000·./usr/share/games/minetest/mods/throwing/12 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2020-04-02·15:48:12.000000·./usr/share/games/minetest/mods/throwing/
13 -rw-r--r--···0·root·········(0)·root·········(0)····14056·2020-04-02·15:17:31.000000·./usr/share/games/minetest/mods/throwing/init.lua13 -rw-r--r--···0·root·········(0)·root·········(0)····14035·2020-04-02·15:48:12.000000·./usr/share/games/minetest/mods/throwing/init.lua
14 -rw-r--r--···0·root·········(0)·root·········(0)······154·2020-04-02·15:17:31.000000·./usr/share/games/minetest/mods/throwing/mod.conf14 -rw-r--r--···0·root·········(0)·root·········(0)······154·2020-04-02·15:48:12.000000·./usr/share/games/minetest/mods/throwing/mod.conf
5.0 KB
./usr/share/doc/minetest-mod-throwing/README.md.gz
4.9 KB
README.md
    
Offset 32, 23 lines modifiedOffset 32, 23 lines modified
32 throwing.toolranks·=·true32 throwing.toolranks·=·true
33 ```33 ```
  
34 ###·Trajectory·parameters34 ###·Trajectory·parameters
  
35 By·default,·the·trajectory·of·the·arrow·is·a·simple·parabola.·You·can·set·the·vertical·acceleration·(acceleration·of·gravity)·using·`throwing.vertical_acceleration`.35 By·default,·the·trajectory·of·the·arrow·is·a·simple·parabola.·You·can·set·the·vertical·acceleration·(acceleration·of·gravity)·using·`throwing.vertical_acceleration`.
  
36 If·you·want·a·more·realistic·trajectory·that·uses·a·first-order·modelling·of·air·friction,·you·can·set·`throwing.realistic_trajectory`·to·true.·In·this·mode,·`throwing.frictional_coefficient`·indicates·the·ratio·between·the·friction·force·on·the·arrow·and·its·velocity.·It·should·be·negative.·The·acceleration·of·the·arrow·is·subsequently·determined·by·dividing·the·force·by·the·"mass"·of·the·arrow,·the·reference·mass·of·1·being·the·mass·of·a·simple·steel·arrow.·Generally,·the·frictional·coefficient·should·be·quite·small;·a·value·of·-1·will·already·drastically·shorten·the·range·of·the·arrow.·The·default·is·-0.5.36 If·you·want·a·more·realistic·trajectory·that·uses·a·first-order·modelling·of·air·friction,·you·can·set·`throwing.realistic_trajectory`·to·true.·In·this·mode,·`throwing.frictional_coefficient`·indicates·the·ratio·between·the·friction·force·on·the·arrow·and·its·velocity.·It·should·be·negative.·The·acceleration·of·the·arrow·is·subsequently·determined·by·dividing·the·force·by·the·"mass"·of·the·arrow,·the·reference·mass·of·1·being·the·mass·of·the·steel·arrow·in·`throwing_arrows`.·Generally,·the·frictional·coefficient·should·be·quite·small;·a·value·of·-1·will·already·drastically·shorten·the·range·of·the·arrow.·The·default·is·-0.5.
  
37 ###·Initial·velocity·computation37 ###·Initial·velocity·computation
  
38 The·mod·provides·three·modes·to·compute·the·initial·speed·of·an·arrow:·simple,·strength·or·strengthmass.38 The·mod·provides·three·modes·to·compute·the·initial·velocity·of·an·arrow·after·it·is·shot:·simple,·strength·and·momentum.
  
39 In·simple·mode,·the·initial·velocity·of·the·arrow·is·always·the·same.·The·`throwing.velocity_factor`·contains·the·value·of·this·velocity.39 In·simple·mode,·the·initial·velocity·of·the·arrow·is·always·the·same.·The·value·of·this·velocity·is·controlled·by·the·`throwing.velocity_factor`·setting,·which·defaults·to·19.
  
40 In·strength·mode·(the·default),·the·initial·velocity·of·the·arrow·only·depends·on·the·bow·that·is·used---the·more·expensive·the·bow,·the·faster·the·arrow.·The·arrow·strength·is·multiplied·by·the·velocity·factor·to·compute·the·speed·of·the·arrow,·an·arrow·strength·of·1·is·about·the·strength·of·the·steel·bow·in·`throwing_arrows`.40 In·strength·mode·(the·default),·the·initial·velocity·of·the·arrow·only·depends·on·the·bow·that·is·used---the·more·expensive·the·bow,·the·faster·the·arrow.·The·bow·strength·is·multiplied·by·the·velocity·factor·to·compute·the·speed·of·the·arrow.·For·reference,·the·steel·bow·in·`throwing_arrows`·has·a·strength·of·about·1.
  
41 Finally,·momentum·mode·is·the·most·realistic.·It·computes·the·velocity·of·the·arrow·based·on·the·bow·strength,·as·in·the·strength·mode,·and·on·the·mass·of·the·arrow:·the·heavier·the·arrow,·the·slower·it·will·be·shot.·It·is·called·the·momentum·mode·because,·in·this·mode,·the·strength·of·a·bow·indicates·the·initial·momentum·of·the·arrow·rather·than·its·initial·speed.41 Finally,·momentum·mode·is·the·most·realistic.·It·computes·the·velocity·of·the·arrow·based·on·the·bow·strength,·as·in·the·strength·mode,·and·on·the·mass·of·the·arrow:·the·heavier·the·arrow,·the·slower·it·will·be·shot.·It·is·called·the·momentum·mode·because,·in·this·mode,·the·strength·of·a·bow·indicates·the·initial·momentum·of·the·arrow·rather·than·its·initial·speed.
  
42 ##·API42 ##·API
  
43 There·are·two·available·functions·in·the·mod·API:43 There·are·two·available·functions·in·the·mod·API:
44 ```lua44 ```lua
Offset 72, 14 lines modifiedOffset 72, 15 lines modified
72 ··*·throw_itself·(optional):·whether·the·bow·should·throw·itself·instead·of·the·arrow·next·to·it·in·the·inventory.72 ··*·throw_itself·(optional):·whether·the·bow·should·throw·itself·instead·of·the·arrow·next·to·it·in·the·inventory.
73 ····The·default·is·false.73 ····The·default·is·false.
74 ··*·cooldown:·bow·cooldown.·Default·is·setting·throwing.bow_cooldown74 ··*·cooldown:·bow·cooldown.·Default·is·setting·throwing.bow_cooldown
75 ··*·function·spawn_arrow_entity(position,·arrow,·player):·defaults·to·throwing.spawn_arrow_entity75 ··*·function·spawn_arrow_entity(position,·arrow,·player):·defaults·to·throwing.spawn_arrow_entity
76 ··*·sound:·sound·to·be·played·when·the·bow·is·used76 ··*·sound:·sound·to·be·played·when·the·bow·is·used
77 ··*·delay:·delay·before·throwing·the·arrow77 ··*·delay:·delay·before·throwing·the·arrow
78 ··*·no_toolranks:·If·true,·toolranks·support·is·disabled·for·this·item.·Defaults·to·false.78 ··*·no_toolranks:·If·true,·toolranks·support·is·disabled·for·this·item.·Defaults·to·false.
 79 ··*·strength:·strength·of·the·bow,·see·above.·Defaults·to·1.
79 ]]80 ]]
  
80 --·Example:81 --·Example:
81 throwing.register_bow("bow_wood",·{82 throwing.register_bow("bow_wood",·{
82 »       itemcraft·=·"default:wood",83 »       itemcraft·=·"default:wood",
83 »       description·=·"Wooden·Bow",84 »       description·=·"Wooden·Bow",
84 »       texture·=·"throwing_bow_wood.png"85 »       texture·=·"throwing_bow_wood.png"
Offset 89, 14 lines modifiedOffset 90, 15 lines modified
89 function·throwing.register_arrow(name,·definition·table)90 function·throwing.register_arrow(name,·definition·table)
90 --[[91 --[[
91 Name:·Arrow·name.·If·it·doesn't·contain·":",·the·"throwing:"·prefix·will·be·added.92 Name:·Arrow·name.·If·it·doesn't·contain·":",·the·"throwing:"·prefix·will·be·added.
92 Definition:·definition·table,·containing:93 Definition:·definition·table,·containing:
93 ··*·tiles·(essential):·tiles·of·the·arrow.94 ··*·tiles·(essential):·tiles·of·the·arrow.
94 ··*·target·(optional,·defaulting·to·throwing.target_both):·what·the·arrow·is·able·to·hit·(throwing.target_node,·throwing.target_object,·throwing.target_both).95 ··*·target·(optional,·defaulting·to·throwing.target_both):·what·the·arrow·is·able·to·hit·(throwing.target_node,·throwing.target_object,·throwing.target_both).
95 ··*·allow_protected·(optional,·defaulting·to·false):·whether·the·arrow·can·be·throw·in·a·protected·area96 ··*·allow_protected·(optional,·defaulting·to·false):·whether·the·arrow·can·be·throw·in·a·protected·area
 97 ··*·mass·(optional,·defaulting·to·1):·the·mass·of·the·arrow·(see·above)
96 ··*·on_hit_sound·(optional):·sound·played·when·the·arrow·hits·a·node·or·an·object.98 ··*·on_hit_sound·(optional):·sound·played·when·the·arrow·hits·a·node·or·an·object.
97 ··*·on_hit(self,·pos,·last_pos,·node,·object,·hitter,·data)·(optional·but·very·useful):·callback·function:99 ··*·on_hit(self,·pos,·last_pos,·node,·object,·hitter,·data)·(optional·but·very·useful):·callback·function:
98 ····-·pos:·the·position·of·the·hit·node·or·object.100 ····-·pos:·the·position·of·the·hit·node·or·object.
99 ····-·last_pos:·the·last·air·node·where·the·arrow·was101 ····-·last_pos:·the·last·air·node·where·the·arrow·was
100 ····-·node·and·object:·hit·node·or·object.·Either·node·or·object·is·nil,·depending102 ····-·node·and·object:·hit·node·or·object.·Either·node·or·object·is·nil,·depending
101 ······whether·the·arrow·hit·a·node·or·an·object.103 ······whether·the·arrow·hit·a·node·or·an·object.
102 ····-·hitter:·an·ObjectRef·to·the·thrower·player.104 ····-·hitter:·an·ObjectRef·to·the·thrower·player.
714 B
./usr/share/doc/minetest-mod-throwing/changelog.Debian.gz
600 B
changelog.Debian
    
Offset 1, 12 lines modifiedOffset 1, 13 lines modified
1 minetest-mod-throwing·(1.1-1~jan+unchanged1)·unchanged;·urgency=medium1 minetest-mod-throwing·(1.1+git20200510.4c50e6b-1~jan+nus1)·fresh-snapshots;·urgency=medium
  
 2 ··*·New·upstream·snapshot.
2 ··*·Build·for·debian-janitor·apt·repository.3 ··*·Build·for·debian-janitor·apt·repository.
  
3 ·--·Debian·Janitor·<janitor@jelmer.uk>··Mon,·06·Jul·2020·03:34:45·+00004 ·--·Debian·Janitor·<janitor@jelmer.uk>··Mon,·06·Jul·2020·03:32:34·+0000
  
4 minetest-mod-throwing·(1.1-1)·unstable;·urgency=medium5 minetest-mod-throwing·(1.1-1)·unstable;·urgency=medium
  
5 ··*·New·upstream·release.6 ··*·New·upstream·release.
  
6 ·--·Julien·Puydt·<jpuydt@debian.org>··Thu,·02·Apr·2020·17:36:37·+02007 ·--·Julien·Puydt·<jpuydt@debian.org>··Thu,·02·Apr·2020·17:36:37·+0200
  
3.32 KB
./usr/share/games/minetest/mods/throwing/init.lua
    
Offset 105, 21 lines modifiedOffset 105, 15 lines modified
105 »       apply_realistic_acceleration(obj,·luaentity.mass)105 »       apply_realistic_acceleration(obj,·luaentity.mass)
  
106 »       if·luaentity.on_throw_sound·~=·""·then106 »       if·luaentity.on_throw_sound·~=·""·then
107 »       »       minetest.sound_play(luaentity.on_throw_sound·or·"throwing_sound",·{pos=playerpos,·gain·=·0.5})107 »       »       minetest.sound_play(luaentity.on_throw_sound·or·"throwing_sound",·{pos=playerpos,·gain·=·0.5})
108 »       end108 »       end
  
109 »       if·not·minetest.settings:get_bool("creative_mode")·then109 »       if·not·minetest.settings:get_bool("creative_mode")·then
110 »       »       if·new_stack·then 
111 »       »       »       inventory:set_stack("main",·arrrow_index,·new_stack)110 »       »       inventory:set_stack("main",·arrow_index,·new_stack)
112 »       »       else 
113 »       »       »       local·stack·=·inventory:get_stack("main",·arrow_index) 
114 »       »       »       stack:take_item() 
115 »       »       »       inventory:set_stack("main",·arrow_index,·stack) 
116 »       »       end 
117 »       end111 »       end
  
118 »       return·true112 »       return·true
119 end113 end
  
120 function·throwing.arrow_step(self,·dtime)114 function·throwing.arrow_step(self,·dtime)
121 »       if·not·self.timer·or·not·self.player·then115 »       if·not·self.timer·or·not·self.player·then
Offset 199, 16 lines modifiedOffset 193, 17 lines modified
199 »       »       »       end193 »       »       »       end
200 »       »       end194 »       »       end
  
201 »       »       --·Toolranks·support:·update·bow·uses195 »       »       --·Toolranks·support:·update·bow·uses
202 »       »       if·self.toolranks·then196 »       »       if·self.toolranks·then
203 »       »       »       local·inventory·=·player:get_inventory()197 »       »       »       local·inventory·=·player:get_inventory()
204 »       »       »       --·Check·that·the·player·did·not·move·the·bow198 »       »       »       --·Check·that·the·player·did·not·move·the·bow
205 »       »       »       if·inventory:get_stack("main",·self.toolranks.index):get_name()·==·self.toolranks.itemstack:get_name()·then199 »       »       »       local·current_stack·=·inventory:get_stack("main",·self.toolranks.index)
 200 »       »       »       if·current_stack:get_name()·==·self.toolranks.name·then
206 »       »       »       »       local·new_itemstack·=·toolranks.new_afteruse(self.toolranks.itemstack,·player,·nil,·{wear·=·self.toolranks.wear})201 »       »       »       »       local·new_itemstack·=·toolranks.new_afteruse(current_stack,·player,·nil,·{wear·=·self.toolranks.wear})
207 »       »       »       »       inventory:set_stack("main",·self.toolranks.index,·new_itemstack)202 »       »       »       »       inventory:set_stack("main",·self.toolranks.index,·new_itemstack)
208 »       »       »       end203 »       »       »       end
209 »       »       end204 »       »       end
210 »       end205 »       end
  
211 »       --·Collision·with·a·node206 »       --·Collision·with·a·node
212 »       if·node.name·==·"ignore"·then207 »       if·node.name·==·"ignore"·then
Offset 397, 42 lines modifiedOffset 392, 50 lines modified
397 »       »       »       minetest.sound_play(def.sound,·{to_player=user:get_player_name()})392 »       »       »       minetest.sound_play(def.sound,·{to_player=user:get_player_name()})
398 »       »       end393 »       »       end
  
399 »       »       meta:set_int("delay",·os.time()·+·(def.delay·or·0))394 »       »       meta:set_int("delay",·os.time()·+·(def.delay·or·0))
400 »       »       minetest.after(def.delay·or·0,·function()395 »       »       minetest.after(def.delay·or·0,·function()
401 »       »       »       --·Re-check·that·the·arrow·can·be·thrown.·Overwrite·the·new_stack396 »       »       »       --·Re-check·that·the·arrow·can·be·thrown.·Overwrite·the·new_stack
402 »       »       »       local·old_new_stack·=·new_stack397 »       »       »       local·old_new_stack·=·new_stack
  
 398 »       »       »       local·arrow_stack·=·user:get_inventory():get_stack("main",·arrow_index)
  
403 »       »       »       res,·new_stack·=·def.allow_shot(user,·user:get_inventory():get_stack("main",·arrow_index),·arrow_index,·true)399 »       »       »       res,·new_stack·=·def.allow_shot(user,·arrow_stack,·arrow_index,·true)
 400 »       »       »       if·not·res·then
 401 »       »       »       »       return
 402 »       »       »       end
  
404 »       »       »       if·not·new_stack·then403 »       »       »       if·not·new_stack·then
405 »       »       »       »       new_stack·=·old_new_stack404 »       »       »       »       new_stack·=·old_new_stack
406 »       »       »       end405 »       »       »       end
407 »       »       »       if·not·res·then406 »       »       »       if·not·new_stack·then
408 »       »       »       »       return407 »       »       »       »       arrow_stack:take_item()
 408 »       »       »       »       new_stack·=·arrow_stack
409 »       »       »       end409 »       »       »       end
  
410 »       »       »       --·Shoot·arrow410 »       »       »       --·Shoot·arrow
411 »       »       »       local·uses·=·65535·/·(def.uses·or·50)411 »       »       »       local·uses·=·65535·/·(def.uses·or·50)
412 »       »       »       local·toolranks_data412 »       »       »       local·toolranks_data
413 »       »       »       if·enable_toolranks·then413 »       »       »       if·enable_toolranks·then
414 »       »       »       »       toolranks_data·=·{414 »       »       »       »       toolranks_data·=·{
415 »       »       »       »       »       itemstack·=·itemstack,415 »       »       »       »       »       name·=·itemstack:get_name(),
416 »       »       »       »       »       index·=·bow_index,416 »       »       »       »       »       index·=·bow_index,
417 »       »       »       »       »       wear·=·uses417 »       »       »       »       »       wear·=·uses
418 »       »       »       »       }418 »       »       »       »       }
419 »       »       »       end419 »       »       »       end
420 »       »       »       if·shoot_arrow(def,·toolranks_data,·user,·bow_index,·def.throw_itself,·new_stack)·then420 »       »       »       if·shoot_arrow(def,·toolranks_data,·user,·bow_index,·def.throw_itself,·new_stack)·then
421 »       »       »       »       if·not·minetest.settings:get_bool("creative_mode")·then421 »       »       »       »       if·not·minetest.settings:get_bool("creative_mode")·then
422 »       »       »       »       »       itemstack:add_wear(uses)422 »       »       »       »       »       itemstack:add_wear(uses)
423 »       »       »       »       end423 »       »       »       »       end
424 »       »       »       end424 »       »       »       end
  
  
425 »       »       »       if·def.throw_itself·then425 »       »       »       if·def.throw_itself·then
426 »       »       »       »       --·This·is·a·bug.·If·we·return·ItemStack(nil),·the·player·punches·the·entity,426 »       »       »       »       --·This·is·a·bug.·If·we·return·ItemStack(nil),·the·player·punches·the·entity,
427 »       »       »       »       --·and·if·the·entity·if·a·__builtin:item,·it·gets·back·to·his·inventory.427 »       »       »       »       --·and·if·the·entity·is·a·__builtin:item,·it·gets·back·to·his·inventory.
428 »       »       »       »       minetest.after(0.1,·function()428 »       »       »       »       minetest.after(0.1,·function()
429 »       »       »       »       »       user:get_inventory():remove_item("main",·itemstack)429 »       »       »       »       »       user:get_inventory():remove_item("main",·itemstack)
430 »       »       »       »       end)430 »       »       »       »       end)
431 »       »       »       elseif·cooldown·>·0·then431 »       »       »       elseif·cooldown·>·0·then
432 »       »       »       »       meta:set_int("cooldown",·os.time()·+·cooldown)432 »       »       »       »       meta:set_int("cooldown",·os.time()·+·cooldown)
433 »       »       »       end433 »       »       »       end
434 »       »       »       user:get_inventory():set_stack("main",·bow_index,·itemstack)434 »       »       »       user:get_inventory():set_stack("main",·bow_index,·itemstack)