|
1 | 1 | // tgstation-server DMAPI |
2 | 2 | // The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in IETF RFC 2119. |
3 | 3 |
|
4 | | -#define TGS_DMAPI_VERSION "7.3.0" |
| 4 | +#define TGS_DMAPI_VERSION "7.3.1" |
5 | 5 |
|
6 | 6 | // All functions and datums outside this document are subject to change with any version and should not be relied on. |
7 | 7 |
|
|
58 | 58 | #define TGS_FILE2TEXT_NATIVE file2text |
59 | 59 | #endif |
60 | 60 |
|
| 61 | +// SpacemanDMM compatibility |
| 62 | +#ifndef CAN_BE_REDEFINED |
| 63 | +#define CAN_BE_REDEFINED(X) |
| 64 | +#endif |
| 65 | + |
61 | 66 | // EVENT CODES |
62 | 67 |
|
63 | 68 | /// Before a reboot mode change, extras parameters are the current and new reboot mode enums. |
|
160 | 165 | * * http_handler - Optional user defined [/datum/tgs_http_handler]. |
161 | 166 | */ |
162 | 167 | /world/proc/TgsNew(datum/tgs_event_handler/event_handler, minimum_required_security_level = TGS_SECURITY_ULTRASAFE, datum/tgs_http_handler/http_handler) |
| 168 | + CAN_BE_REDEFINED(TRUE) |
163 | 169 | return |
164 | 170 |
|
165 | 171 | /** |
|
170 | 176 | * This function should not be called before ..() in [/world/proc/New]. |
171 | 177 | */ |
172 | 178 | /world/proc/TgsInitializationComplete() |
| 179 | + CAN_BE_REDEFINED(TRUE) |
173 | 180 | return |
174 | 181 |
|
175 | 182 | /// Consumers MUST run this macro at the start of [/world/proc/Topic]. |
176 | 183 | #define TGS_TOPIC var/tgs_topic_return = TgsTopic(args[1]); if(tgs_topic_return) return tgs_topic_return |
177 | 184 |
|
178 | 185 | /// Consumers MUST call this as late as possible in [world/proc/Reboot] (BEFORE ..()). |
179 | 186 | /world/proc/TgsReboot() |
| 187 | + CAN_BE_REDEFINED(TRUE) |
180 | 188 | return |
181 | 189 |
|
182 | 190 | // DATUM DEFINITIONS |
|
214 | 222 | * Returns [TRUE]/[FALSE] based on if the [/datum/tgs_version] contains wildcards. |
215 | 223 | */ |
216 | 224 | /datum/tgs_version/proc/Wildcard() |
| 225 | + CAN_BE_REDEFINED(TRUE) |
217 | 226 | return |
218 | 227 |
|
219 | 228 | /** |
|
222 | 231 | * other_version - The [/datum/tgs_version] to compare against. |
223 | 232 | */ |
224 | 233 | /datum/tgs_version/proc/Equals(datum/tgs_version/other_version) |
| 234 | + CAN_BE_REDEFINED(TRUE) |
225 | 235 | return |
226 | 236 |
|
227 | 237 | /// Represents a merge of a GitHub pull request. |
|
459 | 469 |
|
460 | 470 | /// Returns the maximum supported [/datum/tgs_version] of the DMAPI. |
461 | 471 | /world/proc/TgsMaximumApiVersion() |
| 472 | + CAN_BE_REDEFINED(TRUE) |
462 | 473 | return |
463 | 474 |
|
464 | 475 | /// Returns the minimum supported [/datum/tgs_version] of the DMAPI. |
465 | 476 | /world/proc/TgsMinimumApiVersion() |
| 477 | + CAN_BE_REDEFINED(TRUE) |
466 | 478 | return |
467 | 479 |
|
468 | 480 | /** |
469 | 481 | * Returns [TRUE] if DreamDaemon was launched under TGS, the API matches, and was properly initialized. [FALSE] will be returned otherwise. |
470 | 482 | */ |
471 | 483 | /world/proc/TgsAvailable() |
| 484 | + CAN_BE_REDEFINED(TRUE) |
472 | 485 | return |
473 | 486 |
|
474 | 487 | // No function below this succeeds if it TgsAvailable() returns FALSE or if TgsNew() has yet to be called. |
|
480 | 493 | * If TGS has not requested a [TGS_REBOOT_MODE_SHUTDOWN] DreamDaemon will be launched again. |
481 | 494 | */ |
482 | 495 | /world/proc/TgsEndProcess() |
| 496 | + CAN_BE_REDEFINED(TRUE) |
483 | 497 | return |
484 | 498 |
|
485 | 499 | /** |
|
490 | 504 | * admin_only: If [TRUE], message will be sent to admin connected chats. Vice-versa applies. |
491 | 505 | */ |
492 | 506 | /world/proc/TgsTargetedChatBroadcast(datum/tgs_message_content/message, admin_only = FALSE) |
| 507 | + CAN_BE_REDEFINED(TRUE) |
493 | 508 | return |
494 | 509 |
|
495 | 510 | /** |
|
500 | 515 | * user: The [/datum/tgs_chat_user] to PM. |
501 | 516 | */ |
502 | 517 | /world/proc/TgsChatPrivateMessage(datum/tgs_message_content/message, datum/tgs_chat_user/user) |
| 518 | + CAN_BE_REDEFINED(TRUE) |
503 | 519 | return |
504 | 520 |
|
505 | 521 | /** |
|
510 | 526 | * channels - Optional list of [/datum/tgs_chat_channel]s to restrict the message to. |
511 | 527 | */ |
512 | 528 | /world/proc/TgsChatBroadcast(datum/tgs_message_content/message, list/channels = null) |
| 529 | + CAN_BE_REDEFINED(TRUE) |
513 | 530 | return |
514 | 531 |
|
515 | 532 | /// Returns the current [/datum/tgs_version] of TGS if it is running the server, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping! |
516 | 533 | /world/proc/TgsVersion() |
| 534 | + CAN_BE_REDEFINED(TRUE) |
517 | 535 | return |
518 | 536 |
|
519 | 537 | /// Returns the running engine type |
520 | 538 | /world/proc/TgsEngine() |
| 539 | + CAN_BE_REDEFINED(TRUE) |
521 | 540 | return |
522 | 541 |
|
523 | 542 | /// Returns the current [/datum/tgs_version] of the DMAPI being used if it was activated, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping! |
524 | 543 | /world/proc/TgsApiVersion() |
| 544 | + CAN_BE_REDEFINED(TRUE) |
525 | 545 | return |
526 | 546 |
|
527 | 547 | /// Returns the name of the TGS instance running the game if TGS is present, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping! |
528 | 548 | /world/proc/TgsInstanceName() |
| 549 | + CAN_BE_REDEFINED(TRUE) |
529 | 550 | return |
530 | 551 |
|
531 | 552 | /// Return the current [/datum/tgs_revision_information] of the running server if TGS is present, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping! |
532 | 553 | /world/proc/TgsRevision() |
| 554 | + CAN_BE_REDEFINED(TRUE) |
533 | 555 | return |
534 | 556 |
|
535 | 557 | /// Returns the current BYOND security level as a TGS_SECURITY_ define if TGS is present, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping! |
536 | 558 | /world/proc/TgsSecurityLevel() |
| 559 | + CAN_BE_REDEFINED(TRUE) |
537 | 560 | return |
538 | 561 |
|
539 | 562 | /// Returns the current BYOND visibility level as a TGS_VISIBILITY_ define if TGS is present, null otherwise. Requires TGS to be using interop API version 5 or higher otherwise the string "___unimplemented" wil be returned. This function may sleep if the call to [/world/proc/TgsNew] is sleeping! |
540 | 563 | /world/proc/TgsVisibility() |
| 564 | + CAN_BE_REDEFINED(TRUE) |
541 | 565 | return |
542 | 566 |
|
543 | 567 | /// Returns a list of active [/datum/tgs_revision_information/test_merge]s if TGS is present, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping! |
544 | 568 | /world/proc/TgsTestMerges() |
| 569 | + CAN_BE_REDEFINED(TRUE) |
545 | 570 | return |
546 | 571 |
|
547 | 572 | /// Returns a list of connected [/datum/tgs_chat_channel]s if TGS is present, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping! |
548 | 573 | /world/proc/TgsChatChannelInfo() |
| 574 | + CAN_BE_REDEFINED(TRUE) |
549 | 575 | return |
550 | 576 |
|
551 | 577 | /** |
|
556 | 582 | * wait_for_completion - If set, this function will not return until the event has run to completion. |
557 | 583 | */ |
558 | 584 | /world/proc/TgsTriggerEvent(event_name, list/parameters, wait_for_completion = FALSE) |
| 585 | + CAN_BE_REDEFINED(TRUE) |
559 | 586 | return |
560 | 587 |
|
561 | 588 | /* |
|
0 commit comments