-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
125 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,3 @@ | |
|
||
#define PREFIX "[Entity manager] " | ||
#define CONSOLE 0 | ||
|
||
enum MessageType { | ||
MessageType_Reply, | ||
MessageType_Log | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,89 @@ | ||
void Message_EntityNotFound(int client) { | ||
void MessageReply_EntityNotFound(int client) { | ||
ReplyToCommand(client, "%s%t", PREFIX, "Entity not found"); | ||
} | ||
|
||
void Message_EntityAlreadyHasAction(int client, int entity) { | ||
void MessageReply_EntityAlreadyHasAction(int client, int entity) { | ||
ReplyToCommand(client, "%s%t", PREFIX, "Entity already has an action", entity); | ||
} | ||
|
||
void Message_EntityNotFrozen(int client, int entity) { | ||
void MessageReply_EntityNotFrozen(int client, int entity) { | ||
ReplyToCommand(client, "%s%t", PREFIX, "Entity not frozen", entity); | ||
} | ||
|
||
void Message_EntityNotDeleted(int client, int entity) { | ||
void MessageReply_EntityNotDeleted(int client, int entity) { | ||
ReplyToCommand(client, "%s%t", PREFIX, "Entity not deleted", entity); | ||
} | ||
|
||
void Message_EntityFrozen(int client, int entity, MessageType type = MessageType_Reply) { | ||
if (type == MessageType_Reply) { | ||
ReplyToCommand(client, "%s%t", PREFIX, "Entity has been frozen", entity); | ||
} else if (type == MessageType_Log) { | ||
LogMessage("\"%L\" froze entity %d", client, entity); | ||
} | ||
void MessageActivity_EntityFrozen(int client, int entity) { | ||
ShowActivity2(client, PREFIX, "%t", "Entity has been frozen", entity); | ||
} | ||
|
||
void Message_EntityUnfrozen(int client, int entity, MessageType type = MessageType_Reply) { | ||
if (type == MessageType_Reply) { | ||
ReplyToCommand(client, "%s%t", PREFIX, "Entity has been unfrozen", entity); | ||
} else if (type == MessageType_Log) { | ||
LogMessage("\"%L\" unfroze entity %d", client, entity); | ||
} | ||
void MessageLog_EntityFrozen(int client, int entity) { | ||
LogMessage("\"%L\" froze entity %d", client, entity); | ||
} | ||
|
||
void Message_EntityDeleted(int client, int entity, MessageType type = MessageType_Reply) { | ||
if (type == MessageType_Reply) { | ||
ReplyToCommand(client, "%s%t", PREFIX, "Entity deleted", entity); | ||
} else if (type == MessageType_Log) { | ||
LogMessage("\"%L\" deleted entity %d", client, entity); | ||
} | ||
void MessageActivity_EntityUnfrozen(int client, int entity) { | ||
ShowActivity2(client, PREFIX, "%t", "Entity has been unfrozen", entity); | ||
} | ||
|
||
void Message_EntityRestored(int client, int entity, MessageType type = MessageType_Reply) { | ||
if (type == MessageType_Reply) { | ||
ReplyToCommand(client, "%s%t", PREFIX, "Entity restored", entity); | ||
} else if (type == MessageType_Log) { | ||
LogMessage("\"%L\" restored entity %d", client, entity); | ||
} | ||
void MessageLog_EntityUnfrozen(int client, int entity) { | ||
LogMessage("\"%L\" unfroze entity %d", client, entity); | ||
} | ||
|
||
void Message_ListOfEntitiesCleared(int client, MessageType type = MessageType_Reply) { | ||
if (type == MessageType_Reply) { | ||
ReplyToCommand(client, "%s%t", PREFIX, "List of entities cleared"); | ||
} else if (type == MessageType_Log) { | ||
LogMessage("\"%L\" cleared the list of entities", client); | ||
} | ||
void MessageActivity_EntityDeleted(int client, int entity) { | ||
ShowActivity2(client, PREFIX, "%t", "Entity has been deleted", entity); | ||
} | ||
|
||
void Message_EntitiesSaved(int client, int entitiesAmount, MessageType type = MessageType_Reply) { | ||
if (type == MessageType_Reply) { | ||
ReplyToCommand(client, "%s%t", PREFIX, "Entities saved", entitiesAmount); | ||
} else if (type == MessageType_Log) { | ||
LogMessage("\"%L\" saved %d entities", client, entitiesAmount); | ||
} | ||
void MessageLog_EntityDeleted(int client, int entity) { | ||
LogMessage("\"%L\" deleted entity %d", client, entity); | ||
} | ||
|
||
void MessageActivity_EntityRestored(int client, int entity) { | ||
ShowActivity2(client, PREFIX, "%t", "Entity has been restored", entity); | ||
} | ||
|
||
void MessageLog_EntityRestored(int client, int entity) { | ||
LogMessage("\"%L\" restored entity %d", client, entity); | ||
} | ||
|
||
void MessageActivity_ListOfEntitiesCleared(int client) { | ||
ShowActivity2(client, PREFIX, "%t", "List of entities cleared"); | ||
} | ||
|
||
void Message_NoEntitiesForLoading(int client, MessageType type = MessageType_Reply) { | ||
if (type == MessageType_Reply) { | ||
void MessageLog_ListOfEntitiesCleared(int client) { | ||
LogMessage("\"%L\" cleared the list of entities", client); | ||
} | ||
|
||
void MessageActivity_EntitiesSaved(int client, int entitiesAmount) { | ||
ShowActivity2(client, PREFIX, "%t", "Entities saved", entitiesAmount); | ||
} | ||
|
||
void MessageLog_EntitiesSaved(int client, int entitiesAmount) { | ||
LogMessage("\"%L\" saved %d entities", client, entitiesAmount); | ||
} | ||
|
||
void MessageReply_NoEntitiesForLoading(int client) { | ||
if (client != CONSOLE) { | ||
ReplyToCommand(client, "%s%t", PREFIX, "No entities for loading"); | ||
} else if (type == MessageType_Log && client == CONSOLE) { | ||
} | ||
} | ||
|
||
void MessageLog_NoEntitiesForLoading(int client) { | ||
if (client == CONSOLE) { | ||
LogMessage("No entities for this map"); | ||
} | ||
} | ||
|
||
void Message_EntitiesLoaded(int client, int entitiesAmount, MessageType type = MessageType_Reply) { | ||
if (type == MessageType_Reply) { | ||
ReplyToCommand(client, "%s%t", PREFIX, "Entities loaded", entitiesAmount); | ||
} else if (type == MessageType_Log) { | ||
if (client == CONSOLE) { | ||
LogMessage("Loaded %d entities", entitiesAmount); | ||
} else { | ||
LogMessage("\"%L\" loaded %d entities", client, entitiesAmount); | ||
} | ||
void MessageActivity_EntitiesLoaded(int client, int entitiesAmount) { | ||
if (client != CONSOLE) { | ||
ShowActivity2(client, PREFIX, "%t", "Entities loaded", entitiesAmount); | ||
} | ||
} | ||
|
||
void MessageLog_EntitiesLoaded(int client, int entitiesAmount) { | ||
if (client == CONSOLE) { | ||
LogMessage("Loaded %d entities", entitiesAmount); | ||
} else { | ||
LogMessage("\"%L\" loaded %d entities", client, entitiesAmount); | ||
} | ||
} |
Oops, something went wrong.