[Mod] Throwing [0.13] [throwing]

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

by Jeija » Sun Jan 01, 2012 21:55

You're right Tsumiman! Thanks for reporting. Anyway, these lines of code are just to make sure that the arrow doesn't remove itself. This bug shouldn't matter.
Redstone for minetest: Mesecons (mesecons.net)
 

User avatar
Jordach
Member
 
Posts: 4523
Joined: Mon Oct 03, 2011 17:58
Location: Blender Scene
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Mon Jan 02, 2012 00:57

I am going to say this once, celeron and kahrl are doing the C++ and not you. However, this is not the point. Don't fight over code. This mod works, leave it there and, wait for 0.4 to go release. Then the LUA will be done.
viewtopic.php?f=10&t=19056 Solar Plains Dev Server
 

User avatar
Calinou
Moderator
 
Posts: 3156
Joined: Mon Aug 01, 2011 14:26
Location: Troyes, France
GitHub: Calinou
IRC: Calinou
In-game: Calinou

by Calinou » Mon Jan 02, 2012 01:00

I like this mod, however the bow item texture should probably be flipped around (it looks weird in hand).
 

User avatar
MrThebuilder3
Member
 
Posts: 104
Joined: Sat Nov 19, 2011 18:26
 

User avatar
xyz
Member
 
Posts: 450
Joined: Thu Nov 10, 2011 14:25

by xyz » Mon Jan 02, 2012 05:26

Hackeridze, успокойся, пожалуйста.
Just something to stop everybody arguing:
Code: Select all
     // EnvRef:add_entity(pos, entityname)
     // pos = {x=num, y=num, z=num}
     static int l_add_entity(lua_State *L)
     {   
         //infostream<<"EnvRef::l_add_entity()"<<std::endl;
         EnvRef *o = checkobject(L, 1);
         ServerEnvironment *env = o->m_env;
         if(env == NULL) return 0;
         // pos
         v3f pos = readFloatPos(L, 2);
         // content
         const char *name = luaL_checkstring(L, 3);
         // Do it
         ServerActiveObject *obj = new LuaEntitySAO(env, pos, name, "");
         env->addActiveObject(obj);
         // Return created entity
         objectref_get_or_create(L, obj);
         return 1;
     }

Replace your l_add_entity in scriptapi.cpp with this and it will return objectref (not entity, but its .object property). I already use it in my seasons mod (latest version that is not published now) and catapults mod. Of course, this should be somehow improved to return entity rather that object.
 

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

by Jeija » Mon Jan 02, 2012 06:40

I know this fix, i suppose it was sapier who posted it. But I would better like to wait until celeron adds this upstream. As I said, Idon't want that many dependencies for my source. I think its annoying to have to recompile the code when installing a mod. And for now, the get-objects-in.radius thing works fine.
Anyway, thanks for posting it!
Cheers, Jeija
Last edited by Jeija on Mon Jan 02, 2012 06:41, edited 1 time in total.
Redstone for minetest: Mesecons (mesecons.net)
 

User avatar
xyz
Member
 
Posts: 450
Joined: Thu Nov 10, 2011 14:25

by xyz » Mon Jan 02, 2012 08:07

Jeija wrote:I know this fix, i suppose it was sapier who posted it. But I would better like to wait until celeron adds this upstream. As I said, Idon't want that many dependencies for my source. I think its annoying to have to recompile the code when installing a mod. And for now, the get-objects-in.radius thing works fine.
Anyway, thanks for posting it!
Cheers, Jeija

I think many big mods will depend on this thing. get-objects-in-radius is still more hacky than using patch. Also, patch will be used only on server. Anyway, that is your choose :)
 

User avatar
darket
Member
 
Posts: 34
Joined: Sun Nov 27, 2011 10:35
Location: Russian

by darket » Mon Jan 02, 2012 09:43

16:42:41: ERROR[ServerThread]: ERROR: An unhandled exception occurred: LuaError: error: ...-20111209-1-win32\bin\..\data\mods\throwing\init.lua:25: attempt to call method 'get_look_dir' (a nil value)
16:42:41: ERROR[ServerThread]: stack traceback:
 

User avatar
sfan5
Moderator
 
Posts: 3800
Joined: Wed Aug 24, 2011 09:44
Location: Germany
GitHub: sfan5
IRC: sfan5

by sfan5 » Mon Jan 02, 2012 09:51

darket wrote:16:42:41: ERROR[ServerThread]: ERROR: An unhandled exception occurred: LuaError: error: ...-20111209-1-win32\bin\..\data\mods\throwing\init.lua:25: attempt to call method 'get_look_dir' (a nil value)
16:42:41: ERROR[ServerThread]: stack traceback:

You need to build from Source
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
darket
Member
 
Posts: 34
Joined: Sun Nov 27, 2011 10:35
Location: Russian

by darket » Mon Jan 02, 2012 11:56

I can not compile (
 

User avatar
xyz
Member
 
Posts: 450
Joined: Thu Nov 10, 2011 14:25

by xyz » Mon Jan 02, 2012 13:05

Okay, this patch was added to upstream. Please, modify your mod =)
 

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

by Jeija » Mon Jan 02, 2012 15:45

Thank you, celeron55!! (or the person who told him to do so).
This is not the only mod I have to change now ^^
Redstone for minetest: Mesecons (mesecons.net)
 

User avatar
MrThebuilder3
Member
 
Posts: 104
Joined: Sat Nov 19, 2011 18:26
 

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

by Jeija » Wed Jan 04, 2012 08:17

Published V 0.12; MrThebuilder3's textures are default now. New minetest version that returns the objref is used. Arrows are removed after having shot a mob or a player. Arrows can kill multiple objects at the same position.
Bug: arrows can also remove items, because they are objects. Does someone have a fix for that?
Last edited by Jeija on Wed Jan 04, 2012 08:17, edited 1 time in total.
Redstone for minetest: Mesecons (mesecons.net)
 

User avatar
dannydark
Member
 
Posts: 428
Joined: Fri Aug 12, 2011 21:28
Location: Manchester, UK

by dannydark » Wed Jan 04, 2012 08:32

Jeija wrote:Published V 0.12; MrThebuilder3's textures are default now. New minetest version that returns the objref is used. Arrows are removed after having shot a mob or a player. Arrows can kill multiple objects at the same position.
Bug: arrows can also remove items, because they are objects. Does someone have a fix for that?


hmmm, maybe we need a new parameter for objects that would allow you to determine if an object was a mob or not maybe just a simple "mob = 1" or something else like "object_type = mob" if the 2nd option was used we could then also give crops "object_type = plant" or something so then the /clearobjects command could be extended to only clear objects of a certain type.

i.e. just clear all mobs ("/clearobjects mob" maybe) which wouldn't clear peoples crops ^_^
 

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

by Jeija » Wed Jan 04, 2012 08:45

That would be great!
+1 for the idea
Redstone for minetest: Mesecons (mesecons.net)
 

User avatar
sfan5
Moderator
 
Posts: 3800
Joined: Wed Aug 24, 2011 09:44
Location: Germany
GitHub: sfan5
IRC: sfan5

by sfan5 » Wed Jan 04, 2012 16:26

dannydark wrote:
Jeija wrote:Published V 0.12; MrThebuilder3's textures are default now. New minetest version that returns the objref is used. Arrows are removed after having shot a mob or a player. Arrows can kill multiple objects at the same position.
Bug: arrows can also remove items, because they are objects. Does someone have a fix for that?


hmmm, maybe we need a new parameter for objects that would allow you to determine if an object was a mob or not maybe just a simple "mob = 1" or something else like "object_type = mob" if the 2nd option was used we could then also give crops "object_type = plant" or something so then the /clearobjects command could be extended to only clear objects of a certain type.

i.e. just clear all mobs ("/clearobjects mob" maybe) which wouldn't clear peoples crops ^_^

+1
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)
 

Zarberman
Member
 
Posts: 24
Joined: Mon Dec 19, 2011 16:38

by Zarberman » Thu Jan 05, 2012 19:16

could you please post it in .zip format
my website (still in testing) www.gameri.webs.com
 

User avatar
Hackeridze
Member
 
Posts: 310
Joined: Thu Nov 03, 2011 13:35

by Hackeridze » Thu Jan 05, 2012 21:33

Zarberman wrote:could you please post it in .zip format

ZIP is very bad.
My game: RTMG
GENTOO USER
 

Zarberman
Member
 
Posts: 24
Joined: Mon Dec 19, 2011 16:38

by Zarberman » Thu Jan 05, 2012 21:39

well my computer will not let me install any file extractors so .zip files are the only ones i can use.
my website (still in testing) www.gameri.webs.com
 

User avatar
MrThebuilder3
Member
 
Posts: 104
Joined: Sat Nov 19, 2011 18:26

by MrThebuilder3 » Thu Jan 05, 2012 21:50

Zarberman wrote:well my computer will not let me install any file extractors so .zip files are the only ones i can use.

http://www.mediafire.com/?5tpkmud8kjf0ckx
( i hopeyou don't mind, jeija)
 

User avatar
Hackeridze
Member
 
Posts: 310
Joined: Thu Nov 03, 2011 13:35

by Hackeridze » Thu Jan 05, 2012 21:58

Zarberman wrote:well my computer will not let me install any file extractors so .zip files are the only ones i can use.

TAR.GZ is not extractor. Use linux. Anyway -- http://en.wikipedia.org/wiki/Tar_%28file_format%29
My game: RTMG
GENTOO USER
 

Zarberman
Member
 
Posts: 24
Joined: Mon Dec 19, 2011 16:38

by Zarberman » Thu Jan 05, 2012 22:20

i dont have a mac or linux and i cant install programs because my computer will not let me so i need .zip
Last edited by Zarberman on Thu Jan 05, 2012 22:20, edited 1 time in total.
my website (still in testing) www.gameri.webs.com
 

User avatar
MrThebuilder3
Member
 
Posts: 104
Joined: Sat Nov 19, 2011 18:26

by MrThebuilder3 » Thu Jan 05, 2012 22:36

sigh i repacked it as an zip for you ^
 

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

by Jeija » Fri Jan 06, 2012 05:17

No problem, thx for repacking. I just wasn't there yesterday so that I couldn't do that.
Redstone for minetest: Mesecons (mesecons.net)
 

PreviousNext

Return to Old Mods



Who is online

Users browsing this forum: No registered users and 1 guest