Mircea Kitsune [Sun, 30 Oct 2011 09:46:21 +0000 (11:46 +0200)]
Update object owner nickname when using the object_claim command. This can also be used to update your name on an object if you already own it, but changed your nickname since creating it.
Mircea Kitsune [Sun, 30 Oct 2011 09:37:16 +0000 (11:37 +0200)]
Store object information about creation and owner. Objects can now report the name of their owner, their creation date, their last edit date, and the date the creator last went to the bathroom. Joking about the first three ;)
Mircea Kitsune [Sat, 29 Oct 2011 21:16:22 +0000 (00:16 +0300)]
Revert my last commit. I forgot you can edit one property of an object without changing the other, so setDependent does not make sense and gets in the way
Mircea Kitsune [Sat, 29 Oct 2011 20:42:47 +0000 (23:42 +0300)]
To make things even more fun, make the default clipboard cvar seta instead of set. Now even if you restart Xonotic, you can paste your last copied object in the world :)
Mircea Kitsune [Sat, 29 Oct 2011 19:57:00 +0000 (22:57 +0300)]
Second part of my last commit, clipboard functional again. Objects are now pasted from the specified client cvar. For real men: You can also use the object_paste command to spawn an object from the console, by writing each property manually. I challenge your mental strength >:)
Mircea Kitsune [Sat, 29 Oct 2011 19:51:44 +0000 (22:51 +0300)]
And now for something a little different: No longer use a string for the clipboard, but a client-side cvar. This offers many new possibilities... such as multiple clipboards, object presets and shortcuts, exporting objects and posting them online (forum, twitter, etc), and using the clipboard between servers. eg: Say you see an object you can copy, and wanna put it on your server. Just copy it from the Sandbox menu, disconnect, connect to your server, and paste. Your object will be there :)
Mircea Kitsune [Sat, 29 Oct 2011 16:08:19 +0000 (19:08 +0300)]
Re-implement remembering of old movetype for objects, and also persist it in storage. For example: If you set an object to MOVETYPE_PHYSICAL, attach it to another object (during which it becomes MOVETYPE_FOLLOW), restart the server, then go back and detach the object, it will know to go back to MOVETYPE_PHYSICAL. This does not add any extra info, as movetype was already added to the storage for child objects, and was useless before this.
Mircea Kitsune [Sat, 29 Oct 2011 13:35:24 +0000 (16:35 +0300)]
Storage save: Persist all strings between quotation marks. This allows models, materials, and bones with spaces in their names to be persisted properly
Mircea Kitsune [Sat, 29 Oct 2011 13:16:59 +0000 (16:16 +0300)]
Detach objects at exactly the same origin, not the origin of the parent. Angles however are reset to the parent's, so that detached objects don't spin or roll
Mircea Kitsune [Sat, 29 Oct 2011 11:05:55 +0000 (14:05 +0300)]
New functionality for g_sandbox_editor_free. 0 = players can only copy or edit their own objects, 1 = players can copy but not edit other objects, 2 = players can copy and edit all object. Default is now 1 (you can duplicate other people's objects but not edit them).
Mircea Kitsune [Sat, 29 Oct 2011 10:59:06 +0000 (13:59 +0300)]
Name the info command "mesh", and allow it to list both model, andimation frame, and tags. People can then know the model and frame of any object, which can be helpful with building
Mircea Kitsune [Fri, 28 Oct 2011 23:26:32 +0000 (02:26 +0300)]
Get storage loading to use arrays too. Attached objects will be saved in storage, but object can also be copied / pasted with their attachments now. Bones are not saved yet, and will be done tomorrow
Mircea Kitsune [Fri, 28 Oct 2011 23:09:41 +0000 (02:09 +0300)]
At the expense of the developer's sanity, get the save system working with arrays. Also fix a code typo that was always there, making the storage get saved each frame. By default, storage is saved every 5 seconds
Mircea Kitsune [Fri, 28 Oct 2011 20:54:39 +0000 (23:54 +0300)]
Add a code comment about how the string works. Clipboard and database seem to be fully functional now. divVerent won't let me tokenize tokens though, so I need to change implementation to something less hackish.
Mircea Kitsune [Fri, 28 Oct 2011 19:49:02 +0000 (22:49 +0300)]
Attempt to persist attached objects in storage and clipboard, part 1: Store child objects in the same line as their parent object. Objects are separated by the ; symbol.
Mircea Kitsune [Fri, 28 Oct 2011 19:09:34 +0000 (22:09 +0300)]
Don't allow attaching to attachments, for obvious reasons. Also don't persist the movetype of attachments, as it will not work with that I'm going to implement next (restore default physics when detaching an object)
Mircea Kitsune [Fri, 28 Oct 2011 15:48:57 +0000 (18:48 +0300)]
Add a name cvar for storage. That way, people can select between multiple storages. If * is that cvar, storage files are named sandbox/storage_*_mapname.txt
Mircea Kitsune [Fri, 28 Oct 2011 15:01:59 +0000 (18:01 +0300)]
Remove debug code. Saving and loading from text files should be fully functional now. When starting the same map, you will find your objects just as you left them :)
Mircea Kitsune [Fri, 28 Oct 2011 13:51:14 +0000 (16:51 +0300)]
Basic implementation for reading sandbox storage files. Currently, it just prints each line to the console. Also add an autoload cvar, which will make objects be automatically loaded at startup
Mircea Kitsune [Fri, 28 Oct 2011 12:58:27 +0000 (15:58 +0300)]
First part of storing objects to text files, using the autosave feature. Not working properly yet. I also don't know how I'm gonna store attachments to this =(
Mircea Kitsune [Thu, 27 Oct 2011 21:47:28 +0000 (00:47 +0300)]
Divide sandbox messages in three categories, and color each accordingly: INFO (tells unimportant stuff to the player), WARNING (tells important stuff to the player) and server (information about spawned objects printed to the server when g_sandbox_info is enabled)
Mircea Kitsune [Thu, 27 Oct 2011 21:09:09 +0000 (00:09 +0300)]
New command: claim_object. If the player has edit rights over an object (either free editing is enabled, or the object was spawned by a player without an UID), the player can claim the object as his with this command.
Mircea Kitsune [Thu, 27 Oct 2011 20:52:22 +0000 (23:52 +0300)]
Unfortunately, my previous change makes it impossible to track the object count of each player. Therefore, turn the object limit into a global float, and default it to 1000. My only concern about this is that a griefer can spawn objects up to the limit, and prevent other players from building on the server due to that. Not an urgent problem, but to be given thought.
Mircea Kitsune [Thu, 27 Oct 2011 20:46:01 +0000 (23:46 +0300)]
Since objects are going to be persisted, no longer set the owner as an entity. Object owner is set via player UID (key_0.d0si file). If the player does not have a valid UID, his objects are spawned without an owner, and therefore can be edited by anyone (even if g_sandbox_editor_free is disabled).
Mircea Kitsune [Thu, 27 Oct 2011 19:38:48 +0000 (22:38 +0300)]
Don't hard code materials. This will allow server admins to create their own materials only by adding particles and sounds, without having to recompile the code. This commit breaks functionality for now
Mircea Kitsune [Thu, 27 Oct 2011 17:07:26 +0000 (20:07 +0300)]
Increase / decrease the object count of the owner, not of the person spawning / removing objects. As later on, we might have support for removing objects using other means.
Mircea Kitsune [Thu, 27 Oct 2011 13:23:33 +0000 (16:23 +0300)]
Fix detaching of objects. Attached objects are no longer traced (and would be impossible to edit), so the detach function addresses the parent instead. When used, all objects attached to it get detached.