Commit Graph
77 Commits
Author SHA1 Message Date
RickoffandGitHub 397dd85d55 Update commandHandler.lua (#122) 2022-10-20 23:01:07 +03:00
David Cernat a27fe04f4d [CommandHandler] Fix /setattr and /setskill 2022-05-01 02:55:23 +03:00
NkfreeandGitHub fdf5b3f966 Customize logicHandler.CreateObjects functions to take into account object's properties such as count, charge (if the packetType is equal to "place") (#97)
logicHandler.CreateObjectsAtPlayer and logicHandler.CreateObjectAtLocation both take objectData table instead of plain refId.

objectData can be built using added method BuildObjectData in dataTableBuilder.lua

This way any amount of say gold can be spawned easily.

For backwards compatibility it's possible to replace argument refId in either logicHandler.CreateObjectAtPlayer or logicHandler.CreateObjectAtLocation with dataTableBuilder.BuildObjectData(refId)
2022-02-09 22:49:42 +02:00
David Cernat 7a10bea666 [CommandHandler] Fix /setattr and /setskill 2021-10-16 02:42:44 +02:00
David Cernat 9cc8aa44e7 [General] Implement handling of game setting records
Add and use unplaceableRecordTypes table in config.lua
2021-07-18 11:47:00 +02:00
David Cernat a6ba7e4360 [General] Add and use timestamps table for players 2020-11-14 04:19:18 +02:00
David Cernat cfffb0b9eb [General] Always use tableHelper's deepCopy() instead of shallowCopy() 2020-02-24 21:47:34 +02:00
David Cernat 78c537af51 [CommandHandler] Use correct message for actors interacting with objects 2019-12-13 14:31:59 +02:00
David Cernat 611d7dbd19 [General] Implement handling of body part records 2019-11-29 14:07:39 +02:00
David Cernat 668cd69768 [General] Implement handling of script records 2019-11-09 21:38:48 +02:00
David Cernat 580ffac3e1 [General] Implement handling of cell records 2019-09-28 13:15:37 +03:00
David Cernat 8124bdc9b0 [General] Implement handling of light records 2019-08-14 21:11:57 +03:00
David Cernat 5da9cb6da6 [CommandHandler] Fix logic for record type validity checks 2019-08-06 09:08:38 +03:00
David Cernat ba8b88c144 [General] Implement handling of tool-related records 2019-08-04 17:54:05 +03:00
David Cernat b576b94dd5 [General] Implement handling of ingredient records 2019-08-03 06:20:21 +03:00
David Cernat 694f57b156 [General] Implement handling of activator and static records 2019-08-01 09:49:56 +03:00
David Cernat b7629c7c56 [General] Implement handling of container and door records 2019-07-27 03:50:21 +03:00
JakobCh d36f095b29 added banList, ipaddresses, players, cells and regions to defaultCommands 2019-06-05 22:58:14 +02:00
JakobCh 35e9e59891 Started moving the default commands over to use the customCommandHooks
That way you can esaly remove/replace the default commands without touching the corescripts
2019-06-05 22:46:53 +02:00
David Cernat 25f1c70daf [General] Use different timescales for day and night 2019-05-01 01:19:35 +03:00
David Cernat 96595c116c [General] Change ToDisk() & FromDisk() into ToDrive() & FromDrive() 2019-04-21 00:54:46 +03:00
David Cernat 3eedd96248 [General] Use the quicker saving method for most objects in most cases
As of now, only players and cells still use the slower saving method, and only when disconnecting or being fully unloaded respectively.

Additionally, rename the Save() and Load() methods into SaveToDisk() and LoadFromDisk() to reduce ambiguity and prevent them from being used all the time by new scripters.
2019-04-14 23:49:03 +03:00
David Cernat 9f79b9c40b [SpeechHelper] Rework speechHelper around easy to add speech collections 2019-03-10 08:19:19 +02:00
David Cernat 88c71dfa6f [CommandHandler] Update function references in locals when using /load 2019-03-10 03:57:15 +02:00
David Cernat dad68f5e1f [CommandHandler] Add /load command for loading scripts on the fly 2019-03-08 04:26:18 +02:00
David Cernat 7df8f10abd [CommandHandler] Add /resetkills command 2019-02-20 20:16:08 +02:00
SchnibbselandGitHub 61e6022eec [commandHandler] Add missing Line break
Adds a line break ( \n ) to a message
2019-02-19 22:11:18 +01:00
David Cernat 70d094d757 [CommandHandler] Explain usage of /speech even when args are missing 2019-02-01 10:00:09 +02:00
David Cernat a69fe54eb9 [CommandHandler] Only allow /fixme to be used in exteriors
Additionally, add color to its associated text.
2018-12-17 14:48:12 +02:00
perfectcolors 27f117316e Prevent non-moderators from using /advancedexample 2018-11-11 04:54:31 -08:00
David Cernat 67ab8f956f [General] Get indexes by value instead of pattern in various places
This prevents Lua pattern operators from having their special meaning in the values searched for, which was especially causing problems when removing certain spells from players.
2018-10-28 03:48:42 +03:00
David Cernat 8d1dfe5aaf [General] Remove unnecessary spaces 2018-10-22 09:16:09 +03:00
David Cernat 743d4ee0a5 [CommandHandler] Don't crash the server when kicking players 2018-10-22 06:42:39 +03:00
David Cernat d6675fa586 [CommandHandler] Clean up determination of invalid input in /storerecord
Additionally, always rcreate any missing storedRecords tables for players using that command.
2018-10-21 00:38:09 +03:00
David Cernat 46698c1d18 [General] Shorten long lines 2018-09-21 04:16:48 +03:00
David Cernat 4dc340480e [General] Change code style by using "not" operator whenever possible 2018-09-21 03:14:24 +03:00
David Cernat 9cd5dc8556 [General] Implement dynamic records, part 2
Records are now split into 2 categories: permanent records and generated records.

Permanent records are kept forever once created and are sent to all players when they join the server.

Generated records are linked to players, cells or other records, are deleted once those links disappear, and are only sent to players who encounter them. For instance, if a player creates hundreds of potions in a house and then drops the potions there, those potion records will only be sent to players who enter that house. If the potions are drunk and there are no longer any instances of them, their associated records are deleted.

By default, permanent records are created by using the /createrecord command after specifically setting an ID for the record about to be created.

Generated records are created through regular gameplay or by using the /createrecord command without specifying an ID for the record.
2018-08-30 03:32:58 +03:00
David Cernat be40d64c28 [CommandHandler] Remove outdated menu for invalid usage of /createrecord 2018-08-28 21:53:26 +03:00
David Cernat c3f4f771cc [General] Rename guiIds into guiHelper 2018-08-27 22:35:19 +03:00
David Cernat 2ab7ec43df [General] Add /regions command to display loaded regions & authorities
Additionally, clean up guiIds.
2018-08-27 22:13:31 +03:00
David Cernat 88d7f47799 [General] Rename settings.admin into settings.staffRank for players 2018-08-27 16:02:02 +03:00
David Cernat a54d498f76 [General] Add server owner rank & commands for promoting/demoting admins
Additionally, remove unused PromoteModerator() method in BasePlayer.
2018-08-27 15:33:27 +03:00
David Cernat 2d18c05c8d [CommandHandler] Don't let /createrecord with too many args go through
I've noticed myself using /createrecord by mistake when I mean to use /storerecord, which sometimes undesirable consequences, hence this change.
2018-08-27 12:22:01 +03:00
David Cernat 1dda9260e2 [CommandHandler] Rework /placeat & /spawnat by allowing spaces in refIds
The downside is that the count and interval arguments have been removed, but they were not very useful anyway.
2018-08-25 10:22:12 +03:00
David Cernat 474450bc5e [General] Use config's generatedRecordIdPrefix for generating record IDs 2018-08-23 04:39:20 +03:00
David Cernat 9ceacbd09b [CommandHandler] Use PacketBuilder in /createrecord
Additionally, insert a shallow copy of a player's storedTable into the record data instead of inserting a direct reference to the storedTable.
2018-08-13 20:57:24 +03:00
David Cernat ed23c1a69f [General] Use consistent capitalization for function names, part 2 2018-08-13 06:38:45 +03:00
David Cernat 19d839e532 [General] Use consistent capitalization for function names 2018-08-13 06:33:17 +03:00
David Cernat 560be9ae93 [CommandHandler] Make it possible to add effects via /storerecord 2018-08-12 01:17:59 +03:00
David Cernat 022f84a6af [General] Use new capitalization for script function that sets AI fight 2018-08-11 18:59:04 +03:00